/* ============================================================
   till.Doc — landing page
   Visual direction mirrors the iOS app: Inter type, glassy white
   surfaces with soft layered shadows, indigo accent (#5957D6),
   coral hero (#FB8C7A), green→yellow→red expiry ramp.
   ============================================================ */

:root {
  /* Brand */
  --indigo:       #5957D6;
  --indigo-600:   #4a48c4;
  --indigo-soft:  #ECEBFC;
  --coral:        #FB8C7A;
  --coral-600:    #F76F5A;
  --gold:         #FFCC00;
  --gold-deep:    #F2A900;

  /* Status (matches Theme.Color) */
  --green:  #34C759;
  --yellow: #FFB300;
  --red:    #FF3B30;

  /* Neutrals */
  --ink:        #121217;
  --muted:      #6E707A;
  --surface:    #ffffff;
  --bg:         #ffffff;
  --bg-muted:   #f5f5fa;
  --border:     rgba(18, 18, 23, 0.08);
  --border-2:   rgba(18, 18, 23, 0.12);

  /* Shape */
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --r-pill: 999px;

  /* Shadows — two-stop glassy lift, like the app's cardShadow */
  --shadow-sm: 0 1px 2px rgba(18,18,23,.05), 0 4px 12px rgba(18,18,23,.05);
  --shadow:    0 2px 4px rgba(18,18,23,.05), 0 14px 40px rgba(18,18,23,.08);
  --shadow-lg: 0 8px 24px rgba(18,18,23,.10), 0 40px 80px rgba(18,18,23,.14);

  --maxw: 1120px;
  --nav-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:      #f4f4f8;
    --muted:    #9da0ab;
    --surface:  #16161c;
    --bg:       #0d0d10;
    --bg-muted: #121217;
    --border:   rgba(255,255,255,0.10);
    --border-2: rgba(255,255,255,0.16);
    --indigo-soft: #211f3d;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow:    0 2px 4px rgba(0,0,0,.4), 0 14px 40px rgba(0,0,0,.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.5), 0 40px 80px rgba(0,0,0,.6);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 760px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--indigo);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  z-index: 100;
}
.skip-link:focus { left: 16px; }

.grad-text {
  background: linear-gradient(100deg, var(--coral-600), var(--indigo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 6px 18px rgba(89,87,214,.32);
}
.btn--primary:hover { background: var(--indigo-600); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-2);
}
.btn--ghost:hover { background: var(--bg-muted); transform: translateY(-1px); }

/* App Store badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-radius: 14px;
  /* Apple-style badge: fixed dark surface + white text in both schemes.
     Don't use var(--ink) — it flips to near-white in dark mode. */
  background: #121217;
  color: #fff;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-sm);
}
.appstore-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.appstore-badge__logo { width: 26px; height: 26px; flex: none; }
.appstore-badge__text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore-badge__text small { font-size: 11px; opacity: .85; letter-spacing: .02em; }
.appstore-badge__text strong { font-size: 19px; font-weight: 600; }
/* Always-light badge: white surface, so its text must stay dark
   regardless of color scheme (--ink flips to near-white in dark mode). */
.appstore-badge--light { background: #fff; color: #121217; }

/* ───────────────────────── Nav ───────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; }
.brand__mark { display: block; flex: none; }
.brand--footer .brand__mark { width: 28px; height: 28px; }
.brand__name { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; color: var(--gold-deep); }
.brand__dot { color: var(--red); }

.nav__links { display: flex; gap: 28px; font-size: 15px; }
.nav__links a { color: var(--muted); transition: color .15s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { padding: 10px 18px; }

/* ───────────────────────── Hero ───────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 110px) 0 clamp(60px, 9vw, 120px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 85% 0%, rgba(251,140,122,.28), transparent 70%),
    radial-gradient(55% 50% at 0% 30%, rgba(89,87,214,.18), transparent 70%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--indigo);
  background: var(--indigo-soft);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  margin-bottom: 22px;
}
.hero__title { font-size: clamp(40px, 6.4vw, 68px); font-weight: 700; }
.hero__sub {
  margin-top: 22px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
  max-width: 30em;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.hero__points li { display: inline-flex; align-items: center; gap: 8px; }
.tick {
  display: inline-grid;
  place-items: center;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Phone mockup */
.hero__visual { position: relative; display: grid; place-items: center; }
.phone__glow {
  position: absolute;
  inset: 8% 12%;
  background: radial-gradient(circle, rgba(251,140,122,.35), rgba(89,87,214,.25) 55%, transparent 72%);
  filter: blur(48px);
  z-index: -1;
}
.phone {
  position: relative;
  width: min(310px, 80vw);
  aspect-ratio: 9 / 19;
  background: #0c0c10;
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.08);
  transform: rotate(-2deg);
  transition: transform .4s ease;
}
.hero__visual:hover .phone { transform: rotate(0deg); }
.phone__notch {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 26px;
  background: #0c0c10;
  border-radius: var(--r-pill);
  z-index: 2;
}
.phone__screen {
  height: 100%;
  border-radius: 33px;
  overflow: hidden;
  background: var(--bg);
}

