/* =====================================================
   WOW LAYER (loads after style.css and editorial.css)
   To switch it off, delete the wow.css and wow.js lines from the .html files.
   ===================================================== */

/* Visually hidden text for screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Hero: full height, chart background, mouse spotlight ---------- */
.hero { display: flex; align-items: center; min-height: min(88vh, 840px); padding-bottom: 8rem; }
.hero .hero-inner { width: min(1100px, 92%); z-index: 1; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero::after, .journey-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(520px circle at var(--mx, 72%) var(--my, 30%), rgba(184, 147, 90, 0.20), transparent 62%);
}
.journey-hero .container { z-index: 1; }

/* Second line of the name has a slow gold shine passing over it */
.hero h1 .line:nth-child(2) > span {
  background: linear-gradient(100deg, #fff 0%, #fff 40%, #ecd2a0 50%, #fff 60%, #fff 100%);
  background-size: 300% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: lineup 1s 0.12s cubic-bezier(.2, .7, .2, 1) both, shine 7s 1.6s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- Glowing cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; left: 0; top: 0; pointer-events: none; z-index: 200; opacity: 0;
  transition: opacity 0.3s;
}
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--gold); }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  transition: opacity 0.3s, width 0.25s, height 0.25s, margin 0.25s, background 0.25s;
}
.cursor-ring.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(184, 147, 90, 0.18); }
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }

/* ---------- Tilt ---------- */
.tilt { transition: transform 0.35s cubic-bezier(.2, .7, .2, 1); will-change: transform; }

/* ---------- Numbers strip ---------- */
.stats { background: #fff; padding: 4.5rem 0; border-bottom: 1px solid var(--line); }
.stats-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 0 2rem; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .num {
  display: block; font-family: "Source Serif 4", Georgia, serif; font-weight: 700;
  font-size: clamp(3.6rem, 8vw, 6.5rem); line-height: 1; letter-spacing: -0.03em; color: var(--navy);
}
.stat .num[data-suffix]::after { content: attr(data-suffix); color: var(--gold); }
.stat .lab { display: block; margin-top: 0.8rem; color: var(--muted); font-weight: 500; max-width: 17rem; }

/* ---------- Section titles reveal word by word ---------- */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.04em 0.26em; margin: 0 -0.04em -0.26em; }
.w > span { display: inline-block; transform: translateY(112%); transition: transform 0.9s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.split.in-view .w > span { transform: none; }
html.js .section h2.split.reveal { opacity: 1; transform: none; }

/* =====================================================
   EXPERIENCE: dark section, timeline chart, expanding rows
   ===================================================== */
#experience { background: var(--navy); position: relative; overflow: hidden; }
#experience::before {
  content: ""; position: absolute; width: 720px; height: 720px; right: -240px; top: -200px; pointer-events: none;
  background: radial-gradient(circle, rgba(184, 147, 90, 0.22), transparent 65%);
}
#experience .container { position: relative; }
#experience h2 { color: #fff; }
#experience h2::before { color: var(--gold); }
#experience .section-intro { color: #aab2c5; }

