/* ==========================================================================
   BUCARESDAVA — The City Underneath
   Pre-launch landing page. Mobile-first, no dependencies.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* Palette: near-black ground, stone and wet-earth mid tones, one warm accent. */
  --bg:            #0b0b0c;
  --bg-deep:       #070708;
  --bg-raised:     #121213;
  --earth:         #1a1614;
  --border-field:  #6a6862;   /* 3.5:1 against the field — WCAG 1.4.11 */
  --smoke:         #4a4a47;
  --bluegrey:      #7f8b92;
  --ink:           #e9e5dd;
  --ink-soft:      #b6b1a7;
  --ink-faint:     #8b877e;
  --amber:         #d69a4e;
  --amber-bright:  #e6b06a;

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shell: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(4.5rem, 12vw, 9rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --reveal-shift: 14px;
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
/* Author display rules would otherwise beat the UA sheet's [hidden]. */
[hidden] { display: none !important; }
img { height: auto; }
button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }
main:focus, section:focus, .signup-status:focus { outline: none; }

::selection { background: rgba(214, 154, 78, 0.28); color: var(--ink); }

/* --- Utilities ------------------------------------------------------------ */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  transform: translateY(-160%);
  padding: 0.6rem 1rem;
  background: var(--amber);
  color: #14100a;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 2px;
}
.skip-link:focus { transform: translateY(0); }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
              backdrop-filter 0.4s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(9, 9, 10, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}

.wordmark-mark {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--amber);
  flex: none;
  transition: color 0.3s var(--ease);
}
.wordmark:hover .wordmark-mark { color: var(--amber-bright); }

.wordmark-text {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 3.4vw, 1.2rem);
  font-weight: 500;
  letter-spacing: clamp(0.09em, 0.5vw, 0.16em);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.6vw, 1.65rem);
}

.nav-link {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link--join { color: var(--amber); }
.nav-link--join:hover { color: var(--amber-bright); }

/* The page is short: on narrow screens keep only the conversion link. */
@media (max-width: 33.75em) {
  .nav-link--secondary { display: none; }
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: clamp(0.5rem, 2vw, 1rem);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

/* One of the pair links to the other site; the current language is not a link. */
.lang-link {
  padding: 0.2rem 0.1rem;
  color: var(--ink-faint);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
a.lang-link:hover { color: var(--ink-soft); }
.lang-link[aria-current="page"] { color: var(--ink); }

.lang-sep { color: var(--smoke); font-size: 0.7rem; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 8rem clamp(4rem, 14vh, 7.5rem);
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-media {
  position: absolute;
  inset: -6% 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  opacity: 0.62;
  filter: saturate(0.72) contrast(1.04);
  will-change: transform;
}

/* Restrained gradient wash: keeps every line of type above 7:1 contrast. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom,
      rgba(7, 7, 8, 0.86) 0%,
      rgba(7, 7, 8, 0.5) 26%,
      rgba(7, 7, 8, 0.72) 62%,
      rgba(11, 11, 12, 0.97) 100%),
    radial-gradient(120% 80% at 50% 100%, rgba(26, 22, 20, 0.7), transparent 70%);
}

.hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 8rem;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

@media (max-height: 34em) {
  .hero { padding-block: 5.5rem 3rem; }
}

.hero-inner { position: relative; }

.eyebrow {
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-title { margin-top: 1.1rem; font-weight: 300; }

/* One 12-character word: the coefficient keeps it inside the gutters at every
   width down to 320px, so it never needs to be clipped or hyphenated. */
.hero-title-main {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 11.5vw, 7rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: 0.02em;
}

.hero-title-sub {
  display: block;
  margin-top: clamp(0.5rem, 1.6vw, 0.9rem);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 4.2vw, 1.7rem);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-hook {
  max-width: 34ch;
  margin-top: clamp(1.75rem, 5vw, 2.75rem);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5.4vw, 2.1rem);
  font-weight: 300;
  line-height: 1.28;
  text-wrap: balance;
}

.hero-lede {
  max-width: 46ch;
  margin-top: 1.1rem;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  line-height: 1.72;
}

.hero-actions { margin-top: clamp(2rem, 5vw, 2.75rem); }

.hero-note {
  margin-top: 1rem;
  color: var(--ink-faint);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 2rem;
  border: 1px solid var(--amber);
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease);
}

.btn--primary {
  background: transparent;
  color: var(--amber-bright);
}
.btn--primary:hover {
  background: var(--amber);
  color: #17120a;
}

.btn--submit { width: 100%; }

.btn[aria-disabled="true"],
.btn:disabled {
  cursor: progress;
  opacity: 0.6;
}
.btn[aria-disabled="true"]:hover,
.btn:disabled:hover {
  background: transparent;
  color: var(--amber-bright);
}

/* --- Descent / strata ----------------------------------------------------- */
.strata {
  position: relative;
  padding-block: clamp(5rem, 16vw, 10rem);
  background:
    linear-gradient(to bottom, var(--bg) 0%, var(--earth) 55%, var(--bg) 100%);
  overflow: hidden;
}

/* Faint stratigraphy: horizontal bands, like a section cut through ground. */
.strata::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.022) 0px,
    rgba(255, 255, 255, 0.022) 1px,
    transparent 1px,
    transparent 34px);
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 65%, transparent);
  pointer-events: none;
}

/* The Dâmbovița, reduced to a line. */
.strata-river {
  position: absolute;
  inset: auto 0 14% 0;
  color: var(--bluegrey);
  opacity: 0.3;
  pointer-events: none;
}
.strata-river svg { width: 100%; height: clamp(90px, 20vw, 220px); }

