/* ============================================================
   Tofra — components.css
   Reusable UI pieces: buttons, cards, badges, forms, icon boxes,
   feature lists, stats, modal, drawer.
   ============================================================ */

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  padding: 0 28px;
  border: none;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast),
              transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.btn svg { width: 17px; height: 17px; transition: transform var(--t-fast); }
.btn:active { transform: translateY(1px) scale(.99); }
/* the trailing arrow glides forward on hover */
.btn:hover svg:last-child { transform: translateX(3px); }

/* sizes */
.btn--sm { height: 46px; padding: 0 22px; font-size: 15px; }
.btn--lg { height: 56px; padding: 0 32px; font-size: 17px; }
.btn--block { width: 100%; }

/* variants */
.btn--primary {
  background: var(--teal);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover { background: var(--teal-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(15, 139, 141, .34); }
.btn--primary.btn--lg { box-shadow: var(--shadow-btn-lg); }

.btn--white {
  background: #fff;
  color: var(--teal);
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}
.btn--white:hover { color: var(--teal); transform: translateY(-2px); }

/* outline on dark hero */
.btn--outline-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .35);
}
.btn--outline-light:hover { background: #fff; color: var(--navy); }

/* outline on light surface (navy) */
.btn--outline {
  background: transparent;
  color: var(--navy-deep);
  border: 1.5px solid var(--navy-deep);
}
.btn--outline:hover { background: var(--navy-deep); color: #fff; }

/* subtle bordered secondary (grey border → teal on hover) */
.btn--ghost {
  height: 48px;
  padding: 0 24px;
  background: #fff;
  color: var(--navy-deep);
  border: 1.5px solid var(--border);
  font-size: 15px;
}
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn--ghost svg { width: 16px; height: 16px; }

/* inline text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform .25s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---- Cards ------------------------------------------------ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.card--pad { padding: 30px; }
.card--pad-lg { padding: 44px; }
.card--flex { display: flex; flex-direction: column; }

/* lift-on-hover behaviour shared by all interactive cards */
.card--hover { transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out); }
.card--hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-e3); border-color: rgba(15, 139, 141, .28); }
/* the tinted icon square gently reacts when its card is hovered */
.icon-box { transition: transform .3s var(--ease-spring), background var(--t-fast), color var(--t-fast); }
.card--hover:hover .icon-box { transform: translateY(-2px) scale(1.06); }

.card__media {
  background: var(--panel);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--4x3  { aspect-ratio: 4 / 3; }
.card__media--16x9 { aspect-ratio: 16 / 9; }
.card__media--16x10{ aspect-ratio: 16 / 10; }
.card__media--square { aspect-ratio: 1 / 1; }

.card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card__eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 8px;
}
.card__title { font-size: 19px; font-weight: 700; color: var(--navy-deep); line-height: 1.25; }
.card__title--lg { font-size: 22px; }
.card__text { margin-top: 8px; font-size: 15px; color: var(--slate); line-height: 1.55; flex: 1; }
.card__text--sm { font-size: 14px; }

/* mini calibration ticks used on category cards */
.card__ticks { display: flex; gap: 3px; align-items: flex-end; height: 12px; margin-bottom: 14px; }
.card__ticks i { width: 1px; display: block; }
.card__ticks i:nth-child(1) { height: 6px;  background: var(--teal); }
.card__ticks i:nth-child(2) { height: 12px; background: var(--teal-bright); }
.card__ticks i:nth-child(3) { height: 6px;  background: #bdc9c9; }

/* ---- Icon box (tinted rounded square with an svg) --------- */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--r);
  background: var(--teal-tint);
  color: var(--teal);
}
.icon-box--lg { width: 52px; height: 52px; border-radius: 13px; }
.icon-box--sm { width: 42px; height: 42px; border-radius: 11px; }

/* ---- Badge / chip / pill ---------------------------------- */
.badge {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--teal);
  background: var(--teal-tint);
  padding: 5px 11px; border-radius: var(--r-pill);
  width: max-content;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--teal-tint);
  border: 1px solid var(--teal-tint-border);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  font-size: 14px; font-weight: 600; color: var(--teal-hover);
}
.pill svg { width: 15px; height: 15px; }

