/* TipTap landing — the app's auth-screen design system grown into a website.
   Brand source: app/lib/core/theme/app_theme.dart + features/onboarding/auth_widgets.dart.
   Dark, lit (top green bleed + vignette), one accent used sparingly, Space Grotesk. */

/* ---------- Fonts (bundled, no external fetch) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0C120F;
  --surface: #121A15;
  --surface-elev: #1A241E;
  --hairline: #26332B;
  --field: #0E1511;
  --text: #F4F5F7;
  --text-2: #9AA0AB;
  --text-3: #5D6470;
  --accent: #00D26A;
  --accent-top: #1BE381;
  --accent-bottom: #00C463;
  --danger: #FF5C5C;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --font: 'Space Grotesk', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(0, 210, 106, .28); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

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

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 20px;
}
.container-narrow { max-width: 780px; }

section[id], [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }

.hero-title {
  font-size: clamp(2.5rem, 5.2vw + 1rem, 4.4rem);
  letter-spacing: -0.03em;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(180deg, var(--accent-top), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3vw + .5rem, 2.9rem); }
.section-head p { color: var(--text-2); margin-top: 14px; font-size: 1.06rem; }
.section-head-left { text-align: left; margin-inline: 0; }

/* ---------- Buttons (AuthCta translated to web) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border: 0;
  border-radius: var(--r-lg);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent-top), var(--accent));
  color: #04170D;
  box-shadow: 0 6px 18px rgba(0, 210, 106, .30);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 210, 106, .38); }
.btn-primary:active { transform: translateY(0); filter: brightness(.94); }
.btn-lg { height: 56px; padding-inline: 28px; font-size: 17px; }
.btn-sm { height: 40px; padding-inline: 18px; font-size: 14.5px; border-radius: var(--r-md); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(12, 18, 15, .72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--hairline); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.lockup { display: inline-flex; align-items: center; gap: 10px; }
.lockup-word {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.site-nav {
  display: none;
  gap: 26px;
  margin-inline: auto;
}
.site-nav a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  transition: color .16s ease;
}
.site-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.lang-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a {
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  border-radius: 999px;
  transition: color .16s ease, background .16s ease;
}
.lang-switch a:hover { color: var(--text-2); }
.lang-switch a[aria-current] {
  color: #04170D;
  background: linear-gradient(180deg, var(--accent-top), var(--accent));
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 64px;
  overflow: hidden;
}

/* The auth screen's lit background: green bleed from the top edge + a faint
   vignette so corners recede and the center feels lit. */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -30%,
      rgba(0, 210, 106, .13) 0%,
      rgba(0, 210, 106, .045) 38%,
      transparent 72%),
    radial-gradient(90% 90% at 50% 50%,
      transparent 55%,
      rgba(0, 0, 0, .30) 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(18, 26, 21, .6);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 22px;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 210, 106, .5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 210, 106, .45); }
  70% { box-shadow: 0 0 0 8px rgba(0, 210, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 210, 106, 0); }
}

.hero-sub {
  color: var(--text-2);
  font-size: 1.13rem;
  max-width: 34em;
  margin-top: 20px;
}

.hero-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }

.store-badges { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  height: 56px;
  padding-inline: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.store-badge:hover {
  border-color: rgba(0, 210, 106, .45);
  background: var(--surface-elev);
  transform: translateY(-2px);
}
.sb-text { display: flex; flex-direction: column; line-height: 1.15; }
.sb-text small { font-size: 11px; color: var(--text-3); font-weight: 500; }
.sb-text strong { font-size: 16.5px; font-weight: 600; letter-spacing: -0.2px; }

/* Phone mock — the guest tip page, drawn with the app's own components. */
.hero-visual {
  position: relative;
  justify-self: center;
  width: min(320px, 82vw);
}

.phone {
  position: relative;
  border-radius: 44px;
  border: 1px solid var(--hairline);
  background: #080C0A;
  padding: 10px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, .5),
    0 0 90px rgba(0, 210, 106, .07);
}
.phone-screen {
  border-radius: 35px;
  background:
    radial-gradient(130% 60% at 50% -12%, rgba(0, 210, 106, .10), transparent 60%),
    #0A0F0C;
  border: 1px solid rgba(255, 255, 255, .04);
  padding: 14px 18px 22px;
  overflow: hidden;
}
.p-statusbar {
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 600;
  padding-inline: 6px;
}
.p-sb-icons { letter-spacing: 2px; font-size: 8px; line-height: 2; }
.p-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.4px;
}
.p-waiter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 12px 14px;
}
.p-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom));
  color: #04170D;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.p-name { font-weight: 600; font-size: 14.5px; }
