
/* Prevent the original Gutenberg Story from flashing before the mobile rebuild is ready. */
@media (max-width:768px) {
  html.imc-story-mobile-preload .imc-story-mobile-original {
    visibility:hidden !important;
  }
}

/* IMC Story 0.1.23 | Mobile layer only */
@media (max-width: 768px) {
  html,
  body.imc-story-page-owned,
  body.imc-story-page-owned #page,
  body.imc-story-page-owned .site,
  body.imc-story-page-owned .site-content,
  body.imc-story-page-owned .site-container,
  body.imc-story-page-owned .content-area,
  body.imc-story-page-owned .content-container,
  body.imc-story-page-owned .content-bg,
  body.imc-story-page-owned #primary,
  body.imc-story-page-owned #main,
  body.imc-story-page-owned .site-main,
  body.imc-story-page-owned article,
  body.imc-story-page-owned .entry,
  body.imc-story-page-owned .entry-content,
  body.imc-story-page-owned .entry-content-wrap,
  body.imc-story-page-owned .single-content,
  body.imc-story-page-owned .wp-site-blocks,
  body.imc-story-page-owned .imc-story-mobile-original {
    background:#000 !important;
    background-color:#000 !important;
  }

  .imc-story-desktop-owned,
  .imc-story-mobile-hero-legacy,
  .imc-story-mobile-stats-legacy,
  .imc-story-mobile-timeline-legacy,
  .imc-story-mobile-center-legacy,
  .imc-story-mobile-where-started-legacy {
    display:none !important;
  }

  .imc-story-mobile-hero-rebuilt,
  .imc-story-mobile-stats-rebuilt,
  .imc-story-mobile-timeline-rebuilt,
  .imc-story-mobile-center-rebuilt,
  .imc-story-mobile-original {
    box-sizing:border-box;
    width:100%;
    max-width:100%;
  }

  .imc-story-mobile-hero-rebuilt {
    position:relative;
    overflow:hidden;
    margin:0 0 20px;
    background:#000;
    color:#fff;
  }

  .imc-story-mobile-hero-inner {
    position:relative;
    min-height:440px;
    padding:20px 16px 44px;
    background:#000;
  }

  .imc-story-mobile-hero-inner:before {
    content:"";
    position:absolute;
    inset:0;
    z-index:2;
    background:linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,.98) 32%, rgba(0,0,0,.88) 42%, rgba(0,0,0,.58) 54%, rgba(0,0,0,.24) 66%, rgba(0,0,0,.06) 76%, rgba(0,0,0,0) 84%);
    pointer-events:none;
  }

  .imc-story-mobile-hero-copy {
    position:relative;
    z-index:4;
    width:56%;
    max-width:214px;
  }

  .imc-story-mobile-hero-eyebrow {
    position:relative;
    margin:0 0 16px;
    padding-left:46px;
    color:#fff;
    font-family:"League Spartan", Arial, sans-serif;
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
    line-height:1.05;
    text-transform:uppercase;
  }

  .imc-story-mobile-hero-eyebrow:before {
    content:"";
    position:absolute;
    left:0;
    top:50%;
    width:34px;
    height:3px;
    background:#a10d00;
    transform:translateY(-50%);
  }

  .imc-story-mobile-hero-title {
    margin:0 0 18px !important;
    color:#fff !important;
    font-family:"League Spartan", Arial, sans-serif !important;
    font-size:54px !important;
    font-weight:900 !important;
    line-height:.9 !important;
    letter-spacing:-.03em;
    text-transform:uppercase;
  }

  .imc-story-mobile-hero-title span {
    display:block;
    color:#c61507;
  }

  .imc-story-mobile-hero-text {
    display:flex;
    flex-direction:column;
    gap:7px;
    max-width:100%;
  }

  .imc-story-mobile-hero-text p {
    margin:0 !important;
    color:#fff !important;
    font-family:Lato, Arial, sans-serif !important;
    font-size:12.4px !important;
    font-weight:400 !important;
    line-height:1.38 !important;
  }

  .imc-story-mobile-hero-visual {
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:30%;
    width:auto;
    height:auto;
    z-index:1;
    display:flex;
    align-items:flex-end;
    justify-content:flex-end;
    overflow:hidden;
    line-height:0;
  }

  .imc-story-mobile-hero-visual:before {
    content:"";
    position:absolute;
    inset:0;
    z-index:2;
    background:linear-gradient(90deg, #000 0%, rgba(0,0,0,.96) 14%, rgba(0,0,0,.78) 28%, rgba(0,0,0,.46) 42%, rgba(0,0,0,.18) 58%, rgba(0,0,0,.04) 72%, rgba(0,0,0,0) 84%);
    pointer-events:none;
  }

  .imc-story-mobile-hero-visual img {
    position:relative;
    z-index:1;
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    object-fit:cover;
    object-position:61% top;
    -webkit-mask-image:none;
    mask-image:none;
  }

  .imc-story-mobile-hero-wave {
    position:absolute;
    left:0;
    right:0;
    bottom:-1px;
    width:100%;
    height:56px;
    line-height:0;
    z-index:5;
    pointer-events:none;
  }

  .imc-story-mobile-hero-wave path {
    fill:#000;
  }

  .imc-story-mobile-stats-rebuilt {
    width:calc(100% - 40px);
    margin:0 auto 28px;
    border:1px solid #a10d00;
    border-radius:24px;
    overflow:hidden;
    background:#000;
    color:#fff;
  }

  .imc-story-mobile-stat-card {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:92px;
    padding:10px 12px;
    text-align:center;
    background:#000;
  }

  .imc-story-mobile-stat-card + .imc-story-mobile-stat-card {
    border-top:1px solid #a10d00;
  }

  .imc-story-mobile-stat-value {
    color:#c61507;
    font-family:"League Spartan", Arial, sans-serif;
    font-size:32px;
    font-weight:900;
    line-height:.96;
    letter-spacing:-.04em;
    text-transform:uppercase;
  }

  .imc-story-mobile-stat-card--wide .imc-story-mobile-stat-value {
    font-size:32px;
  }

  .imc-story-mobile-stat-label,
  .imc-story-mobile-stat-suffix {
    color:#fff;
    font-family:"League Spartan", Arial, sans-serif;
    font-size:12px;
    font-weight:900;
    line-height:1.15;
    letter-spacing:.02em;
    text-transform:uppercase;
    text-align:center;
  }

  .imc-story-mobile-stat-card--wide {
    gap:7px;
    min-height:122px;
  }

  .imc-story-mobile-stat-card--wide .imc-story-mobile-stat-label,
  .imc-story-mobile-stat-card--wide .imc-story-mobile-stat-suffix {
    max-width:265px;
  }

  .imc-story-mobile-timeline-rebuilt {
    margin:0 0 28px;
    padding:0 18px;
    background:#000;
    color:#fff;
  }

  .imc-story-mobile-timeline-head {
    margin:0 0 22px;
    text-align:center;
  }

  .imc-story-mobile-timeline-head h2 {
    margin:0 !important;
    color:#fff !important;
    font-family:"League Spartan", Arial, sans-serif !important;
    font-size:40px !important;
    font-weight:900 !important;
    line-height:.95 !important;
    letter-spacing:-.03em;
  }

  .imc-story-mobile-timeline-head h2 span {
    color:#b9150b;
  }

  .imc-story-mobile-timeline-track {
    position:relative;
    padding-left:0;
    min-height:100%;
  }

  .imc-story-mobile-timeline-track:before {
    content:"";
    position:absolute;
    left:22px;
    top:20px;
    bottom:20px;
    width:2px;
    z-index:1;
    background:#fff;
  }

  .imc-story-mobile-timeline-item {
    position:relative;
    z-index:2;
    padding:0;
    margin:0 0 calc(var(--imc-year-gap, 0) * 10px);
  }

  .imc-story-mobile-timeline-item:last-child {
    margin-bottom:0;
  }

  .imc-story-mobile-timeline-marker {
    position:absolute;
    left:14px;
    top:50%;
    width:18px;
    height:18px;
    border:2px solid #a10d00;
    border-radius:50%;
    background:#000;
    transform:translateY(-50%);
    box-shadow:0 0 0 4px #000;
    z-index:3;
  }

  .imc-story-mobile-timeline-birth {
    margin:0 0 8px 48px;
    color:#a10d00;
    font-family:"League Spartan", Arial, sans-serif;
    font-size:11px;
    font-weight:900;
    line-height:1;
    letter-spacing:.08em;
    text-transform:uppercase;
  }

  .imc-story-mobile-timeline-card {
    margin-left:48px;
    padding:18px 18px 20px;
    border:1px solid rgba(255,255,255,.9);
    border-radius:22px;
    background:#050505;
  }

  .imc-story-mobile-timeline-logo {
    display:block;
    width:66px;
    height:66px;
    margin:0 0 16px;
    object-fit:contain;
    background:#fff;
    border-radius:8px;
    padding:4px;
  }

  .imc-story-mobile-timeline-year {
    margin:0 0 8px;
    color:#c61507;
    font-family:"League Spartan", Arial, sans-serif;
    font-size:32px;
    font-weight:900;
    line-height:.95;
  }

  .imc-story-mobile-timeline-title {
    margin:0 0 14px !important;
    color:#fff !important;
    font-family:"League Spartan", Arial, sans-serif !important;
    font-size:20px !important;
    font-weight:900 !important;
    line-height:1.05 !important;
    text-transform:uppercase;
  }

  .imc-story-mobile-timeline-text {
    margin:0 !important;
    color:#fff !important;
    font-family:Lato, Arial, sans-serif !important;
    font-size:14px !important;
    line-height:1.56 !important;
  }

  .imc-story-mobile-timeline-action {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    margin-top:16px;
    padding:0 13px;
    border:1px solid #a10d00;
    border-radius:8px;
    background:#a10d00;
    color:#fff !important;
    font-family:"League Spartan",Arial,sans-serif;
    font-size:12px;
    font-weight:900;
    text-decoration:none !important;
    text-transform:uppercase;
  }
  .imc-story-mobile-timeline-action:hover,.imc-story-mobile-timeline-action:focus-visible {
    border-color:#a10d00;
    background:#fff;
    color:#a10d00 !important;
    outline:none;
  }

  .imc-story-mobile-center-rebuilt {
    position:relative;
    margin:24px 0 -58px;
    background:#000;
    color:#fff;
    overflow:visible;
    z-index:0;
  }

  .imc-story-mobile-center-copy {
    padding:0 18px 18px;
  }

  .imc-story-mobile-center-eyebrow {
    position:relative;
    display:inline-block;
    margin:0 0 18px;
    padding-left:46px;
    color:#fff;
    font-family:"League Spartan", Arial, sans-serif;
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
    line-height:1.05;
    text-transform:uppercase;
  }

  .imc-story-mobile-center-eyebrow:before {
    content:"";
    position:absolute;
    left:0;
    top:50%;
    width:34px;
    height:3px;
    background:#a10d00;
    transform:translateY(-50%);
  }

  .imc-story-mobile-center-copy h2 {
    margin:0 0 18px !important;
    color:#fff !important;
    font-family:"League Spartan", Arial, sans-serif !important;
    font-size:38px !important;
    font-weight:900 !important;
    line-height:1 !important;
    letter-spacing:-.03em;
  }

  .imc-story-mobile-center-copy p {
    margin:0 0 16px !important;
    color:#fff !important;
    font-family:Lato, Arial, sans-serif !important;
    font-size:14px !important;
    font-weight:400 !important;
    line-height:1.48 !important;
  }

  .imc-story-mobile-center-copy p:last-child {
    margin-bottom:0 !important;
  }

  .imc-story-mobile-center-image {
    display:block;
    width:100%;
    height:auto;
    margin:12px 0 -58px;
    position:relative;
    z-index:0;
  }

  body.imc-story-page-owned .site-footer,
  body.imc-story-page-owned footer,
  body.imc-story-page-owned #colophon {
    position:relative;
    z-index:5;
    background:#000 !important;
  }
}

