/* ICONIC MOTORS — HERO SYSTEM v6 / 2026-11-12
   One source of truth for HOME, five vehicle models, and five editorial pages.
   Everything below is scoped to the first hero section.
   The !important declarations are limited to geometry originating from the
   Claude HTML exports' inline styles; page content and non-hero styles remain.
   Mobile variant layouts are intentionally not normalized at <=980px.
*/
:root {
  --im-hero-home: 740px;
  --im-hero-model: 740px;
  --im-hero-editorial: 740px;
  /* Brand typography: three optical levels, one font family and weight. */
  --im-hero-heading-font: "Archivo", Arial, sans-serif;
  --im-hero-heading-weight: 850;
  --im-hero-heading-leading: .99;
  --im-hero-heading-tracking: -.033em;
  --im-hero-heading-home: clamp(58px, 4.6vw, 70px);
  --im-hero-heading-model: clamp(68px, 5.45vw, 84px);
  --im-hero-heading-editorial: clamp(60px, 4.85vw, 74px);
  --im-hero-cta-height: 52px;
  --im-hero-photo-shade: linear-gradient(90deg,
    rgba(14,14,15,.78) 0%,rgba(14,14,15,.48) 48%,rgba(14,14,15,.28) 100%),
    linear-gradient(0deg,rgba(14,14,15,.7) 0%,rgba(14,14,15,0) 70%);
}

/* HOMEPAGE: preserve the hero film and 4-column statistics, improve hierarchy. */
@media (min-width:981px) {
  body.homepage .hero { height:var(--im-hero-home) !important; min-height:0 !important; }
  body.homepage .hero .hero-inner {
    height:100%; min-height:0; box-sizing:border-box;
    display:flex; flex-direction:column;
    padding-top:150px !important; padding-bottom:0;
  }
  body.homepage .hero .hero-h1-desktop {
    font-family:var(--im-hero-heading-font) !important;
    font-size:var(--im-hero-heading-home) !important;
    line-height:var(--im-hero-heading-leading) !important;
    letter-spacing:var(--im-hero-heading-tracking) !important;
    font-stretch:112%; font-weight:var(--im-hero-heading-weight) !important;
    max-width:none !important; width:max-content !important;
    white-space:nowrap !important;
    margin-top:18px !important;
  }
  body.homepage .hero .hero-cta-desktop { margin-top:28px !important; }
  body.homepage .hero .hero-h1-desktop br{display:block !important;}
  body.homepage .hero .hero-stats {
    margin-top:auto !important; flex-shrink:0;
    min-height:130px; display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    align-items:stretch;
  }
  body.homepage .hero-stats .stat { align-content:center; }
  body.homepage .hero-stats .stat .num { font-size:clamp(29px,2.8vw,40px); }
  body.homepage .hero-stats .stat-pko .num { font-size:clamp(26px,2.55vw,36px) !important; }
}

