/* VAGAR ADVISORY — shared shell for every page.
   v3: elevated visual design with ambient depth and polish. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root, .sw-root {
  --sw-bg: #0C0D14;
  --sw-ink: #EEEEF2;
  --sw-ink-soft: #9A9AB0;
  --sw-accent: #D91F35;
  --accent-warm: #F03E50;
  --accent-glow: rgba(217, 31, 53, .15);
  --line: rgba(255, 255, 255, .08);
  --line-accent: rgba(217, 31, 53, .18);
  --card: rgba(255, 255, 255, .04);
  --card-hover: rgba(255, 255, 255, .07);
  --maxw: 1180px;
  --head-h: 124px;
  --display: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --sw-font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--sw-bg);
  color: var(--sw-ink);
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- cross-page view transitions ---------------------------------------- */
@view-transition { navigation: auto; }
.site-head { view-transition-name: site-head; }
.phero { view-transition-name: phero; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ---- site header -------------------------------------------------------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  height: var(--head-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 clamp(16px, 5vw, 48px);
  background: rgba(12, 13, 20, .78);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.site-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--sw-ink); }
.site-brand__logo {
  display: flex; align-items: center; flex: none;
  background: #fff; border-radius: 9px; padding: 5px 9px;
}
.site-brand__logo.is-bare { background: none; padding: 0; }
.site-brand__logo img { height: 100px; width: auto; display: block; }
@media (max-width: 560px) {
  :root, .sw-root { --head-h: 84px; }
  .site-brand__logo img { height: 62px; }
}

.site-nav { display: flex; gap: 2px; margin-left: auto; }
.site-nav a {
  text-decoration: none; color: var(--sw-ink-soft); font-size: .88rem; font-weight: 500;
  padding: 8px 14px; border-radius: 6px; white-space: nowrap;
  transition: color .25s ease, background .25s ease;
}
.site-nav a:hover { color: var(--sw-ink); background: rgba(255, 255, 255, .06); }
.site-nav a[aria-current="page"] {
  color: #FFFFFF; font-weight: 600;
  background: linear-gradient(135deg, var(--sw-accent), var(--accent-warm));
}
.site-cta {
  margin-left: 10px; text-decoration: none; font-weight: 650; font-size: .88rem;
  padding: 10px 20px; border-radius: 8px;
  background: linear-gradient(135deg, var(--sw-accent), var(--accent-warm));
  color: #FFFFFF; white-space: nowrap;
  transition: box-shadow .3s ease, transform .3s ease;
}
.site-cta:hover {
  box-shadow: 0 4px 20px rgba(217, 31, 53, .35);
  transform: translateY(-1px);
}
@media (max-width: 900px) {
  .site-cta { display: none; }
  .site-nav { margin-left: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 8px 11px; font-size: .82rem; }
}

/* ---- page shell --------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 5vw, 48px); }
.page { position: relative; z-index: 30; background: var(--sw-bg); }

/* Sections with ambient glow */
section.band {
  padding: clamp(64px, 10vh, 128px) 0;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
/* Subtle accent glow behind alternating sections */
section.band:nth-child(odd)::before {
  content: ""; position: absolute; pointer-events: none;
  width: 600px; height: 600px;
  top: -120px; right: -180px;
  background: radial-gradient(circle, rgba(217, 31, 53, .06) 0%, transparent 70%);
  border-radius: 50%;
}
section.band:nth-child(even)::before {
  content: ""; position: absolute; pointer-events: none;
  width: 500px; height: 500px;
  bottom: -100px; left: -140px;
  background: radial-gradient(circle, rgba(80, 90, 180, .05) 0%, transparent 70%);
  border-radius: 50%;
}

/* ---- inner hero --------------------------------------------------------- */
.phero {
  position: relative; margin-top: var(--head-h);
  min-height: clamp(300px, 50vh, 500px);
  display: flex; align-items: flex-end;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.phero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 13, 20, .55) 0%, rgba(12, 13, 20, .5) 30%, rgba(12, 13, 20, .82) 65%, rgba(12, 13, 20, .97) 100%),
    linear-gradient(90deg, rgba(12, 13, 20, .9) 0%, rgba(12, 13, 20, .65) 45%, rgba(12, 13, 20, .4) 100%);
}
.phero .wrap { position: relative; padding-top: 52px; padding-bottom: 48px; width: 100%; }

