/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
    --bg: #0b0d12;
    --ink: #111318;
    --muted: #6c7785;
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --brand: #0e4d92;
    --brand-600: #0b3f78;
    --ring: rgba(14, 77, 146, 0.28);
    --radius: 16px;
    --shadow-1: 0 2px 10px rgba(16, 24, 40, 0.06);
    --shadow-2: 0 18px 40px rgba(16, 24, 40, 0.08);
    --max: 1280px;
}

/* =========================================================
   RESET
   ========================================================= */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

/* =========================================================
   HEADER (unchanged)
   ========================================================= */
body {
    background-color: white;
    color: white;
    font-family: sans-serif;
    font-weight: bold;
}

header {
    background-color: black;
    display: flex;
    align-items: center;
    padding: 20px 50px;
    width: 100%;
    margin: 0 auto;
    height: 80px;
    position: fixed;
    top: 0;
    z-index: 1000;
}

header img {
    width: 200px;
}

header a.logo {
    position: fixed;
    top: 21px;
    left: 40%;
    margin-left: -70px;
}

@media (min-width:1590px) {
    header a.logo {
        position: relative;
        top: initial;
        left: initial;
        margin-left: initial;
    }
}

.center-nav,
.left-nav,
.right-nav {
    display: flex;
    align-items: center;
    white-space: nowrap;
    line-height: 1;
}

.center-nav {
    position: relative;
    left: 410px;
}

.right-nav {
    position: fixed;
    left: 1300px;
    top: 20px;
    height: 40px;
}

.left-nav {
    position: fixed;
    right: 1300px;
    top: 20px;
    height: 40px;
}

.center-nav a,
.right-nav a,
.left-nav a {
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 14px;
    margin: 0 30px;
    position: relative;
    transition: color .4s;
}

.center-nav a:before,
.right-nav a:before,
.left-nav a::before {
    content: "";
    width: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    background: #fff;
    position: absolute;
    transition: width .2s;
}

.center-nav a:hover:before,
.right-nav a:hover:before,
.left-nav a:hover::before {
    left: 0;
    right: auto;
    width: 100%;
}

.right-nav a,
.left-nav a {
    display: none;
}

@media (min-width:1590px) {

    .right-nav a,
    .left-nav a {
        display: inline-block;
        margin: 0 50px;
    }
}

/* Hamburger + mobile drawer */
.hamburger {
    position: fixed;
    z-index: 1100;
    right: 6px;
    top: 13px;
    color: white;
    padding: 20px;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 16px;
    margin: 2px 0;
    height: 2px;
    background-color: white;
    position: relative;
    transition: all 0.2s linear;
}
.hamburger.active span:first-child,
.hamburger.active span:nth-child(2) { transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { transform: rotate(-45deg); top: -4px; }
.hamburger.active span:last-child { opacity: 0; }

.shadow.active {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

nav.mobile-nav {
    padding-top: 70px;
    display: block;
    position: fixed;
    top: 0;
    right: -280px;
    bottom: 0;
    z-index: 2;
    width: 280px;
    background-color: #000;
    transition: right 0.3s ease-in-out;
}
nav.mobile-nav.active { right: 0; }
nav.mobile-nav a {
    display: block;
    opacity: 0;
    border-bottom: 1px solid #222;
    text-transform: uppercase;
    padding: 16px 25px;
    text-decoration: none;
    text-align: right;
    transition: opacity 0.3s linear;
    transition-delay: 0.2s;
}
nav.mobile-nav.active a { opacity: 1; color: white; }
nav.mobile-nav a:nth-child(2)  { transition-delay: 0.25s; }
nav.mobile-nav a:nth-child(3)  { transition-delay: 0.3s;  }
nav.mobile-nav a:nth-child(4)  { transition-delay: 0.35s; }
nav.mobile-nav a:nth-child(5)  { transition-delay: 0.4s;  }
nav.mobile-nav a:nth-child(6)  { transition-delay: 0.45s; }
nav.mobile-nav a:nth-child(7)  { transition-delay: 0.5s;  }
nav.mobile-nav a:nth-child(8)  { transition-delay: 0.55s; }

main { padding-top: 25px }

@media(max-width:1100px) {
    main {
        padding-top: 84px;
    }
}

.container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 2rem);
}

/* =========================================================
   STORY SECTION
   ========================================================= */
.story {
    background: #fff;
    border-top: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
}

.story-grid {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    grid-template-columns: 1.1fr 1.4fr;
    align-items: center;
    padding-block: clamp(48px, 7vw, 88px);
}

@media(max-width:980px) {
    .story-grid {
        grid-template-columns: 1fr;
    }
}

.story-media {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-1);
    background: linear-gradient(180deg, #f8fbff, #eef4ff);
}

.story-media img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.story-copy {
    color: #222831;
}

.h2 {
    margin: .25rem 0 1rem;
    font-size: clamp(28px, 3.2vw, 42px);
    letter-spacing: -.015em;
}

.story-copy p {
    margin: .8rem 0;
    color: #39424e;
    line-height: 1.75;
}

/* Stats mini cards */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.stats li {
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    border: 1px solid #e8eef6;
    border-radius: 14px;
    padding: 14px 16px;
    text-align: center;
}

.stat {
    display: block;
    font-weight: 800;
    font-size: 22px;
    color: #111318;
}

