/* ============================================================
   Cura — landing page
   Palette + type tokens
   ============================================================ */
:root {
  /* ==== Brand palette — single source of truth. Change colors here only. ==== */
  --ivory:    #F6EFE7;   /* the field, most of every surface */
  --sand:     #EBD9C8;   /* panels, chat, alternating sections */
  --oxblood:  #3B1219;   /* all text, all dark surfaces */
  --bordeaux: #6E2430;   /* working: labels, links, small marks */
  --garnet:   #B24A54;   /* emphasis: value, savings, membership */
  /* rgb triplets so translucent variants stay on-palette */
  --oxblood-rgb:  59, 18, 25;
  --bordeaux-rgb: 110, 36, 48;
  --ivory-rgb:    246, 239, 231;

  /* ==== Component tokens map onto the palette (do not hardcode hexes below) ==== */
  --cream:      var(--ivory);
  --cream-2:    var(--sand);
  --pink:       var(--sand);
  --pink-2:     var(--ivory);
  --brick:      var(--bordeaux);              /* logo, accent headings, marks */
  --brick-deep: #551c26;                      /* darker bordeaux (hover) */
  --btn:        var(--garnet);                /* primary buttons / emphasis */
  --btn-deep:   #98404a;                      /* darker garnet (hover) */
  --ink:        var(--oxblood);               /* all text + dark surfaces */
  --ink-soft:   rgba(var(--oxblood-rgb), .66);
  --blue:       #3a55d9;                      /* functional only: mock "Active" pill */
  --green:      #3f9d5b;                      /* functional only: mock "Confirmed" */
  --green-soft: #e9f5ec;
  --maroon:     var(--oxblood);               /* footer */
  --maroon-2:   #260b10;
  --card-line:  rgba(var(--oxblood-rgb), .10);

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;

  --maxw: 1120px;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: .95rem;
  padding: .8rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn--primary { background: var(--btn); color: #fff; box-shadow: 0 8px 20px -10px rgba(178,74,84,.7); }
.btn--primary:hover { background: var(--btn-deep); transform: translateY(-1px); }
.btn--ghost { background: rgba(255,255,255,.7); color: var(--ink); border-color: var(--card-line); }
.btn--ghost:hover { background: #fff; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--ivory-rgb),.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--oxblood-rgb),.05);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .9rem 1.5rem;
}
.brand {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.5rem; color: var(--brick); letter-spacing: -.02em;
}
.nav__links { display: flex; gap: 2rem; }
.nav__links a { font-size: .92rem; color: var(--ink-soft); font-weight: 500; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { padding: .6rem 1.15rem; font-size: .88rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem 3.5rem;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--pink-2) 0%, rgba(var(--ivory-rgb),0) 60%);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800; letter-spacing: -.035em;
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: .98;
  margin: 0 0 1.1rem; color: var(--ink);
}
.hero__sub {
  max-width: 34rem; margin: 0 auto 1.8rem;
  color: var(--ink-soft); font-size: 1.05rem;
}
.hero__media {
  margin: 3rem 0 0; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(var(--oxblood-rgb),.4);
  background: linear-gradient(160deg,#f2d9cf,#cfe0ea);
}
.hero__media img { width: 100%; height: clamp(240px, 42vw, 520px); object-fit: cover; }

/* ============================================================
   Generic section
   ============================================================ */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3.5rem,7vw,6rem) 1.5rem; }
.eyebrow {
  color: var(--bordeaux); font-family: var(--font-display); font-weight: 700;
  font-size: .78rem; letter-spacing: .16em; margin: 0 0 .9rem;
}
.section__title {
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.04;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin: 0 0 1rem;
  color: var(--ink);
}
.section__title--brand { color: var(--brick); }
.section__title--center { text-align: center; }
.section__lede { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 2.5rem; max-width: 34rem; }
.section__lede--brand { color: var(--brick); }
.section__lede--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.how-card {
  background: var(--pink); border: 1px solid rgba(var(--bordeaux-rgb),.1);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column;
}
.how-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin: 0 0 .35rem; }
.how-card__text { color: var(--ink-soft); font-size: .92rem; margin: 0 0 1.3rem; min-height: 2.6em; }