/* ---- typography --------------------------------------------------------- */
.kicker {
  font-size: .72rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; margin: 0 0 16px;
  background: linear-gradient(135deg, var(--sw-accent), var(--accent-warm));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
h1.h1 {
  font-family: var(--display); font-weight: 800; margin: 0 0 18px;
  font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.06; letter-spacing: -.03em;
  color: #FFFFFF;
}
h2.h {
  font-family: var(--display); font-weight: 700; margin: 0 0 22px;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.14; letter-spacing: -.02em;
  color: #FFFFFF;
}
h3.sub {
  font-family: var(--display); font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  margin: 0 0 10px; font-weight: 700; letter-spacing: -.01em;
  color: #FFFFFF;
}
p.lede {
  font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.65;
  color: #BCBCD0; max-width: 68ch; margin: 0 0 14px;
}
p.muted { color: var(--sw-ink-soft); line-height: 1.65; margin: 0; }

/* ---- grid --------------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }

/* ---- card depth --------------------------------------------------------- */
.grid, ol.steps, .contact-grid { perspective: 1100px; }

.card, ol.steps li {
  transform-style: preserve-3d;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.22,.61,.36,1),
              border-color .4s ease, background .4s ease,
              box-shadow .5s cubic-bezier(.22,.61,.36,1);
}
.tilt { position: relative; overflow: hidden; }
.tilt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; opacity: 0;
  transition: opacity .5s cubic-bezier(.25,.8,.25,1);
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, .07), transparent 55%);
}
.tilt:hover::after { opacity: 1; }
.card:hover, ol.steps li:hover {
  border-color: rgba(217, 31, 53, .3);
  background: var(--card-hover);
  box-shadow: 0 8px 40px rgba(217, 31, 53, .08), 0 0 0 1px rgba(217, 31, 53, .1),
              0 4px 16px rgba(0, 0, 0, .3);
}
.card > *, ol.steps li > * { transform: translateZ(12px); }
ol.steps li::before { transform: translateZ(34px); }

/* ---- scroll reveal ------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0) rotateX(3deg);
  transform-origin: 50% 100%;
  transition: opacity .85s cubic-bezier(.25,.8,.25,1) var(--rd, 0ms),
              transform .85s cubic-bezier(.25,.8,.25,1) var(--rd, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

.phero__img { transform: scale(1.06); transform-origin: 50% 40%; }
.phero .wrap { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  .card, ol.steps li { transform: none; transition: border-color .3s ease; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tilt::after { display: none; }
  .phero__img { transform: none; }
}

/* ---- cards -------------------------------------------------------------- */
.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .02) 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px; padding: 30px;
  backdrop-filter: blur(4px);
}
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--sw-ink-soft); line-height: 1.75; }
.card ul li::marker { color: var(--sw-accent); }
.card a { color: var(--accent-warm); text-decoration: none; word-break: break-word; }
.card a:hover { text-decoration: underline; }

/* ---- chips -------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chips li {
  font-size: .85rem; font-weight: 500; color: #E8E8F0;
  padding: 10px 16px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(217, 31, 53, .1) 0%, rgba(217, 31, 53, .04) 100%);
  border: 1px solid rgba(217, 31, 53, .2);
  transition: border-color .3s ease, background .3s ease;
}
.chips li:hover {
  border-color: rgba(217, 31, 53, .4);
  background: linear-gradient(135deg, rgba(217, 31, 53, .16) 0%, rgba(217, 31, 53, .06) 100%);
}

/* ---- steps -------------------------------------------------------------- */
ol.steps {
  list-style: none; counter-reset: s; margin: 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
ol.steps li {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .02) 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px; padding: 30px;
}
.step-label {
  margin: 0 0 6px; font-family: var(--body);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--sw-accent), var(--accent-warm));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.label {
  font-size: .74rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sw-ink-soft); margin: 0 0 6px;
}

