/* Tavro — tavro.app
 *
 * The palette, type and radii are lifted from the app's own tokens
 * (lib/app/theme/tokens.dart) so the site and the thing you download read as
 * one product: saffron on near-black, Instrument Serif for display, Inter for
 * reading, Plus Jakarta for interface furniture.
 *
 * The passport is the organising metaphor — gold hairlines, monospaced
 * machine-readable type, stamp edges — because that is what the app is about
 * and what its most distinctive screens already look like.
 */

:root {
  /* Ground */
  --bg: #0f0f11;
  --bg-2: #141417;
  --surface: #17171a;
  --surface-2: #1c1c20;
  --stroke: rgba(236, 234, 230, 0.09);
  --stroke-2: rgba(236, 234, 230, 0.16);

  /* Ink */
  --text: #eceae6;
  --text-2: rgba(236, 234, 230, 0.66);
  --text-3: rgba(236, 234, 230, 0.44);

  /* Accent — the app's single accent, used the same way: sparingly */
  --accent: #ff8a3d;
  --accent-soft: #ffb68d;
  --on-accent: #3a1700;
  --gold: #e8c87e;
  --green: #34d399;

  --radius: 16px;
  --radius-lg: 24px;

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(72px, 11vw, 160px);

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --ui: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: min(1180px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

/* ── Type ─────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.9rem, 8.5vw, 5.4rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.04;
}

h3 {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

p { margin: 0; max-width: var(--measure); }

.lede {
  font-size: clamp(1.06rem, 1.9vw, 1.28rem);
  line-height: 1.55;
  color: var(--text-2);
}

.accent { color: var(--accent); }

/* ── Header ───────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-header[data-stuck="true"] { border-bottom-color: var(--stroke); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-links {
  display: flex;
  gap: 26px;
  font-family: var(--ui);
  font-size: 0.93rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 22px; }

/* ── App Store badge ──────────────────────────────────────────────── */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 20px 11px 17px;
  border-radius: 999px;
  background: var(--text);
  color: #101012;
  text-decoration: none;
  font-family: var(--ui);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

.store-badge__logo { width: 22px; height: 22px; flex: none; }

.store-badge__text { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge__text small { font-size: 0.62rem; opacity: 0.72; letter-spacing: 0.01em; }
.store-badge__text strong { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }

.store-badge--sm { padding: 8px 15px 8px 13px; }
.store-badge--sm .store-badge__logo { width: 18px; height: 18px; }
.store-badge--sm .store-badge__text small { font-size: 0.55rem; }
.store-badge--sm .store-badge__text strong { font-size: 0.85rem; }

.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s var(--ease), gap 0.18s var(--ease);
}

.ghost-link:hover { color: var(--text); gap: 11px; }
.ghost-link svg { width: 15px; height: 15px; }

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: var(--section-y);
  overflow: hidden;
}

/* A single warm source behind the phone, as if lit from the screen itself. */
.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -14%;
  width: min(760px, 88vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.14) 0%, rgba(255, 138, 61, 0.04) 42%, transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  /* The phone is capped at 335px, so its column only needs enough room to
     centre it. The headline needs the rest: at an even split "further than
     you think." breaks after "you" and leaves "think." stranded on a line
     of its own. */
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* Sized to the column rather than the page: the second line has to survive
   as one line down to the point where the grid stacks. */
.hero h1 {
  font-size: clamp(2.9rem, 5.4vw, 4.9rem);
  margin-bottom: 22px;
}

.hero .lede { margin-bottom: 30px; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-note {
  font-family: var(--ui);
  font-size: 0.85rem;
  color: var(--text-3);
}

/* ── Passport line — the app's own MRZ strip, used as a rule ──────── */

.mrz {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  font-family: var(--mono);
  font-size: clamp(0.6rem, 1.35vw, 0.74rem);
  letter-spacing: 0.13em;
  color: color-mix(in srgb, var(--gold) 52%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

/* ── Phone ────────────────────────────────────────────────────────── */

.phone {
  position: relative;
  border-radius: 42px;
  padding: 9px;
  background: linear-gradient(160deg, #303036, #17171a 42%, #0e0e10);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 28px 60px -18px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(236, 234, 230, 0.07);
}

.phone img { border-radius: 34px; display: block; width: 100%; }

.hero-phone {
  max-width: 335px;
  margin-inline: auto;
  transform: rotate(1.1deg);
}

/* ── Sections ─────────────────────────────────────────────────────── */

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

.section--hairline { border-top: 1px solid var(--stroke); }

.section-lede { margin-top: 20px; }

/* Alternating feature rows: each one is composed, not a repeated card. */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}

.feature-row + .feature-row { margin-top: var(--section-y); }

.feature-row--flip .feature-row__visual { order: -1; }

.feature-row__visual { display: flex; justify-content: center; }

.feature-row__visual .phone { max-width: 300px; }

.feature-title {
  margin-bottom: 18px;
}

.feature-body { color: var(--text-2); }

.feature-body + .feature-body { margin-top: 14px; }

/* ── Unlock proof — real destinations, real conditions ────────────── */

.unlock-list {
  margin-top: 30px;
  border-top: 1px solid var(--stroke);
}

.unlock-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--stroke);
  font-family: var(--ui);
}

.unlock-row__place {
  font-weight: 600;
  font-size: 0.99rem;
}

.unlock-row__terms {
  font-size: 0.86rem;
  color: var(--text-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.unlock-caption {
  margin-top: 16px;
  font-family: var(--ui);
  font-size: 0.84rem;
  color: var(--text-3);
}

/* ── Split ledger detail ──────────────────────────────────────────── */

.ledger {
  margin-top: 28px;
  display: grid;
  gap: 1px;
  background: var(--stroke);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}

.ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  background: var(--surface);
  font-family: var(--ui);
  font-size: 0.94rem;
}

.ledger-row__label { color: var(--text-2); }

.ledger-row__value { font-variant-numeric: tabular-nums; font-weight: 600; }

.ledger-row--total .ledger-row__value { color: var(--accent); font-size: 1.06rem; }

.ledger-note {
  margin-top: 14px;
  font-family: var(--ui);
  font-size: 0.84rem;
  color: var(--text-3);
}

/* ── Closing ──────────────────────────────────────────────────────── */

.closing {
  text-align: center;
  padding-block: var(--section-y);
  border-top: 1px solid var(--stroke);
}

.closing h2 { margin-bottom: 18px; }

.closing .lede { margin-inline: auto; margin-bottom: 34px; }

.closing-actions { display: flex; justify-content: center; }

/* ── Disclaimer ───────────────────────────────────────────────────── */

.notice {
  padding: 22px 24px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text-3);
  font-size: 0.9rem;
  line-height: 1.62;
  max-width: none;
}

.notice strong { color: var(--text-2); font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--stroke);
  padding-block: 34px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--ui);
  font-size: 0.87rem;
  color: var(--text-3);
}

