/* Werkbund Chronik Timeline (Apple-like / CI)
   - Uses Werkbund green for navigation
   - Warm orange for CTA
*/

.wes-chronik{
  --wb-green: #0f6b3a;
  --wb-orange:#c46a2b;
  /* slightly more modern: clearer glass, softer borders */
  --wb-surface: rgba(255,255,255,.72);
  --wb-border: rgba(15,107,58,.10);
  --wb-text: #0b0f0d;
  --wb-muted: rgba(11,15,13,.62);

  max-width: 1200px;
  margin: clamp(24px, 4vw, 56px) auto;
  padding: 0 clamp(16px, 3vw, 28px);
  color: var(--wb-text);
}

.wes-chronik__header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 14px;
}

.wes-chronik__title{margin:0;font-size: clamp(22px, 2.2vw, 32px);letter-spacing:-0.02em;}
.wes-chronik__subtitle{margin:6px 0 0 0;color:var(--wb-muted);font-size:14px;line-height:1.35;}

.wes-chronik__track{
  position: relative;
  margin-top: 8px;
}
.wes-chronik__track:before{
  content:"";
  position:absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(to bottom, rgba(15,107,58,.34), rgba(15,107,58,.10));
  border-radius: 2px;
}

.wes-chronik__top{display:none !important;}
.wes-chronik__top span{display:none !important;}

.wes-chronik__item{
  position: relative;
  padding: 6px 0;
  scroll-margin-top: 110px;
}

.wes-chronik__row{
  display:grid;
  grid-template-columns: 1fr 96px 1fr;
  gap: 12px;
  align-items: start;
}

.wes-chronik__col{min-width:0;}
.wes-chronik__col--spine{display:flex;justify-content:center;}

