/* Next Date Night: the public site. Same look as the app: midnight, square
   edges, Big Shoulders Display for titles, Figtree for everything else.
   Pink is used sparingly, for the heart. */

/* Self-hosted (no request to Google): variable fonts, Latin subset. */
@font-face {
  font-family: 'Big Shoulders Display';
  src: url('/fonts/big-shoulders-display.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --bg: #0e1226;
  --surface: #171c36;
  --border: #262c4a;
  --text: #f2eef6;
  --muted: #9aa0bd;
  --body: #b8bdd6;
  --pink: #ff4f8b;
  --gutter: 20px;
  --max: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-underline-offset: 0.18em; }

/* The parts the browser draws, in our colours. */
::selection { background: var(--pink); color: var(--bg); }
html { scrollbar-color: var(--border) var(--bg); }
input { caret-color: var(--pink); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.display {
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.94;
}

/* Header */
header { border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 26px; }
.brand svg { flex: none; }
.nav-links { display: flex; gap: 20px; font-weight: 600; font-size: 16px; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 64px; }
.kicker { color: var(--muted); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1 { font-size: clamp(56px, 13vw, 128px); margin: 14px 0 22px; }
.hero p.lead { font-size: clamp(19px, 2.4vw, 23px); color: var(--body); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 26px; text-decoration: none;
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif; font-weight: 800;
  text-transform: uppercase; font-size: 22px; letter-spacing: 0.04em;
  border: 1px solid var(--text);
}
.button.primary { background: var(--text); color: var(--bg); }
.button.secondary { background: transparent; color: var(--text); border-color: var(--muted); }
.button:focus-visible, a:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

.note { color: var(--muted); font-size: 15px; margin-top: 14px; }

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--border); }
section h2 { font-size: clamp(40px, 7vw, 68px); margin-bottom: 28px; }

.steps { display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); padding: 24px; }
.step .n { font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif; font-weight: 800; font-size: 44px; color: var(--muted); line-height: 1; }
.step h3 { font-size: 20px; margin: 10px 0 6px; }
.step p { color: var(--body); font-size: 17px; }

.promises { list-style: none; display: grid; gap: 14px; }
.promises li { display: flex; gap: 14px; align-items: flex-start; font-size: 18px; }
.promises li::before { content: ''; flex: none; width: 14px; height: 2px; background: var(--muted); margin-top: 14px; }

.split { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); padding: 28px; }
.panel h3 { font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif; font-weight: 800; text-transform: uppercase; font-size: 32px; line-height: 1; margin-bottom: 12px; }
.panel p { color: var(--body); }

.heart { color: var(--pink); }

footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--muted); font-size: 15px; }
footer .row { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .hero { padding: 104px 0 88px; }
}

@media (max-width: 420px) {
  .nav-links { gap: 14px; font-size: 15px; }
  .brand { font-size: 22px; }
}


/* ==========================================================================
   Homepage (index.html): the wall of nights out, with the sign-up pinned in.
   ========================================================================== */

.home header { position: relative; z-index: 2; background: var(--bg); }

/* The wall: 8 photos in an uneven 4-column grid, the panel over its left.
   The photos' filter paints them above ordinary flow, so the panel is lifted. */
.wall { position: relative; min-height: calc(100svh - 69px); display: grid; padding: 0; border-top: 0; }
.mosaic {
  grid-area: 1 / 1;
  display: grid;
  gap: 3px;
  background: var(--bg);
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 19svh);
  min-height: 0;
}
.mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; filter: brightness(0.78) saturate(1.05); }
/* Phones: six photos, the faceless close-ups left out. */
.mosaic .t2, .mosaic .t4 { display: none; }

.pin { grid-area: 2 / 1; position: relative; z-index: 1; background: var(--bg); padding: 32px var(--gutter) 40px; }
.pin h1 { font-size: clamp(52px, 13.5vw, 96px); letter-spacing: -0.01em; text-wrap: balance; }
.promise { color: var(--body); font-size: 19px; margin: 18px 0 10px; max-width: 34em; }
.where { color: var(--text); font-weight: 600; font-size: 16px; }

