/* Home of Two promo — palette lifted from app/src/theme/variables.scss */
:root {
  --paper: #faeff0;
  --rose: #f0d7d7;
  --rose-deep: #e0b3b3;
  --sand: #efe3d0;
  --teal: #156f65;
  --teal-deep: #0c584f;
  --warm: #c9664d;
  --ink: #142423;
  --ink-soft: #47615b;
  --ink-faint: rgba(71, 97, 91, 0.66);
  --card: #fffaf9;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--font);
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.6rem, 8vw, 4rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: .75rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; margin: 0.25rem 0 0; }

:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; border-radius: 6px; }

/* header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1.1rem; max-width: 62rem; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; }
.lang { display: inline-flex; border: 1px solid var(--rose-deep); border-radius: 999px; overflow: hidden; background: var(--card); }
.lang button {
  border: 0; background: transparent; padding: .35rem .8rem; font: inherit; font-size: .85rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--teal); color: #fff; }

main { max-width: 62rem; margin: 0 auto; padding: 0 1.1rem 3rem; }
section { padding: 2.5rem 0; }

/* hero */
.hero { display: grid; gap: 1.5rem; align-items: center; text-align: center; padding-top: 1.5rem; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.05fr 1fr; text-align: left; gap: 2.5rem; padding-top: 2.5rem; }
  .hero-logo { margin-left: 0; }
  .pitch { margin-left: 0; }
}
.hero-logo { margin: 0 auto 1rem; border-radius: 24px; box-shadow: 0 12px 30px rgba(20, 36, 35, .12); }
.pitch { font-size: 1.2rem; color: var(--ink-soft); max-width: 34rem; margin: .8rem auto 1.5rem; }
.hero-art { width: 100%; max-width: 420px; height: auto; margin: 0 auto; display: block; overflow: visible; }
.hero-art .float-a, .hero-art .float-b, .hero-art .float-c { animation: drift 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-art .float-b { animation-duration: 8.5s; animation-delay: -2s; }
.hero-art .float-c { animation-duration: 6s; animation-delay: -1s; }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* dividers */
.divider { max-width: 22rem; margin: 0 auto; opacity: .9; }
.divider svg { display: block; width: 100%; height: 12px; }

/* buttons */
.btn {
  display: inline-block; padding: .85rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-deep); }
.btn.ghost { background: var(--sand); color: var(--ink-soft); border-color: var(--rose-deep); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* features */
.grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 540px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.grid li {
  background: var(--card); border: 1px solid var(--rose); border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1rem; position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.grid li:hover, .grid li:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(20, 36, 35, .09);
  border-color: color-mix(in srgb, var(--c, var(--teal)) 45%, var(--rose));
}
.grid p { margin: .3rem 0 0; color: var(--ink-soft); font-size: .95rem; }
/* Icon tile: the feature colour as ink on a light tint of itself. */
.ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: .8rem;
  color: var(--c, var(--teal));
  background: color-mix(in srgb, var(--c, var(--teal)) 14%, #fff);
}
@supports not (color: color-mix(in srgb, red 50%, transparent)) { .ico { background: var(--sand); } }
.ico svg, .glyph svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

/* private */
.private-list { list-style: none; margin: 0; padding: 0; max-width: 44rem; display: grid; gap: .9rem; }
.private-list li { display: grid; grid-template-columns: 48px 1fr; gap: .9rem; align-items: start; }
.private-list p { margin: .55rem 0 0; color: var(--ink-soft); }
.glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; color: var(--teal); background: var(--sand);
  border: 1px solid var(--rose);
}

