/* Varpa site — palette taken from the app */
:root {
  --bg: #0b0f17;
  --bg-2: #0e131d;
  --panel: #131824;
  --line: #222b3d;
  --line-2: #2c3750;
  --text: #eef2f7;
  --soft: #b9c3d2;
  --muted: #7d8ba1;
  --cyan: #22d3ee;
  --violet: #9b72cf;
  --green: #34d399;
  --amber: #f5b63b;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(34, 211, 238, .3); }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.mono { font-family: var(--mono); }
html[data-lang="en"] [lang="it"], html[data-lang="it"] [lang="en"] { display: none !important; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 15, 23, .82); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.top nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.top nav a:hover { color: var(--text); }
.lang { display: flex; gap: 2px; font: 500 13px var(--mono); }
.lang button { background: none; border: 0; padding: 6px 7px; color: var(--muted); cursor: pointer; border-radius: 6px; font: inherit; }
.lang button[aria-pressed="true"] { color: var(--text); background: var(--panel); }
.lang button:focus-visible, .btn-play:focus-visible, .copy:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 84px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 420px at 76% 38%, rgba(155, 114, 207, .22), transparent 70%),
    radial-gradient(560px 460px at 64% 62%, rgba(34, 211, 238, .14), transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.kicker { font: 500 14px var(--mono); color: var(--green); margin: 0 0 22px; }
.kicker .caret { display: inline-block; width: .55em; height: 1.05em; background: var(--cyan); vertical-align: -2px; margin-left: 3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
h1 { font-size: clamp(44px, 6.6vw, 84px); line-height: .98; letter-spacing: -.035em; font-weight: 700; margin: 0 0 24px; }
h1 em { font-style: normal; background: linear-gradient(92deg, var(--cyan), var(--violet) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 20px; line-height: 1.55; color: var(--soft); max-width: 31em; margin: 0 0 34px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.btn-play {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: #000; color: #fff; border: 1px solid #5f6368; border-radius: 10px; padding: 9px 20px 9px 15px; min-width: 186px;
  transition: transform .15s, border-color .15s;
}
.btn-play:hover { transform: translateY(-1px); border-color: #9aa0a6; }
.btn-play svg { width: 26px; height: 28px; flex: none; }
.btn-play span { display: flex; flex-direction: column; line-height: 1.05; }
.btn-play small { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.btn-play b { font-size: 21px; font-weight: 500; letter-spacing: -.01em; }
.btn-play.is-soon { pointer-events: none; }
.btn-play.is-soon small { color: var(--amber); opacity: 1; }
.link-arrow { color: var(--soft); text-decoration: none; font-size: 16px; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.link-arrow:hover { color: var(--text); border-color: var(--cyan); }
.facts { margin: 40px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; font: 14px var(--mono); color: var(--muted); }
.facts li:not(:last-child)::after { content: "·"; margin: 0 12px; color: var(--line-2); }

.device { position: relative; justify-self: center; width: min(330px, 78vw); }
.frame {
  position: relative; border-radius: 46px; padding: 9px; background: linear-gradient(160deg, #2a3348, #121722 40%, #1b2232);
  box-shadow: 0 0 0 1px #343f58 inset, 0 40px 90px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255,255,255,.03);
}
.frame img { border-radius: 38px; width: 100%; height: auto; aspect-ratio: 600 / 1272; object-fit: cover; object-position: 50% 0; background: var(--bg-2); }
.device .peek {
  position: absolute; width: 62%; right: -34%; top: 16%; z-index: -1; opacity: .55; filter: saturate(.8);
  transform: rotate(6deg);
}
.device .peek .frame { border-radius: 34px; padding: 7px; }
.device .peek img { border-radius: 28px; }

/* ---------- sections ---------- */
section { padding: 110px 0; }
.eyebrow { font: 500 13px var(--mono); color: var(--muted); letter-spacing: .02em; margin: 0 0 16px; }
.eyebrow b { color: var(--cyan); font-weight: 500; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 18px; font-weight: 700; }
h3 { font-size: 22px; letter-spacing: -.015em; margin: 0 0 10px; }
.intro { max-width: 640px; margin-bottom: 72px; }
.intro p { color: var(--soft); font-size: 19px; margin: 0; }

/* feature rows */
.story { display: grid; gap: 120px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.row:nth-child(even) .row-media { order: 2; }
.row-media { display: flex; justify-content: center; position: relative; }
.row-media::before {
  content: ""; position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%; top: 14%; z-index: -1;
  background: radial-gradient(closest-side, var(--glow, rgba(34, 211, 238, .18)), transparent);
}
.row:nth-child(2) { --glow: rgba(155, 114, 207, .22); }
.row:nth-child(3) { --glow: rgba(52, 211, 153, .16); }
.row:nth-child(4) { --glow: rgba(245, 182, 59, .14); }
.row-media .frame { width: min(300px, 74vw); }
.row-text .num { font: 500 13px var(--mono); color: var(--muted); margin-bottom: 18px; display: block; }
.row-text h3 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.08; letter-spacing: -.025em; margin-bottom: 16px; }
.row-text p { color: var(--soft); font-size: 18px; margin: 0 0 22px; max-width: 30em; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--soft); font-size: 16px; }
.ticks li::before { content: ">"; position: absolute; left: 0; font-family: var(--mono); color: var(--green); }

/* more list */
.more { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.more div { padding: 28px 28px 30px 0; border-bottom: 1px solid var(--line); }
.more div:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.more div:not(:nth-child(3n+1)) { padding-left: 28px; }
.more dt { font-weight: 600; margin-bottom: 6px; }
.more dd { margin: 0; color: var(--muted); font-size: 15.5px; }

/* demo */
.demo { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.demo .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.demo p { color: var(--soft); margin: 0; font-size: 18px; }
.term { background: #0a0d14; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.term-bar span { margin: 0 auto; font: 12.5px var(--mono); color: var(--muted); transform: translateX(-20px); }
.term-body { padding: 22px 22px 24px; font: 14.5px/1.9 var(--mono); color: var(--soft); }
.term-body .p { color: var(--green); }
.term-body .c { color: var(--muted); }
.url-line { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 9px; }
.url-line code { color: var(--cyan); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy { flex: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 7px; font: 500 12.5px var(--mono); padding: 5px 10px; cursor: pointer; }
.copy:hover { border-color: var(--cyan); }

/* faq */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
details { border-bottom: 1px solid var(--line); padding: 22px 0; }
details:first-child { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font-size: 18px; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--muted); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); color: var(--cyan); }
details p { color: var(--soft); margin: 14px 0 0; max-width: 40em; }
details a { color: var(--cyan); }

/* contact + footer */
.contact { text-align: center; padding: 120px 0 100px; }
.contact h2 { margin-bottom: 14px; }
.contact p { color: var(--soft); margin: 0 auto 28px; max-width: 34em; }
.mail { font: 500 clamp(20px, 3.4vw, 34px) var(--mono); color: var(--text); text-decoration: none; border-bottom: 2px solid var(--cyan); padding-bottom: 4px; }
.mail:hover { color: var(--cyan); }
footer { border-top: 1px solid var(--line); padding: 36px 0 56px; color: var(--muted); font-size: 14px; }
footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: start; }
footer .legal-note { max-width: 62em; line-height: 1.6; font-size: 13px; grid-column: 1 / -1; color: #66758c; }
footer nav { display: flex; gap: 22px; }
footer a { color: var(--soft); text-decoration: none; }
footer a:hover { color: var(--text); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- legal pages ---------- */
.legal { padding: 64px 0 40px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(34px, 5vw, 50px); }
.legal h2 { font-size: 22px; margin: 38px 0 8px; letter-spacing: -.01em; }
.legal p, .legal li { color: var(--soft); }
.legal a { color: var(--cyan); }
.legal .meta { color: var(--muted); font: 14px var(--mono); }
.toc { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; font: 14px var(--mono); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
.legal article { scroll-margin-top: 84px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 12px; }
.legal article:first-of-type { border-top: 0; margin-top: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero .wrap, .row, .demo .wrap, .faq-grid { grid-template-columns: 1fr; }
  .hero .wrap { gap: 56px; }
  .device { width: min(290px, 70vw); }
  .row { gap: 40px; }
  .row:nth-child(even) .row-media { order: 0; }
  .story { gap: 96px; }
  .more { grid-template-columns: 1fr 1fr; }
  .more div { padding: 24px 20px 26px 0 !important; border-right: 0 !important; }
  .more div:nth-child(odd) { border-right: 1px solid var(--line) !important; }
  .more div:nth-child(even) { padding-left: 20px !important; }
  section { padding: 84px 0; }
  .faq-grid { gap: 24px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top nav { display: none; }
  .lang { margin-left: auto; }
  .hero p.lead { font-size: 18px; }
  .device .peek { display: none; }
  .more { grid-template-columns: 1fr; }
  .more div { border-right: 0 !important; padding-left: 0 !important; }
  footer .wrap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kicker .caret { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
