/* ============================================================
   BASE — reset, layout primitives, motion scaffolding
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto; /* Lenis owns scrolling */
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--paper);
  background: var(--ink-900);
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv01";
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
/* blocco scroll del menu mobile anche senza Lenis (reduced-motion / CDN ko) */
body.menu-open { overflow: hidden; }
/* senza JS il loader non deve coprire la pagina */
.no-js .loader { display: none; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

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

::selection { background: var(--honda-red); color: #fff; }

/* --- Skip link --- */
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 9999;
  background: var(--cta-red); color: #fff; padding: 12px 18px;
  border-radius: 8px; font-weight: 600; font-size: var(--fs-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* --- Layout --- */
.shell { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--space-section); }
.section--tight { padding-block: clamp(4rem, 8vh, 7rem); }

.section--dark  { background: var(--ink-900); color: var(--paper); }
.section--dark2 { background: var(--ink-800); color: var(--paper); }
.section--light { background: var(--paper-bg); color: var(--ink-900); }

/* Hairline divider used between contrasting sections */
.section--light .eyebrow,
.section--light .lead { color: var(--muted-d); }

/* --- Eyebrow / kicker --- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-size: var(--fs-eyebrow); letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 600; color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--honda-red);
  display: inline-block;
}
.eyebrow--center::before { display: none; }

/* --- Buttons (Honda CTA rule: #E61832) --- */
.btn {
  --pad-y: 0.95rem; --pad-x: 1.6rem;
  position: relative; display: inline-flex; align-items: center; gap: 0.7rem;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm);
  letter-spacing: 0.01em; border-radius: 100px; overflow: hidden;
  transition: transform var(--dur-micro) var(--ease), box-shadow var(--dur-micro) var(--ease), color var(--dur-micro) var(--ease);
  will-change: transform;
}
.btn__label { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .6rem; }
.btn svg { width: 16px; height: 16px; transition: transform var(--dur-micro) var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary { background: var(--cta-red); color: #fff; }
.btn--primary::after {
  content: ""; position: absolute; inset: 0; background: var(--cta-red-hi);
  transform: translateY(101%); transition: transform var(--dur-mid) var(--ease); z-index: 1;
}
.btn--primary:hover::after { transform: translateY(0); }
.btn--primary:hover { box-shadow: 0 14px 34px -12px rgba(230,24,50,0.6); }

.btn--ghost {
  background: transparent; color: currentColor;
  box-shadow: inset 0 0 0 1px var(--line-str);
}
.section--light .btn--ghost { box-shadow: inset 0 0 0 1px var(--line-d); }
.btn--ghost::after {
  content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0;
  transition: opacity var(--dur-micro) var(--ease); z-index: 1;
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px currentColor; }

/* --- Animated underline link --- */
.link-u { position: relative; display: inline-block; font-weight: 600; }
.link-u::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform var(--dur-mid) var(--ease);
}
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

/* --- Reveal scaffolding (progressive enhancement) --- */
.js [data-reveal] .reveal-line > span,
.js [data-reveal-fade],
.js [data-reveal-mask] > * { will-change: transform, opacity; }

.js [data-reveal-fade] { opacity: 0; transform: translateY(26px); }
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; }
.js [data-reveal="lines"] .reveal-line > span { transform: translateY(110%); }
.js [data-reveal="word"] .word { display: inline-block; overflow: hidden; vertical-align: top; }
.js [data-reveal="word"] .word > span { display: inline-block; transform: translateY(110%); }

.js [data-clip] { clip-path: inset(0 0 100% 0); }

/* Failsafe: librerie non caricate o reduced-motion → tutto visibile */
.cb-static [data-reveal] .reveal-line > span,
.cb-static [data-reveal="word"] .word > span { transform: none !important; }
.cb-static [data-reveal-fade] { opacity: 1 !important; transform: none !important; }
.cb-static [data-clip] { clip-path: none !important; }
.cb-static .hero__eyebrow,
.cb-static .hero__sub,
.cb-static .hero__actions,
.cb-static .hero__meta-item,
.cb-static .scroll-cue { opacity: 1 !important; transform: none !important; visibility: visible !important; }

/* No-JS / reduced-motion safety */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] .reveal-line > span,
  .js [data-reveal="word"] .word > span { transform: none !important; }
  .js [data-reveal-fade] { opacity: 1 !important; transform: none !important; }
  .js [data-clip] { clip-path: none !important; }
}

/* --- Utility --- */
.u-mw { max-width: var(--maxw-text); }
.u-center { text-align: center; margin-inline: auto; }
.u-muted { color: var(--muted); }
.section--light .u-muted { color: var(--muted-d); }
.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;
}
.nowrap { white-space: nowrap; }
.accent { color: var(--honda-red); }

/* Grain / cinematic texture overlay */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