/* invite card */
.card {
  background: var(--card); border: 1px solid var(--rose-deep); border-radius: calc(var(--radius) + 6px);
  padding: 1.6rem 1.4rem; max-width: 30rem; margin: 0 auto; box-shadow: 0 14px 40px rgba(20, 36, 35, .08);
}
.card-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.glyph.key { width: 42px; height: 42px; color: var(--warm); background: var(--rose); border-color: var(--rose-deep); flex: none; }
.glyph.key svg { width: 22px; height: 22px; }
form { display: grid; gap: .35rem; margin-top: 1rem; }
label { font-size: .9rem; font-weight: 600; color: var(--ink-soft); margin-top: .5rem; }
input {
  font: inherit; padding: .75rem .9rem; border-radius: 12px; border: 1px solid var(--rose-deep);
  background: #fff; color: var(--ink); width: 100%;
}
input#code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
input[aria-invalid="true"] { border-color: var(--warm); }
form .btn { margin-top: 1rem; }
.nojs { font-size: .85rem; color: var(--ink-faint); margin: .5rem 0 0; }
.js .nojs { display: none; }

#status:empty { display: none; }
#status { margin-top: 1rem; }
.error { color: var(--warm); font-weight: 600; }
.success .btn { display: block; width: 100%; margin-bottom: .6rem; }
.success .hint { font-size: .9rem; color: var(--ink-soft); margin: .9rem 0 0; }
.success .hint li { margin-bottom: .3rem; }

footer { text-align: center; color: var(--ink-faint); font-size: .9rem; padding: 1rem 1.1rem max(env(safe-area-inset-bottom), 2rem); }

@media (prefers-reduced-motion: reduce) {
  .btn, .grid li { transition: none; }
  .hero-art .float-a, .hero-art .float-b, .hero-art .float-c { animation: none; }
}


/* ---------------------------------------------------------------------------
   showcase — the chronology, as the app actually draws it

   ⚠ THIS IS A COPY OF A REAL SCREEN, AND IT HAS TO STAY ONE. It mirrors
   `app/src/app/features/timeline/timeline.page.scss`: a 2px spine down the
   middle, cards of `calc(50% - 26px)` alternating either side, a 28px node dot
   carrying the entry's module colour, the kind as a coloured overline, then
   title / place / date, then a photo mosaic whose caption sits ON the picture.
   The first draft of this section was an invented single-column card list, and
   it advertised a layout the app has never had. If the timeline changes, this
   changes with it — a promo shot of a screen that does not exist is a lie told
   slowly.

   Module colours are the light-palette values of `--cs-mod-*` from
   `app/src/theme/variables.scss`: trips #3d8bb0, meals #c9784d, dateideas
   #d4864a. They are written out rather than tokenised because this page has no
   dark palette and no app tokens.

   The screen is built at 390px — a real phone's CSS width — and scaled down to
   fit the frame, so every proportion inside it is the one a phone shows. Sizing
   the cards to a 270px mock instead would have quietly changed the layout.
   --------------------------------------------------------------------------- */