/* IMC Story 0.1.27 | targeted mobile corrections */
@media (max-width:768px) {
  /* Hero: keep Nicolas clearly visible again, keep text in place, soften the black/red seam. */
  .imc-story-mobile-hero-inner {
    min-height:440px !important;
    background:#000 !important;
    background-image:linear-gradient(90deg,#000 0%,#000 34%,#170000 49%,#560000 72%,#a10d00 100%) !important;
    background-repeat:no-repeat !important;
    background-position:center center !important;
    background-size:cover !important;
  }
  .imc-story-mobile-hero-inner:before {
    display:block !important;
    inset:0 !important;
    z-index:2 !important;
    background:linear-gradient(90deg, rgba(0,0,0,.98) 0%, rgba(0,0,0,.96) 27%, rgba(0,0,0,.84) 38%, rgba(0,0,0,.58) 49%, rgba(0,0,0,.28) 60%, rgba(0,0,0,.10) 71%, rgba(0,0,0,.02) 80%, rgba(0,0,0,0) 88%) !important;
  }
  .imc-story-mobile-hero-copy {
    width:54% !important;
    max-width:200px !important;
  }
  .imc-story-mobile-hero-visual {
    display:flex !important;
    left:28% !important;
    right:0 !important;
    top:0 !important;
    bottom:0 !important;
    z-index:1 !important;
    overflow:hidden !important;
  }
  .imc-story-mobile-hero-visual:before {
    display:block !important;
    background:linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.96) 12%, rgba(0,0,0,.82) 26%, rgba(0,0,0,.56) 40%, rgba(0,0,0,.28) 54%, rgba(0,0,0,.10) 68%, rgba(0,0,0,.02) 80%, rgba(0,0,0,0) 90%) !important;
  }
  .imc-story-mobile-hero-visual img {
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    object-position:60% top !important;
    transform:none !important;
  }

  /* Stats: same centered width, much less empty space above and below each line. */
  .imc-story-mobile-stats-rebuilt {
    width:calc(100% - 40px) !important;
    margin:0 auto 28px !important;
  }
  .imc-story-mobile-stat-card {
    min-height:0 !important;
    height:auto !important;
    padding:12px 12px !important;
    gap:4px !important;
  }
  .imc-story-mobile-stat-card--wide {
    min-height:0 !important;
    padding:12px 12px !important;
    gap:5px !important;
  }
  .imc-story-mobile-stat-value,
  .imc-story-mobile-stat-card--wide .imc-story-mobile-stat-value {
    font-size:31px !important;
    line-height:1 !important;
    margin:0 !important;
  }
  .imc-story-mobile-stat-label,
  .imc-story-mobile-stat-suffix {
    font-size:11px !important;
    line-height:1.08 !important;
    margin:0 !important;
  }
  .imc-story-mobile-stat-card + .imc-story-mobile-stat-card {
    border-top-width:1px !important;
  }

  /* Timeline: restore a real white line behind the exact center of the circles. */
  .imc-story-mobile-timeline-track {
    position:relative !important;
    overflow:visible !important;
  }
  .imc-story-mobile-timeline-track:before {
    content:"" !important;
    display:block !important;
    position:absolute !important;
    left:23px !important;
    top:16px !important;
    bottom:16px !important;
    width:2px !important;
    background:#fff !important;
    opacity:1 !important;
    z-index:1 !important;
    pointer-events:none !important;
  }
  .imc-story-mobile-timeline-line {
    display:none !important;
  }
  .imc-story-mobile-timeline-item {
    position:relative !important;
    z-index:2 !important;
    overflow:visible !important;
  }
  .imc-story-mobile-timeline-marker {
    left:14px !important;
    top:50% !important;
    width:18px !important;
    height:18px !important;
    transform:translateY(-50%) !important;
    border:2px solid #a10d00 !important;
    border-radius:50% !important;
    background:#000 !important;
    box-shadow:0 0 0 4px #000 !important;
    z-index:3 !important;
  }
  .imc-story-mobile-timeline-card {
    margin-left:48px !important;
    background:#000 !important;
  }
}