/* ---- image accordion ---------------------------------------------------- */
.iacc { display: flex; gap: 10px; height: clamp(340px, 54vh, 480px); }
.iacc__item {
  position: relative; flex: 1 1 0; min-width: 54px;
  border: 0; padding: 0; margin: 0; background: none; color: inherit;
  border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: flex-grow .55s cubic-bezier(.25,.8,.25,1);
}
.iacc__item.is-active { flex-grow: 6; }
.iacc__item img {
  position: absolute; top: 0; left: 50%; height: 100%;
  width: 480px; max-width: none;
  transform: translateX(-50%) scale(1.0);
  object-fit: cover; object-position: center;
  transition: transform .7s cubic-bezier(.25,.8,.25,1);
}
.iacc__item.is-active img {
  transform: translateX(-50%) scale(1.06);
}

/* Scrim overlay — two layers when active: a strong frosted zone behind the
   text (bottom 38%) and a light wash over the rest so the image reads as
   backdrop rather than content. Collapsed panels stay uniformly dark. */
.iacc__item::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(12, 13, 20, .92) 4%, rgba(12, 13, 20, .5) 46%, rgba(12, 13, 20, .6) 100%);
  transition: background .55s cubic-bezier(.25,.8,.25,1);
}
.iacc__item.is-active::after {
  background:
    linear-gradient(0deg,
      rgba(12, 13, 20, .92) 0%,
      rgba(12, 13, 20, .82) 18%,
      rgba(12, 13, 20, .35) 38%,
      rgba(12, 13, 20, .05) 56%,
      rgba(12, 13, 20, .15) 100%);
  backdrop-filter: blur(0px);
}

/* Frosted glass strip behind the label + description on the active panel. */
.iacc__item .iacc__frost {
  position: absolute; z-index: 1; inset: auto 0 0 0; height: 0;
  backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px);
  transition: height .55s cubic-bezier(.25,.8,.25,1),
              backdrop-filter .55s ease,
              -webkit-backdrop-filter .55s ease;
  pointer-events: none;
  mask-image: linear-gradient(0deg, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(0deg, black 60%, transparent 100%);
}
.iacc__item.is-active .iacc__frost {
  height: 50%;
  backdrop-filter: blur(12px) saturate(.8);
  -webkit-backdrop-filter: blur(12px) saturate(.8);
}
.iacc__item::before {
  content: ""; position: absolute; inset: 0; z-index: 3;
  border-radius: 14px;
  border: 1.5px solid transparent;
  transition: border-color .5s ease;
  pointer-events: none;
}
.iacc__item.is-active::before { border-color: rgba(217, 31, 53, .35); }
.iacc__item:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 3px; }

.iacc__label {
  position: absolute; z-index: 2; left: 50%; bottom: 84px;
  white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: #fff;
  transform: translateX(-50%) rotate(90deg); transform-origin: 50% 50%;
  transition: transform .55s cubic-bezier(.25,.8,.25,1),
              bottom .55s cubic-bezier(.25,.8,.25,1),
              opacity .4s ease;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}
.iacc__item.is-active .iacc__label {
  bottom: 58px; transform: translateX(-50%) rotate(0deg);
}
.iacc__desc {
  position: absolute; z-index: 2; left: 24px; right: 24px; bottom: 24px;
  margin: 0; font-size: .92rem; line-height: 1.55; color: #D0D0DA;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s cubic-bezier(.25,.8,.25,1) .1s,
              transform .5s cubic-bezier(.25,.8,.25,1) .1s;
}
.iacc__item.is-active .iacc__desc { opacity: 1; transform: translateY(0); }