.footer-links { display: flex; gap: 24px; }

.footer-links a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-links a:hover { color: var(--text); }

/* ── Entrance: one authored moment, on the hero only ──────────────── */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal 0.85s var(--ease) forwards;
  }

  .reveal-1 { animation-delay: 0.05s; }
  .reveal-2 { animation-delay: 0.14s; }
  .reveal-3 { animation-delay: 0.23s; }
  .reveal-4 { animation-delay: 0.32s; }

  .hero-phone {
    opacity: 0;
    animation: phone-in 1.1s var(--ease) 0.18s forwards;
  }
}

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

@keyframes phone-in {
  from { opacity: 0; transform: rotate(1.1deg) translateY(26px) scale(0.975); }
  to { opacity: 1; transform: rotate(1.1deg) translateY(0) scale(1); }
}

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-phone { max-width: 290px; transform: none; }
  .hero::before { right: -40%; top: -6%; }

  .feature-row,
  .feature-row--flip { grid-template-columns: 1fr; gap: 34px; }

  .feature-row--flip .feature-row__visual { order: 0; }

  .feature-row__visual .phone { max-width: 268px; }

  .nav-links { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }

  .nav { padding: 12px 0; }

  .hero { padding-top: 30px; }

  .hero-actions { gap: 18px; }

  .mrz { font-size: 0.55rem; letter-spacing: 0.09em; }

  .unlock-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .unlock-row__terms { text-align: left; }

  .ledger-row { padding: 13px 15px; font-size: 0.9rem; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ── Invite landing (/split/join/…) ───────────────────────────────── */

.invite-wrap,
.notfound-wrap {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 40px var(--gutter);
}

.invite,
.notfound {
  width: min(480px, 100%);
  text-align: center;
}

.notfound h1 {
  font-size: clamp(2.1rem, 6.4vw, 2.9rem);
  line-height: 1.06;
  margin-bottom: 14px;
}

.notfound p { margin-inline: auto; }

.notfound__links {
  margin-top: 30px;
  font-family: var(--ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-3);
}

.notfound__links a {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--stroke-2);
  padding-bottom: 1px;
}

.notfound__links a:hover { color: var(--text); }

.invite__mark,
.notfound__mark {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  margin: 0 auto 26px;
  display: block;
}

.invite h1 {
  font-size: clamp(2.1rem, 6.4vw, 2.9rem);
  line-height: 1.06;
  margin-bottom: 14px;
}

.invite p { margin-inline: auto; }

.invite__code-card {
  position: relative;
  margin: 30px 0 26px;
  padding: 22px 22px 18px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

/* The gold hairline is the passport cue carried over from the app — the same
   one the MRZ strip on the homepage uses. */
.invite__code-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.55;
}

.invite__code-label {
  font-family: var(--ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-bottom: 9px;
}

.invite__code {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--text);
  /* The letter-spacing pushes the string right; pull it back to centre. */
  text-indent: 0.24em;
  word-break: break-all;
}

