/* Torvik website. One stylesheet, no frameworks. Colours come from the app and its icon. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/inter-latin-800-normal.woff2") format("woff2"); }

:root {
  --bg: #0C0F14;
  --surface: #121720;
  --surface-2: #151920;
  --line: #1E2430;
  --line-2: #2A3240;
  --text: #FFFFFF;
  --text-2: #C9CED6;
  --muted: #9AA3AE;
  --faint: #7D8792;
  --blue: #7FB2FE;
  --teal: #5EE6C8;
  --green: #35F07A;
  --amber: #FFB020;
  --grad: linear-gradient(90deg, #7FB2FE 0%, #5EE6C8 55%, #35F07A 100%);
  --radius: 24px;
  --gutter: 56px;
  --max: 1168px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.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; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: #FFFFFF; color: var(--bg); font-weight: 700; }
.skip:focus { top: 12px; }

.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); }
.eyebrow.g { color: var(--green); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gline { height: 2px; border: 0; margin: 0; background: linear-gradient(90deg, rgba(127,178,254,0), var(--blue) 30%, var(--green) 70%, rgba(53,240,122,0)); opacity: .6; }
.glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(10px); z-index: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 14px; font-weight: 800; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; }
.btn-light { background: #FFFFFF; color: var(--bg); }
.btn-light:hover { color: var(--bg); background: #EEF3FB; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); font-weight: 700; }
.btn-ghost:hover { border-color: var(--blue); }
.btn-grad { background: linear-gradient(90deg, var(--blue), var(--green)); color: var(--bg); }
.btn-grad:hover { color: var(--bg); filter: brightness(1.06); }
.btn-green { background: var(--green); color: var(--bg); }
.store-badge { display: inline-flex; align-items: center; }
.store-badge img { height: 52px; width: auto; }
.store-badge.pending { height: 52px; padding: 0 20px; border-radius: 14px; background: #FFFFFF; color: var(--bg); font-weight: 800; font-size: 15px; gap: 10px; }
.store-badge.pending:hover { color: var(--bg); }
.store-badge.pending small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .3px; color: #55606E; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(12,15,20,.82); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid #161B24; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { font-size: 15px; font-weight: 600; color: var(--muted); }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .btn { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--text); align-items: center; justify-content: center; cursor: pointer; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; max-width: 560px; position: relative; z-index: 1; }
.pill-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { padding: 5px 10px; border-radius: 9px; background: rgba(53,240,122,.14); color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .5px; }
h1 { margin: 0; font-size: clamp(40px, 5.2vw, 64px); line-height: 1.06; font-weight: 800; letter-spacing: -1.4px; }
.lede { margin: 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--muted); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--text-2); }
.checks li::before { content: "✓ "; color: var(--green); font-weight: 800; }
.hero-visual { position: relative; display: flex; justify-content: center; padding: 10px 0; }
.float-chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: rgba(12,15,20,.86); border: 1px solid rgba(255,255,255,.08); font-size: 13px; font-weight: 600; white-space: nowrap; z-index: 3; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.float-chip .dot { width: 9px; height: 9px; border-radius: 5px; background: var(--green); }
.chip-a { left: -46%; top: -3%; }
.chip-b { right: -40%; bottom: -3%; }

/* Phone frame around real app screenshots */
.phone { position: relative; width: 290px; aspect-ratio: 390 / 844; border-radius: 48px; background: #05070A; padding: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 0 1px var(--line-2); z-index: 1; flex-shrink: 0; }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: var(--bg); }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .island { position: absolute; left: 50%; top: 11px; width: 86px; height: 25px; margin-left: -43px; border-radius: 13px; background: #000; z-index: 2; }
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-wrap .glow { left: 50%; top: 50%; width: 460px; height: 460px; margin: -230px 0 0 -230px; }

/* Features */
.feature { position: relative; overflow: hidden; padding: 72px 0; }
.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature.flip .feature-copy { order: 2; }
.feature-copy { display: flex; flex-direction: column; gap: 14px; max-width: 470px; }
.feature-copy h2 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -.6px; }
.feature-copy p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); }
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ticks li { position: relative; padding-left: 26px; font-size: 15px; line-height: 22px; color: var(--text-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; background: no-repeat center/16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2335F07A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.gcard { display: flex; border-radius: var(--radius); padding: 1px; background: linear-gradient(135deg, rgba(127,178,254,.55), rgba(53,240,122,.35) 60%, rgba(255,255,255,.04)); }
.gcard > .inner { flex: 1; min-width: 0; border-radius: calc(var(--radius) - 1px); background: var(--surface); }
.trust { padding: 32px 0 56px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trust .inner { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.trust h3 { margin: 0; font-size: 19px; font-weight: 800; }
.trust p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.tile { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }

.notify { padding: 0 0 64px; }
.notify .inner { padding: 44px; display: flex; gap: 24px; align-items: center; justify-content: space-between; background: radial-gradient(120% 140% at 0% 0%, #18305A, #0F141C 60%); }
.notify h2 { margin: 8px 0 6px; font-size: 32px; line-height: 1.2; font-weight: 800; }
.notify p { margin: 0; color: var(--muted); }
.notify form { display: flex; gap: 10px; }
.notify input { height: 52px; min-width: 280px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: 500 15px Inter, system-ui, sans-serif; }
.notify input::placeholder { color: var(--faint); }
.form-note { margin-top: 10px; font-size: 13px; color: var(--green); min-height: 1em; }

.final { position: relative; overflow: hidden; padding: 72px 0 96px; text-align: center; }
.final .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; position: relative; z-index: 1; }
.final img.app-icon { width: 120px; height: 120px; border-radius: 27px; box-shadow: 0 20px 60px rgba(127,178,254,.25); }
.final h2 { margin: 0; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.1; font-weight: 800; letter-spacing: -1px; }

/* Footer */
.site-footer { padding: 36px 0 44px; font-size: 14px; color: var(--faint); }
.site-footer .wrap { display: flex; gap: 18px; justify-content: space-between; }
.site-footer .brand { font-size: 16px; color: var(--text); }
.site-footer .brand img { width: 26px; height: 26px; border-radius: 6px; }
.foot-left { display: flex; flex-direction: column; gap: 8px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; align-content: flex-start; }
.foot-links a:hover { color: var(--text); }
.legal { font-size: 12px; }

/* Document pages (privacy, support) */
.doc-hero { position: relative; overflow: hidden; padding: 64px 0 72px; }
.doc-col { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.doc-col h1 { margin: 8px 0 10px; font-size: clamp(34px, 4.4vw, 50px); line-height: 1.1; letter-spacing: -1px; }
.doc-col .intro { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); }
.summary { margin-top: 28px; }
.summary .inner { padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.summary h2 { margin: 0; font-size: 18px; font-weight: 800; }
.prose h2 { margin: 36px 0 10px; font-size: 22px; font-weight: 800; padding-left: 14px; border-left: 3px solid var(--blue); }
.prose h2:nth-of-type(even) { border-left-color: var(--green); }
.prose p, .prose li { font-size: 16px; line-height: 1.65; color: var(--text-2); }
.prose ul { margin: 0; padding-left: 20px; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.faq { margin-top: 28px; overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 22px; display: flex; justify-content: space-between; gap: 16px; font-size: 17px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 22px; line-height: 22px; font-weight: 600; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 22px 20px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.faq details p a { color: var(--blue); }
.help-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 24px; }
.help-grid .card { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.help-grid h2 { margin: 0; font-size: 19px; font-weight: 800; }
.help-grid p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.help-grid .btn { align-self: flex-start; height: 46px; font-size: 15px; word-break: break-all; }

/* 404 */
.not-found { min-height: 60vh; display: flex; align-items: center; text-align: center; }
.not-found .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* Responsive */
@media (max-width: 1100px) {
  .chip-a { left: -28%; }
  .chip-b { right: -24%; }
}
@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .hero { padding: 40px 0 24px; }
  .hero .wrap, .feature .wrap { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip .feature-copy { order: 0; }
  .feature { padding: 48px 0; }
  .feature-copy { max-width: none; }
  .trust-grid { grid-template-columns: 1fr; }
  .notify .inner { flex-direction: column; align-items: stretch; padding: 28px; }
  .notify form { flex-direction: column; }
  .notify input { min-width: 0; }
  .chip-a { left: -12px; top: -14px; }
  .chip-b { right: -12px; bottom: -16px; }
  .help-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 76px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; background: rgba(12,15,20,.97); border-bottom: 1px solid #161B24; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav .btn { margin-top: 14px; height: 48px; }
  .phone { width: 260px; }
  .site-footer .wrap { flex-direction: column; }
  .faq summary { padding: 18px; font-size: 16px; }
  .faq details p { padding: 0 18px 18px; }
}

/* ================================================================== Motion
   Only transform and opacity animate, so everything runs on the GPU.
   Hidden-until-revealed states apply only when JavaScript is running (html.js)
   and the visitor hasn't asked for reduced motion. */
:root { --ease: cubic-bezier(.2,.8,.2,1); --ease-soft: cubic-bezier(.4,0,.2,1); }

/* Scroll progress and header */
.progress-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--teal), var(--green)); transform: scaleX(0); transform-origin: left center; will-change: transform; }
.site-header { transition: background-color .35s var(--ease-soft), box-shadow .35s var(--ease-soft); }
.site-header.scrolled { background: rgba(12,15,20,.94); box-shadow: 0 10px 30px rgba(0,0,0,.35); }

/* Buttons and cards */
.btn, .store-badge { transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s ease, border-color .25s ease, filter .25s ease; }
.btn:hover, .store-badge:hover { transform: translateY(-2px); }
.btn:active, .store-badge:active { transform: translateY(0) scale(.98); transition-duration: .12s; }
.btn-light:hover, .store-badge:hover { box-shadow: 0 12px 30px rgba(127,178,254,.22); }
.btn-green:hover { box-shadow: 0 12px 30px rgba(53,240,122,.28); }
.btn-grad { position: relative; overflow: hidden; }
.btn-grad::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.55), rgba(255,255,255,0)); transform: skewX(-20deg) translateX(0); opacity: 0; }
.btn-grad:hover::after { animation: sweep .9s var(--ease-soft); }
@keyframes sweep { 0% { opacity: 0; transform: skewX(-20deg) translateX(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: skewX(-20deg) translateX(420%); } }
.gcard { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.trust .gcard:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,.45), 0 0 40px rgba(127,178,254,.12); }
.tile { transition: transform .5s var(--ease); }
.trust .gcard:hover .tile { transform: scale(1.08) rotate(-4deg); }

/* Living gradient words and breathing glows */
.grad { background-image: linear-gradient(90deg, #7FB2FE 0%, #5EE6C8 25%, #35F07A 50%, #5EE6C8 75%, #7FB2FE 100%); background-size: 200% auto; animation: shimmer 9s linear infinite; }
@keyframes shimmer { to { background-position: -200% center; } }
.glow { animation: breathe 9s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: .7; transform: scale(.94); } to { opacity: 1; transform: scale(1.06); } }

/* Hero entrance */
.hero-stage { position: relative; perspective: 1200px; }
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .6s var(--ease); }
.hero .phone { animation: float 7s ease-in-out 1.6s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.float-chip { animation: drift 6s ease-in-out infinite; }
.chip-b { animation-delay: -3s; }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

.js .hero-copy > * { animation: rise 1s var(--ease) both; }
.js .hero-copy > :nth-child(1) { animation-delay: .05s; }
.js .hero-copy > :nth-child(2) { animation-delay: .15s; }
.js .hero-copy > :nth-child(3) { animation-delay: .28s; }
.js .hero-copy > :nth-child(4) { animation-delay: .4s; }
.js .hero-copy > :nth-child(5) { animation-delay: .52s; }
.js .hero-stage { animation: phoneIn 1.3s var(--ease) .25s backwards; }
.js .float-chip { animation: chipIn .8s var(--ease) backwards, drift 6s ease-in-out infinite; }
.js .chip-a { animation-delay: 1.1s, 1.9s; }
.js .chip-b { animation-delay: 1.3s, -1s; }
.js .doc-col > .eyebrow, .js .doc-col > h1, .js .doc-col > .intro { animation: rise 1s var(--ease) both; }
.js .doc-col > h1 { animation-delay: .1s; }
.js .doc-col > .intro { animation-delay: .22s; }
.js .not-found .wrap > * { animation: rise 1s var(--ease) both; }
.js .not-found .wrap > :nth-child(2) { animation-delay: .1s; }
.js .not-found .wrap > :nth-child(3) { animation-delay: .2s; }
.js .not-found .wrap > :nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes phoneIn { from { opacity: 0; transform: translateY(70px) rotateX(16deg) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes chipIn { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: none; } }

/* Scroll reveals */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.from-right { transform: translateX(60px) rotate(3deg) scale(.95); }
.js .reveal.from-left { transform: translateX(-60px) rotate(-3deg) scale(.95); }
.js .reveal.in { opacity: 1; transform: none; }
.js .feature-copy.reveal .ticks li { opacity: 0; transform: translateX(-12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .feature-copy.reveal.in .ticks li { opacity: 1; transform: none; }
.js .feature-copy.reveal.in .ticks li:nth-child(1) { transition-delay: .35s; }
.js .feature-copy.reveal.in .ticks li:nth-child(2) { transition-delay: .45s; }
.js .feature-copy.reveal.in .ticks li:nth-child(3) { transition-delay: .55s; }
.parallax { will-change: transform; }
.final .app-icon.reveal.in { animation: iconGlow 4s ease-in-out 1.2s infinite; }
@keyframes iconGlow { 0%, 100% { box-shadow: 0 20px 60px rgba(127,178,254,.25); } 50% { box-shadow: 0 24px 80px rgba(53,240,122,.35); } }

/* Menu and FAQ */
@media (max-width: 720px) {
  .nav.open { animation: menuIn .4s var(--ease); }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
}
.faq summary::after { transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details[open] p { animation: faqIn .45s var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq summary { transition: color .2s ease; }
.faq summary:hover { color: var(--blue); }

/* Respect Reduce Motion: show everything, move nothing */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .feature-copy.reveal .ticks li { opacity: 1 !important; transform: none !important; }
  .tilt, .parallax { transform: none !important; }
}