/* IMC Story 0.1.28 | mobile flash + timeline line only */
@media (max-width:768px) {
  .imc-story-mobile-timeline-track {
    position:relative !important;
    overflow:visible !important;
  }
  .imc-story-mobile-timeline-track:before {
    content:"" !important;
    display:block !important;
    position:absolute !important;
    left:22px !important;
    top:9px !important;
    bottom:9px !important;
    width:2px !important;
    height:auto !important;
    background:#ffffff !important;
    background-color:#ffffff !important;
    opacity:1 !important;
    visibility:visible !important;
    z-index:50 !important;
    pointer-events:none !important;
  }
  .imc-story-mobile-timeline-line {
    display:none !important;
  }
  .imc-story-mobile-timeline-item {
    position:relative !important;
    z-index:auto !important;
    background:transparent !important;
    overflow:visible !important;
  }
  .imc-story-mobile-timeline-marker {
    box-sizing:border-box !important;
    left:14px !important;
    top:50% !important;
    width:18px !important;
    height:18px !important;
    transform:translateY(-50%) !important;
    border:2px solid #a10d00 !important;
    border-radius:50% !important;
    background:#000 !important;
    box-shadow:none !important;
    z-index:70 !important;
  }
  .imc-story-mobile-timeline-card {
    position:relative !important;
    z-index:60 !important;
  }
}
