/* ============================================
   HOMEPAGE — editorial redesign
   Loaded only by index.html, after style.css.
   Brand: Ink Navy / Slate / Paper, Playfair Display + Libre Franklin.
   ============================================ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}
.eyebrow-light { color: var(--brand-light); }

/* ---------------- HERO ---------------- */
.hero {
  min-height: 92vh;
  align-items: flex-end;
}
.hero-slide.active { animation: hs-kenburns 9s ease-out both; }
@keyframes hs-kenburns {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(14,27,42,.78) 0%, rgba(14,27,42,.42) 45%, rgba(14,27,42,0) 75%),
    linear-gradient(0deg, rgba(14,27,42,.85) 0%, rgba(14,27,42,0) 38%);
}
.hero-content {
  padding: 160px 80px 150px;
  max-width: 860px;
}
.hero-content h1 {
  font-size: clamp(40px, 5.2vw, 72px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.hero-content p { font-size: 18px; }

.hero-ticker {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.14);
  background: rgba(14,27,42,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.tick-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: hs-ticker 55s linear infinite;
}
.tick-item {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.78);
  white-space: nowrap;
  padding: 0 28px;
}
/* the separator echoes the Heirstone mark: a square turned 45° */
.tick-dot {
  width: 6px; height: 6px;
  border: 1px solid var(--brand-light);
  transform: rotate(45deg);
  flex: none;
}
@keyframes hs-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------------- SELECTED ENGAGEMENTS (carousel) ---------------- */
.eng {
  background: var(--dark-navy);
  padding: 110px 0 96px;
  overflow: hidden;
}
.eng-head, .eng-foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.eng-head h2 {
  font-family: var(--f-serif);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 500;
  line-height: 1.15;
  color: #fff;
  max-width: 680px;
  letter-spacing: -0.015em;
}
.eng-controls { display: flex; align-items: center; gap: 14px; flex: none; }
.eng-count {
  font-size: 14px;
  color: var(--brand-light);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  margin-right: 12px;
}
.eng-count b { color: #fff; font-weight: 600; }
.eng-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  background: transparent;
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, opacity .25s;
}
.eng-btn svg { width: 20px; height: 20px; }
.eng-btn:hover { background: #fff; color: var(--dark-navy); border-color: #fff; }
.eng-btn:disabled { opacity: .3; cursor: default; background: transparent; color: #fff; }
.eng-btn:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 3px; }

.eng-track {
  --edge: max(48px, calc((100vw - 1240px) / 2 + 48px));
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--edge);
  padding: 52px var(--edge) 8px;
  scrollbar-width: none;
  cursor: grab;
  outline: none;
}
.eng-track::-webkit-scrollbar { display: none; }
.eng-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.eng-track.is-dragging * { pointer-events: none; user-select: none; }

.eng-card {
  flex: 0 0 min(580px, 84vw);
  scroll-snap-align: start;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.06);
  opacity: .45;
  transition: opacity .6s ease;
}
.eng-card.is-current, .eng-card:hover { opacity: 1; }
.eng-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.eng-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.eng-card.is-current .eng-media img, .eng-card:hover .eng-media img { transform: scale(1); }
.eng-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(19,39,58,.75) 0%, rgba(19,39,58,0) 45%);
}
.eng-num {
  position: absolute;
  right: 22px; bottom: 6px;
  z-index: 1;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 76px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.75);
}
.eng-body { padding: 28px 32px 34px; }
.eng-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-light);
}
.eng-body h3 {
  font-family: var(--f-serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
  margin: 12px 0 14px;
}
.eng-desc { font-size: 15px; line-height: 1.7; color: rgba(255,255,255,.7); }
.eng-outcome {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(255,255,255,.9);
}
.eng-outcome span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 6px;
}
.eng-foot { margin-top: 44px; align-items: center; }
.eng-progress {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.12);
  position: relative;
  overflow: hidden;
}
.eng-progress span {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: #fff;
  transition: width .35s ease;
}
.eng-all {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.eng-all svg { width: 18px; height: 18px; transition: transform .25s; }
.eng-all:hover svg { transform: translateX(4px); }

/* ---------------- PRACTICES (explorer) ---------------- */
.px-section {
  background: var(--bg-light);
  padding: 120px 48px;
}
.px-head { max-width: 1240px; margin: 0 auto 60px; }
.px-head h2 {
  font-family: var(--f-serif);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  line-height: 1.08;
  color: var(--dark-navy);
  letter-spacing: -0.02em;
}
.px-head h2 em { color: var(--brand); }
.px-intro { margin-top: 18px; font-size: 17px; line-height: 1.7; color: var(--text-secondary); max-width: 640px; }

.px {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  grid-template-rows: repeat(5, auto) 1fr;   /* tabs pack at the top; the panel spans all rows */
  column-gap: 72px;
  align-items: start;
}
.px-item { display: contents; }
.px-tab {
  grid-column: 1;
  display: grid;
  grid-template-columns: 52px 1fr 20px;
  align-items: start;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  cursor: pointer;
  font: inherit;
  color: var(--text-light);
  position: relative;
}
.px-item:last-child .px-tab { border-bottom: 1px solid var(--border); }
.px-tab::before {               /* active rule draws across the top border */
  content: '';
  position: absolute; left: 0; top: -1px;
  height: 2px; width: 0;
  background: var(--dark-navy);
  transition: width .5s cubic-bezier(.2,.7,.2,1);
}
.px-item.is-active .px-tab::before { width: 100%; }
.px-n { font-size: 13px; font-weight: 600; letter-spacing: .08em; padding-top: 7px; font-variant-numeric: tabular-nums; }
.px-text { display: flex; flex-direction: column; gap: 4px; }
.px-name {
  font-family: var(--f-serif);
  font-size: 23px;
  line-height: 1.25;
  color: var(--text-primary);
  opacity: .5;
  transition: opacity .3s;
}
.px-tag { font-size: 14px; color: var(--text-light); }
.px-tab:hover .px-name, .px-item.is-active .px-name { opacity: 1; }
.px-item.is-active .px-n { color: var(--dark-navy); }
.px-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.px-caret { display: none; }

.px-panel {
  grid-column: 2;
  grid-row: 1 / -1;
  display: none;
}
.px-item.is-active .px-panel { display: block; animation: px-in .6s cubic-bezier(.2,.7,.2,1); }
@keyframes px-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.px-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--dark-navy); }
.px-media img { width: 100%; height: 100%; object-fit: cover; display: block; animation: px-zoom 8s ease-out both; }
@keyframes px-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.px-copy { padding-top: 30px; }
.px-lead { font-size: 18px; line-height: 1.7; color: var(--text-secondary); max-width: 680px; }
.px-sublabel {
  margin: 28px 0 14px;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brand);
}
.px-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.px-chip {
  padding: 10px 15px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 13.5px;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.px-chip:hover { background: var(--dark-navy); border-color: var(--dark-navy); color: #fff; }
.px-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 32px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--dark-navy);
  color: var(--dark-navy);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
}
.px-cta svg { width: 18px; height: 18px; transition: transform .25s; }
.px-cta:hover svg { transform: translateX(4px); }

