/* ==========================================================================
   FanSkope — responsive overrides
   Load AFTER style.css.  Desktop-first (max-width) breakpoints:

     1180px  small laptop  -> hamburger nav, fan diagram becomes 2 columns
     1024px  tablet        -> tighter gutters / section spacing
      768px  large phone   -> single column, smaller type & padding
      480px  phone         -> full-width buttons, compact cards
      360px  small phone   -> final squeeze
   ========================================================================== */


/* ---------- <= 1180px : small laptop / tablet landscape ---------- */
@media (max-width: 1180px) {

  /* Navigation -> hamburger */
  .nav__toggle { display: inline-flex; }

  .nav__links {
    display: none;
    flex: 0 0 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 4px 0 8px;
    border-top: 1px solid var(--line-dark);
  }
  .nav__links.is-open { display: flex; }

  .nav__link {
    padding: 15px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--line-dark);
  }
  .nav__cta,
  .nav__login {
    justify-content: center;
    text-align: center;
    margin-top: 14px;
    padding: 14px 20px;
  }
  .nav__login { margin-top: 10px; }

  .nav__toggle.is-open .nav__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open .nav__bar:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open .nav__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Fan diagram: dial on top, 8 layers in two columns below */
  .fan {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
    align-items: start;
  }
  .fan__center {
    grid-column: 1 / -1;
    order: -1;
    width: 100%;
    max-width: 400px;
    justify-self: center;
  }
  /* connector lines pointed at the dial, which no longer sits between the columns */
  .layer-row__line,
  .layer-row__dot { display: none; }
}


/* ---------- <= 1024px : tablet ---------- */
@media (max-width: 1024px) {
  :root {
    --gutter: 24px;
    --section-y: 72px;
  }

  .hero { padding-bottom: 72px; }
.hero__inner {
    gap: 48px;
    flex-direction: column;
    align-items: start;
    flex: auto;
}
.hero__lead {
    max-width: 100%;
}
.record {
    max-width: 100%;
}
.hero__visual {
    width: 100%;
}
  .section-head { margin-bottom: 44px; }
  .section-head--tight { margin-bottom: 32px; }
  .section-title--how { margin-bottom: 44px; }

  .split { gap: 40px 48px; }

  .stage { gap: 24px 40px; }
  .audience,
  .data-card { padding: 32px; }
  .across,
  .why-all { padding: 28px 32px; }
  .form { padding: 32px; }
.contact {
    flex-direction: column;
}
.contact__lead {
    flex: 1;
}
.form {
    grid-template-columns: 1fr 1fr;
}
}


