/* =========================================================
   RotalNova Lab — stylesheet
   Palette (derivata dal logo):
     verde bosco  #1F3A2E / #122019   (profondità, natura)
     verde salvia #3F7D55             (crescita)
     ambra        #E8A54E / #F4C26B   (accento caldo, la freccia)
     azzurro tech #5AA9D6             (i nodi, dettaglio tech)
   Type: Space Grotesk (display) · Inter (body)
   ========================================================= */

:root {
  --bg:       #FBFAF6;   /* bianco caldo, leggermente crema */
  --bg-soft:  #F1EEE6;
  --ink:      #16281F;   /* verde-nero: il testo */
  --ink-2:    #4F6157;   /* verde attenuato per testi secondari */
  --forest:   #1F3A2E;   /* verde bosco del logo */
  --forest-2: #122019;   /* verde bosco scuro */
  --sage:     #3F7D55;   /* verde salvia */
  --amber:    #E8A54E;   /* ambra: accento principale */
  --amber-2:  #F4C26B;   /* ambra chiara */
  --tech:     #5AA9D6;   /* azzurro tech */
  --line:     #E4E0D4;   /* linee su fondo crema */
  --white:    #FFFFFF;
  --radius:   16px;
  --max:      1120px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink); }
.brand__mark { width: 32px; height: 32px; border-radius: 8px; flex: none; display: block; }
.brand--sm .brand__mark { width: 26px; height: 26px; }
.brand__lab { color: var(--sage); }
.brand--sm { font-size: 1rem; }

/* ---------- Navbar ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(251,251,253,.8); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 4px 24px rgba(15,22,51,.04); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: .95rem; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { padding: 9px 18px; background: var(--ink); color: var(--white) !important; border-radius: 999px; }
.nav__cta:hover { background: var(--sage); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile { display: none; flex-direction: column; padding: 0 24px; max-height: 0; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); transition: max-height .35s var(--ease); }
.nav__mobile.is-open { max-height: 320px; }
.nav__mobile a { padding: 15px 0; font-weight: 500; border-bottom: 1px solid var(--line); color: var(--ink); }
.nav__mobile a:last-child { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 170px 0 110px; overflow: hidden; }
.hero__inner { position: relative; z-index: 2; max-width: 780px; }
.eyebrow { font-family: 'Space Grotesk', sans-serif; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 20px; }
.hero__title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 26px; }
.grad { background: linear-gradient(105deg, var(--sage), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: 1.2rem; color: var(--ink-2); max-width: 620px; margin-bottom: 38px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__glow { position: absolute; top: -180px; right: -160px; width: 560px; height: 560px; background: radial-gradient(circle, rgba(232,165,78,.28), transparent 65%); z-index: 1; pointer-events: none; }
.hero__glow--2 { position: absolute; bottom: -220px; left: -180px; width: 480px; height: 480px; background: radial-gradient(circle, rgba(63,125,85,.20), transparent 65%); z-index: 1; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .98rem; padding: 13px 26px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--forest); color: var(--white); box-shadow: 0 8px 22px rgba(31,58,46,.22); }
.btn--primary:hover { background: var(--forest-2); box-shadow: 0 12px 28px rgba(31,58,46,.30); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--big { font-size: 1.15rem; padding: 17px 40px; }
.btn--sm { padding: 9px 18px; font-size: .88rem; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section__title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -0.025em; line-height: 1.12; margin-bottom: 48px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 38px 34px; transition: transform .3s var(--ease), box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15,22,51,.07); }
.card__icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: var(--bg-soft); color: var(--sage); font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 22px; }
.card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.45rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.card p { color: var(--ink-2); margin-bottom: 20px; }
.card__list { list-style: none; }
.card__list li { position: relative; padding-left: 26px; margin-bottom: 9px; color: var(--ink); font-size: .96rem; }
.card__list li::before { content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--amber), var(--sage)); }
.card:nth-child(2) .card__icon { color: var(--tech); }

/* ---------- App section ---------- */
.section--app { background: var(--ink); color: var(--white); border-radius: 32px; margin: 0 16px; }
.section--app .eyebrow { color: var(--amber); }
.section--app .section__title { color: var(--white); }
.app__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.app__text p { color: rgba(255,255,255,.72); margin-bottom: 16px; max-width: 460px; }
.app__note { color: var(--amber) !important; font-weight: 500; }
.app__visual { display: flex; justify-content: center; }
.phone { position: relative; width: 210px; height: 420px; background: linear-gradient(160deg, #1b2350, #10152e); border-radius: 34px; border: 1px solid rgba(255,255,255,.12); padding: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.phone__notch { width: 90px; height: 20px; background: #0b0f22; border-radius: 0 0 14px 14px; margin: 0 auto 0; }
.phone__screen { position: relative; height: calc(100% - 20px); margin-top: 8px; border-radius: 24px; background: radial-gradient(circle at 50% 42%, rgba(110,123,255,.35), transparent 60%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; overflow: hidden; }
.phone__nova { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--amber), var(--sage)); box-shadow: 0 0 40px rgba(232,165,78,.55); animation: pulse 3s var(--ease) infinite; }
.phone__soon { font-family: 'Space Grotesk', sans-serif; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.75); }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.12); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .phone__nova { animation: none; } }

/* ---------- Chi sono ---------- */
.chi__inner { max-width: 760px; }
.chi__lead { font-size: 1.2rem; color: var(--ink-2); margin-bottom: 20px; }

/* ---------- Contatti ---------- */
.section--contact { text-align: center; }
.contact__inner { max-width: 640px; margin: 0 auto; }
.contact__inner .eyebrow { display: block; }
.contact__lead { font-size: 1.2rem; color: var(--ink-2); margin-bottom: 34px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { font-size: .9rem; color: var(--ink-2); transition: color .2s; }
.footer__links a:hover { color: var(--sage); }
.footer__copy { font-size: .85rem; color: var(--ink-2); width: 100%; }

/* ---------- Cookie banner ---------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(15,22,51,.16); padding: 20px 22px; max-width: 620px; margin: 0 auto; transform: translateY(140%); transition: transform .5s var(--ease); }
.cookie.is-visible { transform: none; }
.cookie__body { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie__body p { font-size: .9rem; color: var(--ink-2); flex: 1 1 280px; }
.cookie__body a { color: var(--sage); text-decoration: underline; }
.cookie__actions { display: flex; gap: 10px; }

/* ---------- Legal pages ---------- */
.legal { padding: 130px 0 90px; }
.legal__inner { max-width: 760px; }
.legal h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2rem,4vw,2.8rem); letter-spacing: -0.025em; margin-bottom: 10px; }
.legal .updated { color: var(--ink-2); font-size: .9rem; margin-bottom: 40px; }
.legal h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; margin: 34px 0 12px; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal a { color: var(--sage); text-decoration: underline; }
.back { display: inline-block; margin-top: 40px; font-weight: 600; color: var(--sage); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__mobile { display: flex; }
  .cards { grid-template-columns: 1fr; }
  .app__grid { grid-template-columns: 1fr; gap: 40px; }
  .app__visual { order: -1; }
  .section--app { border-radius: 24px; margin: 0 8px; }
  .hero { padding: 140px 0 80px; }
  .section { padding: 72px 0; }
}
