/* KueTap — tokens lifted verbatim from the TowFi site so the two read as
   one family. Dark is the default; [data-theme="light"] overrides, matching
   TowFi's manual toggle rather than prefers-color-scheme. */
:root {
  --towfi-gold:      rgb(255, 163, 12);
  --towfi-gold-dark: rgb(224, 163, 13);
  --bg-primary:      rgb(26, 32, 37);
  --bg-secondary:    rgb(34, 39, 43);
  --bg-card:         rgb(45, 52, 60);
  --bg-input:        rgb(24, 28, 31);
  --text-primary:    #ffffff;
  --text-secondary:  #9ca3af;
  --text-muted:      #6b7280;
  --border-color:    rgb(55, 62, 70);
  --track-color:     rgba(255, 163, 12, 0.1);
}
[data-theme="light"] {
  --bg-primary:     #f5f5f5;
  --bg-secondary:   #ffffff;
  --bg-card:        #ffffff;
  --bg-input:       #e5e5e5;
  --text-primary:   #1a2025;
  --text-secondary: #4b5563;
  --text-muted:     #6b7280;
  --border-color:   #d1d5db;
  --track-color:    rgba(0, 0, 0, 0.08);
}
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-primary); color: var(--text-primary);
  font: 400 17px/1.7 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 22px; }

header { border-bottom: 1px solid var(--border-color); background: var(--bg-secondary); }
header .wrap { display: flex; align-items: center; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.mark { width: 30px; height: 30px; flex: none; }
.brand {
  text-decoration: none; color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 700;
  letter-spacing: -.02em;
}
.brand span { color: var(--towfi-gold); }
header nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: .92rem; }
header nav a { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
header nav a:hover, header nav a[aria-current] { color: var(--towfi-gold); }
#theme {
  background: none; border: 1px solid var(--border-color); border-radius: 999px;
  color: var(--text-secondary); cursor: pointer; font: inherit; font-size: .85rem;
  padding: 5px 13px; line-height: 1;
}
#theme:hover { color: var(--towfi-gold); border-color: var(--towfi-gold); }

main { padding: 46px 0 20px; }
h1 {
  font-family: 'Space Grotesk', sans-serif; font-size: 2.2rem; font-weight: 700;
  letter-spacing: -.03em; margin: 0 0 6px; line-height: 1.15;
}
.updated { color: var(--text-muted); font-size: .92rem; margin: 0 0 40px; }
h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.24rem; font-weight: 600;
  margin: 40px 0 12px; padding-top: 22px; border-top: 1px solid var(--border-color);
  letter-spacing: -.015em;
}
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { font-size: 1.02rem; font-weight: 600; margin: 26px 0 8px; }
p, li { color: var(--text-secondary); }
p { margin: 0 0 16px; }
ul { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }
strong { color: var(--text-primary); font-weight: 600; }
a { color: var(--towfi-gold); }
code {
  font: 400 .88em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-input); padding: 2px 6px; border-radius: 6px; color: var(--text-primary);
}
.callout {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-left: 3px solid var(--towfi-gold); border-radius: 12px;
  padding: 18px 20px; margin: 0 0 24px;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--towfi-gold); }
table {
  width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: .95rem;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 12px; overflow: hidden;
}
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-color); vertical-align: top; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { color: var(--text-primary); font-weight: 600; }
td { color: var(--text-secondary); }

footer { border-top: 1px solid var(--border-color); margin-top: 56px; background: var(--bg-secondary); }
footer .wrap { padding-top: 26px; padding-bottom: 40px; }
.footline { font-size: .88rem; color: var(--text-muted); margin: 0 0 6px; }
.footline a { color: var(--text-secondary); text-decoration: none; }
.footline a:hover { color: var(--towfi-gold); }
.towfi { font-size: .84rem; color: var(--text-muted); margin: 10px 0 0; }
.towfi b { color: var(--towfi-gold); font-weight: 600; }
a:focus-visible, #theme:focus-visible { outline: 2px solid var(--towfi-gold); outline-offset: 3px; }
@media (max-width: 520px) {
  h1 { font-size: 1.8rem; }
  header nav { gap: 12px; font-size: .85rem; }
}

