:root {
  --cream: #f4eee3;
  --panel: #ffffff;
  --ink: #211c18;
  --ink-soft: #5f5850;
  --muted: #756c62;
  --rust: #a45f3d;
  --rust-dark: #8a5230;
  --border: #d7ccbe;
  --footer-bg: #17130f;
  --footer-text: #d9d1c6;
  --error: #b3453b;
  --copy-column: 460px;
  --phone-column: 360px;
  --hero-gap: 120px;
  --phone-visual-shift: 5px;
  --footer-image-edge-adjust: -12px;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
}

a {
  color: var(--rust);
}

/* ---- Home page ---- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

.hero {
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  padding: 54px 0 42px;
}

.hero-inner {
  width: min(calc(var(--copy-column) + var(--hero-gap) + var(--phone-column)), calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--copy-column) var(--phone-column);
  column-gap: var(--hero-gap);
  align-items: center;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }
}

.hero-text {
  max-width: 460px;
}

.wordmark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.7rem, 5vw, 4.1rem);
  color: var(--rust);
  margin: 0 0 0.5rem;
}

.word-entry {
  max-width: 22rem;
  margin: 0 0 1.75rem;
}

.word-entry__headword {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.word-entry__phonetic {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--muted);
}

.word-entry__def {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 22rem;
}

h1 {
  max-width: 450px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(48px, 4vw, 60px);
  line-height: 0.97;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}

.hero-subtext {
  max-width: 520px;
  margin: 1.2rem 0 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-soft);
  white-space: nowrap;
}

.divider {
  display: block;
  width: 46px;
  height: 1.5px;
  background: var(--rust);
  margin: 1.5rem 0 1.375rem;
}

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--rust);
  margin: 0 0 0.7rem;
}

form {
  margin: 0;
}

.field-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

input[type="email"] {
  width: 300px;
  height: 3.5rem;
  padding: 0 1rem;
  margin-left: calc(-1rem - 1px);
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

input[type="email"]:focus-visible {
  border-color: #58f0a7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(88, 240, 167, 0.24);
}

button {
  height: 3.5rem;
  min-width: 150px;
  padding: 0 1.7rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
}

button:hover:not(:disabled) {
  background: #342b25;
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cf-turnstile {
  margin-top: 0.75rem;
}

.helper-text {
  margin: 0.7rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.form-status {
  margin-top: 0.45rem;
  min-height: 1.1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.form-status[data-state="error"] {
  color: var(--error);
}

.signup-confirmation {
  max-width: 26rem;
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.5;
  color: #277c55;
}

/* ---- Phone mockup (shows public/images/closet.jpg, cropped to the frame) ---- */

.hero-visual {
  display: flex;
  justify-content: center;
  overflow: visible;
  transform: translateX(var(--phone-visual-shift));
}

.phone-frame {
  position: relative;
  width: min(350px, 80vw);
  aspect-ratio: 9 / 19;
  background: #0d0c0a;
  border-radius: 2.6rem;
  padding: 12px;
  box-shadow:
    0 18px 40px rgba(37, 29, 23, 0.16),
    0 4px 12px rgba(37, 29, 23, 0.12);
  overflow: visible;
  /* The mockup is decorative, so taps on it shouldn't do anything. Without this,
     iOS Safari treats a double-tap here as zoom-to-fit and jumps the page. Scoped
     to the frame on purpose — pinch-zoom still works everywhere, including here. */
  touch-action: manipulation;
}

.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  background: #0d0c0a;
  border-radius: 12px;
  z-index: 2;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2rem;
  overflow: visible;
  background: linear-gradient(180deg, #efe6d6 0%, #efe6d6 42%, #c9b28c 42%, #a68d67 100%);
  /* Lets the caption size itself off the phone's actual rendered width
     (container query units), instead of the page viewport — the phone is
     never full page-width, so vw-based sizing overflowed/clipped words. */
  container-type: inline-size;
}

.scene {
  position: absolute;
  inset: 0;
}

.scene::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.08;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.55) 0 0.7px, transparent 0.8px),
    radial-gradient(circle at 70% 65%, rgba(23, 19, 15, 0.35) 0 0.6px, transparent 0.7px);
  background-size: 5px 5px, 7px 7px;
  mix-blend-mode: overlay;
}

