/* Tabsie site. Light only.
   The page is built from the app's own material: the Harbour gradient as the ground, white glass
   cards, teal pills, the app's radii. Colours come from app/src/theme/theme.ts (lightColors).
   Headings are set in Bricolage Grotesque; body text uses the system stack, as the app does. */

:root {
  color-scheme: light;

  --ground-1: #dceff3;
  --ground-2: #e6f3ee;
  --ground-3: #f1f5ea;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.85);
  --ink: #1c1c1e;
  --muted: #55555a;
  --line: rgba(60, 60, 67, 0.16);
  --accent: #0a6560;
  --accent-deep: #084f4b;
  --accent-soft: #ddeeec;
  --on-accent: #ffffff;
  --owed: #2f6b1f;
  --owe: #9a4219;
  --success-soft: #e3f1dd;
  --warning-soft: #fbebdd;
  --warning-ink: #7a3410;
  --subtle-fill: rgba(118, 118, 128, 0.14);
  --shadow-rgb: 11, 59, 58;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --pill: 999px;

  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground-3) linear-gradient(180deg, var(--ground-1) 0%, var(--ground-2) 45%, var(--ground-3) 100%) no-repeat;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.prose-wrap { max-width: 46rem; }

/* Type */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); line-height: 1; }
.nobr { display: inline-block; }
h2 { font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem); letter-spacing: -0.025em; }
h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0 0 1rem; text-wrap: pretty; }
.lead { font-size: 1.1875rem; line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* Buttons and chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 3rem; padding: 0 1.375rem; border-radius: var(--pill);
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-light { background: var(--surface); color: var(--accent); }
.btn-light:hover { background: var(--accent-soft); }
.btn-light:focus-visible { outline-color: var(--surface); }
.btn svg { width: 1.125rem; height: 1.125rem; }

.chip {
  display: inline-flex; align-items: center; height: 3rem; padding: 0 1.125rem;
  border-radius: var(--pill); background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--ink); font-weight: 600; font-size: 0.9375rem; white-space: nowrap;
}