.showcase { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 760px) {
  .showcase { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
.showcase-copy h2 { margin-bottom: .6rem; }
.showcase-note { font-size: .8rem; color: var(--ink-faint); margin-top: .6rem; }

/* The scale is tied to the width by hand: screen = width - 2*(9px padding + 3px border), and
   --tl-scale must be screen/390 or the phone's contents overflow its own frame. Change one and
   change the other. Two sizes is enough; a fluid scale would need JS on resize. */
.phone { justify-self: center; width: 300px; max-width: 100%; --tl-scale: .707; }
@media (max-width: 380px) { .phone { width: 260px; --tl-scale: .605; } }
.phone__frame {
  position: relative;
  padding: 11px 9px;
  border: 3px solid var(--teal);
  border-radius: 36px;
  background: var(--card);
  box-shadow: 0 20px 44px rgba(20, 36, 35, 0.18);
}
.phone__bar { width: 36%; height: 5px; margin: 0 auto 8px; border-radius: 999px; background: var(--rose-deep); }
.phone__screen {
  position: relative;
  height: 452px;
  overflow: hidden;
  border-radius: 22px;
  /* The app's own page ground, not this page's paper. */
  background: #fbf7f4;
}

/* 390 CSS px of phone, shrunk to whatever the frame is. See the header. */
.phone__scale { width: 390px; transform: scale(var(--tl-scale, 0.687)); transform-origin: top left; }

/* The source chips. Pinned rather than scrolling: in the app they scroll away with
   the page, but a loop that redealt them every cycle would read as a glitch. */
.tl-sources {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 16px 10px;
  background: #fbf7f4;
  position: relative; z-index: 2;
}
.tl-chip {
  border: 1px solid #e6dcd6; background: #fffaf9; color: #6b7f7a;
  border-radius: 999px; padding: 6px 14px; font-size: .85rem;
}
.tl-chip--on { border-color: transparent; background: var(--teal); color: #fff; }

/* No fade at the bottom: a phone's bezel CUTS its screen, it does not blur it, and a soft edge
   here made the mockup read as a graphic rather than as a screenshot. The frame is the edge. */
.tl-window { height: 560px; overflow: hidden; }

/* Two identical stacks, translated by exactly -50%. The halves must be the same
   height to the pixel, so the spacing lives on `.tl-entry` as padding-bottom
   (as it does in the app) rather than as a `gap` on the track — a gap adds one
   extra space between the halves that -50% then cuts through. */
.tl-roll { animation: tl-roll 46s linear infinite; }
.phone:hover .tl-roll, .phone:focus-within .tl-roll { animation-play-state: paused; }
@keyframes tl-roll { from { transform: translateY(0); } to { transform: translateY(-50%); } }

.tl { position: relative; padding: 4px 16px 8px; }
/* The spine: one line behind everything, not one per entry. */
.tl::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-inline-start: -1px; background: #e6dcd6;
}
.tl-year { position: relative; display: flex; justify-content: center; margin: 18px 0 10px; }
.tl-year__label {
  position: relative; background: #fbf7f4; border: 1px solid #e6dcd6; border-radius: 999px;
  padding: 3px 14px; font-size: .8rem; color: #6b7f7a;
}

.tl-entry { position: relative; display: flex; justify-content: flex-start; padding: 0 0 16px; }
.tl-entry--right { justify-content: flex-end; }
.tl-entry__node {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fffaf9;
  border: 2px solid var(--k); color: var(--k);
  z-index: 1;
}
.tl-entry__node svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tl-card {
  width: calc(50% - 26px);
  display: flex; flex-direction: column; gap: 4px;
  background: #fffaf9; border-radius: 16px; padding: 12px;
  box-shadow: 0 6px 18px rgba(20, 36, 35, 0.07);
}
.tl-card__kind { margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--k); }
.tl-card__title { margin: 0; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; line-height: 1.2; color: var(--ink); }
.tl-card__sub { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.tl-card__date { margin: 0; font-size: .82rem; color: var(--ink-faint); }

/* The mosaic: two columns; one picture takes the full width, and with three the
   first spans both and the other two sit under it. Same rule as the app. */
.tl-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; }
.tl-shot { position: relative; min-width: 0; border-radius: 10px; overflow: hidden; }
.tl-shot img { width: 100%; height: 56px; object-fit: cover; display: block; }
.tl-shots[data-count="1"] .tl-shot,
.tl-shots[data-count="3"] .tl-shot--hero { grid-column: 1 / -1; }
.tl-shots[data-count="1"] .tl-shot img,
.tl-shots[data-count="3"] .tl-shot--hero img { height: 96px; }

/* The caption rides ON the picture, over a scrim — no theme knows how bright a
   holiday is, so it is a scrim rather than a palette colour. Only the hero
   carries one: a 56px stamp cannot hold a sentence. */
.tl-shot__note {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 8px 6px;
  background: linear-gradient(to top, rgba(8, 12, 14, 0.72), transparent);
  color: #fff; font-size: .72rem; line-height: 1.25;
}
.tl-shot:not(.tl-shot--hero) .tl-shot__note { display: none; }
.tl-shots[data-count="1"] .tl-shot .tl-shot__note { display: block; }

.tl-shot__more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8, 12, 14, 0.52); color: #fff; font-size: .82rem; font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .tl-roll { animation: none; }
  .tl-window { overflow-y: auto; }
}