/* tag chip (application tags, industry tags) */
.tag {
  display: inline-flex;
  padding: 5px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.tag--white { background: #fff; padding: 10px 16px; font-size: 14px; color: var(--navy-deep); }

/* filter chip button (Category / Insights) */
.chip {
  height: 42px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy-deep);
  font-family: inherit;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}
.chip--sm { height: 40px; padding: 0 18px; font-size: 14px; }
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---- Feature / check list --------------------------------- */
.check-list { display: flex; flex-direction: column; gap: 12px; }
.check-list__item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink-soft);
}
.check-list__item::before {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  background:
    var(--teal-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%230F8B8D' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
    center / 13px no-repeat;
}
.check-list__item--lg { font-size: 16px; align-items: center; }
.check-list__item--lg::before { width: 24px; height: 24px; border-radius: 7px; margin-top: 0; }

/* ---- Stats ------------------------------------------------ */
.stat__num { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--navy-deep); }
.stat__label { margin-top: 10px; font-size: 16px; color: var(--slate); }
.stat-row { display: flex; flex-wrap: wrap; gap: 38px; }
.stat-row .stat__num { font-size: 26px; }
.stat-row .stat__label { font-size: 14px; }

/* stat card on dark (Why-choose counters) */
.stat--dark { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 24px; }
.stat--dark .stat__num { color: #fff; font-size: 52px; }
.stat--dark .stat__label { color: rgba(237, 242, 241, .7); font-size: 16px; margin-top: 12px; }

/* ---- Forms ------------------------------------------------ */
.field { display: block; }
.field__label {
  display: block;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  margin-bottom: 7px;
}
.input, .textarea, .select {
  width: 100%;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: #fff;
  padding: 0 15px;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.textarea { height: auto; padding: 13px 15px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6773' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-tint);
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 13px; color: var(--slate); line-height: 1.5; }

/* ---- Modal ------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(21, 59, 80, .45);
  backdrop-filter: blur(4px);
  /* entrance: backdrop fades in, dialog springs up (see .is-open) */
  opacity: 0;
  transition: opacity .3s var(--ease-out);
}
.modal.is-open { opacity: 1; }
.modal__dialog {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal);
  opacity: 0;
  transform: translateY(28px) scale(.96);
  transition: transform .42s var(--ease-spring), opacity .32s var(--ease-out);
}
.modal.is-open .modal__dialog { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .modal, .modal__dialog { transition: none; }
  .modal__dialog { opacity: 1; transform: none; }
}
.modal__head {
  padding: 30px 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.modal__eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 8px;
}
.modal__title { font-size: 26px; font-weight: 700; color: var(--navy-deep); line-height: 1.2; }
.modal__close {
  flex: none;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 10px;
  background: var(--bg-alt);
  color: var(--navy-deep);
  cursor: pointer;
}
.modal__close:hover { background: var(--border); }
.modal__tagrow { padding: 20px 32px 0; }
.modal__success { padding: 32px; text-align: center; }
.modal__success-icon {
  width: 60px; height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-green);
  display: flex; align-items: center; justify-content: center;
}

/* ---- Success state on the contact page -------------------- */
.form-success { padding: 32px 0; text-align: center; }

/* ---- FAQ accordion ---------------------------------------- */
.faq { border-bottom: 1px solid var(--border); }
.faq:last-child { border-bottom: none; }
.faq__q {
  width: 100%;
  background: transparent;
  border: none;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  color: var(--navy-deep);
}
.faq__icon {
  flex: none;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
  color: var(--slate);
  transition: transform .25s ease, background var(--t-fast), color var(--t-fast);
}
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(180deg); background: var(--teal); color: #fff; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq__a p { margin: 0; padding: 0 28px 26px; font-size: 16px; color: var(--slate); line-height: 1.65; max-width: 720px; }

/* ---- Brand tile ------------------------------------------- */
.brand-tile {
  height: 120px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--slate);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  text-align: center;
  transition: color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.brand-tile:hover { border-color: var(--teal); box-shadow: var(--shadow-soft); }
/* partner logo — greyed & dimmed by default, full brand colour on hover */
.brand-logo {
  width: auto;
  height: 30px;
  max-width: 74%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .62;
  transition: filter var(--t-fast), opacity var(--t-fast);
}
.brand-tile:hover .brand-logo { filter: none; opacity: 1; }