.invite__copy {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--stroke-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.invite__copy:hover { color: var(--text); border-color: var(--text-3); }

.invite__copy svg { width: 15px; height: 15px; }

.invite__copy[data-copied="true"] {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
}

.invite__steps {
  margin-top: 30px;
  text-align: left;
  display: grid;
  gap: 16px;
}

.invite__step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-family: var(--ui);
  font-size: 0.93rem;
  color: var(--text-2);
}

.invite__step svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--accent);
}

.invite__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

/* The "already have it" path. Accent-filled because for someone who does have
   Tavro, opening it is the whole job — the store badge below is for everyone
   else. */
.invite__open {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--ui);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.18s var(--ease), filter 0.18s var(--ease);
}

.invite__open:hover { filter: brightness(1.06); transform: translateY(-1px); }
.invite__open svg { width: 17px; height: 17px; }

.invite__or {
  font-family: var(--ui);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}

.invite__platform {
  margin: 0;
  font-family: var(--ui);
  font-size: 0.8rem;
  color: var(--text-3);
}

.invite__footnote {
  margin-top: 34px;
  font-family: var(--ui);
  font-size: 0.82rem;
  color: var(--text-3);
}

/* Says where this page came from. An invite arrives from a stranger's phone,
   so it should be obvious it belongs to a real product. */
.invite__origin {
  margin-top: 40px;
  font-family: var(--ui);
  font-size: 0.78rem;
  color: var(--text-3);
}

.invite__origin a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--stroke-2);
  padding-bottom: 1px;
}

.invite__origin a:hover { color: var(--text-2); }

/* ── Legal & support pages ────────────────────────────────────────── */
/*
 * privacy/, terms/ and support/ are deliberately left alone: they are legal
 * text and their markup is not this redesign's to rewrite. But they share
 * this stylesheet, and the rewrite dropped the classes they were built on —
 * .container, .article, .content-grid and the rest — which flattened them.
 * Those classes are re-declared here against the current tokens so the pages
 * read as part of the same site without a word of their HTML changing.
 *
 * Everything is scoped to body.policy-page so none of it can reach the pages
 * above.
 */

.policy-page .container {
  width: min(1140px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

/* Their <nav> sits straight inside the header with no wrapper of its own. */
.policy-page .nav {
  width: min(1140px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

/* These pages load Plus Jakarta Sans and Inter only. A display heading would
   fall back to Georgia here, so keep headings on the interface face — which
   is also what they looked like before. */
.policy-page h1,
.policy-page h2,
.policy-page h3,
.policy-page .brand {
  font-family: var(--ui);
  font-weight: 700;
}

.policy-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-family: var(--ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.policy-page .eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.18);
}

.policy-hero {
  border-bottom: 1px solid var(--stroke);
  padding: clamp(48px, 7vw, 78px) 0 clamp(28px, 4vw, 44px);
}

.policy-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0;
}

.policy-hero p {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--text-2);
  font-size: 1rem;
}

.content { padding: clamp(40px, 6vw, 60px) 0 clamp(56px, 8vw, 88px); }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 44px;
  align-items: start;
}

.article { max-width: 780px; }

.article section {
  border-top: 1px solid var(--stroke);
  padding: 28px 0;
}

.article section:first-child { border-top: 0; padding-top: 0; }

.article h2 {
  margin: 0 0 12px;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

.article h3 {
  margin: 22px 0 8px;
  font-size: 1.02rem;
  color: var(--text);
}

.article p,
.article li {
  color: var(--text-2);
  line-height: 1.7;
  max-width: 72ch;
}

.article p { margin: 0 0 12px; }
.article p:last-child { margin-bottom: 0; }

.article ul { margin: 12px 0 0; padding-left: 22px; }
.article li { margin-bottom: 6px; }

.article a { color: var(--accent); text-decoration: none; }
.article a:hover { text-decoration: underline; }

.side-note {
  position: sticky;
  top: 96px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
}

.side-note h2 { margin: 0 0 10px; font-size: 1.02rem; }

.side-note p {
  margin: 0 0 16px;
  color: var(--text-2);
  font-size: 0.94rem;
  line-height: 1.55;
}

.side-note a {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent);
  text-decoration: none;
}

.side-note a:hover { text-decoration: underline; }

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.support-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
}

.support-card h2 { margin: 0 0 10px; font-size: 1.1rem; }

.support-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.62;
}

.support-card a { color: var(--accent); text-decoration: none; }
.support-card a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .content-grid,
  .support-grid { grid-template-columns: 1fr; }

  .side-note { position: static; }

  /* Privacy / Terms / Support is the whole navigation on these pages, so it
     cannot be hidden on small screens the way the homepage's section links
     are. */
  .policy-page .nav-links { display: flex; gap: 18px; font-size: 0.86rem; }
}
