/* RiftMaster — landing page */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #0d0e12;
  --foreground: #f3f1ed;
  --muted: #aeadaa;
  --subtle: #86878a;
  --surface: #15181e;
  --surface-2: #1c2028;
  --surface-3: #252a33;
  --default: #2c313b;
  --separator: #ffffff1f;
  --border-strong: #ffffff2e;
  --accent: #c0f447;
  --accent-hover: #acdf3f;
  --accent-fg: #0d0e12;
  --accent-soft: #c0f4471f;
  --accent-soft-border: #c0f44766;
  --warning: #f5b84a;
  --warning-soft: #f5b84a24;
  --fury: #d43940;
  --calm: #1aa671;
  --mind: #327a9c;
  --body: #dd6e11;
  --chaos: #8863b0;
  --order: #c3a20f;
  --colorless: #8a8b8e;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --card-shadow: 0 1px 2px rgba(0,0,0,.5), 0 24px 64px rgba(0,0,0,.55);
  --hero-shadow: 0 1px 2px rgba(0,0,0,.5), 0 32px 80px rgba(0,0,0,.6);
  --ease: cubic-bezier(.22,1,.36,1);
  --tour-ms: 7000ms;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; color: inherit; }
.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; background: var(--accent); color: var(--accent-fg); padding: 10px 16px; border-radius: 9999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { border-top: 1px solid var(--separator); }
.section--alt { background: var(--surface); }
.section__inner { padding-top: 112px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.section-head--center { align-items: center; text-align: center; max-width: none; }
.overline { font-family: var(--mono); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.h2 { font-size: 48px; line-height: 54px; font-weight: 700; letter-spacing: -.03em; }
.lead { font-size: 17px; line-height: 26px; color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 9999px; font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .2s; }
.btn--primary { background: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-fg); }
.btn--secondary { background: var(--default); color: var(--foreground); }
.btn--secondary:hover { background: var(--surface-3); color: var(--foreground); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9999px; background: var(--default); border: 1px solid transparent; font-size: 14px; font-weight: 600; color: var(--foreground); white-space: nowrap; }
.chip--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.chip--on { background: var(--accent-soft); border-color: var(--accent-soft-border); color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 9999px; flex: none; }
.status { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 9999px; font-size: 12px; font-weight: 600; white-space: nowrap; align-self: flex-start; }
.status--done { background: var(--accent-soft); color: var(--accent); }
.status--dev { background: var(--warning-soft); color: var(--warning); }
.status--plan { background: var(--default); color: var(--muted); }

/* Phone frame */
.phone { border-radius: 42px; padding: 9px; background: var(--surface); border: 1px solid var(--separator); box-shadow: var(--card-shadow); }
.phone img { width: 100%; height: auto; aspect-ratio: 386 / 800; object-fit: cover; object-position: top; border-radius: 33px; }

/* Header */
.header { border-bottom: 1px solid var(--separator); }
.nav { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--foreground); text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.brand:hover { color: var(--foreground); }
.brand__mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); display: flex; align-items: center; justify-content: center; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 9999px; }
.nav__link:hover { color: var(--foreground); background: var(--surface-2); }