.strata-inner { position: relative; }

.strata-lines {
  max-width: 30ch;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.6rem);
  font-weight: 300;
  line-height: 1.34;
  text-wrap: balance;
}
.strata-lines span { display: block; }
.strata-lines span + span { color: var(--ink-soft); }
.strata-lines span:last-child { color: var(--ink-faint); }

/* --- Sections ------------------------------------------------------------- */
.section { padding-block: var(--section-y); }

.section-label {
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-title {
  max-width: 22ch;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 7vw, 3.1rem);
  font-weight: 300;
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.prose {
  max-width: 56ch;
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.6vw, 1.08rem);
  line-height: 1.78;
}
.prose p + p { margin-top: 1.1rem; }

/* Historical layers, stacked like strata. */
.layers {
  margin-top: clamp(2.5rem, 7vw, 4rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.layers li {
  display: grid;
  gap: 0.15rem 2rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.layer-era {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.layer-text {
  color: var(--ink-faint);
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (min-width: 40em) {
  .layers li { grid-template-columns: 15rem 1fr; align-items: baseline; }
}

/* --- Divider -------------------------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: min(var(--shell), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.divider-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.14), transparent);
}

.divider-mark {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--smoke);
  flex: none;
}

/* --- The object -------------------------------------------------------------- */
.object {
  background:
    radial-gradient(70% 55% at 50% 45%, rgba(214, 154, 78, 0.06), transparent 72%),
    linear-gradient(to bottom, var(--bg), var(--bg-deep));
}

.object-grid {
  display: grid;
  gap: clamp(2.5rem, 8vw, 4.5rem);
  align-items: center;
}

.object-figure { position: relative; }

.object-figure img {
  width: min(100%, 22rem);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 26px 46px rgba(0, 0, 0, 0.72));
}

.object-figure figcaption {
  margin-top: 1.5rem;
  color: var(--ink-faint);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-align: center;
}

.object-lines {
  max-width: 46ch;
  margin-top: clamp(1.5rem, 4vw, 2rem);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 3.4vw, 1.38rem);
  font-weight: 300;
  line-height: 1.5;
}
.object-lines span { display: block; }
.object-lines span:last-child { margin-top: 0.6rem; color: var(--ink); }

@media (min-width: 48em) {
  .object-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); }
  .object-figure figcaption { text-align: left; }
  .object-figure img { margin-inline: 0; }
}

/* --- Sign-up -------------------------------------------------------------- */
.join {
  background:
    linear-gradient(to bottom, var(--bg-deep), var(--bg) 45%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Left-aligned like every other section: the page reads as one descending column. */

.join-lede {
  max-width: 50ch;
  margin-top: clamp(1.25rem, 3.5vw, 1.75rem);
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 2.6vw, 1.05rem);
  line-height: 1.76;
}

.signup-panel {
  max-width: 34rem;
  margin-top: clamp(2rem, 5vw, 2.75rem);
  padding: clamp(1.25rem, 4vw, 1.85rem);
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 3px;
}

.signup {
  display: grid;
  gap: 0.9rem;
}

.field { display: grid; gap: 0.5rem; }

.field-label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  background: #0a0a0b;
  border: 1px solid var(--border-field);
  border-radius: 2px;
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.field-input::placeholder { color: #6c6862; }
.field-input:hover { border-color: var(--ink-faint); }
.field-input:focus { border-color: var(--amber); }
.field-input[aria-invalid="true"] { border-color: #b4603f; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.signup-status:empty { display: none; }
/* Once the fields are gone the message stands alone inside the panel. */
.signup[hidden] + .signup-status { margin-top: 0; }
.signup-status[data-state="error"] { color: #e3906c; }
.signup-status[data-state="success"] {
  color: var(--amber-bright);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.6vw, 1.4rem);
  letter-spacing: 0.02em;
}
.signup-status[data-state="loading"] { color: var(--ink-faint); }

.signup-privacy {
  margin-top: 0.9rem;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

@media (min-width: 34em) {
  .signup {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .btn--submit { width: auto; }
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  padding-block: clamp(3rem, 8vw, 4.5rem);
  background: var(--bg-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.footer-sub {
  margin-top: 0.35rem;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.1em;
}

.footer-meta {
  display: grid;
  gap: 0.4rem;
  color: var(--ink-faint);
  font-size: 0.8rem;
}
.footer-dot { padding-inline: 0.4rem; }

.footer-social { display: flex; gap: 0.75rem; }

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -0.6rem;
  color: var(--ink-faint);
  border-radius: 2px;
  transition: color 0.25s var(--ease);
}
.social-link:hover { color: var(--amber); }
.social-icon { width: 1.35rem; height: 1.35rem; }

@media (min-width: 48em) {
  .footer-inner {
    grid-template-columns: 1fr auto auto;
    align-items: end;
    gap: 3rem;
  }
  .footer-meta { justify-items: end; text-align: right; }
  .footer-social { align-self: end; }
  .social-link { margin-left: 0; }
}

/* --- Motion --------------------------------------------------------------- */
/* Reveals only apply once JS is running, so the page is complete without it. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition:
    opacity 0.9s var(--ease) calc(var(--d, 0) * 90ms),
    transform 0.9s var(--ease) calc(var(--d, 0) * 90ms);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js [data-reveal],
  .js [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-media img { transform: none !important; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Print ---------------------------------------------------------------- */
@media print {
  .site-header, .hero-media, .signup, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