.join { margin-top: 24px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* The display rule below would otherwise beat the hidden attribute (the "Which town?" box showed for everyone). */
.fields [hidden] { display: none !important; }
.fields label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.fields .wide { grid-column: 1 / -1; }
.fields input {
  min-height: 52px; padding: 0 14px; width: 100%;
  background: transparent; color: var(--text); font: 600 17px/1 'Figtree', system-ui, sans-serif;
  border: 1px solid var(--muted); border-radius: 0;
}
.fields select {
  min-height: 52px; padding: 0 40px 0 14px; width: 100%; appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%239aa0bd' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--text); font: 600 17px/1 'Figtree', system-ui, sans-serif;
  border: 1px solid var(--muted); border-radius: 0;
}
.fields select option { background: var(--surface); color: var(--text); }
.fields select:hover { border-color: var(--body); }
.fields select:focus { outline: 3px solid var(--pink); outline-offset: 2px; border-color: var(--text); }
.fields input::placeholder { color: var(--muted); font-weight: 400; }
.fields input:hover { border-color: var(--body); }
.fields input:focus { outline: 3px solid var(--pink); outline-offset: 2px; border-color: var(--text); }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.join-button, .join-link {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 60px; margin-top: 14px; border: 0; border-radius: 0; cursor: pointer; text-decoration: none;
  background: var(--pink); color: var(--bg);
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif; font-weight: 800;
  font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase;
  transition: background-color 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.join-button:hover, .join-link:hover { background: #ff6b9e; }
.join-button:focus-visible, .join-link:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.join-button:disabled { background: var(--border); color: var(--muted); cursor: progress; }
.small { color: var(--muted); font-size: 14px; margin-top: 10px; }
.small.error { color: var(--text); }
.small.error::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--text); margin-right: 8px; }

.joined { margin-top: 24px; padding: 24px; border: 1px solid var(--pink); }
.joined:focus { outline: none; }
.joined-title { font-size: 40px; margin: 10px 0 6px; }
.joined p:last-child { color: var(--body); }

.stores { display: flex; gap: 10px; margin-top: 18px; }
.store {
  flex: 1; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px;
  border: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: border-color 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.store:hover { border-color: var(--muted); }
.store span { display: grid; line-height: 1.15; font-weight: 700; font-size: 17px; }
.store small { font-weight: 400; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

@media (min-width: 900px) {
  /* A definite height, so the photo rows share the screen, not their photos' own sizes. */
  .wall { height: max(680px, calc(100svh - 69px)); min-height: 0; }
  .mosaic {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
    height: 100%;
  }
  .mosaic .t2, .mosaic .t4 { display: block; }
  .mosaic .t3 { object-position: center 30%; }
  .mosaic .t8 { object-position: 40% 20%; }
  .mosaic .t5 { object-position: 80% center; }
  .mosaic .t1 { grid-area: 1 / 1 / 3 / 2; }
  .mosaic .t2 { grid-area: 1 / 2 / 2 / 3; }
  .mosaic .t3 { grid-area: 1 / 3 / 2 / 5; }
  .mosaic .t4 { grid-area: 2 / 2 / 4 / 3; }
  .mosaic .t5 { grid-area: 2 / 3 / 3 / 4; }
  .mosaic .t6 { grid-area: 2 / 4 / 4 / 5; }
  .mosaic .t7 { grid-area: 3 / 1 / 4 / 2; }
  .mosaic .t8 { grid-area: 3 / 3 / 4 / 4; }
  .pin {
    grid-area: 1 / 1;
    align-self: center;
    justify-self: start;
    width: min(640px, 50vw);
    margin: 28px 0 28px max(var(--gutter), calc((100vw - var(--max)) / 2));
    padding: 34px 40px 30px;
  }
  .pin h1 { font-size: clamp(56px, 5.6vw, 84px); }
  .promise { font-size: 18px; margin: 14px 0 8px; }
  .join { margin-top: 18px; }
  .fields { grid-template-columns: 1fr 1fr 1.4fr; }
  .fields .wide { grid-column: auto; }
  .fields #town-other { grid-column: 1 / -1; }
}

/* The mechanism: two phones, one idea, both say yes. */
.together { padding: 88px 0; }
.together-grid { display: grid; gap: 48px; align-items: center; }
.phones { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 76px; }
.phone { border: 1px solid var(--border); background: var(--surface); padding: 12px; }
.phone-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.idea img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; filter: brightness(0.85); }
.idea-title { font-size: clamp(22px, 3.4vw, 30px); margin: 12px 0 6px; }
.idea-venue { font-size: 13px; color: var(--text); margin-bottom: 2px; }
.idea-facts { font-size: 13px; color: var(--body); }
.phone-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.phone-actions span {
  display: flex; align-items: center; justify-content: center; min-height: 36px;
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif; font-weight: 800; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.04em; border: 1px solid var(--border); color: var(--muted);
}
.phone .yes { transition: background-color 220ms ease-out, color 220ms ease-out, border-color 220ms ease-out; }
.both {
  position: absolute; left: 0; right: 0; bottom: 0; min-height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--pink); color: var(--bg); font-size: 28px;
  transition: clip-path 640ms cubic-bezier(0.16, 1, 0.3, 1);
}
.example { position: absolute; right: 0; top: calc(100% + 8px); font-size: 12px; color: var(--muted); }

/* The end state is the default, so it shows with no script. The script arms
   the start state, then plays it once: your yes, your partner's, then they meet. */
.phones .yes { background: var(--pink); color: var(--bg); border-color: var(--pink); }
.phones.armed .yes { background: transparent; color: var(--muted); border-color: var(--border); }
.phones.armed .both { clip-path: inset(0 50% 0 50%); }
.phones.armed.play [data-who='you'] .yes { background: var(--pink); color: var(--bg); border-color: var(--pink); transition-delay: 400ms; }
.phones.armed.play [data-who='partner'] .yes { background: var(--pink); color: var(--bg); border-color: var(--pink); transition-delay: 1300ms; }
.phones.armed.play .both { clip-path: inset(0 0 0 0); transition-delay: 2100ms; }

.together-copy p { color: var(--body); max-width: 32em; }
.together-copy p + p { margin-top: 14px; }

@media (min-width: 900px) {
  .together { padding: 120px 0; }
  .together-grid { grid-template-columns: 1.05fr 1fr; gap: 72px; }
}

/* Every kind of night: a strip of tall photos, captions set on the image. */
.nights { padding: 72px 0 88px; border-top: 1px solid var(--border); }
.nights h2 { font-size: clamp(44px, 7vw, 76px); }
.nights-lead { color: var(--body); margin: 14px 0 36px; max-width: 36em; }
.strip {
  list-style: none; display: grid; gap: 3px;
  grid-template-columns: repeat(4, 72vw);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip li { position: relative; scroll-snap-align: start; }
.strip img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; display: block; filter: brightness(0.8); }
.strip span {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif; font-weight: 800;
  font-size: 30px; line-height: 0.95; text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(14, 18, 38, 0.7);
}

/* Friends second: one big photo, the copy beside it. */
.friends { border-top: 1px solid var(--border); padding: 0; }
@media (min-width: 700px) { .strip { grid-template-columns: repeat(4, 1fr); overflow: visible; } }
.friends-grid { display: grid; }
.friends-grid img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; filter: brightness(0.85); }
.friends-copy { padding: 56px var(--gutter) 64px; }
.friends-copy h2 { font-size: clamp(44px, 7vw, 76px); margin-bottom: 18px; }
.friends-copy > p { color: var(--body); max-width: 32em; margin-bottom: 28px; }
@media (min-width: 900px) {
  .friends-grid { grid-template-columns: 1fr 1fr; }
  .friends-copy { padding: 96px 64px; align-self: center; }
}