.wes-chronik__pin{
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.95), rgba(255,255,255,.55));
  border: 2px solid rgba(15,107,58,.55);
  box-shadow: 0 18px 48px rgba(0,0,0,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.wes-chronik__pinyear{
  font-weight: 950;
  font-size: 15px;
  color: var(--wb-green);
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: transform .18s ease;
}

/* Printed-like offset: pins are slightly shifted towards their card */
.wes-chronik__item--left{ --_pinshift: -8px; }
.wes-chronik__item--right{ --_pinshift: 8px; }
.wes-chronik__item--left .wes-chronik__pin{ transform: translateX(-8px); }
.wes-chronik__item--right .wes-chronik__pin{ transform: translateX(8px); }

/* Connector line (pin -> card) */
.wes-chronik__card{ position: relative; }
.wes-chronik__item--left .wes-chronik__col--left .wes-chronik__card:before,
.wes-chronik__item--right .wes-chronik__col--right .wes-chronik__card:before{
  content:"";
  position:absolute;
  top: 28px;
  width: 22px;
  height: 2px;
  background: linear-gradient(to right, rgba(15,107,58,.00), rgba(15,107,58,.28));
  border-radius: 2px;
}
.wes-chronik__item--left .wes-chronik__col--left .wes-chronik__card:before{
  right: -22px;
}
.wes-chronik__item--right .wes-chronik__col--right .wes-chronik__card:before{
  left: -22px;
  transform: scaleX(-1);
}

.wes-chronik__card{
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 22px 60px rgba(0,0,0,.09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.wes-chronik__cardinner{
  display:grid;
  gap: 12px;
}
.wes-chronik__cardinner--hasmedia{
  grid-template-columns: 136px 1fr;
  align-items: start;
}

.wes-chronik__h{
  margin: 0 0 8px 0;
  font-size: 19.5px;
  letter-spacing: -0.015em;
}

.wes-chronik__media{
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.55);
}
.wes-chronik__thumb{width:100%;height:auto;display:block;}

.wes-chronik__text{
  color: var(--wb-muted);
  font-size: 16px;
  line-height: 1.62;
  /* Avoid Safari premature wraps (German); keep predictable wrapping */
  text-wrap: wrap;
  hyphens: auto;
}
.wes-chronik__text p{margin:0 0 10px 0;}
.wes-chronik__text p:last-child{margin-bottom:0;}

/* Hover / Active focus (desktop hover + mobile primary item)
   - enlarge pin (year bubble) and corresponding card
*/
.wes-chronik__item.is-hover .wes-chronik__pin,
.wes-chronik__item.is-active .wes-chronik__pin{
  transform: translateX(var(--_pinshift, 0px)) scale(1.08);
  border-color: rgba(15,107,58,.75);
  box-shadow: 0 18px 42px rgba(0,0,0,.16);
}
.wes-chronik__item.is-hover .wes-chronik__pinyear,
.wes-chronik__item.is-active .wes-chronik__pinyear{
  transform: scale(1.02);
}
.wes-chronik__item.is-hover .wes-chronik__card,
.wes-chronik__item.is-active .wes-chronik__card{
  transform: translateY(-2px);
  border-color: rgba(15,107,58,.22);
  box-shadow: 0 30px 76px rgba(0,0,0,.14);
}

/* alternate sides */
.wes-chronik__item--left .wes-chronik__col--right{opacity:0;}
.wes-chronik__item--right .wes-chronik__col--left{opacity:0;}

.wes-chronik__item--right .wes-chronik__col--left,
.wes-chronik__item--left .wes-chronik__col--right{pointer-events:none;}

/* Oldest entry centered under the spine */
.wes-chronik__item--center .wes-chronik__col--left,
.wes-chronik__item--center .wes-chronik__col--right{
  opacity: 0;
  pointer-events: none;
}
.wes-chronik__centerwrap{
  position: relative;
  max-width: 560px;
  margin: 14px auto 0 auto;
}
.wes-chronik__item--center .wes-chronik__centerwrap:before{
  content:"";
  position:absolute;
  top: -12px;
  left: 50%;
  width: 2px;
  height: 12px;
  transform: translateX(-1px);
  background: linear-gradient(to bottom, rgba(15,107,58,.28), rgba(15,107,58,.10));
  border-radius: 2px;
}

.wes-chronik__item--founding{
  padding-top: 14px;
  padding-bottom: 18px;
}
.wes-chronik__item--founding .wes-chronik__pin{
  width: 72px;
  height: 72px;
  border-color: rgba(196,106,43,.38);
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,.96), rgba(255,251,246,.82) 58%, rgba(246,238,228,.72));
  box-shadow: 0 22px 58px rgba(0,0,0,.12), 0 0 0 8px rgba(196,106,43,.06);
}
.wes-chronik__item--founding .wes-chronik__pinyear{
  color: #245f3e;
  font-size: 16px;
}
.wes-chronik__item--founding .wes-chronik__centerwrap{
  max-width: 620px;
  margin-top: 18px;
}
.wes-chronik__item--founding .wes-chronik__centerwrap:before{
  top: -18px;
  height: 18px;
  background: linear-gradient(to bottom, rgba(196,106,43,.22), rgba(15,107,58,.10));
}
.wes-chronik__card--founding{
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,252,248,.72)),
    radial-gradient(circle at top center, rgba(196,106,43,.08), rgba(255,255,255,0) 55%);
  border-color: rgba(196,106,43,.16);
  box-shadow: 0 28px 76px rgba(0,0,0,.10);
}
.wes-chronik__card--founding:after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events:none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}
.wes-chronik__foundingmark{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 0 0 12px;
}
.wes-chronik__foundingline{
  width: 36px;
  height: 1px;
  background: linear-gradient(to right, rgba(196,106,43,.68), rgba(15,107,58,.18));
  border-radius: 999px;
}
.wes-chronik__foundingeyebrow{
  display:inline-flex;
  align-items:center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,247,238,.88);
  border: 1px solid rgba(196,106,43,.18);
  color: rgba(141,73,27,.94);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.wes-chronik__item--founding .wes-chronik__text{
  color: rgba(11,15,13,.72);
}