.label {
    display: block;
    color: #738093;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* =========================================================
   HORIZONTAL TIMELINE (clean, connected, fade-in)
   ========================================================= */
.design-section {
    background: #fff;
}

.design-section .container {
    padding-block: clamp(48px, 7vw, 88px);
}

.h2.center {
    text-align: center;
    margin: 0 0 28px;
}

.timeline {
    --offset: 120px;
    --dot: 12px;
    --card-w: clamp(220px, 22vw, 300px);
    --gap: clamp(24px, 5vw, 140px);

    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--gap);
    padding: 40px clamp(8px, 3vw, 24px);
    min-height: calc((var(--offset) * 2) + 220px);
    overflow: visible;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg, #edf3fb, #dfe9f6, #edf3fb);
    border-radius: 2px;
}

.timeline .timeline-middle {
    display: none;
}

.timeline-component {
    position: relative;
    width: var(--card-w);
    background: #fff;
    border: 1px solid #e7ecf3;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
    padding: 16px 18px;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .55s ease, transform .55s ease;
}

.timeline-component h3 {
    margin: .2rem 0 .25rem;
    font-size: 18px;
    color: #111318;
}

.timeline-component p {
    margin: 0;
    color: #6e7a8c;
    font-weight: 700;
}

/* Alternating placement */
.timeline-component.up {
    bottom: 180px;
}

.timeline-component.down {
    top: 180px;
}

/* Connectors */
.timeline-component.up::before,
.timeline-component.down::before {
    content: "";
    position: absolute;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg, #dde7f4, #b7cff2);
    transform: translateX(-50%);
}

.timeline-component.up::before {
    top: 100%;
    height: var(--offset);
}

.timeline-component.down::before {
    bottom: 100%;
    height: var(--offset);
}

/* Dots on line */
.timeline-component.up::after,
.timeline-component.down::after {
    content: "";
    position: absolute;
    left: 50%;
    width: var(--dot);
    height: var(--dot);
    border-radius: 999px;
    transform: translateX(-50%);
    background: #0e4d92;
    box-shadow: 0 0 0 6px rgba(14, 77, 146, .10), inset 0 0 0 3px #2d6fb8;
}

.timeline-component.up::after {
    top: calc(100% + var(--offset) - (var(--dot)/2));
}

.timeline-component.down::after {
    bottom: calc(100% + var(--offset) - (var(--dot)/2));
}

/* Show animation */
.timeline-component.show {
    opacity: 1;
    transform: none;
    transition-delay: 0s;
}

.timeline-component.wide-card {
  width: 450px;
}

.timeline-component.wider-card {
  width: 650px;
}

.timeline-component.slim-card {
  width: 175px;
}

/* Responsive */
@media(max-width:1100px) {
    .timeline {
        --gap: clamp(16px, 4vw, 40px);
        --offset: 96px;
        --card-w: clamp(200px, 38vw, 260px);
    }

    .timeline-component h3 {
        font-size: 16px;
    }
}

/* ===== Timeline: mobile stack (≤ 720px) ===== */
@media (max-width: 720px) {
  /* Timeline container becomes a vertical stack */
  .timeline {
    --rail-w: 2px;
    --dot: 12px;
    --space-y: 18px;     /* gap between card edge and rail */
    --card-gap: 18px;    /* gap between cards */

    position: relative;
    display: block;
    padding: 8px 16px 8px calc(16px + var(--space-y) + var(--dot)); /* room for rail + dot */
    min-height: initial;
    gap: 0;
  }

  /* Horizontal line -> vertical rail on the left */
  .timeline::before {
    top: 0;
    bottom: 0;
    left: 24px;                 /* aligns with dots */
    right: auto;
    width: var(--rail-w);
    height: auto;
    background: linear-gradient(180deg, #edf3fb, #dfe9f6, #edf3fb);
  }

  /* Hide middle placeholders (not needed on mobile) */
  .timeline .timeline-middle { display: none !important; }

  /* Cards go full width and flow naturally */
  .timeline-component {
    position: relative;
    width: 100% !important;
    margin: 0 0 var(--card-gap) 0;
    transform: none;
    opacity: 1;
    text-align: left;
    padding: 14px 16px;
  }

  .timeline-component h3 { font-size: 16px; margin: 0 0 6px; }
  .timeline-component p  { margin: 0; font-weight: 700; }

  /* Clear alternation offsets from desktop */
  .timeline-component.up,
  .timeline-component.down { top: auto; bottom: auto; }

  /* Connector from card to rail */
  .timeline-component.up::before,
  .timeline-component.down::before {
    content: "";
    position: absolute;
    left: -13px;                 /* rail center */
    top: 22px;                  /* vertically near title */
    width: calc(var(--space-y) + 8px);
    height: 2px;
    background: linear-gradient(90deg, #dde7f4, #b7cff2);
    transform: translateX(-50%);
  }

  /* Dot on the rail */
  .timeline-component.up::after,
  .timeline-component.down::after {
    content: "";
    position: absolute;
    left: -22px;
    top: 16px;                  /* aligns above connector */
    width: var(--dot);
    height: var(--dot);
    border-radius: 999px;
    background: #0e4d92;
    box-shadow: 0 0 0 6px rgba(14, 77, 146, .10), inset 0 0 0 3px #2d6fb8;
    transform: translate(-50%, 0);
  }

  /* Make all special-width cards fluid on mobile */
  .timeline-component.wide-card,
  .timeline-component.wider-card,
  .timeline-component.slim-card { width: 100% !important; }

  /* Slight motion reduction for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    .timeline-component { transition: none; }
  }
}


/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background: black;
    padding: 50px;
    font-size: 12px;
}

footer nav {
    text-align: center;
}

footer nav span {
    color: #777;
    display: inline-block;
    padding-right: 30px;
    text-transform: uppercase;
}

footer nav a {
    padding: 0 20px;
    color: white;
    transition: color .2s linear;
}

footer nav a:hover {
    color: #aaa;
}