@media (max-width: 720px) {
  .iacc { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .iacc::-webkit-scrollbar { display: none; }
  .iacc__item { flex: 0 0 76%; scroll-snap-align: center; }
  .iacc__item.is-active { flex-grow: 0; }
  .iacc__label { bottom: 58px; transform: translateX(-50%) rotate(0deg); }
  .iacc__desc { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .iacc__item, .iacc__item img, .iacc__label, .iacc__desc { transition: none; }
}

/* ---- buttons ------------------------------------------------------------ */
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  text-decoration: none; font-family: var(--display); font-weight: 650; font-size: .93rem;
  padding: 14px 28px; border-radius: 10px; display: inline-block;
  letter-spacing: .01em;
  transition: box-shadow .35s ease, transform .35s ease, background .35s ease, border-color .35s ease;
}
.btn--primary {
  background: linear-gradient(135deg, var(--sw-accent), var(--accent-warm));
  color: #FFFFFF;
  box-shadow: 0 2px 12px rgba(217, 31, 53, .15);
}
.btn--primary:hover {
  box-shadow: 0 6px 28px rgba(217, 31, 53, .3);
  transform: translateY(-2px);
}
.btn--ghost {
  border: 1.5px solid rgba(255, 255, 255, .18); color: var(--sw-ink);
  background: transparent;
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .04);
  transform: translateY(-2px);
}

/* ---- footer ------------------------------------------------------------- */
footer.foot {
  padding: clamp(48px, 7vh, 80px) 0;
  position: relative; z-index: 30;
  background: linear-gradient(180deg, var(--sw-bg) 0%, rgba(8, 9, 14, 1) 100%);
  border-top: 1px solid var(--line);
}
footer.foot::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--sw-accent), transparent);
}
footer.foot .fname {
  font-family: var(--display); font-weight: 800; font-size: 1.1rem; margin: 0 0 10px;
  color: #FFFFFF;
}
footer.foot .fline { color: var(--sw-ink-soft); margin: 0 0 6px; font-size: .93rem; }
footer.foot .fnav { display: flex; flex-wrap: wrap; gap: 18px; margin: 24px 0 0; }
footer.foot .fnav a {
  color: var(--sw-ink-soft); text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: color .25s ease;
}
footer.foot .fnav a:hover { color: var(--accent-warm); }
footer.foot .fcopy { color: #555568; margin: 24px 0 0; font-size: .84rem; }

/* ---- scroll-world overrides (home page film) ---------------------------- */
.sw-copy__tags li {
  color: #F6D8DC;
  background: linear-gradient(135deg, rgba(217, 31, 53, .12), rgba(217, 31, 53, .04));
  border-color: rgba(217, 31, 53, .25);
}
.sw-btn--primary {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--sw-accent), var(--accent-warm));
}
.sw-route__label {
  color: var(--sw-ink);
  background: rgba(12, 13, 20, .82);
  border-color: rgba(217, 31, 53, .22);
}
.sw-copylayer::before {
  background: linear-gradient(90deg,
    var(--sw-bg) 0%, rgba(12, 13, 20, .93) 38%, rgba(12, 13, 20, .62) 66%, transparent 100%);
}
@media (max-width: 860px) {
  .sw-copylayer::before {
    background: linear-gradient(0deg,
      var(--sw-bg) 10%, rgba(12, 13, 20, .90) 52%, rgba(12, 13, 20, .45) 76%, transparent 100%);
  }
}
.sw-topbar { display: none; }
.sw-scrollbar { top: var(--head-h); }

.sw-copy__title {
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.9vw, 2.45rem); letter-spacing: -.022em; line-height: 1.1;
}
.sw-copy__body { margin-top: 14px; }
.sw-copy__tags { margin-top: 18px; }
.sw-copy__cta { margin-top: 22px; }
.sw-copy__eyebrow { margin-top: 14px; }

.sw-route, .sw-hint { transition: opacity .35s ease, visibility .35s ease; }
body.past-film .sw-route, body.past-film .sw-hint { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .sw-route, .sw-hint { transition: none; } }