/* Header */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand {
  display: flex; align-items: center; gap: 0.625rem; color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; opacity: 0.8; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.nav .nav-more { display: none; }

/* Phone frame. Screens are 402 x 874 points. */
.phone {
  --pw: 15rem;
  --pr: 2.75rem;
  width: var(--pw); padding: 0.5rem; border-radius: var(--pr);
  background: #101617; position: relative; flex: none;
  box-shadow: 0 1.5rem 3rem -1rem rgba(var(--shadow-rgb), 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.phone img {
  width: 100%; aspect-ratio: 402 / 874; object-fit: cover; object-position: top;
  border-radius: calc(var(--pr) - 0.5rem); background: var(--ground-1);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2a3336; }
.phone::before { left: -3px; top: 22%; height: 11%; box-shadow: 0 calc(var(--pw) * 0.17) 0 #2a3336; }
.phone::after { right: -3px; top: 26%; height: 15%; }

/* Hero */
.hero { padding: 1.5rem 0 4rem; }
.hero .wrap { display: grid; gap: 2.5rem; }
.hero h1 { margin-bottom: 1.125rem; }
.hero .lead { margin-bottom: 1.75rem; max-width: 32rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.hero-note { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.hero-stage { position: relative; display: flex; justify-content: center; padding-top: 1rem; }
.phone--back { display: none; }
.hero-tabby { position: absolute; left: calc(50% - 11.25rem); bottom: -0.75rem; width: 8.5rem; z-index: 3; filter: drop-shadow(0 10px 14px rgba(var(--shadow-rgb), 0.2)); }
.hero-tabby img { width: 100%; }

/* Sections */
section { padding: 3.5rem 0; }
.section-head { margin-bottom: 2rem; max-width: 36rem; }
.section-head p { margin: 0.75rem 0 0; color: var(--muted); font-size: 1.125rem; }

/* How it works */
.steps { display: grid; gap: 2.5rem; }
.step { display: grid; gap: 1.5rem; }
.step-text { max-width: 30rem; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem;
  border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent);
  font-family: var(--display); font-weight: 800; font-size: 1.125rem; margin-bottom: 0.875rem;
}
.step h3 { margin-bottom: 0.625rem; }
.step p { margin: 0; color: var(--muted); }
.step-stage {
  position: relative; min-height: 22rem; overflow: hidden; border-radius: var(--r-xl);
  background: linear-gradient(160deg, #cbe4e8 0%, #ddeeec 55%, #e8f1e6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 4px 14px rgba(var(--shadow-rgb), 0.07);
}
.step-stage .phone { position: absolute; left: 50%; top: 2.25rem; transform: translateX(-50%); }
.step-stage--diagram { display: grid; place-items: center; padding: 1.5rem 1.25rem; }

/* The simplification diagram */
.simplify { width: 100%; max-width: 24rem; }
.simplify-card {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  padding: 1.125rem 1rem 1rem; box-shadow: 0 4px 14px rgba(var(--shadow-rgb), 0.07);
}
.simplify svg { width: 100%; height: auto; overflow: visible; }
.simplify .avatar { fill: #bfe3df; }
.simplify .avatar-b { fill: #f3ddb8; }
.simplify .avatar-c { fill: #d5d9f0; }
.simplify .initial { font: 700 1.25rem var(--font); fill: var(--ink); }
.simplify .name { font: 500 0.9375rem var(--font); fill: var(--ink); }
.simplify .amount { font: 600 0.875rem var(--font); fill: var(--accent); font-variant-numeric: tabular-nums; }
.simplify .edge { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.simplify .edge-before { transition: opacity 0.4s ease, stroke 0.4s ease; }
.simplify .edge-after { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s, opacity 0.2s ease 0.2s; }
.simplify .head-after, .simplify .amount-after { opacity: 0; transition: opacity 0.3s ease 0.9s; }
.simplify .amount-before { transition: opacity 0.4s ease; }
.simplify .head-before { fill: var(--accent); transition: opacity 0.4s ease; }
.simplify .head-after { fill: var(--accent); }
.simplify[data-mode="after"] .edge-before { stroke: #9aa7a7; opacity: 0.45; stroke-dasharray: 2 6; }
.simplify[data-mode="after"] .head-before, .simplify[data-mode="after"] .amount-before { opacity: 0; }
.simplify[data-mode="after"] .edge-after { stroke-dashoffset: 0; opacity: 1; }
.simplify[data-mode="after"] .head-after, .simplify[data-mode="after"] .amount-after { opacity: 1; }
.simplify-caption { margin: 0.75rem 0 0; min-height: 3.2em; font-size: 0.9375rem; color: var(--muted); text-align: center; }
.simplify-caption strong { color: var(--ink); font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 0.875rem; padding: 3px; border-radius: 11px; background: var(--subtle-fill); }
.seg button {
  height: 2.25rem; border: 0; border-radius: 8px; background: transparent; color: var(--ink);
  font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(var(--shadow-rgb), 0.16); }
.seg button:focus-visible { outline-offset: -2px; }

/* Trust */
.trust-card {
  display: grid; gap: 1.5rem; align-items: center;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-xl);
  padding: 1.75rem 1.25rem; box-shadow: 0 4px 14px rgba(var(--shadow-rgb), 0.07);
}
.trust-art { width: 9rem; justify-self: center; }
.trust-card h2 { margin-bottom: 0.5rem; }
.trust-card .lead { margin-bottom: 1.25rem; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 0.875rem 0; border-top: 1px solid var(--line); color: var(--muted); }
.facts li strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 0.125rem; }

/* Closing */
.cta {
  position: relative; overflow: hidden; display: grid; gap: 1.5rem; align-items: center;
  background: var(--accent) linear-gradient(135deg, #0d6f69 0%, var(--accent) 55%, var(--accent-deep) 100%);
  color: var(--on-accent); border-radius: var(--r-xl); padding: 2.25rem 1.5rem;
  box-shadow: 0 1.25rem 2.5rem -1rem rgba(var(--shadow-rgb), 0.45);
}
.cta h2 { margin-bottom: 0.75rem; }
.cta p { color: rgba(255, 255, 255, 0.85); margin-bottom: 1.5rem; max-width: 30rem; }
.cta p:last-child { margin-bottom: 0; }
.cta-art { width: 10rem; justify-self: center; }
.cta ::selection { background: var(--on-accent); color: var(--accent); }

/* Footer */
.site-footer { padding: 2rem 0 2.5rem; font-size: 0.9375rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0; }
.footer-brand { display: flex; align-items: center; gap: 0.625rem; color: var(--ink); font-weight: 600; }
.footer-brand img { width: 24px; height: 24px; border-radius: 6px; }

/* Draft banner (privacy, terms) */
.draft { background: var(--warning-soft); color: var(--warning-ink); font-size: 0.9375rem; font-weight: 600; }
.draft .wrap { padding-top: 0.75rem; padding-bottom: 0.75rem; }

/* Documents (privacy, terms, support) */
.doc { padding: 1.5rem 0 4rem; }
.doc .prose-wrap {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-xl);
  padding: 2rem 1.25rem 2.25rem; box-shadow: 0 4px 14px rgba(var(--shadow-rgb), 0.07);
}
.doc h1 { font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem); margin-bottom: 0.75rem; }
.doc h2 { font-size: 1.375rem; margin: 2.25rem 0 0.75rem; }
.doc ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.doc li { margin-bottom: 0.5rem; }
.doc li::marker { color: var(--accent); }
.doc .meta { color: var(--muted); font-size: 0.9375rem; margin-bottom: 1.75rem; }
.fill { background: #fff3c4; color: #5c4400; padding: 0.05rem 0.35rem; border-radius: 4px; font-weight: 600; font-size: 0.9em; }
.doc-art { width: 7rem; margin: -0.5rem 0 0.75rem -0.5rem; }

.note { background: var(--accent-soft); border-radius: var(--r-lg); padding: 1.25rem 1.5rem; }
.note p { margin: 0; }
.note h2 { font-size: 1.25rem; }

/* FAQ (support) */
.faq { display: grid; gap: 0.75rem; margin: 1.5rem 0; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 1.25rem; }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 600; font-size: 1rem; list-style-position: outside; }
.faq summary::marker { color: var(--accent); }
.faq summary:hover { color: var(--accent); }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { color: var(--muted); font-size: 1rem; padding: 0.875rem 0 0.25rem; }

/* Larger screens */
@media (min-width: 40rem) {
  .wrap { padding: 0 1.5rem; }
  .nav .nav-more { display: inline; }
  .trust-card { grid-template-columns: 10rem 1fr; gap: 2.5rem; padding: 2.5rem; }
  .trust-art { width: 10rem; }
  .cta { grid-template-columns: 1fr 11rem; padding: 3rem; }
  .cta-art { width: 11rem; }
  .site-footer .wrap { grid-template-columns: auto 1fr auto; align-items: center; }
  .site-footer nav { justify-content: center; }
  .doc .prose-wrap { padding: 2.75rem 3rem 3rem; }
}

@media (min-width: 56rem) {
  .site-header .wrap { height: 4.5rem; }
  .hero { padding: 3rem 0 5.5rem; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 2rem; }
  .hero h1 { margin-bottom: 1.5rem; }
  .hero .lead { font-size: 1.3125rem; margin-bottom: 2rem; }
  .hero-stage { display: block; height: 39rem; padding: 0; }
  .hero-stage .phone { --pw: 16.5rem; --pr: 3rem; position: absolute; }
  .phone--back { display: block; left: 0; top: 0; transform: scale(0.94); transform-origin: top left; opacity: 0.96; z-index: 1; }
  .phone--front { right: 0; top: 3rem; z-index: 2; }
  .hero-tabby { left: calc(50% - 7rem); bottom: -0.5rem; width: 10rem; }

  section { padding: 4.5rem 0; }
  .section-head { margin-bottom: 3rem; }
  .steps { gap: 3.5rem; }
  .step { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4rem; }
  .step:nth-child(even) .step-stage { order: -1; }
  .step-text { justify-self: start; }
  .step:nth-child(even) .step-text { justify-self: end; }
  .step-stage { min-height: 26rem; }
  .step-stage .phone { --pw: 16rem; --pr: 3rem; top: 2.5rem; }
  .cta { grid-template-columns: 1fr 13rem; padding: 3.5rem 4rem; }
  .cta-art { width: 13rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