/* framed logo used inside the featured-partner cards */
.logo-frame {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  height: 64px; padding: 0 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.logo-frame img { height: 26px; width: auto; object-fit: contain; }

/* ---- Timeline (About) ------------------------------------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: #dbe3e6; }
.timeline__item { position: relative; padding-top: 30px; }
.timeline__dot { position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); }
.timeline__dot--bright { border-color: var(--teal-bright); }
.timeline__year { font-size: 22px; font-weight: 800; color: var(--teal); letter-spacing: -.01em; }
.timeline__title { margin: 8px 0 6px; font-size: 17px; font-weight: 700; color: var(--navy-deep); line-height: 1.25; }
.timeline__desc { font-size: 14px; color: var(--slate); line-height: 1.55; }

/* ---- Process steps (Services) ----------------------------- */
.step { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 22px; }
.step__no { font-size: 15px; font-weight: 700; color: var(--teal-soft); margin-bottom: 10px; }
.step__title { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.step__desc { font-size: 15px; line-height: 1.6; color: rgba(237, 242, 241, .7); }

/* ---- Spec table (Product) --------------------------------- */
.spec { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.spec__row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; padding: 16px 26px; border-bottom: 1px solid var(--border-soft); }
.spec__row:last-child { border-bottom: none; }
.spec__label { font-size: 15px; color: var(--slate); }
.spec__value { font-size: 15px; font-weight: 600; color: var(--navy-deep); }

/* ---- Product gallery thumbs ------------------------------- */
.thumb { padding: 0; border: 2px solid var(--border); border-radius: var(--r); overflow: hidden; background: #fff; aspect-ratio: 1 / 1; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--teal); }

/* ---- Navy info panel (Contact / compliance) --------------- */
.panel-navy { background: var(--navy); color: #fff; border-radius: var(--r-md); padding: 28px; position: relative; overflow: hidden; }
.panel-navy__row { display: flex; gap: 14px; align-items: flex-start; }
.panel-navy__icon {
  width: 40px; height: 40px; flex: none;
  border-radius: 11px;
  background: rgba(32, 199, 183, .16);
  color: var(--teal-soft);
  display: flex; align-items: center; justify-content: center;
}
.panel-navy__label { font-size: 14px; color: var(--teal-soft); font-weight: 600; margin-bottom: 2px; }
.panel-navy__value { font-size: 15px; color: rgba(237, 242, 241, .9); line-height: 1.5; }
.panel-navy__value a { color: rgba(237, 242, 241, .9); }
.panel-navy__value a:hover { color: #fff; }

/* ---- Map --------------------------------------------------- */
.map { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-soft); height: 420px; background: var(--bg-alt); }
.map iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.2); }
/* shown only if the embed is blocked/slow — the iframe paints over it */
.map__fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 24px; text-align: center;
  color: var(--slate); font-weight: 600;
}

/* ---- Responsive tweaks for the above ---------------------- */
@media (max-width: 900px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { display: none; }
}
@media (max-width: 680px) {
  .timeline { grid-template-columns: 1fr; }
  .spec__row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   Motion & interaction layer (injected chrome + micro-UX)
   Adds "life": scroll progress, back-to-top, cursor spotlight on
   cards, magnetic + shiny buttons, animated nav underline, and a
   shimmering headline accent. All are progressive enhancements —
   they degrade to plain styling and are silenced by the global
   prefers-reduced-motion rule in base.css.
   ============================================================ */

/* ---- Scroll progress bar (top of viewport) ---------------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 100;
  background: transparent;
  pointer-events: none;
}
.scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright) 70%, #8bf3e6);
  box-shadow: 0 0 12px rgba(32, 199, 183, .55);
  will-change: transform;
}

/* ---- Back-to-top floating button -------------------------- */
.to-top {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 70;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 139, 141, .38);
  opacity: 0;
  transform: translateY(16px) scale(.85);
  pointer-events: none;
  transition: opacity 1.3s var(--ease-out), transform 1s var(--ease-spring), background var(--t-fast);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
/* keep the hover lift snappy even though show/hide is slow */
.to-top:hover { background: var(--teal-hover); transform: translateY(-3px); transition: transform .25s var(--ease-spring), background var(--t-fast); }
.to-top svg { width: 20px; height: 20px; }
@media (max-width: 680px) { .to-top { right: 16px; bottom: 16px; } }

/* ---- WhatsApp floating button (always on, pulsing) -------- */
/* Sits at the same corner as the back-to-top arrow, but always
   visible and gently pulsing. Its bottom offset animates upward
   (.is-raised) whenever the arrow below it is on screen, and
   settles back down when the arrow hides. */
.wa-fab {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 72;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 211, 102, .42);
  transition: bottom .5s var(--ease-spring), transform .3s var(--ease-spring);
  animation: wa-pulse 2.2s ease-in-out infinite;
}
.wa-fab.is-raised { bottom: 88px; }        /* lifted above the arrow */
.wa-fab:hover { color: #fff; transform: translateY(-3px) scale(1.06); }
.wa-fab svg { width: 26px; height: 26px; }

/* expanding ring + subtle heartbeat */
@keyframes wa-pulse {
  0%   { box-shadow: 0 12px 28px rgba(37, 211, 102, .42), 0 0 0 0 rgba(37, 211, 102, .5); }
  70%  { box-shadow: 0 12px 28px rgba(37, 211, 102, .42), 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 12px 28px rgba(37, 211, 102, .42), 0 0 0 0 rgba(37, 211, 102, 0); }
}
@media (max-width: 680px) {
  .wa-fab { right: 16px; bottom: 16px; }
  .wa-fab.is-raised { bottom: 78px; }
}
/* keep it visible for reduced-motion users, just calm */
@media (prefers-reduced-motion: reduce) {
  .wa-fab { animation: none; }
}

/* ---- Cursor spotlight on interactive cards ---------------- */
/* A soft teal glow tracks the pointer via --mx / --my (set in JS). */
.card--hover { position: relative; }
.card--hover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
              rgba(32, 199, 183, .16), transparent 62%);
  transition: opacity .35s ease;
}
.card--hover:hover::after { opacity: 1; }