@media (max-width: 720px){
  .wes-chronik__header{flex-direction:column;align-items:flex-start;}

  /* Mobile spine alignment: engineered axis */
  .wes-chronik__track:before{left: 32px; transform: none;}
  .wes-chronik__top{justify-content:flex-start; padding-left: 4px;}
  .wes-chronik__item{scroll-margin-top: 96px; padding: 8px 0;}

  /* prevent any left/right pin drift on mobile */
  .wes-chronik__item{ --_pinshift: 0px; }

  .wes-chronik__row{
    grid-template-columns: 64px 1fr;
    gap: 12px;
    /* Important: prevent auto-placement from pushing the content to a new row
       (happens when the "unused" side column contains whitespace nodes).
       We explicitly place spine + content into the same grid row.
    */
    grid-auto-flow: row;
  }
  .wes-chronik__col--spine{grid-column:1;grid-row:1;justify-content:center;}
  .wes-chronik__col--left,
  .wes-chronik__col--right{grid-column:2;grid-row:1;opacity:1;pointer-events:auto;}

  /* On mobile we never show both side columns at once. This is more robust than :empty
     because PHP/HTML indentation can create whitespace nodes and break :empty.
  */
  .wes-chronik__item--left .wes-chronik__col--right{display:none;}
  .wes-chronik__item--right .wes-chronik__col--left{display:none;}
  .wes-chronik__item--center .wes-chronik__col--left,
  .wes-chronik__item--center .wes-chronik__col--right{display:none;}
  /* Make the spine + bubbles feel engineered on iPhone */
  .wes-chronik__pin{
    width: 48px;
    height: 48px;
    transform:none;
    margin-left: 0; /* bubble is the reference for spine alignment */
    position: relative;
  }
  .wes-chronik__pinyear{font-size: 13px; letter-spacing:.02em;}

  /* On mobile, active/hover must not translate on X (only scale) */
  .wes-chronik__item.is-hover .wes-chronik__pin,
  .wes-chronik__item.is-active .wes-chronik__pin{
    transform: scale(1.08);
  }

  /* Disable desktop card-connector rules on mobile; we use the bubble connector instead */
  .wes-chronik__item .wes-chronik__card:before{display:none;}

  /* Mobile connector: line from year bubble to the card (anchored to bubble center)
     This avoids misalignment when card heights differ (esp. with images).
  */
  .wes-chronik__pin:after{
    content:"";
    position:absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-1px);
    width: 20px; /* engineered for 64px spine col + 12px gap */
    height: 2px;
    background: linear-gradient(to right, rgba(15,107,58,.34), rgba(15,107,58,.06));
    border-radius: 2px;
    pointer-events:none;
  }
  .wes-chronik__item--center .wes-chronik__pin:after{display:none;}

  /* Media layout: image above text on narrow screens (prevents ugly narrow columns) */
  .wes-chronik__cardinner--hasmedia{grid-template-columns: 1fr; gap: 10px;}
  .wes-chronik__media{max-width: 240px; margin: 0 auto;}

  /* Center card has no left-connector */
  .wes-chronik__item--center .wes-chronik__card:before{display:none;}

  /* Typography: larger & more readable */
  .wes-chronik__text{font-size: 17.5px; line-height: 1.62;}
  .wes-chronik__h{font-size: 20px;}

  .wes-chronik__item--center .wes-chronik__centerwrap{
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .wes-chronik__item--center .wes-chronik__centerwrap:before{left: 32px; transform:none;}

  .wes-chronik__item--founding{
    padding-top: 12px;
    padding-bottom: 16px;
  }
  .wes-chronik__item--founding .wes-chronik__pin{
    width: 54px;
    height: 54px;
    box-shadow: 0 16px 38px rgba(0,0,0,.12), 0 0 0 6px rgba(196,106,43,.05);
  }
  .wes-chronik__item--founding .wes-chronik__pinyear{
    font-size: 14px;
  }
  .wes-chronik__item--founding .wes-chronik__centerwrap{
    margin-top: 12px;
  }
  .wes-chronik__foundingmark{
    gap: 8px;
    margin-bottom: 10px;
  }
  .wes-chronik__foundingline{
    width: 24px;
  }
  .wes-chronik__foundingeyebrow{
    padding: 0 10px;
    min-height: 24px;
    font-size: 10px;
    letter-spacing: .11em;
  }
}

/* Single Chronik */
.wes-chronik-single .wes-single-hero-inner{
  grid-template-columns: minmax(280px, 380px) 1fr;
}
@media (max-width: 900px){
  .wes-chronik-single .wes-single-hero-inner{ grid-template-columns: 1fr; }
}

.wes-chronik-single-poster{
  aspect-ratio: var(--wes-poster-ar, 4 / 5);
}

.wes-chronik-single-poster-fallback{
  width:100%;
  height:100%;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.9), rgba(255,255,255,.55) 40%, rgba(255,255,255,.35) 70%),
    linear-gradient(180deg, rgba(15,107,58,.12), rgba(255,255,255,.0));
}

.wes-chronik-year-kicker{
  color: var(--wb-green);
  font-weight: 900;
  letter-spacing: .04em;
}

.wes-chronik-single-meta .wes-meta-row{
  grid-template-columns: 90px minmax(0, 1fr);
}

.wes-chronik-single-nav{
  margin-top: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wes-chronik-single-content{
  padding: 18px;
}


.wes-chronik__legacy-anchor{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path: inset(50%);
}

.wes-chronik__pinlink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  color:inherit;
}
.wes-chronik__pinlink:focus-visible{
  outline:2px solid rgba(15,107,58,.45);
  outline-offset:6px;
  border-radius:999px;
}