/* Hero */
.hero { padding: 80px 24px 0; overflow: hidden; }
.hero__copy { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.badge { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 9999px; background: var(--surface-2); border: 1px solid var(--separator); font-size: 13px; font-weight: 600; color: var(--muted); }
.badge .dot { background: var(--accent); }
.hero__title { font-size: 72px; line-height: 76px; font-weight: 700; letter-spacing: -.035em; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__sub { font-size: 19px; line-height: 29px; color: var(--muted); max-width: 640px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.fan { max-width: 1200px; margin: 72px auto 0; height: 600px; display: flex; justify-content: center; align-items: flex-start; }
.fan__item { flex: none; }
.fan__item--c { width: 290px; z-index: 3; }
.fan__item--c .phone { border-color: var(--border-strong); box-shadow: var(--hero-shadow); }
.fan__item--l, .fan__item--r { width: 240px; margin-top: 56px; z-index: 2; }
.fan__item--l { margin-right: -48px; transform: rotate(-4deg); }
.fan__item--r { margin-left: -48px; transform: rotate(4deg); }
.fan__item--ll, .fan__item--rr { width: 210px; margin-top: 120px; z-index: 1; }
.fan__item--ll { margin-right: -56px; transform: rotate(-9deg); }
.fan__item--rr { margin-left: -56px; transform: rotate(9deg); }
.fan__item--l .phone, .fan__item--r .phone { border-radius: 36px; padding: 8px; }
.fan__item--l img, .fan__item--r img { border-radius: 28px; }
.fan__item--ll .phone, .fan__item--rr .phone { border-radius: 34px; padding: 7px; }
.fan__item--ll img, .fan__item--rr img { border-radius: 27px; }

.float { animation: float 8s ease-in-out infinite; }
.float--1 { animation-delay: -2s; } .float--2 { animation-delay: -4s; } .float--3 { animation-delay: -6s; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Tour */
#tour { position: relative; z-index: 4; }
.tour { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.tour__side { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.tour__list { display: flex; flex-direction: column; gap: 8px; }
.tab { display: flex; flex-direction: column; gap: 12px; width: 100%; min-height: 56px; padding: 16px 18px; border-radius: 16px; background: transparent; border: 1px solid transparent; cursor: pointer; text-align: left; transition: background-color .2s; }
.tab:hover { background: #1c202880; }
.tab__head { display: flex; align-items: center; gap: 14px; }
.tab__num { font-family: var(--mono); font-size: 13px; font-weight: 600; width: 24px; color: var(--subtle); }
.tab__title { font-size: 17px; line-height: 22px; font-weight: 600; }
.tab__body { display: none; flex-direction: column; gap: 14px; padding-left: 38px; }
.tab__text { font-size: 15px; line-height: 22px; color: var(--muted); }
.tab__points { display: flex; flex-direction: column; gap: 10px; }
.tab__points li { display: flex; gap: 10px; align-items: center; font-size: 14px; line-height: 20px; font-weight: 500; }
.check { width: 22px; height: 22px; border-radius: 9999px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.tab[aria-selected="true"] { background: var(--surface-2); border-color: var(--separator); }
.tab[aria-selected="true"] .tab__num { color: var(--accent); }
.tab[aria-selected="true"] .tab__body { display: flex; animation: rise .28s var(--ease); }
.bar { display: block; height: 2px; border-radius: 9999px; background: var(--default); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 0; background: var(--accent); }
.is-playing .bar__fill.run { animation: progress var(--tour-ms) linear forwards; }
.is-stopped .bar { visibility: hidden; }
@keyframes progress { from { width: 0; } to { width: 100%; } }
@keyframes rise { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

.tour__chips { display: none; gap: 8px; overflow-x: auto; margin: 0 -24px; padding: 2px 24px 4px; scrollbar-width: none; }
.tour__chips::-webkit-scrollbar { display: none; }
.tour__chips .chip { cursor: pointer; height: 40px; padding: 0 16px; }
.tour__chips .chip[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent-soft-border); color: var(--accent); }
.tour__mob { display: none; flex-direction: column; gap: 12px; }
.tour__mob-text { font-size: 15px; line-height: 22px; color: var(--muted); min-height: 44px; }

.tour__phone { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.tour__frame { width: 320px; max-width: 100%; border-radius: 46px; padding: 10px; background: var(--background); border: 1px solid var(--border-strong); box-shadow: var(--hero-shadow); }
.tour__screen { position: relative; aspect-ratio: 386 / 800; border-radius: 36px; overflow: hidden; background: var(--background); }
.tour__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .4s ease; }
.tour__screen img.is-active { opacity: 1; }

/* Collezioni */
.duo { display: flex; flex-wrap: wrap; gap: 16px; }
.duo__card { flex: 1 1 400px; min-width: 0; background: var(--surface); border: 1px solid var(--separator); border-radius: 24px; padding: 40px 32px 0; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.duo__card--accent { border-color: var(--accent-soft-border); }
.duo__kicker { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.duo__card--accent .duo__kicker { color: var(--accent); }
.duo__title { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.02em; }
.duo__text { font-size: 16px; line-height: 24px; color: var(--muted); max-width: 420px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.duo__shot { margin-top: 24px; display: flex; justify-content: center; }
.duo__shot div { width: 300px; max-width: 90%; height: 420px; overflow: hidden; border-radius: 36px 36px 0 0; padding: 8px 8px 0; background: var(--background); border: 1px solid var(--separator); border-bottom: 0; }
.duo__shot img { width: 100%; height: auto; border-radius: 28px 28px 0 0; }

/* Funzioni */
.bento { display: flex; flex-wrap: wrap; gap: 16px; }
.feat { flex: 1 1 300px; min-width: 0; background: var(--surface); border: 1px solid var(--separator); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.feat--wide { flex: 2 1 520px; }
.feat--between { justify-content: space-between; }
.feat--planned { border-style: dashed; border-color: var(--border-strong); gap: 20px; }
.feat__head { display: flex; flex-direction: column; gap: 10px; }
.feat__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.icon-circle { width: 44px; height: 44px; border-radius: 9999px; background: var(--default); color: var(--foreground); display: flex; align-items: center; justify-content: center; flex: none; }
.icon-circle--accent { background: var(--accent); color: var(--accent-fg); }
.feat__title { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.015em; }
.feat__text { font-size: 15px; line-height: 22px; color: var(--muted); }
.panel { background: var(--surface-2); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.label-mono { font-family: var(--mono); font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper__value { font-family: var(--mono); font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--accent); }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.price { font-family: var(--mono); font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; }
.price-meta { font-size: 13px; line-height: 19px; color: var(--muted); }
.price-own { display: flex; justify-content: space-between; border-top: 1px solid var(--separator); padding-top: 12px; font-size: 14px; color: var(--muted); }
.price-own span { font-family: var(--mono); font-weight: 600; color: var(--foreground); }
.panel--tight { gap: 6px; }
.progress { display: flex; flex-direction: column; gap: 12px; }
.progress li { display: flex; flex-direction: column; gap: 6px; }
.progress__row { display: flex; justify-content: space-between; font-size: 13px; line-height: 19px; color: var(--muted); }
.progress__row span:last-child { font-family: var(--mono); font-weight: 600; color: var(--foreground); }
.progress__track { height: 6px; border-radius: 9999px; background: var(--surface-3); overflow: hidden; }
.progress__track span { display: block; height: 100%; border-radius: 9999px; }
.planned { display: flex; gap: 14px; align-items: flex-start; }
.planned h3 { font-size: 20px; line-height: 26px; font-weight: 700; }
.planned p { font-size: 15px; line-height: 22px; color: var(--muted); }

/* Roadmap */
.roadmap { display: flex; flex-wrap: wrap; gap: 24px 16px; }
.roadmap li { flex: 1 1 170px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.roadmap__bar { display: block; height: 4px; border-radius: 9999px; background: var(--default); }
.roadmap__bar--done { background: var(--accent); }
.roadmap__bar--dev { background: var(--warning); }
.roadmap__title { font-size: 18px; line-height: 24px; font-weight: 600; }

/* Progetto */
.project { display: flex; flex-wrap: wrap; gap: 48px 64px; padding-top: 120px; padding-bottom: 120px; }
.project__head { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.project__body { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.project__body > p:first-child { color: var(--foreground); }
.points { border-top: 1px solid var(--separator); }
.points li { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--separator); }
.points__num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); width: 28px; flex: none; padding-top: 2px; }
.points h3 { font-size: 16px; line-height: 22px; font-weight: 600; }
.points p { font-size: 14px; line-height: 20px; color: var(--muted); margin-top: 4px; }

/* Chiusura */
.closing { padding: 0 24px 120px; }
.closing__card { max-width: 1152px; margin: 0 auto; background: var(--accent); color: var(--accent-fg); border-radius: 24px; padding: 64px 48px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.closing__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.closing .overline { color: var(--accent-fg); }
.closing__title { font-size: 44px; line-height: 50px; font-weight: 700; letter-spacing: -.03em; }
.closing__text { font-size: 17px; line-height: 26px; max-width: 620px; }
.closing__icon { flex: none; width: 96px; height: 96px; border-radius: 9999px; background: var(--background); color: var(--accent); display: flex; align-items: center; justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--separator); }
.footer__inner { padding-top: 40px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 20px; }
.footer__brand { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.footer__legal { font-size: 12px; line-height: 18px; color: var(--subtle); max-width: 860px; }

/* Responsive */
@media (max-width: 860px) {
  .fan__item--ll, .fan__item--rr { display: none; }
  .tour__list { display: none; }
  .tour__chips, .tour__mob { display: flex; }
  .tour__phone { order: -1; }
  .tour__frame { width: 230px; }
  .tour { gap: 24px; }
  .section__inner { padding-top: 72px; padding-bottom: 72px; }
  .project { padding-top: 72px; padding-bottom: 72px; }
  .closing { padding-bottom: 72px; }
  .closing__card { padding: 48px 28px; }
}
@media (max-width: 560px) {
  .nav__link { display: none; }
  .hero { padding-top: 56px; }
  .hero__title { font-size: 44px; line-height: 48px; }
  .hero__sub { font-size: 17px; line-height: 26px; }
  .h2, .closing__title { font-size: 34px; line-height: 40px; }
  .fan { height: calc(96vw + 40px); margin-top: 48px; }
  .fan__item--c { width: 46vw; }
  .fan__item--l, .fan__item--r { width: 34vw; margin-top: 28px; }
  .fan__item--l { margin-right: -9vw; }
  .fan__item--r { margin-left: -9vw; }
  .fan__item--c .phone { border-radius: 26px; padding: 5px; }
  .fan__item--c img { border-radius: 21px; }
  .fan__item--l .phone, .fan__item--r .phone { border-radius: 20px; padding: 4px; }
  .fan__item--l img, .fan__item--r img { border-radius: 16px; }
  .duo__card { padding: 32px 24px 0; }
  .duo__title { font-size: 26px; line-height: 32px; }
  .feat { padding: 24px; }
  .closing__icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float, .pulse { animation: none; }
  .tab[aria-selected="true"] .tab__body { animation: none; }
  .tour__screen img { transition: none; }
}