.scene-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Fills the portrait phone frame from a landscape source, cropping the
     sides. object-position controls which vertical slice of the rack shows. */
  object-fit: cover;
  object-position: 50% 56%;
  display: block;
  clip-path: inset(0 round 2rem);
  filter: contrast(1.07) saturate(0.9) brightness(0.99);
  transform: scale(1.12);
  transform-origin: 50% 54%;
  /* iOS gives any <img> a long-press callout ("Save Image") that lifts and scales
     a preview out of the frame. Nothing here is meant to be interactive. */
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.scene-caption {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 45%;
  width: 150%;
  transform: translate(-50%, -50%) rotate(-3deg);
  text-align: center;
  color: #58f0a7;
  pointer-events: none;
  font-family: "Snell Roundhand", "Brush Script MT", "Segoe Script", cursive;
  font-weight: 700;
  font-size: clamp(3.5rem, 5vw, 5.8rem);
  line-height: 0.8;
  -webkit-text-stroke: 1.25px #291827;
  paint-order: stroke fill;
  text-shadow:
    2px 2px 0 #3b44f6,
    0 7px 14px rgba(25, 18, 23, 0.14);
}

.scene-caption span {
  display: block;
  white-space: nowrap;
}

.scene-caption span:first-child {
  transform: translateX(-14px);
}

.scene-caption span + span {
  margin-top: -0.06em;
  transform: translateX(6px);
}

@media (max-width: 700px) {
  .scene-caption {
    top: 46%;
    width: 118%;
    font-size: clamp(2.5rem, 18cqw, 3.25rem);
  }

  .scene-caption span:first-child {
    transform: translateX(-6px);
  }

  .scene-caption span + span {
    transform: translateX(4px);
  }
}

/* ---- Footer ---- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  min-height: 58px;
  display: flex;
  align-items: center;
}

.footer-grid {
  width: min(calc(var(--copy-column) + var(--hero-gap) + var(--phone-column)), calc(100% - 64px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--copy-column) var(--phone-column);
  column-gap: var(--hero-gap);
  align-items: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-left,
.footer-right {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: nowrap;
}

.footer-left {
  grid-column: 1;
  justify-self: start;
}

.footer-right {
  grid-column: 2;
  justify-self: end;
  transform: translateX(var(--footer-image-edge-adjust));
}

@media (max-width: 700px) {
  .hero {
    min-height: auto;
    padding: 3rem 0 2.5rem;
  }

  .hero-inner {
    width: min(calc(100% - 40px), 640px);
    grid-template-columns: 1fr;
    row-gap: 2.75rem;
  }

  .hero-text {
    max-width: 100%;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.5rem, 10.5vw, 3.25rem);
  }

  .hero-subtext {
    max-width: 100%;
    white-space: normal;
  }

  .hero-visual {
    transform: none;
  }

  .phone-frame {
    width: min(280px, 74vw);
  }

  .field-row {
    width: 100%;
    max-width: 450px;
  }

  input[type="email"] {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    margin-left: 0;
  }

  button {
    width: auto;
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  .footer-grid {
    width: calc(100% - 40px);
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
  }

  .footer-right {
    transform: none;
  }
}

@media (max-width: 640px) {
  .hero-text {
    text-align: center;
  }

  .word-entry,
  .word-entry__def,
  h1,
  .hero-subtext,
  .field-row,
  .signup-confirmation {
    margin-left: auto;
    margin-right: auto;
  }

  .divider {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 520px) {
  .field-row {
    flex-direction: column;
  }

  input[type="email"],
  button {
    width: 100%;
  }

  .site-footer {
    min-height: 58px;
    justify-content: center;
  }

  .footer-left,
  .footer-right {
    white-space: nowrap;
  }
}

/* ---- Doc pages (privacy.html) ---- */

.doc-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4rem) 1.5rem;
}

.wrap {
  width: 100%;
}

.wrap--doc {
  max-width: 34rem;
  margin: 0 auto;
  text-align: left;
}

.wrap--doc h1 {
  font-size: 2.2rem;
  margin: 0 0 1rem;
}

.wrap--doc p,
.wrap--doc li {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.95rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