/* ---- Button shine sweep + magnetic base ------------------- */
.btn--primary, .btn--white { position: relative; overflow: hidden; }
.btn--primary::before, .btn--white::before {
  content: "";
  position: absolute;
  top: 0; left: -130%;
  width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-20deg);
  transition: left 2s var(--ease-out);
  pointer-events: none;
}
.btn--primary:hover::before, .btn--white:hover::before { left: 150%; }
/* magnetized buttons follow the cursor a touch (JS sets the vars) */
.btn[data-magnetic] {
  transform: translate(var(--mgx, 0), var(--mgy, 0));
  transition: transform .25s var(--ease-spring), background var(--t-fast), box-shadow var(--t-fast);
}

/* ---- Animated nav underline ------------------------------- */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav__link { position: relative; }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* ---- Marquee logo — colour up on individual hover --------- */
.marquee__item img { transition: filter .3s ease, opacity .3s ease; }
.marquee__item:hover img { filter: none; opacity: 1; }

/* ---- Shimmering headline accent (.hl) --------------------- */
.hl {
  background: linear-gradient(100deg, var(--teal-bright), #8bf3e6 45%, var(--teal-bright));
  background-size: 220% auto;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--teal-bright); /* fallback where clip unsupported */
  animation: tofra-shine 6s linear infinite;
}
@keyframes tofra-shine { to { background-position: 220% center; } }

/* ---- 3D tilt wrapper -------------------------------------- */
[data-tilt] {
  transform: perspective(900px)
             rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg));
  transform-style: preserve-3d;
  transition: transform .4s var(--ease-out);
  will-change: transform;
}

/* ---- Ambient section motion ------------------------------- */
/* Slow-drifting soft orbs keep every light section quietly alive.
   Applied automatically to alternating sections, plus an opt-in
   .section--drift for any other section (e.g. plain white ones). */
.section--alt,
.section--drift { position: relative; overflow: hidden; }
.section--alt > *,
.section--drift > * { position: relative; z-index: 1; }
.section--alt::before, .section--alt::after,
.section--drift::before, .section--drift::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.section--alt::before, .section--drift::before {
  width: 440px; height: 440px;
  top: -130px; right: -110px;
  background: radial-gradient(circle, rgba(32, 199, 183, .11), transparent 70%);
  animation: tofra-drift 22s ease-in-out infinite;
}
.section--alt::after, .section--drift::after {
  width: 400px; height: 400px;
  bottom: -150px; left: -120px;
  background: radial-gradient(circle, rgba(15, 139, 141, .09), transparent 70%);
  animation: tofra-drift-2 27s ease-in-out infinite;
}