/* ---------------- ENGAGEMENT MODEL (timeline) ---------------- */
.tl-section { background: var(--bg-white); padding: 120px 48px; }
.tl-head { max-width: 1240px; margin: 0 auto 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 72px; align-items: end; }
.tl-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.tl-head h2 {
  font-family: var(--f-serif);
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--dark-navy);
  letter-spacing: -0.02em;
}
.tl-head p { font-size: 17px; line-height: 1.7; color: var(--text-secondary); }
.tl-wrap { position: relative; max-width: 1240px; margin: 0 auto; }
.tl-line { position: absolute; left: 0; right: 0; top: 9px; height: 1px; background: var(--border); }
.tl-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--dark-navy);
  transition: width 1.8s cubic-bezier(.4,0,.2,1);
}
.tl-wrap.in-view .tl-fill { width: 100%; }
.tl { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 44px; margin: 0; padding: 0; }
.tl-step { position: relative; }
.tl-dot {
  display: block;
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1px solid var(--dark-navy);
  background: var(--bg-white);
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
  transition: background .4s ease;
}
.tl-wrap.in-view .tl-dot { background: var(--dark-navy); }
.tl-wrap.in-view .tl-step:nth-child(2) .tl-dot { transition-delay: .45s; }
.tl-wrap.in-view .tl-step:nth-child(3) .tl-dot { transition-delay: .9s; }
.tl-wrap.in-view .tl-step:nth-child(4) .tl-dot { transition-delay: 1.35s; }
.tl-n {
  display: block;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 64px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--brand-light);
  margin-bottom: 16px;
}
.tl-step h3 {
  font-family: var(--f-serif);
  font-size: 25px;
  font-weight: 500;
  color: var(--dark-navy);
  margin-bottom: 12px;
}
.tl-step p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); }