/* ---------- <= 768px : large phone / portrait tablet ---------- */
@media (max-width: 768px) {
  :root {
    --gutter: 20px;
    --section-y: 56px;
  }

  .page { font-size: 16px; }

  /* Header */
  .nav { padding-top: 14px; padding-bottom: 14px; }
  .logo { font-size: 26px; }

  /* Hero */
  .hero { padding-top: 36px; padding-bottom: 56px; }
  .hero__inner { gap: 40px; }
  .hero__content { flex-basis: 100%; gap: 24px; }
  .hero__visual { flex-basis: 100%; }
  .hero__eyebrow { font-size: 12px; letter-spacing: 0.12em; }
  .hero__lead { font-size: 18px; max-width: none; }
  .record { padding: 22px; }

  /* Section headers */
  .section-head { gap: 16px; margin-bottom: 36px; }
  .section-head--tight { margin-bottom: 28px; }
  .section-head__aside,
  .section-head__aside--narrow { max-width: none; }
  .section-title--how { margin-bottom: 36px; }
  .section-title--w760,
  .section-title--w780 { max-width: none; }

  /* Split layouts */
  .split { gap: 32px; }
  .split__lead,
  .split__body,
  .split__body--cards { flex-basis: 100%; }
  .why__text { font-size: 17px; max-width: none; }
  .feature { padding: 24px; }

  /* Fan diagram -> single column */
  .fan { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .fan__center { margin-bottom: 14px; }
  .fan__col { gap: 12px; }
  .fan__caption-title { font-size: 22px; }
  .outputs { margin-top: 36px; padding-top: 24px; }

  /* Who we serve */
  .audience,
  .data-card { padding: 28px; border-radius: 18px; }
  .audience__title { font-size: 28px; }
  .across { padding: 24px 28px; gap: 16px 24px; border-radius: 18px; }
  .across__title { font-size: 26px; flex-basis: 100%; }
  .across__list { flex-basis: 100%; }

  /* Our data */
  .data-card__code { font-size: 54px; }
  .why-all { padding: 24px 28px; border-radius: 18px; }
  .why-all__text { flex-basis: 100%; font-size: 18px; }

  /* Services */
  .stage { padding: 32px 0; gap: 20px 32px; }
  .stage__intro { flex-basis: 100%; max-width: none; }
  .stage__cards { flex-basis: 100%; }
  .stage__title { font-size: 28px; }
  .product { padding: 24px; }
  .product__title,
  .product--dark .product__title { font-size: 20px; }

  /* How it works */
  .steps { gap: 28px; }

  /* Contact */
  .contact { gap: 36px; }
  .contact__lead,
  .form { flex-basis: 100%; }
  .contact__text { font-size: 18px; max-width: none; }
  .form { padding: 28px; gap: 16px; }

  /* Footer */
  .site-footer { padding-top: 32px; padding-bottom: 32px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}


/* ---------- <= 480px : phone ---------- */
@media (max-width: 480px) {
  :root {
    --gutter: 16px;
    --section-y: 48px;
  }

  .logo { font-size: 24px; }
  .logo__mark { width: 21px; height: 21px; }

  /* Hero */
  .hero { padding-top: 28px; padding-bottom: 48px; }
  .hero__content { gap: 22px; }
  .hero__title { font-size: clamp(40px, 13vw, 56px); }
  .hero__lead { font-size: 17px; }

  .toggle { align-self: stretch; }
  .toggle__btn { flex: 1 1 0; padding-left: 12px; padding-right: 12px; }

  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; text-align: center; font-size: 16px; }

  /* Fan record card */
  .record { padding: 18px; border-radius: 16px; font-size: 13px; }
  .record__head { flex-wrap: wrap; row-gap: 4px; font-size: 11px; margin-bottom: 16px; }
  .record__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
  .record__tile { aspect-ratio: 16 / 9; padding: 12px; font-size: 11px; }
  .record__row { flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; }
  .record__value { text-align: right; margin-left: auto; }

  /* Type scale */
  .section-title { font-size: clamp(30px, 9.5vw, 38px); }
  .eyebrow { font-size: 12px; margin-bottom: 12px; }

  /* Fan diagram */
  .layer { padding: 18px; border-radius: 14px; }
  .layer__title { font-size: 17px; }
  .fan__caption-title { font-size: 20px; }
  .outputs__label { flex-basis: 100%; }
  .chip { padding: 7px 14px; font-size: 14px; }

  /* Cards */
  .audience,
  .data-card { padding: 22px; border-radius: 16px; gap: 18px; }
  .audience__title { font-size: 26px; }
  .tags { font-size: 14px; }
  .tag { padding: 7px 12px; }
  .across,
  .why-all { padding: 22px; border-radius: 16px; }
  .data-card__code { font-size: 46px; }
  .data-card__name { font-size: 18px; }
  .why-all__text { font-size: 17px; }

  /* Services */
  .stage { padding: 28px 0; }
  .stage__title { font-size: 26px; }
  .product,
  .feature { padding: 20px; border-radius: 14px; }

  /* Steps */
  .step__title { font-size: 20px; }

  /* Contact */
  .contact__title { font-size: clamp(34px, 11vw, 44px); margin-bottom: 16px; }
  .contact__text { font-size: 17px; margin-bottom: 18px; }
  .contact__mail { font-size: 16px; }
  .form { padding: 22px; border-radius: 16px; }
  .form__submit { font-size: 16px; }
  .field__control {
    padding: 8px 14px;
    min-height: 38px;
}


/* ---------- <= 360px : small phone ---------- */
@media (max-width: 360px) {
  .logo { font-size: 22px; }
  .nav__toggle { width: 40px; height: 40px; }
  .hero__title { font-size: 38px; }
  .toggle__btn { font-size: 14px; }
  .record__tile { padding: 10px; }
  .audience,
  .data-card,
  .form { padding: 18px; }
}