.venues-band { padding: 64px 0; }
.venues-grid { display: grid; gap: 18px; align-items: center; }
.venues-grid h2 { font-size: clamp(36px, 5vw, 52px); margin: 0; }
.venues-grid p { color: var(--body); max-width: 30em; }
@media (min-width: 900px) { .venues-grid { grid-template-columns: 1.1fr 1.2fr auto; gap: 40px; } }

/* The close: back to the sign-up, over one last photo. */
.close { position: relative; padding: 0; display: grid; align-items: end; min-height: 560px; overflow: hidden; }
.close img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
/* Midnight over the photo, heaviest where the words sit: the field stays our blue, not grey. */
.close::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(14, 18, 38, 0.92) 25%, rgba(14, 18, 38, 0.45) 75%, rgba(14, 18, 38, 0.3));
}
.close-copy { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 72px; width: 100%; }
.close h2 { font-size: clamp(52px, 10vw, 96px); max-width: 9em; }
.close-copy p { color: var(--text); font-size: 19px; margin: 16px 0 6px; max-width: 30em; }
.close .join-link { width: auto; display: inline-flex; padding: 0 32px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .phone .yes, .both, .join-button, .join-link, .store { transition: none !important; }
}


/* ==========================================================================
   Phones first (most visitors): the whole sign-up inside the first screen,
   the demo explained before it plays, and Join always one tap away.
   ========================================================================== */