/* ---------- Timeline chart (home page and company pages) ---------- */
.gantt {
  --lw: 150px; --g-text: #c9cfdd; --g-track: rgba(255, 255, 255, 0.07);
  --g-line: rgba(255, 255, 255, 0.16); --g-axis: #8e97ad; --g-hover: #fff;
  position: relative;
}
.journey .gantt {
  --g-text: var(--muted); --g-track: rgba(31, 42, 68, 0.08);
  --g-line: rgba(31, 42, 68, 0.14); --g-axis: var(--muted); --g-hover: var(--navy);
}
.gantt::before {
  content: ""; position: absolute; left: var(--lw); right: 0; top: 0; bottom: 26px; pointer-events: none;
  background: linear-gradient(to right, var(--g-line) 1px, transparent 1px) 0 0 / 25% 100%;
}
.g-row { display: grid; grid-template-columns: var(--lw) 1fr; align-items: center; height: 40px; position: relative; }
.g-label { font-weight: 600; font-size: 0.92rem; color: var(--g-text); transition: color 0.25s, padding-left 0.25s; }
.g-track { position: relative; height: 14px; border-radius: 7px; background: var(--g-track); }
.g-bar {
  position: absolute; top: 0; bottom: 0; left: var(--l); width: var(--w); border-radius: 7px;
  background: linear-gradient(90deg, var(--gold), #e0c28f);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 120ms + 150ms), filter 0.25s, box-shadow 0.25s, opacity 0.3s;
}
.g-bar.alt { background: linear-gradient(90deg, #e8d0a2, #f6e7c6); }
.gantt.in .g-bar, html:not(.js) .g-bar { transform: none; }
.g-bar.now::after {
  content: ""; position: absolute; right: -4px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: #fff; animation: ping 2s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(184, 147, 90, 0.7); }
  70%, 100% { box-shadow: 0 0 0 11px rgba(184, 147, 90, 0); }
}
.g-row:hover .g-label, .g-row.hl .g-label { color: var(--g-hover); padding-left: 6px; }
.g-row:hover .g-bar, .g-row.hl .g-bar { filter: brightness(1.1); box-shadow: 0 0 18px rgba(184, 147, 90, 0.55); }
.g-row.dim .g-bar { opacity: 0.35; }
.g-row.dim:hover .g-bar { opacity: 1; }
.g-row.here .g-label { color: var(--gold-dark); }
.g-axis { position: relative; height: 26px; margin-left: var(--lw); }
.g-axis span { position: absolute; top: 8px; padding-left: 6px; font: 600 0.72rem "Inter", sans-serif; letter-spacing: 0.12em; color: var(--g-axis); }
.gantt-wrap { margin: 2.2rem 0 3.2rem; }
.g-title { font: 600 0.78rem "Inter", sans-serif; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.8rem !important; }
.g-hint { color: #8e97ad; font-size: 0.85rem; margin: 0.4rem 0 0 !important; }

/* ---------- Expanding rows ---------- */
#experience .exp-grid {
  --gutter: 2.6rem; --lx: 0.55rem; counter-reset: exp;
  position: relative; display: block; padding-left: var(--gutter); margin-top: 0;
}
.xi { position: relative; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.xi:last-of-type { border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
.xi-h { font: inherit; margin: 0; }
.xi-head {
  appearance: none; background: none; border: 0; color: inherit; font: inherit; text-align: left;
  width: 100%; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.6rem; align-items: center;
  padding: 1.8rem 0.5rem; transition: background 0.3s, padding 0.3s;
}
.xi-head::before {
  counter-increment: exp; content: "0" counter(exp);
  font: 600 0.9rem "Inter", sans-serif; letter-spacing: 0.15em; color: var(--gold); transition: color 0.3s;
}
.xi-text > span { display: block; }
.xi .when { color: var(--gold); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.xi.current .when::before { content: "\25CF  "; }
.xi-title {
  font-family: "Source Serif 4", Georgia, serif; font-weight: 700; line-height: 1.25;
  font-size: clamp(1.35rem, 3vw, 2rem); color: #fff; transition: color 0.3s;
}
.xi-co { color: #c9cfdd; font-weight: 600; }
.xi-sum { color: #aab2c5; font-size: 0.95rem; margin-top: 0.35rem; transition: color 0.3s; }
.xi.open .xi-title { color: #ecd2a0; }

.xi-head:hover, .xi-head:focus-visible { background: var(--gold); padding-left: 1.6rem; padding-right: 1.6rem; }
.xi-head:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.xi-head:hover::before, .xi-head:hover .when, .xi-head:hover .xi-title, .xi-head:hover .xi-co,
.xi-head:focus-visible::before, .xi-head:focus-visible .when, .xi-head:focus-visible .xi-title { color: var(--navy); }
.xi-head:hover .xi-sum, .xi-head:focus-visible .xi-sum { color: #2d3b5e; }

.xi-icon {
  width: 38px; height: 38px; border: 1.5px solid var(--gold); border-radius: 50%; position: relative;
  transition: transform 0.45s cubic-bezier(.2, .7, .2, 1), border-color 0.3s;
}
.xi-icon::before, .xi-icon::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--gold); border-radius: 2px; transition: background 0.3s; }
.xi-icon::before { width: 14px; height: 2px; margin: -1px 0 0 -7px; }
.xi-icon::after { width: 2px; height: 14px; margin: -7px 0 0 -1px; }
.xi.open .xi-icon { transform: rotate(45deg); }
.xi-head:hover .xi-icon, .xi-head:focus-visible .xi-icon { border-color: var(--navy); }
.xi-head:hover .xi-icon::before, .xi-head:hover .xi-icon::after,
.xi-head:focus-visible .xi-icon::before, .xi-head:focus-visible .xi-icon::after { background: var(--navy); }

/* The panel slides open smoothly (animates its height from 0 to its natural size) */
.xi-panel {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 0.5s cubic-bezier(.2, .7, .2, 1), visibility 0.5s;
}
.xi.open .xi-panel { grid-template-rows: 1fr; visibility: visible; }
html:not(.js) .xi-panel { grid-template-rows: 1fr; visibility: visible; }
.xi-panel-inner { overflow: hidden; min-height: 0; }
.xi-body { padding: 0.4rem 4.5rem 2.2rem 3.6rem; }
.xi-body > * { opacity: 0; transform: translateY(10px); transition: opacity 0.4s 0.15s, transform 0.4s 0.15s; }
.xi.open .xi-body > *, html:not(.js) .xi-body > * { opacity: 1; transform: none; }
.xi-body ul { list-style: none; margin: 0; }
.xi-body li { position: relative; padding: 0.35rem 0 0.35rem 1.3rem; color: #c9cfdd; }
.xi-body li::before { content: ""; position: absolute; left: 0; top: 0.95rem; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.xi-role { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; margin: 1rem 0 0.2rem !important; color: #fff; }
.xi-role:first-child { margin-top: 0 !important; }
.xi-role span { color: #8e97ad; font-size: 0.88rem; }
.xi-open {
  display: inline-block; margin-top: 1.3rem; padding: 0.7rem 1.3rem; border: 1.5px solid var(--gold); color: var(--gold);
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
}
.xi-open span { display: inline-block; transition: transform 0.25s; }
.xi-open:hover { background: var(--gold); color: var(--navy); }
.xi-open:hover span { transform: translateX(5px); }

/* ---------- Career path: line that draws itself beside the rows ---------- */
.career-line {
  position: absolute; left: var(--lx); top: 0; bottom: 0; width: 2px; --p: 0;
  background: rgba(255, 255, 255, 0.18);
}
.career-fill {
  position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--p));
  background: linear-gradient(var(--gold), #ecd2a0); transition: transform 0.2s linear;
}
.career-head {
  position: absolute; left: 50%; top: calc(var(--p) * 100%); width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--gold); transition: top 0.2s linear;
  box-shadow: 0 0 0 6px rgba(184, 147, 90, 0.25), 0 0 26px rgba(184, 147, 90, 0.9);
}
.xi::after {
  content: ""; position: absolute; top: 2.3rem; width: 14px; height: 14px; border-radius: 50%;
  left: calc(var(--lx) + 1px - var(--gutter) - 7px);
  background: var(--navy); border: 2px solid rgba(255, 255, 255, 0.4);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.xi.on::after { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 6px rgba(184, 147, 90, 0.22); }
.xi.hl::after { box-shadow: 0 0 0 9px rgba(184, 147, 90, 0.35); }

/* ---------- Contact: dark finish ---------- */
#contact { background: var(--navy); position: relative; overflow: hidden; padding: 7rem 0; }
#contact::before {
  content: ""; position: absolute; width: 800px; height: 800px; left: 50%; top: -400px; margin-left: -400px; pointer-events: none;
  background: radial-gradient(circle, rgba(184, 147, 90, 0.20), transparent 62%);
}
#contact .container { position: relative; }
#contact h2 { color: #fff; }
#contact h2::before { color: var(--gold); }
#contact p { color: #c9cfdd; }
#contact .btn:not(.primary) { color: #fff; }
.footer { border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* =====================================================
   COMPANY PAGES
   ===================================================== */
.journey-hero > .container > :nth-child(5) { animation-delay: 0.32s; }
.jstats { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 2.4rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.jstat { min-width: 0; }
.jstat .num { display: block; font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: clamp(2.8rem, 6vw, 4.2rem); line-height: 1; letter-spacing: -0.02em; color: #fff; }
.jstat .val { display: block; font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 1.45rem; line-height: 1.2; color: #fff; }
.jstat .lab { display: block; margin-top: 0.5rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 600; }

.glance li {
  padding: 0.95rem 1.2rem; margin-bottom: 0.7rem; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: 2px; color: var(--ink);
  transition: transform 0.25s, box-shadow 0.25s;
}
.glance li:last-child { border-bottom: 1px solid var(--line); }
.glance li::before { display: none; }
.glance li:hover { transform: translateX(6px); box-shadow: 0 10px 24px rgba(31, 42, 68, 0.1); }
.glance li.role-name { background: none; border: 0; padding: 0; margin: 1.6rem 0 0.7rem; box-shadow: none; transform: none; }
.glance li.role-name:first-child { margin-top: 0; }

/* "Coming soon" note shown until the real story, photos and videos are added */
.soon {
  padding: 1.6rem 1.8rem; border: 1px solid rgba(184, 147, 90, 0.4); border-radius: 2px;
  background: linear-gradient(135deg, rgba(184, 147, 90, 0.12), rgba(184, 147, 90, 0.02));
}
.soon-label {
  display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem !important;
  font: 700 0.75rem "Inter", sans-serif; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-dark);
}
.soon-label::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); animation: ping 2s infinite; }
.soon p:last-child { margin: 0; color: var(--ink); font-size: 1.05rem; }

/* Swipeable photo row */
.gallery-wrap { position: relative; }
.gallery { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 0.4rem; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: 0 0 min(78%, 420px); scroll-snap-align: start; }
.g-nav {
  position: absolute; top: 42%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 1.2rem; cursor: pointer;
  box-shadow: 0 8px 22px rgba(31, 42, 68, 0.35); transition: background 0.2s, opacity 0.2s;
}
.g-nav:hover { background: var(--gold-dark); }
.g-nav.prev { left: -14px; }
.g-nav.next { right: -14px; }
.g-nav[hidden] { display: none; }
.video { box-shadow: 12px 12px 0 var(--gold); }

/* =====================================================
   PAGE TRANSITIONS (supported browsers only)
   ===================================================== */
@view-transition { navigation: auto; }
.nav { view-transition-name: site-nav; }
::view-transition-old(root) { animation: 0.3s ease both vt-out; }
::view-transition-new(root) { animation: 0.5s 0.05s cubic-bezier(.2, .7, .2, 1) both vt-in; }
::view-transition-group(job-title) { animation-duration: 0.6s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(26px); } }
.vt body { animation: none; }   /* the browser already fades pages in and out */
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- Phones ---------- */
@media (max-width: 800px) {
  .hero { min-height: auto; }
  .stats { padding: 3rem 0; }
  .stats-inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .stat, .stat:first-child { border-left: 0; padding: 0; border-top: 1px solid var(--line); padding-top: 1.4rem; }
  .stat:first-child { border-top: 0; padding-top: 0; }
  #contact { padding: 4.5rem 0; }

  .gantt { --lw: 104px; }
  .g-label { font-size: 0.8rem; }
  #experience .exp-grid { --gutter: 1.9rem; --lx: 0.3rem; }
  .xi-head { grid-template-columns: 1fr auto; gap: 1rem; padding: 1.4rem 0.3rem; }
  .xi-head::before { display: none; }
  .xi-head:hover, .xi-head:focus-visible { padding-left: 0.8rem; padding-right: 0.8rem; }
  .xi-body { padding: 0.2rem 0.3rem 1.8rem 0; }
  .xi-icon { width: 32px; height: 32px; }
  .xi::after { top: 2rem; }
  .jstats { gap: 1.4rem 2rem; }
  .g-nav.prev { left: -6px; }
  .g-nav.next { right: -6px; }
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .w > span { transform: none; }
  .g-bar { transform: none; }
  .xi-body > * { opacity: 1; transform: none; }
}