/* ---- Living calibration bars (eyebrow equalizer) ---------- */
/* The little bars above each section title gently pulse like a
   live measurement readout — a small always-on sign of life that
   appears in almost every section head across the site. */
.eyebrow__bars i {
  transform-origin: bottom;
  animation: tofra-eq 1.8s ease-in-out infinite;
}
.eyebrow__bars i:nth-child(1) { animation-delay: 0s; }
.eyebrow__bars i:nth-child(2) { animation-delay: .3s; }
.eyebrow__bars i:nth-child(3) { animation-delay: .6s; }
@keyframes tofra-eq {
  0%, 100% { transform: scaleY(.45); }
  50%      { transform: scaleY(1); }
}

/* ---- Living hero calibration scale ------------------------ */
/* The horizontal tick lines on the hero's left edge breathe in
   and out (animating their length) like a live measurement wave,
   matching the pulsing eyebrow bars in the section subtitles. */
.hero__scale span {
  transform-origin: left center;
  animation: tofra-scale-line 2.6s ease-in-out infinite;
}
.hero__scale span:nth-child(1) { animation-delay: 0s;    }
.hero__scale span:nth-child(2) { animation-delay: .15s;  }
.hero__scale span:nth-child(3) { animation-delay: .3s;   }
.hero__scale span:nth-child(4) { animation-delay: .45s;  }
.hero__scale span:nth-child(5) { animation-delay: .6s;   }
.hero__scale span:nth-child(6) { animation-delay: .75s;  }
.hero__scale span:nth-child(7) { animation-delay: .9s;   }
.hero__scale span:nth-child(8) { animation-delay: 1.05s; }
.hero__scale span:nth-child(9) { animation-delay: 1.2s;  }
@keyframes tofra-scale-line {
  0%, 100% { transform: scaleX(.4); opacity: .55; }
  50%      { transform: scaleX(1);  opacity: 1;   }
}

/* Reduced-motion: neutralize the transform-driven extras too */
@media (prefers-reduced-motion: reduce) {
  .scroll-progress__bar { transform: scaleX(0) !important; }
  .card--hover::after,
  .btn--primary::before, .btn--white::before,
  .nav__link::after,
  .section--alt::before, .section--alt::after,
  .section--drift::before, .section--drift::after { display: none; }
  .eyebrow__bars i,
  .hero__scale span { animation: none; }
  .hero__scale span { transform: none; opacity: .5; }
  [data-tilt] { transform: none !important; }
  .hl { -webkit-text-fill-color: initial; color: var(--teal-bright); }
}

/* ---- Prose (legal + article body) ------------------------- */
.prose { color: var(--ink-soft); font-size: 17px; line-height: 1.72; }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--navy-deep);
  margin-top: 48px;
  scroll-margin-top: 100px;
}
.prose h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy-deep);
  margin-top: 32px;
}
.prose p, .prose li { color: var(--slate); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--teal-hover); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-top: 10px; }
.prose ul li { list-style: none; position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -20px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.prose blockquote {
  border-left: 3px solid var(--teal);
  padding: 6px 0 6px 22px;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.6;
  font-style: italic;
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.prose :first-child { margin-top: 0; }

/* two-column doc layout: sticky sidebar + prose */
.doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}
.doc-aside { position: sticky; top: 96px; }
.doc-toc { display: flex; flex-direction: column; gap: 2px; }
.doc-toc a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--slate);
  padding: 8px 12px;
  border-left: 2px solid var(--border);
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.doc-toc a:hover { color: var(--teal); border-color: var(--teal); }
.doc-meta-card {
  margin-bottom: 22px;
  padding: 18px 20px;
  background: var(--bg-alt);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--slate);
}
.doc-meta-card strong { display: block; color: var(--navy-deep); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 32px; }
  .doc-aside { position: static; }
  .doc-toc { flex-direction: row; flex-wrap: wrap; }
  .doc-toc a { border-left: none; border-bottom: 2px solid var(--border); }
}

/* ---- Article (insight detail) ----------------------------- */
.article-byline { display: flex; align-items: center; gap: 13px; margin-top: 30px; }
.article-byline__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .25);
}
.article-byline__name { font-size: 15px; font-weight: 700; color: #fff; }
.article-byline__role { font-size: 13px; color: var(--on-dark-dim); }

.article-cover {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  background: var(--panel);
  box-shadow: var(--shadow-e3);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