/* --- shared mock surface --- */
.mock {
  background: #fff; border-radius: 16px; padding: 1rem;
  box-shadow: 0 18px 40px -28px rgba(var(--oxblood-rgb),.4);
  border: 1px solid var(--card-line);
  margin-top: auto; font-size: .8rem;
}

/* Card 1 — connected accounts */
.mock-inbox { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.mock-app {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-family: var(--font-display); flex: 0 0 auto;
}
.mock-app svg { width: 20px; height: 20px; fill: #fff; }
.mock-app--gmail { background: #ea4335; }
.mock-app--wa { background: #25d366; }
.mock-app--msg { background: #34c759; }
.mock-app--icloud { background: linear-gradient(160deg,#3fa9f5,#2d7ff0); }
.mock-plus {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brick); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; flex: 0 0 auto;
}
.mock-panel { background: var(--cream); border-radius: 12px; padding: .75rem; }
.mock-panel__label { font-weight: 700; margin: 0 0 .6rem; font-size: .82rem; }
.mock-accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.mock-accounts li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: .55rem; }
.acc-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .8rem; }
.acc-ic--gmail { background: #ea4335; }
.acc-ic--wa { background: #25d366; }
.acc-ic--outlook { background: #0a66c2; }
.acc-ic--icloud { background: linear-gradient(160deg,#3fa9f5,#2d7ff0); }
.acc-name { font-weight: 600; }
.acc-meta { color: var(--ink-soft); font-size: .74rem; }

/* Card 2 — trip checklist */
.mock-progress { margin-bottom: .9rem; }
.mock-progress__label { font-weight: 700; font-size: .82rem; }
.mock-progress__bar { height: 6px; border-radius: 999px; background: var(--cream-2); margin-top: .45rem; overflow: hidden; }
.mock-progress__bar span { display: block; height: 100%; width: 68%; background: linear-gradient(90deg,var(--brick),#e08a5a); border-radius: 999px; }
.trip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.trip-list li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: .55rem; }
.trip-ic { font-size: 1rem; line-height: 1; }
.trip-main { display: flex; flex-direction: column; }
.trip-main b { font-weight: 600; font-size: .82rem; }
.trip-main small { color: var(--ink-soft); font-size: .72rem; }
.pill { font-size: .66rem; font-weight: 700; padding: .18rem .5rem; border-radius: 999px; white-space: nowrap; }
.pill--green { background: var(--green-soft); color: var(--green); }
.pill--blue { background: #e8edfb; color: var(--blue); }

/* Card 3 — live updates */
.live-banner { background: var(--ink); color: #fff; border-radius: 12px; padding: .8rem; margin-bottom: .9rem; }
.live-dot { display: inline-flex; align-items: center; gap: .4rem; font-size: .68rem; font-weight: 700; letter-spacing: .05em; color: #ffd9c9; text-transform: uppercase; }
.live-dot span { width: 7px; height: 7px; border-radius: 50%; background: #ff6b4a; box-shadow: 0 0 0 0 rgba(255,107,74,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(255,107,74,0);} 100%{ box-shadow:0 0 0 0 rgba(255,107,74,0);} }
.live-banner__body { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.live-banner__body b { font-size: .9rem; display: block; }
.live-banner__body small { color: #c9cee6; font-size: .74rem; }
.live-plane { font-size: 1.3rem; }
.adapt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.adapt-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: var(--cream); border-radius: 10px; padding: .55rem .7rem; }
.adapt-main b { font-weight: 600; font-size: .82rem; display: block; }
.adapt-main small { color: var(--ink-soft); font-size: .72rem; }
.check { width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: .8rem; flex: 0 0 auto; }

/* ============================================================
   TRIP NEEDS
   ============================================================ */
.trip__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: start; }
.trip-card { display: block; }
/* Figma card art (label + illustration + caption baked in). All three share a
   height; one is slightly narrower, so `contain` keeps a uniform frame without
   cropping the baked-in label/caption. */
.trip-card__img {
  display: block; width: 100%; aspect-ratio: 460 / 588;
  object-fit: contain; object-position: center;
}

/* ============================================================
   GALLERY DECK
   ============================================================ */
.gallery { text-align: center; overflow-x: clip; }
.gallery .section__title { margin-bottom: 2.5rem; }
.deck {
  position: relative; height: clamp(240px, 34vw, 380px);
  display: flex; align-items: center; justify-content: center;
}
.deck__card {
  position: absolute; width: clamp(150px, 20vw, 230px); aspect-ratio: 3/4;
  border-radius: 14px; overflow: hidden; background: #fff; padding: 8px;
  box-shadow: 0 30px 50px -30px rgba(var(--oxblood-rgb),.55);
  transform: translateX(calc(var(--i) * clamp(90px, 12vw, 150px))) rotate(calc(var(--i) * 7deg));
  transition: transform .3s ease;
}
.deck__card img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.deck__card--hero { z-index: 5; width: clamp(180px, 24vw, 280px); box-shadow: 0 40px 70px -30px rgba(var(--oxblood-rgb),.65); }
.deck:hover .deck__card { transform: translateX(calc(var(--i) * clamp(120px, 15vw, 180px))) rotate(calc(var(--i) * 5deg)); }

/* ============================================================
   FAQ
   ============================================================ */
.faq { padding-top: 0; }
.faq__panel {
  background: var(--pink); border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 2.5rem;
}
.faq__title { margin: 0; }
.faq__list { display: grid; gap: .25rem; }
.faq-item { border-bottom: 1px solid rgba(var(--oxblood-rgb),.12); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.05rem .2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-weight: 600; font-size: 1rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-toggle { position: relative; width: 18px; height: 18px; flex: 0 0 auto; }
.faq-toggle::before, .faq-toggle::after {
  content: ""; position: absolute; background: var(--brick); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.faq-toggle::before { top: 8px; left: 0; width: 18px; height: 2px; }
.faq-toggle::after { top: 0; left: 8px; width: 2px; height: 18px; }
.faq-item[open] .faq-toggle::after { transform: rotate(90deg); opacity: 0; }
.faq-item p { margin: 0 .2rem 1.15rem; color: var(--ink-soft); font-size: .95rem; max-width: 42rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { position: relative; background: var(--maroon); color: var(--ivory); margin-top: 2rem; overflow: hidden; }
.footer__ridge { position: absolute; top: 0; left: 0; width: 100%; height: clamp(64px,7vw,96px); display: block; z-index: 1; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(4.5rem,8vw,7rem) 1.5rem 1rem; position: relative; z-index: 2; }
.footer__cols { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 2rem; align-items: start; }
.footer__col h4 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 0 0 1rem; }
.footer__col a { display: block; color: rgba(var(--ivory-rgb),.72); font-size: .92rem; margin-bottom: .65rem; }
.footer__col a:hover { color: #fff; }
.footer__center { text-align: center; }
.footer__tag { color: var(--garnet); font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin: 0 0 1rem; opacity: .95; }
.signup__label { display: block; font-weight: 600; margin-bottom: .6rem; color: var(--ivory); }
.signup__row { display: flex; gap: .5rem; max-width: 360px; margin: 0 auto; }
.signup__row input {
  flex: 1 1 0; min-width: 0; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: .7rem 1.1rem; color: #fff; font-family: var(--font-body); font-size: .9rem;
}
.signup__cc {
  flex: 0 0 auto; width: 3.75rem;
  display: inline-flex; align-items: center; gap: 1px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: .7rem .6rem; color: #fff;
}
.signup__cc:focus-within { outline: 2px solid var(--brick); outline-offset: 1px; }
.signup__cc input { flex: 1 1 auto; width: 100%; min-width: 0; background: transparent; border: none; padding: 0; color: #fff; font-family: var(--font-body); font-size: .9rem; }
.signup__cc input:focus { outline: none; }
.signup__row input::placeholder { color: rgba(var(--ivory-rgb),.5); }
.signup__row input:focus { outline: 2px solid var(--brick); outline-offset: 1px; }

.footer__wordmark {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(7rem, 30vw, 26rem); line-height: .8;
  text-align: center; color: #fff; letter-spacing: -.04em;
  margin-top: clamp(1rem, 3vw, 2rem); transform: translateY(18%);
  user-select: none; pointer-events: none;
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   Focus + reduced motion
   ============================================================ */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--brick); outline-offset: 3px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .live-dot span { animation: none; }
  .deck__card, .btn { transition: none; }
}

/* ============================================================
   JOIN MODAL
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; padding: 1.5rem; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(var(--oxblood-rgb),.45); backdrop-filter: blur(3px); animation: fade .2s ease; }
.modal__dialog {
  position: relative; margin: auto; width: min(440px, calc(100vw - 3rem));
  background: var(--pink-2); border: 1px solid rgba(var(--bordeaux-rgb),.15);
  border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: 0 40px 90px -30px rgba(var(--oxblood-rgb),.55);
  animation: pop .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal__close {
  position: absolute; top: .9rem; right: 1rem; width: 34px; height: 34px;
  border: none; background: transparent; color: var(--ink-soft);
  font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 50%;
}
.modal__close:hover { background: rgba(var(--oxblood-rgb),.06); color: var(--ink); }
.modal__title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; font-size: 1.6rem; margin: 0 0 .4rem; color: var(--ink); }
.modal__sub { color: var(--ink-soft); font-size: .95rem; margin: 0 0 1.4rem; }
.join-form { display: grid; gap: .85rem; min-width: 0; }
.join-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; min-width: 0; }
.join-form label { display: grid; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--ink); min-width: 0; }
.join-form input {
  font-family: var(--font-body); font-size: .95rem; font-weight: 400;
  width: 100%; min-width: 0;
  padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--card-line);
  background: #fff; color: var(--ink);
}
.join-form input:focus { outline: 2px solid var(--brick); outline-offset: 1px; border-color: transparent; }
.phone-row { display: flex; gap: .5rem; min-width: 0; }
.phone-cc {
  flex: 0 0 auto; width: 4rem;
  display: inline-flex; align-items: center; gap: 1px;
  padding: .7rem .55rem; border-radius: 12px;
  border: 1px solid var(--card-line); background: #fff; color: var(--ink);
}
.phone-cc:focus-within { outline: 2px solid var(--brick); outline-offset: 1px; border-color: transparent; }
.phone-cc input { flex: 1 1 auto; width: 100%; min-width: 0; border: none; padding: 0; background: transparent; color: inherit; font-family: var(--font-body); font-size: .95rem; }
.phone-cc input:focus { outline: none; }
.phone-cc__plus { color: inherit; opacity: .85; }
.phone-num { flex: 1 1 auto; }
.join-form input:user-invalid { border-color: var(--brick); }
.join-form__submit { margin-top: .4rem; width: 100%; }
.join-form__submit[disabled] { opacity: .6; cursor: progress; }
.join-form__status { margin: .2rem 0 0; font-size: .85rem; min-height: 1.2em; }
.join-form__status[data-state="error"] { color: var(--brick); }
.join-form__status[data-state="ok"] { color: var(--green); }
body.modal-open { overflow: hidden; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .how__grid, .trip__grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .how-card__text { min-height: 0; }
  .faq__panel { grid-template-columns: 1fr; gap: 1.25rem; }
  .footer__cols { grid-template-columns: 1fr; text-align: center; }
  .footer__col a { }
}
@media (max-width: 640px) {
  .nav__links { display: none; }
  .deck__card { transform: translateX(calc(var(--i) * 46px)) rotate(calc(var(--i) * 6deg)); }
  .deck:hover .deck__card { transform: translateX(calc(var(--i) * 46px)) rotate(calc(var(--i) * 6deg)); }
  /* Footer signup: keep code + number on one row, drop the button to its own
     full-width row so it never clips. */
  .signup__row { flex-wrap: wrap; }
  .signup__row .btn--primary { flex: 1 0 100%; }
}
