/* ============================================================
   Rullino — landing page
   Token system
   ============================================================ */
:root {
  --ink: #141110;
  --ink-soft: #1b1613;
  --surface: #1e1815;
  --surface-2: #29211c;
  --hairline: #3a2f27;

  --amber: #ffb300;
  --amber-soft: #d99a1f;
  --amber-dim: #6b4a13;

  --paper: #f2ebdd;
  --paper-2: #e9dfc9;
  --ink-on-paper: #241c15;

  --fog: #a99c8d;
  --fog-dim: #786a5c;
  --white: #f7f3ec;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --wrap: 1180px;
  --radius: 3px;

  --ease: cubic-bezier(.22, .7, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 28px;
}

.mono { font-family: var(--font-mono); }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.96;
}

/* film grain, very subtle, ambient texture on the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ---------- sprocket rail (top, ambient, decorative filmstrip edge) ---------- */
.sprocket-rail {
  height: 14px;
  width: 100%;
  background:
    repeating-linear-gradient(
      to right,
      var(--surface-2) 0 8px,
      transparent 8px 20px
    );
  background-position: 6px center;
  background-repeat: repeat-x;
  background-size: 20px 8px;
  border-bottom: 1px solid var(--hairline);
}

.frame-sprockets {
  height: 10px;
  margin-bottom: 8px;
  background-image:
    repeating-linear-gradient(
      to right,
      var(--ink) 0 5px,
      transparent 5px 15px
    );
  background-position: 4px center;
  background-repeat: repeat-x;
  background-size: 15px 6px;
  opacity: 0.55;
  border-radius: 1px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 17, 16, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand-icon { border-radius: 7px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.site-nav a {
  text-decoration: none;
  color: var(--fog);
  transition: color 0.15s var(--ease);
}
.site-nav a:hover { color: var(--amber); }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--fog);
}
.lang-toggle:hover { border-color: var(--amber-dim); color: var(--white); }
.lang-opt { padding: 1px 3px; transition: color 0.15s var(--ease); }
.lang-sep { opacity: 0.4; }
html[data-lang="it"] .lang-opt[data-val="it"],
html[data-lang="en"] .lang-opt[data-val="en"] {
  color: var(--amber);
  font-weight: 600;
}

@media (max-width: 720px) {
  .site-nav { display: none; }
}

/* ============================================================
   Language toggle logic (CSS half, JS toggles [data-lang] on <html>)
   ============================================================ */
[data-it][data-en] { }
html[data-lang="en"] [data-it]::before,
html[data-lang="it"] [data-en]::before { content: none; }

/* We swap textContent via JS rather than pure CSS, so no extra rules needed here. */

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.btn-primary {
  background: var(--amber);
  color: #171310;
  font-weight: 600;
  border: 1px solid var(--amber);
}
.btn-primary:hover { transform: translateY(-1px); background: #ffc333; }
.btn-primary em { font-style: normal; display: block; font-size: 10px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.08em; }
.btn-primary strong { display: block; font-size: 15px; font-weight: 700; }
.apple-mark { width: 22px; height: 22px; flex-shrink: 0; }

.btn-ghost {
  border: 1px solid var(--hairline);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: minmax(360px, 460px) 1fr;
  gap: 64px;
  align-items: center;
  padding-block: 76px 88px;
}
/* Senza min-width:0 un item di grid non si restringe oltre il min-content
   dei suoi figli (qui, la figura del telefono): su viewport stretti la
   colonna — e con essa l'intero .hero — sfonda il contenitore. */
.hero-copy, .hero-frame-wrap { min-width: 0; }
.eyebrow {
  color: var(--amber-soft);
  font-size: 12px;
  letter-spacing: 0.14em;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--amber); }