.brand { white-space: nowrap; }
.phone-only { display: none; }

/* The demo: heading, then the cards, then the words (phones); cards beside
   heading and words (desktop). */
.together-grid { grid-template-areas: 'head' 'phones' 'copy'; }
.together-head { grid-area: head; font-size: clamp(44px, 7vw, 76px); text-wrap: balance; margin: 0; }
.phones { grid-area: phones; }
.together-copy { grid-area: copy; }
@media (min-width: 900px) {
  .together-grid { grid-template-areas: 'phones head' 'phones copy'; grid-template-rows: auto 1fr; row-gap: 22px; }
  .together-head { align-self: end; }
}

/* The pinned Join bar: phones only, once the form has scrolled away. */
.sticky-join {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--border);
  transform: translateY(110%); transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sticky-join.show { transform: translateY(0); }
.sticky-join .join-link { margin-top: 0; min-height: 52px; font-size: 22px; }
@media (min-width: 900px) { .sticky-join { display: none; } }

@media (max-width: 599px) {
  .wide-only, .where { display: none; }
  .phone-only { display: inline; }

  /* Header: one line. You're already on "For couples". */
  .nav { min-height: 56px; }
  .brand { font-size: 22px; gap: 8px; }
  .nav-links a[aria-current='page'] { display: none; }

  /* A slimmer photo band, so the form reaches the first screen. */
  .wall { min-height: 0; }
  .mosaic { grid-template-rows: repeat(2, 18vw); }
  .pin { padding: 18px var(--gutter) 28px; }
  .pin h1 { font-size: clamp(42px, 11.6vw, 56px); }
  .promise { font-size: 17px; line-height: 1.5; margin: 10px 0 0; }
  .where { font-size: 15px; }
  .join { margin-top: 14px; }
  .fields { gap: 10px; }
  .fields label { font-size: 13px; gap: 4px; }
  .fields input { min-height: 48px; font-size: 16px; }
  .join-button { min-height: 56px; margin-top: 12px; font-size: 24px; }
  .small { font-size: 13px; }
  .stores { margin-top: 14px; }
  .store { min-height: 52px; padding: 0 12px; gap: 8px; }
  .store span { font-size: 16px; }

  /* The demo cards, simplified for a narrow screen. */
  .together { padding: 64px 0; }
  .together-grid { gap: 28px; }
  .phones { gap: 10px; padding-bottom: 66px; }
  .phone { padding: 8px; }
  .phone-top { font-size: 12px; margin-bottom: 8px; }
  .idea-title { font-size: 20px; margin: 10px 0 4px; }
  .idea-venue { display: none; }
  .idea-facts { font-size: 12px; }
  .phone-actions { gap: 4px; margin-top: 10px; }
  .phone-actions span { font-size: 13px; letter-spacing: 0.02em; min-height: 34px; }
  .both { min-height: 50px; font-size: 24px; }

  .nights { padding: 56px 0 64px; }
  .nights-lead { margin-bottom: 24px; }
  .strip span { font-size: 26px; }
  .friends-copy { padding: 40px var(--gutter) 48px; }
  .venues-band { padding: 48px 0; }
  .venues-grid .button { width: 100%; }
  .close { min-height: 460px; }
  .close-copy { padding-bottom: 56px; }
  .close .join-link { width: 100%; }
  footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-join { transition: none; }
}
