/* === Fonts (self-hosted) === */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/eb-garamond-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/eb-garamond-latin-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0f;
  --text: #f5f0e8;
  --text-dim: #a09a8e;
  --accent: #c9a84c;
  --accent-dim: rgba(201, 168, 76, 0.3);
  --surface: rgba(245, 240, 232, 0.04);
  --border: rgba(245, 240, 232, 0.08);
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* === Constellation Canvas === */
#constellation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* === Hero === */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 1.2s ease-out 0.3s forwards;
}

.hero-thesis {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 40ch;
  opacity: 0;
  animation: fadeUp 1.2s ease-out 0.8s forwards;
}

/* === Manifesto === */
.manifesto {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}

.manifesto-inner {
  max-width: 600px;
  margin: 0 auto;
}

.manifesto-inner p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.9;
  margin-bottom: 2.5rem;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.manifesto-inner p.visible {
  opacity: 1;
  transform: translateY(0);
}

.manifesto-inner p:last-child {
  margin-bottom: 0;
}

/* === The Ask === */
.the-ask {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem 2rem;
  text-align: center;
}

.the-ask p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  color: var(--text);
  line-height: 1.8;
  max-width: 36ch;
  margin: 0 auto;
}

/* === Application Form === */
.application {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem 6rem;
  max-width: 520px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.8rem;
}

.form-group label {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  padding: 0.75rem 1rem;
  transition: border-color 0.3s ease, background 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-dim);
  background: rgba(245, 240, 232, 0.06);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #8b3a3a;
}

.form-group textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.form-actions {
  margin-top: 2.5rem;
  text-align: center;
}

button[type="submit"] {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  padding: 0.75rem 3rem;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

button[type="submit"]:hover {
  border-color: var(--accent);
  color: var(--accent);
}

button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-message {
  text-align: center;
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
}

.form-message.success {
  color: var(--text-dim);
}

.form-message.error {
  color: #c97a4c;
}

/* === Footer === */
.footer {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-lineage {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-dim);
  opacity: 0.6;
  max-width: 40ch;
  margin: 0 auto 1.5rem;
}

.footer-legal {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.4;
  letter-spacing: 0.02em;
}

.footer-legal a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.footer-legal a:hover {
  border-bottom-color: var(--text-dim);
}

/* === Privacy Page === */
.privacy {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}

.privacy-back {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.privacy-back:hover {
  opacity: 1;
}

.privacy h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
  margin: 2rem 0 0.5rem;
}

.privacy-updated {
  font-size: 0.8rem;
  color: var(--text-dim);
  opacity: 0.5;
  margin-bottom: 3rem;
}

.privacy h2 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 2.5rem 0 0.75rem;
  color: var(--text);
}

.privacy p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.privacy ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
}

.privacy ul li {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.8;
  padding-left: 1.2rem;
  position: relative;
}

.privacy ul li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.privacy a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.3s ease;
}

.privacy a:hover {
  border-bottom-color: var(--accent);
}

/* === Animations === */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Responsive === */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .hero {
    min-height: 85vh;
    padding: 2rem 1.5rem;
  }

  .manifesto {
    padding: 4rem 1.5rem;
  }

  .application {
    padding: 2rem 1.5rem 5rem;
  }

  .manifesto-inner p {
    margin-bottom: 2rem;
  }
}