.hero-sub {
  color: var(--fog);
  font-size: 17px;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.hero-microcopy {
  color: var(--fog-dim);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.hero-frame-wrap {
  display: flex;
  justify-content: center;
  animation: frame-in 0.7s var(--ease) both;
  animation-delay: 0.1s;
}
@keyframes frame-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   Frame / contact-sheet card — signature element
   ============================================================ */
.frame {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 10px 10px 14px;
  position: relative;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--amber-dim);
  opacity: 0.8;
}
.frame::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.frame img {
  border-radius: 2px;
  width: 100%;
  border: 1px solid var(--hairline);
  display: block;
}

/* Ogni fotogramma del provino ha la stessa proporzione, come su un vero
   provino a contatto: le schermate vengono inquadrate dall'alto (dove
   vive l'identità di ciascuna vista) e il resto è tagliato via CSS,
   senza deformare nulla. */
.contact-sheet .frame img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

.frame-shot {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.frame--hero .frame-shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 54px;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}
.frame-cap {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.frame-tag {
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.frame-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
}
.frame-desc {
  color: var(--fog);
  font-size: 13.5px;
  line-height: 1.5;
}

.frame--hero {
  max-width: 300px;
}
.frame--hero .frame-cap {
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: var(--fog);
  letter-spacing: 0.03em;
}
.frame--hero .frame-tag { font-size: 13px; }

/* hover only where meaningful (grid frames), skip on touch via hover media */
@media (hover: hover) {
  .contact-sheet .frame:hover {
    transform: translateY(-4px);
    border-color: var(--amber-dim);
    box-shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.65);
  }
}

/* ============================================================
   Sections — shared
   ============================================================ */
.section { padding-block: 92px; border-bottom: 1px solid var(--hairline); }
.section--muted { background: var(--ink-soft); }
.section-title {
  font-size: clamp(30px, 3.6vw, 46px);
  max-width: 16ch;
  margin-bottom: 46px;
}

/* ============================================================
   Contact sheet grid
   ============================================================ */
.contact-sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.contact-sheet .frame { min-width: 0; }
@media (max-width: 920px) {
  .contact-sheet { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .contact-sheet { grid-template-columns: 1fr; }
}

/* ============================================================
   Roll steps (numbered — genuinely sequential: frames on a roll)
   ============================================================ */
.roll-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.roll-step {
  padding: 30px 26px 30px 0;
  border-right: 1px solid var(--hairline);
  position: relative;
  min-width: 0;
}
.roll-step:last-child { border-right: 0; padding-right: 0; }
.roll-step-no {
  display: block;
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}
.roll-step h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 10px;
}
.roll-step p {
  color: var(--fog);
  font-size: 14px;
  line-height: 1.55;
}
@media (max-width: 860px) {
  .roll-steps { grid-template-columns: 1fr 1fr; }
  .roll-step:nth-child(2) { border-right: 0; }
  .roll-step:nth-child(1), .roll-step:nth-child(2) {
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 26px;
    margin-bottom: 26px;
  }
}
@media (max-width: 560px) {
  .roll-steps { grid-template-columns: 1fr; }
  .roll-step { border-right: 0 !important; border-bottom: 1px solid var(--hairline); padding: 24px 0; }
  .roll-step:last-child { border-bottom: 0; }
}

/* ============================================================
   Pro / pricing — paper section, inverted for tactile contrast
   ============================================================ */
.section--paper {
  background: var(--paper);
  color: var(--ink-on-paper);
}
.pro-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}
.eyebrow--on-paper { color: var(--amber-soft); }
.on-paper { color: var(--ink-on-paper); }
.pro-sub {
  font-size: 16.5px;
  max-width: 48ch;
  color: #4a3f30;
  margin-bottom: 28px;
}
.pro-list {
  display: grid;
  gap: 12px;
  font-size: 14px;
}
.pro-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pro-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--amber-soft);
  border-radius: 1px;
  flex-shrink: 0;
}

.price-tag {
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 34px 42px;
  min-width: 240px;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.5);
}
.price-tag-hole {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.price-tag-eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fog);
  margin-top: 14px;
  margin-bottom: 10px;
}
.price-tag-amount {
  display: block;
  font-size: 46px;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 10px;
}
.price-tag-note {
  display: block;
  font-size: 11.5px;
  color: var(--fog);
  letter-spacing: 0.03em;
}

@media (max-width: 760px) {
  .pro-wrap { grid-template-columns: 1fr; justify-items: start; }
  .price-tag { justify-self: start; }
}

/* ============================================================
   Doc sections (privacy / support) — quieter, function over flourish
   ============================================================ */
.doc-wrap { max-width: 920px; }
.doc-intro {
  color: var(--fog);
  font-size: 16px;
  max-width: 56ch;
  margin-bottom: 44px;
}
.doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 48px;
}
.doc-block { min-width: 0; }
.doc-block p { color: var(--fog); font-size: 14.5px; margin-top: 10px; }
.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-soft);
  font-weight: 500;
}
.doc-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--amber);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid var(--amber-dim);
  word-break: break-word;
}
.doc-link:hover { border-color: var(--amber); }

@media (max-width: 720px) {
  .doc-grid { grid-template-columns: 1fr; }
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
}
.support-card { min-width: 0; }
.support-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--white);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
a.support-card:hover { border-color: var(--amber-dim); transform: translateY(-2px); }
.support-value { font-size: 16px; word-break: break-word; }
.support-cta { color: var(--amber); font-family: var(--font-mono); font-size: 13px; margin-top: 6px; }
.support-tips {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.support-tips li {
  color: var(--fog);
  font-size: 14px;
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.support-tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  background: var(--amber-dim);
}

@media (max-width: 720px) {
  .support-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding-block: 40px;
  background: var(--ink-soft);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  justify-content: space-between;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand .brand-name { font-size: 18px; }
.footer-tag { color: var(--fog-dim); font-size: 12px; }
.footer-nav { display: flex; gap: 22px; font-size: 13px; }
.footer-nav a { text-decoration: none; color: var(--fog); }
.footer-nav a:hover { color: var(--amber); }
.footer-copy { color: var(--fog-dim); font-size: 12px; }

/* ============================================================
   Responsive — hero stack
   ============================================================ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-block: 56px 60px; text-align: left; }
  .hero-frame-wrap { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 20px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .section { padding-block: 64px; }
}