.wes-chronik__rupture{
  position:relative;
  padding: 20px 0 20px;
  z-index: 6;
  isolation: isolate;
}
.wes-chronik__ruptureinner{
  position:relative;
  min-height: 138px;
  display:grid;
  grid-template-columns: minmax(0,1fr) 96px minmax(0,1fr);
  align-items:center;
  gap: 12px;
  overflow: visible;
}
.wes-chronik__ruptureaxis{
  position:relative;
  grid-column:2;
  justify-self:center;
  width: 96px;
  min-height: 138px;
  z-index: 5;
  overflow: visible;
}
.wes-chronik__ruptureseg,
.wes-chronik__rupturebadge{
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
}
.wes-chronik__ruptureseg{
  width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(20,24,22,.68) 0 8px, rgba(20,24,22,.16) 8px 16px);
  border-radius: 999px;
}
.wes-chronik__ruptureseg--top{
  top: 0;
  bottom: calc(50% + 22px);
}
.wes-chronik__ruptureseg--bottom{
  top: calc(50% + 22px);
  bottom: 0;
}
.wes-chronik__rupturebadge{
  top: 50%;
  z-index: 6;
  min-width: 124px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(28,33,30,.90), rgba(38,43,40,.82));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  transform: translate(-50%, -50%);
}
.wes-chronik__rupturecontent{
  grid-column: 3;
  position:relative;
  justify-self: start;
  width: min(100%, 420px);
  max-width: 420px;
  margin: 0 0 0 10px;
  padding: 0;
  z-index: 4;
  text-align:left;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.wes-chronik__rupturecontent:before{
  content:none;
}
.wes-chronik__rupturecontent > *{
  text-wrap: pretty;
}
.wes-chronik__ruptureyears{
  display:block;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .03em;
  white-space: nowrap;
  color: rgba(255,255,255,.96);
  font-variant-numeric: tabular-nums;
}
.wes-chronik__rupturelabel{
  display:block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .01em;
  color: rgba(11,15,13,.88);
}
.wes-chronik__rupturenote{
  max-width: 34ch;
  margin: 0;
  color: rgba(11,15,13,.66);
  line-height: 1.56;
  font-size: 14px;
}
.wes-chronik__rupture--subtle .wes-chronik__ruptureseg{
  background: repeating-linear-gradient(to bottom, rgba(20,24,22,.52) 0 8px, rgba(20,24,22,.12) 8px 16px);
}
.wes-chronik__rupture--subtle .wes-chronik__rupturebadge{
  background: linear-gradient(180deg, rgba(42,47,44,.82), rgba(52,57,54,.76));
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.wes-chronik__item--rupture-context .wes-chronik__pin{
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.95), rgba(244,246,245,.72));
  border-color: rgba(23,27,25,.6);
  box-shadow: 0 18px 48px rgba(0,0,0,.16);
}
.wes-chronik__item--rupture-context .wes-chronik__pinyear{
  color: rgba(20,24,22,.92);
}
.wes-chronik__item--rupture-context .wes-chronik__card{
  border-color: rgba(23,27,25,.14);
  background: rgba(250,250,249,.82);
}
.wes-chronik__item--rupture-context .wes-chronik__card:before{
  background: linear-gradient(to right, rgba(20,24,22,.00), rgba(20,24,22,.28));
}

.wes-chronik-single .wes-single-hero-inner--with-poster{
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  max-width: 1120px;
}
.wes-chronik-single .wes-single-hero-inner--no-poster{
  grid-template-columns: 1fr;
  max-width: 900px;
}
.wes-chronik-single-head{
  max-width: 760px;
}
.wes-chronik-single .wes-single-title{
  margin-bottom: 6px;
}
.wes-chronik-single-subtitle{
  margin: 0 0 12px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: -.02em;
  color: rgba(11,15,13,.82);
}
.wes-chronik-single-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 16px;
}
.wes-chronik-single-nav{
  margin-top: 14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.wes-chronik-single-section{
  padding-top: 0;
}
.wes-chronik-single-section-inner{
  max-width: 900px;
}
.wes-chronik-single-content{
  padding: 18px;
}
.wes-chronik-single-return{
  margin-top: 18px;
}

@media (max-width: 720px){
  .wes-chronik__rupture{
    padding: 16px 0 18px;
  }
  .wes-chronik__ruptureinner{
    min-height: 128px;
    grid-template-columns: 64px minmax(0,1fr);
    gap: 12px;
    overflow: visible;
  }
  .wes-chronik__ruptureaxis{
    grid-column:1;
    width: 64px;
    min-height: 128px;
    z-index: 7;
  }
  .wes-chronik__rupturebadge{
    min-width: 116px;
    min-height: 38px;
    padding: 0 14px;
    z-index: 8;
  }
  .wes-chronik__rupturecontent > *{
  text-wrap: pretty;
}
.wes-chronik__ruptureyears{
    font-size: 14px;
  }
  .wes-chronik__rupturecontent{
    grid-column:2;
    max-width:none;
    width: auto;
    margin: 0 0 0 18px;
    padding: 0;
    z-index: 6;
  }
  .wes-chronik__rupturecontent:before{
    content:none;
  }
  .wes-chronik__rupturelabel{
    margin: 0 0 6px;
    font-size: 14px;
  }
  .wes-chronik__rupturenote{
    margin-left:0;
    margin-right:0;
    max-width: 26ch;
    font-size: 13.5px;
  }
  .wes-chronik-single-actions .wes-btn,
  .wes-chronik-single-nav .wes-btn{
    flex: 1 1 calc(50% - 10px);
    justify-content:center;
  }
}