.p-role { color: var(--text-3); font-size: 12px; margin-top: 1px; }
.p-star { color: var(--accent); }
.p-tip-title {
  margin-top: 20px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.p-chips { display: flex; gap: 7px; margin-top: 10px; }
.p-chip {
  flex: 1;
  text-align: center;
  padding: 9px 2px;
  border-radius: 11px;
  border: 1px solid var(--hairline);
  background: var(--field);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.p-chip.is-selected {
  border-color: var(--accent);
  color: var(--accent-top);
  background: rgba(0, 210, 106, .10);
  box-shadow: 0 0 16px rgba(0, 210, 106, .14);
}
.p-amount {
  text-align: center;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-top: 24px;
}
.p-cta {
  margin-top: 22px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--accent-top), var(--accent));
  color: #04170D;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 6px 18px rgba(0, 210, 106, .28);
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 11px 15px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  animation: floaty 5.5s ease-in-out infinite;
}
.float-toast { top: 13%; right: -6%; }
.float-stars { bottom: 15%; left: -9%; font-size: 15px; letter-spacing: 2px; animation-delay: -2.7s; }
.float-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 210, 106, .16);
  color: var(--accent-top);
  font-size: 12px;
  flex-shrink: 0;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@media (min-width: 960px) {
  .hero { padding-top: calc(var(--header-h) + 88px); padding-bottom: 96px; }
  .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 40px; }
  .hero-visual { width: 320px; }
}

/* ---------- Sections ---------- */
.section { padding-block: 76px; }
.section-alt {
  background:
    linear-gradient(180deg, rgba(18, 26, 21, .55), rgba(18, 26, 21, .25));
  border-block: 1px solid rgba(38, 51, 43, .55);
}
@media (min-width: 960px) {
  .section { padding-block: 108px; }
}

.grid { display: grid; gap: 18px; }
@media (min-width: 700px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 26px 24px;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(0, 210, 106, .35); }
.card h3 { font-size: 1.16rem; margin-top: 18px; }
.card p { color: var(--text-2); font-size: .95rem; margin-top: 8px; }

.icon-tile {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(0, 210, 106, .09);
  border: 1px solid rgba(0, 210, 106, .22);
}
.icon-tile-sm { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }

.step-card .step-top { display: flex; align-items: flex-start; justify-content: space-between; }
.step-num {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--hairline);
}

/* ---------- Split (waiters) ---------- */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1.05fr .95fr; gap: 64px; } }

.feature-list { list-style: none; display: grid; gap: 22px; margin-top: 34px; }
.feature-list li { display: flex; gap: 16px; align-items: flex-start; }
.feature-list h3 { font-size: 1.08rem; }
.feature-list p { color: var(--text-2); font-size: .95rem; margin-top: 5px; }

/* Waiter balance card mock */
.split-visual { justify-self: center; width: min(400px, 100%); }
.balance-card {
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(0, 210, 106, .09), transparent 60%),
    var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .4), 0 0 70px rgba(0, 210, 106, .05);
}
.b-head { display: flex; justify-content: space-between; align-items: center; }
.b-label {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.b-amount { font-size: 52px; font-weight: 700; letter-spacing: -1.5px; line-height: 1.05; margin-top: 14px; }
.b-today { color: var(--text-2); font-size: 14.5px; margin-top: 6px; }
.b-up { color: var(--accent-top); font-weight: 600; }
.b-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 74px;
  margin-top: 24px;
}
.b-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, rgba(0, 210, 106, .75), rgba(0, 210, 106, .25));
}
.b-bars span:nth-child(6) { background: linear-gradient(180deg, var(--accent-top), var(--accent-bottom)); }
.b-withdraw {
  margin-top: 24px;
  height: 50px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--accent-top), var(--accent));
  color: #04170D;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 210, 106, .26);
}
.b-cardrow {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
  margin-top: 16px;
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 500;
}

/* ---------- FAQ ---------- */
.faq {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.faq details + details { border-top: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.03rem;
  transition: color .16s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-top); }
.faq-chevron {
  flex-shrink: 0;
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform .22s ease;
  margin-top: -4px;
}
.faq details[open] .faq-chevron { transform: rotate(225deg); margin-top: 4px; }
.faq details[open] summary { color: var(--accent-top); }
.faq details > p {
  padding: 0 24px 22px;
  color: var(--text-2);
  max-width: 60em;
}

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  text-align: center;
  background:
    radial-gradient(110% 100% at 50% -30%, rgba(0, 210, 106, .13), transparent 62%),
    var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  padding: 56px 24px;
  overflow: hidden;
}
.contact-mark { margin: 0 auto 22px; }
.contact-card h2 { font-size: clamp(1.7rem, 3vw + .4rem, 2.5rem); }
.contact-card > p { color: var(--text-2); margin: 14px auto 0; max-width: 34em; }
.contact-actions { margin-top: 30px; }
.contact-lines {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
}
.contact-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 15px;
  transition: color .16s ease;
}
.contact-line:hover { color: var(--accent-top); }
.contact-line svg { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 56px 0 32px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .25));
}
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; } }

.footer-brand p { color: var(--text-3); font-size: 14px; margin-top: 14px; max-width: 26em; }
.footer-col { display: grid; gap: 11px; align-content: start; justify-items: start; }
.footer-col h4 {
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 4px;
}
.footer-col a { color: var(--text-2); font-size: 14.5px; transition: color .16s ease; }
.footer-col a:hover { color: var(--text); }
.footer-col a[aria-current] { color: var(--accent-top); }

.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: 13.5px;
}

/* ---------- Reveal on scroll (JS-gated; static without JS) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .float-card { animation: none; }
  .pulse-dot { animation: none; }
  .btn, .card, .store-badge { transition: none; }
}
