/* Tavbi landing page. "Signal green blocks": one flat colour field per chapter. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --deep: #092725;
  --deep-2: #0f3835;
  --on-deep: #f2fffb;
  --on-deep-muted: #b6d9d2;
  --mint: #65dfbd;
  --rule: #41635c;
  --sage: #e8efe9;
  --ink: #0b1f1d;
  --ink-muted: #47605b;
  --line: #cfdcd4;
  --due: #b54708;
  --wrap: 1160px;
  --pad: 128px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--deep);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #0a84ff; outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }

h2 { font-size: clamp(36px, 4.6vw, 64px); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
.lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; }

.skip { position: absolute; left: 16px; top: -80px; z-index: 20; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Nav capsule ---------- */

.site-nav { position: fixed; top: 16px; left: 0; right: 0; z-index: 10; padding: 0 16px; pointer-events: none; }
.nav-capsule {
  pointer-events: auto; max-width: 980px; margin: 0 auto; min-height: 60px; padding: 8px 8px 8px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff; border-radius: 999px; font-size: 15px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}
.site-nav.scrolled .nav-capsule { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22); transform: scale(0.985); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-nav nav { display: flex; gap: 4px; }
.site-nav nav a { text-decoration: none; color: var(--ink-muted); font-weight: 500; padding: 10px 14px; border-radius: 999px; transition: background 0.2s, color 0.2s; }
.site-nav nav a:hover { background: var(--sage); color: var(--ink); }
.get {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--deep); color: var(--on-deep); font-weight: 700; text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.get:hover { background: var(--deep-2); transform: translateY(-1px); }
.get:active { transform: scale(0.97); }
@media (max-width: 860px) { .site-nav nav { display: none; } }

/* ---------- Phone frame ---------- */