/* ── Hero: TowFi's floating phone, running the KueTap splash ───────────── */
.hero { padding: 60px 0 40px; }
.hero-container {
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
  max-width: 62rem; margin: 0 auto; padding: 0 22px;
}
.hero-content h1 { font-size: 3rem; margin-bottom: 14px; }
.hero-content .lede { font-size: 1.16rem; color: var(--text-secondary); margin: 0 0 26px; max-width: 30rem; }
.hero-badge {
  display: inline-block; font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--towfi-gold); background: var(--track-color);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 13px 24px; border-radius: 12px;
}
.btn-primary { background: var(--towfi-gold); color: #1a2025; }
.btn-secondary { border: 1px solid var(--border-color); color: var(--text-primary); }
.btn:hover { filter: brightness(1.08); }

.hero-visual { display: flex; justify-content: center; align-items: center; position: relative; }
.hero-glow {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,163,12,.2) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%); pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}
.phone-mockup {
  width: 264px; height: 545px; padding: 12px; border-radius: 50px; position: relative;
  background: linear-gradient(145deg, rgb(45,52,60), rgb(26,32,37));
  box-shadow: 0 50px 100px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.1),
              inset 0 0 0 1px rgba(255,255,255,.05);
  animation: float 6s ease-in-out infinite;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 40px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, rgb(34,39,43) 0%, rgb(26,32,37) 100%);
  display: flex; align-items: center; justify-content: center;
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px; background: #000; border-radius: 20px; z-index: 10;
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-20px) rotate(2deg); } }
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* The splash mark, replayed on a loop inside the phone. */
.splash { width: 100%; height: 100%; }
.sp-dot   { animation: spDot 8s ease-out infinite; transform-origin: 116px 232px; }
.sp-glow  { animation: spGlow 8s ease-out infinite; transform-origin: 116px 232px; }
.sp-arc   { stroke-dasharray: 140; stroke-dashoffset: 140; animation: spArc 8s ease-out infinite; }
.sp-arc2  { animation-delay: .23s; } .sp-arc3 { animation-delay: .46s; }
.sp-rip   { animation: spRip 8s ease-out infinite; transform-origin: 116px 232px; }
.sp-rip2  { animation-delay: .65s; }
.sp-word  { animation: spWord 8s ease-out infinite; }
.sp-tag   { animation: spWord 8s ease-out infinite .4s; }
.sp-pow   { animation: spWord 8s ease-out infinite .7s; }
@keyframes spDot  { 0%{opacity:0;transform:scale(.35)} 7%{opacity:1;transform:scale(1)} 88%{opacity:1} 96%,100%{opacity:0} }
@keyframes spGlow { 0%{opacity:0} 10%{opacity:1} 88%{opacity:1} 96%,100%{opacity:0} }
@keyframes spArc  { 0%,4%{stroke-dashoffset:140} 14%{stroke-dashoffset:0} 88%{stroke-dashoffset:0;opacity:1} 96%,100%{opacity:0} }
@keyframes spRip  { 0%,28%{opacity:0;transform:scale(.25)} 30%{opacity:.7} 44%{opacity:0;transform:scale(2.6)} 100%{opacity:0} }
@keyframes spWord { 0%,16%{opacity:0} 26%{opacity:1} 88%{opacity:1} 96%,100%{opacity:0} }
@media (prefers-reduced-motion: reduce) {
  .phone-mockup, .hero-glow, .sp-dot, .sp-glow, .sp-arc, .sp-rip, .sp-word, .sp-tag, .sp-pow { animation: none; }
  .sp-glow { opacity: 1; }
  .sp-arc { stroke-dashoffset: 0; }
}
@media (max-width: 820px) {
  .hero-container { grid-template-columns: 1fr; gap: 36px; }
  .hero-content h1 { font-size: 2.3rem; }
  .phone-mockup { width: 232px; height: 480px; }
}
