/* ==========================================================================
   Urbians — Homepage
   Tema unico chiaro. Nessuna dark mode.
   ========================================================================== */

:root {
  /* Colori */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --ink: #0f172a;          /* testo principale */
  --ink-2: #334155;        /* testo secondario */
  --accent: #0096b3;       /* petrolio, usato con parsimonia */
  --border: #e2e8f0;

  /* Forma */
  --radius: 24px;
  --maxw: 1100px;
  --pad-x: clamp(20px, 5vw, 40px);
  --shadow-phone: 0 30px 60px -24px rgba(15, 23, 42, 0.35);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* compensa la barra sticky negli ancoraggi */
}

body {
  font-family: var(--font);
  font-size: 1.125rem;          /* 18px minimo */
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

/* Stati di focus visibili --------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Layout -------------------------------------------------------------------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.section {
  padding: clamp(72px, 11vw, 128px) 0;
}

.section--soft {
  background: var(--bg-soft);
}

/* Barra superiore ----------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__logo img {
  height: 60px;
  width: auto;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 11px 20px;
  border-radius: 999px;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.nav__cta:hover {
  filter: brightness(1.07);
}

.nav__cta:active {
  transform: translateY(1px);
}

/* Hero ---------------------------------------------------------------------- */
.hero {
  padding-top: clamp(56px, 9vw, 96px);
  padding-bottom: clamp(64px, 10vw, 120px);
  text-align: center;
}

.hero__title {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--ink);
}

.hero__sub {
  margin: 24px auto 0;
  max-width: 600px;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink-2);
}

.hero__store {
  margin-top: clamp(32px, 5vw, 40px);
}

/* Cappello / panoramica (sezione dedicata alla home dell'app) --------------- */
.overview {
  text-align: center;
}

.overview__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.overview__sub {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.overview__phone {
  margin-top: clamp(44px, 7vw, 72px);
  display: flex;
  justify-content: center;
}

.overview__phone .phone {
  width: clamp(250px, 32vw, 320px);
}

/* Pulsanti store ------------------------------------------------------------ */
.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.store-soon {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 440px;
  margin: 0 auto;
}

.store-btn {
  flex: 1 1 180px;
  max-width: 210px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 22px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.store-btn svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

/* Sollevamento al passaggio del mouse */
.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -14px rgba(15, 23, 42, 0.55);
}

/* CTA attivo (App Store e Google Play): un leggero bagliore pulsante
   richiama l'occhio verso il download. */
.store-btn--cta {
  animation: ctaPulse 2.8s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 150, 179, 0),
                0 10px 22px -16px rgba(15, 23, 42, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 150, 179, 0.14),
                0 14px 28px -14px rgba(15, 23, 42, 0.55);
  }
}

/* Al passaggio del mouse la pulsazione si ferma e prende il sopravvento
   l'effetto lift + ombra, così l'interazione resta nitida. */
.store-btn--cta:hover {
  animation: none;
}

/* Sezioni funzione (testo + telefono) -------------------------------------- */
.feature__inner {
  display: flex;
  align-items: center;
  gap: clamp(40px, 6vw, 90px);
}

.feature--reverse .feature__inner {
  flex-direction: row-reverse;
}

.feature__text {
  flex: 1 1 0;
  max-width: 480px;
}

.feature__title {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.feature__sub {
  margin-top: 18px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.feature__media {
  flex: 0 0 auto;
}

/* Cornice telefono disegnata in CSS ---------------------------------------- */
.phone {
  width: clamp(240px, 30vw, 300px);
  padding: 10px;                /* bezel sottile */
  background: #0f172a;
  border-radius: 42px;
  box-shadow: var(--shadow-phone);
}

.phone__screen {
  border-radius: 32px;
  overflow: hidden;
  background: #000;
}

.phone__screen img {
  width: 100%;
}

/* Sezione "Perché Urbians" -------------------------------------------------- */
.why__inner {
  max-width: 720px;
  margin: 0 auto;
}

.why__title {
  text-align: center;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: clamp(28px, 5vw, 48px);
}

.why__p {
  font-size: clamp(1.12rem, 2vw, 1.3rem);
  line-height: 1.75;
  color: var(--ink-2);
}

.why__p + .why__p {
  margin-top: 24px;
}

.why__p em {
  font-style: italic;
  color: var(--ink);
}

.why__p strong {
  font-weight: 700;
  color: var(--ink);
}

/* Chiusura ------------------------------------------------------------------ */
.closing {
  text-align: center;
}

.closing__title {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink);
}

.closing__store {
  margin-top: clamp(36px, 6vw, 52px);
}

/* Footer -------------------------------------------------------------------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: clamp(48px, 7vw, 72px) 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.footer__links a {
  color: var(--ink-2);
  font-size: 1rem;
}

.footer__links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--ink-2);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer__social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer__social svg {
  width: 20px;
  height: 20px;
}

.footer__copy {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.footer__copy a {
  color: var(--accent);
}

.footer__copy a:hover {
  text-decoration: underline;
}

/* Animazioni di comparsa ---------------------------------------------------- */
/* Lo stato nascosto si applica solo se il JS è attivo (.js): senza JS o se
   le animazioni sono disattivate, tutto è visibile da subito. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger leggero fra titolo, testo e telefono */
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 860px) {
  .feature__inner,
  .feature--reverse .feature__inner {
    flex-direction: column;   /* su mobile: testo sopra, telefono sotto */
    text-align: center;
  }

  .feature__text {
    max-width: 560px;
  }

  .feature__media {
    margin-top: clamp(36px, 8vw, 48px);
  }
}

/* Rispetta sempre prefers-reduced-motion ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .nav__cta,
  .store-btn {
    transition: none !important;
  }

  .store-btn--cta {
    animation: none !important;
  }
}