.phone {
  border: 8px solid #06110f; border-radius: 42px; overflow: hidden; background: #f2f2f7;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 660 / 1434; }

/* ---------- Opening ---------- */

.open { background: var(--deep); color: var(--on-deep); overflow: hidden; }
.open-copy { padding-top: 168px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.open h1 { font-size: clamp(52px, 7.4vw, 104px); font-weight: 800; line-height: 0.98; letter-spacing: -0.045em; }
.open .lede { margin-top: 28px; color: var(--on-deep-muted); max-width: 32ch; }

.get-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px; margin-top: 36px; }
.badge { display: inline-flex; line-height: 0; border-radius: 10px; transition: transform 0.25s var(--ease); }
.badge img { height: 54px; width: auto; }
.badge:hover { transform: translateY(-2px) scale(1.03); }
.badge:active { transform: scale(0.97); }
.qr-inline { display: flex; align-items: center; gap: 12px; text-align: left; font-size: 14px; line-height: 1.35; color: var(--on-deep-muted); }
.qr-inline img { width: 64px; height: 64px; padding: 6px; background: #fff; border-radius: 10px; }
@media (max-width: 900px) { .qr-inline { display: none; } }

.open-facts { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; font-size: 15px; font-weight: 500; color: var(--on-deep-muted); }
.open-facts li { display: flex; align-items: center; gap: 8px; }
.open-facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

/* three whole phones, nothing cropped */
.trio { display: flex; justify-content: center; align-items: center; gap: 32px; padding: 72px 24px 112px; }
.slot { flex: 0 1 270px; min-width: 0; }
.slot.main { flex-basis: 310px; }
@media (max-width: 900px) { .trio { gap: 16px; } }
@media (max-width: 560px) {
  /* swipeable row on phones so each screen stays readable */
  .trio { justify-content: flex-start; gap: 16px; padding: 48px 24px 72px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .trio::-webkit-scrollbar { display: none; }
  .slot, .slot.main { flex: 0 0 64%; scroll-snap-align: center; }
  .slot.main { order: -1; }
  .phone { border-width: 6px; border-radius: 34px; }
}

/* ---------- Lock Screen chapter (mint) ---------- */

.lock { background: var(--mint); color: var(--deep); padding: var(--pad) 0; }
.lock-grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 72px; align-items: center; }
.lock .lede { margin-top: 24px; max-width: 36ch; }
.lock-points { margin: 44px 0 0; display: grid; gap: 0; }
.lock-points > div { padding: 18px 0; border-top: 2px solid rgba(9, 39, 37, 0.18); }
.lock-points dt { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.lock-points dd { margin: 4px 0 0; }
@media (max-width: 900px) {
  .lock-grid { grid-template-columns: 1fr; gap: 56px; }
  .lock-copy { order: -1; }
}

.la { width: 100%; max-width: 360px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.seg { display: flex; gap: 2px; padding: 4px; background: rgba(9, 39, 37, 0.14); border-radius: 999px; }
.seg button {
  min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 14px "Inter", sans-serif; background: transparent; color: var(--deep);
  transition: background 0.25s, box-shadow 0.25s;
}
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }

.la-phone {
  position: relative; width: 100%; aspect-ratio: 360 / 720; overflow: hidden;
  border: 10px solid #06110f; border-radius: 56px; color: #fff; text-align: left;
  background: linear-gradient(168deg, #d9efe6 0%, #86bfae 30%, #2f7168 62%, #0c3531 100%);
  box-shadow: 0 34px 70px rgba(9, 39, 37, 0.4);
}
.la-pill { position: absolute; top: 12px; left: 50%; width: 104px; height: 30px; margin-left: -52px; background: #000; border-radius: 20px; }
.la-clock { position: absolute; top: 10%; left: 0; right: 0; text-align: center; }
.la-clock .date { font-size: 18px; font-weight: 600; }
.la-clock .time { font-size: 92px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.la-card {
  position: absolute; left: 10px; right: 10px; bottom: 15%;
  background: #000; border-radius: 26px; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.la-row { display: flex; align-items: flex-start; gap: 10px; }
.la-row.center { align-items: center; }
.la-row svg { flex: none; width: 26px; height: 26px; }
.la-name { flex: 1; min-width: 0; }
.la-name b { display: block; font-size: 16px; font-weight: 600; }
.la-name span { font-size: 14px; color: rgba(235, 235, 245, 0.65); }
.la-amt { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.la-actions { display: flex; justify-content: flex-end; gap: 8px; }
.la-actions button {
  position: relative; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 15px "Inter", sans-serif; display: inline-flex; align-items: center; gap: 6px;
  transition: transform 0.15s var(--ease);
}
.la-actions button:active { transform: scale(0.94); }
.la-skip { background: rgba(10, 132, 255, 0.24); color: #6ab0ff; }
.la-pay { background: #0071e3; color: #fff; }
.la-pay svg { width: 15px; height: 15px; }
.la-done { min-height: 44px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.la-done svg { width: 24px; height: 24px; }
.la-swipe { position: absolute; left: 0; right: 0; bottom: 5.5%; text-align: center; font-size: 13px; font-weight: 500; opacity: 0.9; }
.la-home { position: absolute; left: 50%; bottom: 9px; width: 124px; height: 5px; margin-left: -62px; border-radius: 3px; background: rgba(255, 255, 255, 0.9); }

.la-island-dim { position: absolute; inset: 0; background: rgba(4, 16, 15, 0.35); }
.la-island {
  position: absolute; top: 8px; left: 8px; right: 8px; transform-origin: 50% 0;
  background: #000; border-radius: 42px; padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.la-island-note { position: absolute; left: 0; right: 0; bottom: 9%; text-align: center; font-size: 15px; padding: 0 32px; }

.la-hint { font-size: 14px; font-weight: 600; min-height: 21px; }
.la-replay {
  min-height: 44px; padding: 0 20px; border: 2px solid var(--deep); border-radius: 999px;
  background: transparent; color: var(--deep); font: 700 14px "Inter", sans-serif; cursor: pointer;
}
@media (max-width: 400px) { .la-clock .time { font-size: 72px; } }

/* ---------- Calendar and history (sage) ---------- */

.sage, .facts, .plans, .questions { background: var(--sage); }
.sage { padding: var(--pad) 0 0; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 72px; align-items: center; }
.feature + .feature { margin-top: 112px; }
.feature.flip .feature-copy { order: 2; }
.feature.flip { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
.feature .lede { margin-top: 20px; color: var(--ink-muted); max-width: 34ch; }
.feature-media .phone { max-width: 320px; margin: 0 auto; box-shadow: 0 30px 60px rgba(9, 39, 37, 0.2); }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--deep); color: var(--on-deep); font-size: 0.78em; font-weight: 700; vertical-align: 0.08em; }
@media (max-width: 800px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .feature-copy { order: 0; }
  .feature + .feature { margin-top: 80px; }
}

/* ---------- Facts bento ---------- */

.facts { padding: var(--pad) 0 0; }
.facts h2 { max-width: 14ch; margin-bottom: 48px; }
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile {
  border-radius: 32px; padding: 32px; min-height: 240px; background: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.tile:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(9, 39, 37, 0.12); }
.tile.wide { grid-column: span 2; }
.tile.green { background: var(--deep); color: var(--on-deep); }
.tile.mint { background: var(--mint); color: var(--deep); }
.tile-label { font-size: 15px; font-weight: 600; color: var(--ink-muted); }
.tile.green .tile-label { color: var(--on-deep-muted); }
.tile.mint .tile-label { color: var(--deep); }
.tile-big { font-size: clamp(40px, 5vw, 68px); font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.tile-mid { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
@media (max-width: 800px) {
  .bento { grid-template-columns: 1fr; }
  .tile.wide { grid-column: auto; }
  .tile { min-height: 180px; padding: 28px; }
}

/* ---------- Free and Premium ---------- */

.plans { padding: var(--pad) 0 0; }
.plans h2 { max-width: 16ch; }
.plans > .wrap > .lede { margin-top: 20px; color: var(--ink-muted); }
.plan-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plan { background: #fff; border-radius: 32px; padding: 40px; }
.plan h3 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.plan h3 span { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--mint); }
.plan p { margin-top: 16px; }
.plan ul { list-style: none; margin: 24px 0 0; padding: 0; }
.plan li { position: relative; padding: 13px 0 13px 34px; border-top: 1px solid var(--line); }
.plan li::before {
  content: ""; position: absolute; left: 4px; top: 19px; width: 14px; height: 8px;
  border-left: 3px solid var(--deep); border-bottom: 3px solid var(--deep); transform: rotate(-45deg); border-radius: 1px;
}
.plan.premium { background: var(--deep); color: var(--on-deep); }
.plan.premium p { color: var(--on-deep-muted); }
.plan.premium li { border-color: var(--rule); }
.plan.premium li::before { border-color: var(--mint); }
.plan-note { font-size: 15px; margin-top: 24px; }
@media (max-width: 800px) { .plan-grid { grid-template-columns: 1fr; } .plan { padding: 28px; } }

/* ---------- Questions ---------- */

.questions { padding: var(--pad) 0; }
.faq { margin-top: 40px; background: #fff; border-radius: 32px; padding: 8px 32px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0; font-size: 20px; font-weight: 700; letter-spacing: -0.015em;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 11px; height: 11px; margin-right: 6px;
  border-right: 3px solid var(--deep); border-bottom: 3px solid var(--deep);
  transform: rotate(45deg); transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--ink-muted); }

/* ---------- Closing ---------- */

.close { position: relative; background: var(--deep); color: var(--on-deep); padding: var(--pad) 0 24px; overflow: hidden; }
.close-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.close-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.close h2 { margin-top: 32px; font-size: clamp(40px, 5.6vw, 76px); max-width: 13ch; }
.close .get-row { justify-content: center; }
.mark { position: absolute; width: 420px; height: 420px; stroke: var(--rule); opacity: 0.55; }
.mark-l { left: -130px; top: 40px; transform: rotate(-14deg); }
.mark-r { right: -150px; top: 220px; transform: rotate(12deg); }
@media (max-width: 800px) { .mark { width: 240px; height: 240px; } .mark-l { left: -110px; top: 10px; } .mark-r { right: -120px; top: 330px; } }

.close footer { position: relative; margin-top: var(--pad); }
.footer-panel {
  background: #fff; color: var(--ink); border-radius: 32px; padding: 32px;
  display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center; font-size: 15px;
}
.footer-panel p { margin-top: 8px; color: var(--ink-muted); }
.footer-panel nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-panel nav a { font-weight: 600; text-decoration: none; padding: 6px 0; }
.footer-panel nav a:hover { text-decoration: underline; }
.copyright { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 13px; }
@media (max-width: 700px) { .footer-panel { grid-template-columns: 1fr; } }

section[id] { scroll-margin-top: 72px; }
@media (max-width: 640px) { :root { --pad: 88px; } }

/* ---------- Motion ---------- */
/* Everything below is decoration. It is switched off for reduced motion, and the
   hidden starting states only apply once site.js has put .js on <html>. */

@keyframes rise { from { opacity: 0; transform: translateY(0.5em); } to { opacity: 1; transform: none; } }
@keyframes word { from { opacity: 0; transform: translateY(0.6em) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes tower-in { from { opacity: 0; translate: 0 120px; } to { opacity: 1; translate: 0 0; } }
@keyframes drift { from { translate: 0 -10px; } to { translate: 0 10px; } }
@keyframes card-in { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes island-in { from { opacity: 0; transform: scale(0.35, 0.2); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.6); } 60% { transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.7); } 100% { box-shadow: 0 0 0 14px rgba(10, 132, 255, 0); } }
@keyframes float-l { from { transform: rotate(-14deg) translateY(0); } to { transform: rotate(-9deg) translateY(-26px); } }
@keyframes float-r { from { transform: rotate(12deg) translateY(0); } to { transform: rotate(7deg) translateY(24px); } }
@keyframes open-faq { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* opening: headline words, then the rest, then the phones */
  .open h1 .w { display: inline-block; animation: word 0.8s var(--ease) both; }
  .w2 { animation-delay: 0.08s !important; }
  .w3 { animation-delay: 0.16s !important; }
  .w4 { animation-delay: 0.24s !important; }
  .rise { animation: rise 0.8s var(--ease) both; }
  .r5 { animation-delay: 0.38s; }
  .r6 { animation-delay: 0.5s; }
  .r7 { animation-delay: 0.62s; }
  .site-nav .nav-capsule { animation: rise 0.7s var(--ease) both; }
  .slot { animation: tower-in 1.1s var(--ease) 0.3s both; }
  .slot.s2 { animation-delay: 0.42s; }
  .slot.s3 { animation-delay: 0.54s; }
  .drift-a { animation: drift 7s ease-in-out infinite alternate; }
  .drift-b { animation: drift 9s ease-in-out -3s infinite alternate-reverse; }

  /* scroll reveals */
  .js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js [data-reveal="left"] { transform: translateX(-48px) rotate(-3deg); }
  .js [data-reveal="right"] { transform: translateX(48px) rotate(3deg); }
  .js [data-reveal="pop"] { transform: scale(0.6); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js [data-reveal].d1 { transition-delay: 0.1s; }
  .js [data-reveal].d2 { transition-delay: 0.2s; }
  .js [data-reveal].d3 { transition-delay: 0.3s; }
  .js .bento .tile:nth-child(2) { transition-delay: 0.1s; }
  .js .bento .tile:nth-child(4) { transition-delay: 0.1s; }
  .js .bento .tile:nth-child(5) { transition-delay: 0.2s; }
  /* hover lift must not wait on the reveal delay */
  .js .bento .tile.in:hover { transition-delay: 0s; }

  /* plan rows tick in one after another */
  .js .plan li { opacity: 0; transform: translateX(-12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
  .js .plan.in li { opacity: 1; transform: none; }
  .js .plan.in li:nth-child(1) { transition-delay: 0.15s; }
  .js .plan.in li:nth-child(2) { transition-delay: 0.22s; }
  .js .plan.in li:nth-child(3) { transition-delay: 0.29s; }
  .js .plan.in li:nth-child(4) { transition-delay: 0.36s; }
  .js .plan.in li:nth-child(5) { transition-delay: 0.43s; }
  .js .plan.in li:nth-child(6) { transition-delay: 0.5s; }
  .js .plan.in li:nth-child(7) { transition-delay: 0.57s; }

  /* Lock Screen demo */
  .js .la .la-card { opacity: 0; }
  .js .la.in .la-card { animation: card-in 0.7s var(--ease) 0.45s both; }
  .la-island { animation: island-in 0.5s var(--ease) both; }
  .la-done { animation: pop 0.45s var(--ease) both; }
  .la-done .draw { stroke-dasharray: 16; stroke-dashoffset: 16; animation: draw 0.35s ease-out 0.2s forwards; }
  .la:not(.touched) .la-pay { animation: ring 1.8s ease-out 1.4s infinite; }

  .faq details[open] p { animation: open-faq 0.35s var(--ease) both; }
  .mark-l { animation: float-l 11s ease-in-out infinite alternate; }
  .mark-r { animation: float-r 13s ease-in-out infinite alternate; }
}

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