/* The in-phone mockup mirrors the real app home screen: amber accent (#F2A800),
   a stacked "till./Doc" wordmark between a layout toggle and a settings gear, a
   2-column card grid with a full-width focus card on top, amber Hugeicons-style
   glyphs on soft blobs (pink when urgent), colour-coded expiry phrases (no
   percentages / progress bars), and a floating frosted filter bar with Add. */
.app {
  --acc: #F2A800;               /* till.Doc amber accent (Theme.Color.accent) */
  position: relative;
  padding: 34px 11px 11px;
  display: flex; flex-direction: column;
  height: 100%;
}

/* Header — layout toggle (left), stacked wordmark (centre), settings gear (right) */
.app__header { position: relative; display: grid; place-items: center; padding: 2px 4px 14px; }
.app__logo { text-align: center; font-size: 21px; line-height: .92; font-weight: 800; letter-spacing: -.02em; color: var(--gold-deep); }
.app__logo-dot { color: var(--red); }
.app__navico { position: absolute; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.app__navico--left { left: 4px; }
.app__navico--right { right: 4px; }
.app__navico svg { width: 100%; height: 100%; }

/* Card grid — 2 columns; the focus card spans both */
.app__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; align-content: start; }

.doc {
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Focus card — full width: icon + Replace-file on top, title + expiry below */
.doc--focus {
  grid-column: 1 / -1;
  padding: 14px 15px;
  background: color-mix(in srgb, var(--bg-muted) 55%, var(--surface));
}
.doc__focustop { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.doc__replace {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--ink);
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 15px;
}
.doc__replace svg { width: 15px; height: 15px; color: var(--muted); flex: none; }

/* Grid cell — centred icon, title, expiry */
.doc--cell { padding: 13px 9px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; }

/* Thumbnail — amber glyph overhanging a soft blob (grey, or pink when urgent),
   mirroring DocumentThumbnail (blob + accent-tinted Hugeicons glyph). */
.thumb { position: relative; flex: none; width: 54px; height: 54px; display: grid; place-items: center; color: var(--acc); }
.thumb::before {
  content: ""; position: absolute;
  width: 62%; height: 62%;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  border-radius: 44% 56% 57% 43% / 48% 44% 56% 52%;
}
.thumb--urgent::before { background: color-mix(in srgb, var(--red) 15%, var(--bg-muted)); }
.thumb svg { position: relative; width: 88%; height: 88%; }
.thumb--lg { width: 68px; height: 68px; }

.doc__title { display: block; font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.doc--cell .doc__title { margin-top: 9px; font-size: 14px; }
.doc__expiry { display: block; font-size: 12px; color: var(--muted); }
.doc--cell .doc__expiry { margin-top: 5px; }
.doc--focus .doc__expiry { margin-top: 3px; }
.doc__expiry--red { color: var(--red); }
.doc__expiry--yellow { color: var(--yellow); }
.doc__expiry--green { color: var(--green); }

/* Floating frosted filter bar + Add control (pinned to the bottom of the app) */
.app__bar {
  margin-top: auto;
  display: flex; align-items: center; gap: 5px;
  padding: 6px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.app__pill { font-size: 12px; font-weight: 500; color: var(--muted); padding: 7px 12px; border-radius: var(--r-pill); }
.app__pill--on { color: var(--ink); font-weight: 600; background: var(--surface); box-shadow: var(--shadow-sm); }
.app__bar-div { width: 1px; height: 18px; background: var(--border-2); margin: 0 2px; }
.app__addbtn { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 7px 13px; }
.app__addbtn-ico { color: var(--acc); font-size: 18px; font-weight: 400; line-height: 1; }

/* ───────────────────────── Sections ───────────────────────── */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--muted { background: var(--bg-muted); }
.section__head { max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.section__head h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.section__head p { color: var(--muted); font-size: 17px; }

.kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--coral-600);
  margin-bottom: 14px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step__num {
  position: absolute;
  top: 22px; right: 24px;
  font-size: 13px; font-weight: 700;
  color: var(--indigo);
  background: var(--indigo-soft);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
}
.step__icon { font-size: 34px; margin-bottom: 16px; }
.step h3 { font-size: 21px; margin-bottom: 10px; }
.step p { color: var(--muted); }

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 15px;
  font-size: 24px;
  margin-bottom: 18px;
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.card h3 { font-size: 20px; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 880px;
  margin: 0 auto;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--c);
  transition: transform .15s ease;
}
.chip:hover { transform: translateY(-2px); }

/* Privacy */
.privacy {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  max-width: 880px;
}
.privacy__icon {
  flex: none;
  width: clamp(96px, 16vw, 140px);
  height: clamp(96px, 16vw, 140px);
  display: grid; place-items: center;
  font-size: clamp(48px, 8vw, 68px);
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--coral), var(--indigo));
  box-shadow: var(--shadow);
}
.privacy h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; }
.privacy p { color: var(--muted); font-size: 17px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 4px 22px;
  box-shadow: var(--shadow-sm);
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-weight: 400;
  font-size: 24px;
  color: var(--indigo);
  transition: transform .2s ease;
  line-height: 1;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { color: var(--muted); padding: 0 0 20px; }

/* CTA */
.cta {
  padding: clamp(64px, 9vw, 110px) 0;
  text-align: center;
  background: linear-gradient(140deg, var(--coral), var(--indigo));
  color: #fff;
}
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cta__mark { border-radius: 18px; box-shadow: var(--shadow-lg); margin-bottom: 24px; }
.cta h2 { font-size: clamp(28px, 4.4vw, 46px); max-width: 16em; }
.cta p { font-size: 18px; opacity: .92; margin: 16px 0 30px; max-width: 28em; }
.cta__note { font-size: 13px; opacity: .8; margin-top: 18px; }

/* Footer */
.footer { background: var(--ink); color: #fff; padding: 44px 0; }
@media (prefers-color-scheme: dark) { .footer { background: #060608; } }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand--footer .brand__name { color: var(--gold-deep); }
.footer__links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.footer__links a { color: rgba(255,255,255,.7); transition: color .15s ease; }
.footer__links a:hover { color: #fff; }
.footer__legal { width: 100%; font-size: 13px; color: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }
.footer__legal a { color: rgba(255,255,255,.7); }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { order: 2; }
  .hero__visual { order: 1; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__actions, .hero__points { justify-content: center; }
  .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .privacy { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .nav__links { display: none; }
  .cards { grid-template-columns: 1fr; }
  .hero__points { font-size: 13px; gap: 8px 16px; }
}

/* Reveal-on-scroll */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ───────────────────────── Legal pages ───────────────────────── */
.legal { padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.legal__head { margin-bottom: clamp(32px, 5vw, 48px); }
.legal__head h1 { font-size: clamp(32px, 5vw, 46px); }
.legal__updated { margin-top: 12px; font-size: 14px; color: var(--muted); }

.prose { max-width: 760px; }
.prose h2 {
  font-size: clamp(20px, 2.6vw, 24px);
  margin: 40px 0 12px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose p { margin: 0 0 14px; }
.prose ul { list-style: disc; padding-left: 22px; margin: 0 0 16px; }
.prose ul li { margin: 0 0 8px; }
.prose a { color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { .prose a { color: #9d9bff; } }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