/* ALL VEHICLE PAGES / DESKTOP: shared grid and exact common baselines. */
@media (min-width:981px) {
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) {
    height:var(--im-hero-model) !important;
    min-height:var(--im-hero-model) !important;
    max-height:none !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap {
    position:relative !important; z-index:2;
    box-sizing:border-box; height:100% !important; min-height:0 !important;
    display:grid !important; grid-template-columns:minmax(0,1fr) !important;
    /* breadcrumb, flexible breathing room, title, subtitle, price, CTA, stats */
    grid-template-rows:28px minmax(0,1fr) 112px 70px 90px 76px 120px !important;
    align-content:stretch !important;
    padding-top:46px !important; padding-bottom:0 !important;
    margin-top:0 !important; margin-bottom:0 !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > p.m:first-of-type {
    grid-row:1 !important;grid-column:1 !important;
    margin:0 !important;align-self:start !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > h1 {
    grid-row:3 !important; grid-column:1 !important;
    display:flex !important; align-items:flex-end !important;
    width:100% !important; max-width:100% !important;
    height:auto !important; min-height:0 !important;
    margin:0 !important; transform:none !important;
    font-family:var(--im-hero-heading-font) !important;
    font-size:var(--im-hero-heading-model) !important;
    font-weight:var(--im-hero-heading-weight) !important;
    font-stretch:112%;
    line-height:var(--im-hero-heading-leading) !important;
    letter-spacing:var(--im-hero-heading-tracking) !important;
    overflow-wrap:normal; word-break:normal;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > h1 br {display:none !important;}
  /* The long Land Cruiser name has its own optical width adjustment. */
  .lc-d section[data-lc-section="d-main-0"] > .wrap > h1 {
    font-size:clamp(60px,5.05vw,76px) !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > p.d {
    grid-row:4 !important; grid-column:1 !important;
    width:100% !important; max-width:1160px !important;
    height:auto !important; min-height:0 !important;
    margin:14px 0 0 !important; transform:none !important;
    font-size:clamp(20px,1.65vw,24px) !important;
    line-height:1.16 !important; align-self:start !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > p.d + div {
    grid-row:5 !important;grid-column:1 !important;
    height:auto !important;min-height:0 !important;
    display:flex !important;align-items:center !important;
    margin:0 !important;gap:40px !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > p.d + div + div {
    grid-row:6 !important;grid-column:1 !important;
    width:auto !important; max-width:100% !important;
    height:auto !important; min-height:0 !important;
    display:flex !important; align-items:center !important;
    margin:0 !important;gap:12px !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > p.d + div + div .btn {
    min-height:var(--im-hero-cta-height) !important;
    height:var(--im-hero-cta-height) !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > .g4 {
    grid-row:7 !important;grid-column:1 !important;
    box-sizing:border-box !important;
    width:100% !important;min-height:120px !important;height:120px !important;
    margin:0 !important;display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    align-self:end !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > .g4 > div {
    box-sizing:border-box !important;
    padding-top:18px !important;padding-bottom:14px !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > .g4 > div > .d {
    display:flex !important;align-items:flex-end !important;
    min-height:36px !important;
    font-size:clamp(24px,2.2vw,32px) !important;
    line-height:1.04 !important;
  }
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > .g4 > div > .m {
    margin-top:8px !important; font-size:12px; line-height:1.3;
  }
  /* Normalize only the overlay, not the approved photographic source. */
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > div[aria-hidden="true"] {
    inset:0 !important;top:0 !important;
    width:100% !important;height:100% !important;
    opacity:1 !important;background:var(--im-hero-photo-shade) !important;
    pointer-events:none;
  }
  /* The LC image had a hard-coded -210px top and 977px height in its export. */
  .lc-d section[data-lc-section="d-main-0"] > img:first-child {
    top:0 !important;bottom:0 !important;height:100% !important;
    object-position:60% 42% !important;
  }
  /* Swift: high contrast on button hover, as approved on Jimny. */
  .swift-d .sw-hero a.btn-line:is(:hover,:focus-visible){
    background:#fff !important;color:#0e0e0f !important;border-color:#fff !important;
  }
}

/* EDITORIAL PAGE HEROES / DESKTOP: same rhythm, calmer title scale.
   No changes to the real page content beneath the first section. */
@media (min-width:981px) {
  :is(body.finance-page .fin-desktop .fin-first,
      body.warranty-page .gw-desktop .gw-s1,
      body.accessories-page .acc-desktop .acc-s1,
      body.about-page .onas-desktop .onas-s1,
      body.contact-page .contact-desktop .contact-s1) {
    height:var(--im-hero-editorial) !important;
    min-height:var(--im-hero-editorial) !important;
    position:relative !important;display:flex !important;align-items:flex-end !important;
  }
  :is(body.finance-page .fin-desktop .fin-first,
      body.warranty-page .gw-desktop .gw-s1,
      body.accessories-page .acc-desktop .acc-s1,
      body.about-page .onas-desktop .onas-s1,
      body.contact-page .contact-desktop .contact-s1) > .wrap {
    box-sizing:border-box !important;
    position:absolute !important;z-index:2 !important;
    left:50% !important;bottom:34px !important;top:auto !important;
    transform:translateX(-50%) !important;
    width:100% !important; max-width:1360px !important;
    min-height:0 !important; height:auto !important;
    margin:0 !important;
    padding:0 40px !important;
  }
  :is(body.finance-page .fin-desktop .fin-first,
      body.warranty-page .gw-desktop .gw-s1,
      body.accessories-page .acc-desktop .acc-s1,
      body.about-page .onas-desktop .onas-s1,
      body.contact-page .contact-desktop .contact-s1) > .wrap > h1 {
    font-family:var(--im-hero-heading-font) !important;
    font-size:var(--im-hero-heading-editorial) !important;
    font-weight:var(--im-hero-heading-weight) !important;
    font-stretch:112%;
    line-height:var(--im-hero-heading-leading) !important;
    letter-spacing:var(--im-hero-heading-tracking) !important;
    width:auto !important; max-width:16ch !important;
    margin:0 !important;
  }
  /* 3-line headlines get slightly tighter typography to share the CTA baseline. */
  body.finance-page .fin-desktop .fin-first > .wrap > h1 {font-size:clamp(58px,4.65vw,70px) !important;max-width:18ch !important;}
  body.accessories-page .acc-desktop .acc-s1 > .wrap > h1 {font-size:clamp(58px,4.65vw,70px) !important;max-width:18ch !important;}
  body.contact-page .contact-desktop .contact-s1 > .wrap > h1 {font-size:clamp(58px,4.65vw,70px) !important;max-width:18ch !important;}
  :is(body.finance-page .fin-desktop .fin-first,
      body.warranty-page .gw-desktop .gw-s1,
      body.accessories-page .acc-desktop .acc-s1,
      body.about-page .onas-desktop .onas-s1,
      body.contact-page .contact-desktop .contact-s1) > .wrap > p {
    font-size:18px !important;line-height:1.45 !important;
    margin-top:22px !important;
  }
  :is(body.finance-page .fin-desktop .fin-first,
      body.warranty-page .gw-desktop .gw-s1,
      body.accessories-page .acc-desktop .acc-s1,
      body.about-page .onas-desktop .onas-s1,
      body.contact-page .contact-desktop .contact-s1) > .wrap > div:last-child {
    margin-top:28px !important;
    display:flex !important;align-items:center !important;
    gap:12px !important;
  }
  :is(body.finance-page .fin-desktop .fin-first,
      body.warranty-page .gw-desktop .gw-s1,
      body.accessories-page .acc-desktop .acc-s1,
      body.about-page .onas-desktop .onas-s1,
      body.contact-page .contact-desktop .contact-s1) > div[aria-hidden="true"] {
    inset:0 !important;top:0 !important;left:0 !important;
    width:100% !important;height:100% !important;
    opacity:1 !important;background:var(--im-hero-photo-shade) !important;
    pointer-events:none;
  }
}

/* Narrow desktops: smaller headlines and data labels; no horizontal clipping. */
@media (min-width:981px) and (max-width:1150px) {
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > h1 {font-size:clamp(66px,6.6vw,78px) !important;}
  .lc-d section[data-lc-section="d-main-0"] > .wrap > h1 {font-size:60px !important;}
  :is(.jm-desktop section[data-jm-section="d1-0"],
      .wr-d section[data-wr-section="d-4-0"],
      .r4-d section[data-4r-section="d-dmain-0"],
      .lc-d section[data-lc-section="d-main-0"],
      .swift-d section[data-sw-section="d-hero"]) > .wrap > .g4 > div > .d {font-size:23px !important;}
}

/* The model and editorial phone/tablet versions retain the separately
   approved Claude mobile compositions without a new universal 980px layout. */

/* Wrangler's original export uses a more specific height rule on .wr-d .im;
   this is the single exception needed to keep all five model heights equal. */
@media (min-width:981px) {
  .wr-d .im section[data-wr-section="d-4-0"] {
    height:var(--im-hero-model) !important;
    min-height:var(--im-hero-model) !important;
  }
}

/* Narrow laptop: keep the two deliberate HOME lines inside the viewport,
   even when Archivo's wider 112% font-stretch is available. */
@media (min-width:981px) and (max-width:1120px) {
  body.homepage .hero .hero-h1-desktop {font-size:clamp(52px,5.2vw,58px) !important;}
}


/* V5 / 2026-11-12 — headline optical sizing after a staging screenshot at
   1527px width. Adjust HOME only. Keep two deliberate lines and the model,
   editorial, stats, and separately approved mobile layouts untouched. */
@media (min-width:981px) {
  body.homepage .hero .hero-inner {
    padding-top:217px !important; /* +12px from V4; stable statistics at bottom */
  }
  body.homepage .hero .hero-h1-desktop {
    font-size:clamp(52px,3.9vw,56px) !important;
    line-height:1.04 !important;
    max-width:min(960px,calc(100vw - 120px)) !important;
    width:auto !important;
    white-space:normal !important;
    margin-top:16px !important;
  }
  body.homepage .hero .hero-cta-desktop {
    margin-top:24px !important;
  }
  /* Keep V4's high-contrast gradient for light frames of the hero film. */
  body.homepage .hero .hero-veil {
    background:
      linear-gradient(90deg, rgba(14,14,15,.47) 0%, rgba(14,14,15,.25) 58%, rgba(14,14,15,.09) 100%),
      linear-gradient(0deg, rgba(14,14,15,.88) 8%, rgba(14,14,15,.50) 42%, rgba(14,14,15,.05) 86%) !important;
  }
}
@media (min-width:981px) and (max-width:1120px) {
  body.homepage .hero .hero-h1-desktop {
    font-size:clamp(46px,4.5vw,50px) !important;
  }
  body.homepage .hero .hero-inner {
    padding-top:210px !important;
  }
}

/* Mobile editorial pages: align the first headline with the model hero title.
   Model pages place their title about 270px below the hero's top edge. */
@media (max-width:620px){
  :is(body.finance-page .fin-mobile .fin-first,
      body.warranty-page .gw-mobile .gw-s1,
      body.about-page .onas-mobile .onas-s1,
      body.accessories-page .acc-mobile .acc-s1,
      body.contact-page .contact-mobile .contact-s1){
    display:flex!important;align-items:flex-start!important;
  }
  :is(body.finance-page .fin-mobile .fin-first,
      body.warranty-page .gw-mobile .gw-s1,
      body.about-page .onas-mobile .onas-s1,
      body.accessories-page .acc-mobile .acc-s1,
      body.contact-page .contact-mobile .contact-s1) > .wrap{
    box-sizing:border-box!important;
    padding-top:270px!important;padding-bottom:0!important;
  }
}