/* ---------------- ABOUT (aligned to the new type) ---------------- */
.about-text h2 { font-weight: 500; letter-spacing: -0.015em; }

/* ---------------- WHO + WHY band ---------------- */
.band { background: var(--navy); padding: 120px 48px; }
.band-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 96px;
}
.band h2 {
  font-family: var(--f-serif);
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 500;
  line-height: 1.18;
  color: #fff;
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}
.who, .why2 { list-style: none; margin: 0; padding: 0; }
.who-item, .why2-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.who-icon { width: 28px; height: 28px; color: var(--brand-light); margin-top: 2px; }
.why2-n { font-family: var(--f-serif); font-style: italic; font-size: 22px; color: var(--brand-light); line-height: 1.2; }
.who-item h3 { font-size: 17px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.why2-item h3 { font-family: var(--f-serif); font-size: 21px; font-weight: 500; color: #fff; margin-bottom: 6px; }
.who-item p, .why2-item p { font-size: 14.5px; line-height: 1.65; color: rgba(255,255,255,.66); }

/* ---------------- scroll reveal ---------------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1024px) {
  .hero-content { padding: 140px 40px 140px; }
  .eng-head { flex-direction: column; align-items: flex-start; }
  .px { column-gap: 44px; grid-template-columns: 300px 1fr; }
  .band-inner { grid-template-columns: 1fr; gap: 64px; }
  .tl { grid-template-columns: repeat(2, 1fr); row-gap: 56px; }
  .tl-line { display: none; }
}

@media (max-width: 860px) {
  /* practices become an accordion: the "drop-down" on phones */
  .px { display: block; }
  .px-item { display: block; }
  .px-tab { width: 100%; grid-template-columns: 44px 1fr 22px; padding: 22px 0; }
  .px-caret { display: block; width: 14px; height: 14px; position: relative; margin-top: 10px; }
  .px-caret::before, .px-caret::after {
    content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px;
    background: var(--dark-navy); transition: transform .3s;
  }
  .px-caret::after { transform: rotate(90deg); }
  .px-item.is-active .px-caret::after { transform: rotate(0); }
  .px-panel { grid-row: auto; padding-bottom: 32px; }
  .px-name { font-size: 21px; }
  .tl-head { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { min-height: 88vh; }
  /* text spans the full width on phones, so darken the whole frame, not just the left */
  .hero-overlay {
    background: linear-gradient(0deg, rgba(14,27,42,.92) 0%, rgba(14,27,42,.62) 55%, rgba(14,27,42,.45) 100%);
  }
  /* timeline becomes a vertical line with the dots on it */
  .tl { border-left: 1px solid var(--border); padding-left: 28px; row-gap: 48px; }
  .tl-dot { position: absolute; left: -38px; top: 4px; margin: 0; }
  .tl-wrap.in-view .tl-dot { background: var(--dark-navy); }
  .hero-content { padding: 120px 24px 120px; }
  .eng { padding: 80px 0 72px; }
  .eng-head, .eng-foot { padding: 0 24px; }
  .eng-track { --edge: 24px; gap: 16px; padding-top: 36px; }
  .eng-body { padding: 22px 22px 26px; }
  .eng-body h3 { font-size: 23px; }
  .eng-num { font-size: 58px; }
  .eng-foot { flex-direction: column; align-items: stretch; gap: 22px; }
  .eng-btn { width: 46px; height: 46px; }
  .px-section, .tl-section, .band { padding: 80px 24px; }
  .tl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tick-track, .hero-slide.active, .px-media img, .px-item.is-active .px-panel { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
}

/* Long-word languages (kk, ky, ru, de, fi): the hero headline sizes down so no word overruns */
.hero-content h1 { overflow-wrap: break-word; hyphens: auto; }
html:is([lang=kk],[lang=ky],[lang=ru],[lang=de],[lang=fi]) .hero-content h1 { font-size: clamp(32px, 4.4vw, 60px); }
