/* ==========================================================================
   Georgetown Consulting — styles
   Brand colours sampled from the logo: slate #47535F, olive #A3A82A
   ========================================================================== */

:root {
  /* Brand */
  --ink: #18212a;
  --slate: #47535f;
  --text: #4a5561;
  --muted: #6b7580;
  --olive: #a3a82a;
  --olive-bright: #c2c83f;
  --olive-deep: #7a7f1e;   /* large text on light, >= 3:1 */
  --olive-ink: #5f6316;    /* small text on light, >= 4.5:1 */
  --paper: #f6f5ef;
  --paper-2: #eeede5;
  --white: #ffffff;
  --line: rgba(24, 33, 42, 0.1);
  --line-2: rgba(24, 33, 42, 0.18);
  --error: #b4462f;

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 84px;
  --section-y: clamp(88px, 11vw, 144px);
  --radius: 18px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --shadow-sm: 0 1px 2px rgba(24, 33, 42, 0.06), 0 4px 14px rgba(24, 33, 42, 0.06);
  --shadow-md: 0 2px 6px rgba(24, 33, 42, 0.06), 0 18px 40px -12px rgba(24, 33, 42, 0.18);
  --shadow-lg: 0 30px 80px -20px rgba(24, 33, 42, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
::selection { background: var(--olive); color: var(--ink); }
:focus-visible { outline: 2px solid var(--olive-deep); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 1000;
  padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600;
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Type ---------- */
.h2 {
  font-weight: 600;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

.section { padding-block: var(--section-y); position: relative; }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-intro { font-size: 1.05rem; color: var(--text); max-width: 48ch; }
p { text-wrap: pretty; }
.text-link { color: var(--ink); font-weight: 600; background: linear-gradient(var(--olive), var(--olive)) 0 100% / 100% 1.5px no-repeat; transition: background-size .4s var(--ease); padding-bottom: 1px; }
.text-link:hover { background-size: 0 1.5px; background-position: 100% 100%; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: #fff; --btn-fill: var(--olive); --btn-fg-hover: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 1em 1.6em; border-radius: 999px;
  font-size: .94rem; font-weight: 600; line-height: 1.2;
  background: var(--btn-bg); color: var(--btn-fg);
  transition: color .45s var(--ease), transform .3s var(--ease);
  white-space: nowrap;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-fill); border-radius: inherit;
  transform: scaleX(0); transform-origin: right center;
  transition: transform .55s var(--ease);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left center; }
.btn:hover { color: var(--btn-fg-hover); }
.btn:active { transform: scale(.98); }
.btn .i-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease); flex: none; }
.btn:hover .i-arrow { transform: translateX(4px); }
.btn-sm { padding: .78em 1.25em; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-fill: var(--ink); --btn-fg-hover: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-light { --btn-bg: var(--ink); --btn-fg: #fff; --btn-fill: #fff; --btn-fg-hover: var(--ink); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  height: var(--header-h);
  transition: height .45s var(--ease), transform .5s var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(246, 245, 239, .85);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0; transition: opacity .45s var(--ease);
}
.site-header.is-scrolled { height: 70px; }
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { flex: none; display: block; }
.brand img { width: clamp(176px, 17vw, 210px); height: auto; transition: width .45s var(--ease); }
.is-scrolled .brand img { width: clamp(168px, 15.5vw, 192px); }

.primary-nav { display: flex; gap: 4px; margin-left: auto; }
.primary-nav a {
  position: relative; padding: 8px 14px;
  font-size: .92rem; font-weight: 500; color: var(--ink);
}
.primary-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 1.5px;
  background: var(--olive); transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.primary-nav a:hover::after, .primary-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header-cta { flex: none; }

.menu-toggle { display: none; position: relative; width: 46px; height: 46px; border-radius: 50%; margin-left: 8px; box-shadow: inset 0 0 0 1px var(--line-2); flex: none; }
.menu-toggle span { position: absolute; left: 14px; right: 14px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .5s var(--ease), top .5s var(--ease); }
.menu-toggle span:first-child { top: 19px; }
.menu-toggle span:last-child { top: 26px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 22.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 22.5px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: var(--paper);
  padding-top: calc(var(--header-h) + 16px);
  overflow-y: auto;
  clip-path: circle(0% at calc(100% - 44px) 42px);
  visibility: hidden;
  transition: clip-path .8s var(--ease-in-out), visibility 0s linear .8s;
}
.mobile-menu.is-open { clip-path: circle(150% at calc(100% - 44px) 42px); visibility: visible; transition: clip-path .8s var(--ease-in-out), visibility 0s; }
.mobile-menu-inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding-bottom: 40px; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(1.7rem, 7vw, 2.3rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; color: var(--ink);
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), color .3s;
}
.mobile-menu nav a:hover { color: var(--olive-deep); }
.mobile-menu-foot { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.mobile-menu-foot .btn { width: 100%; }
.mobile-menu-foot p { margin-top: 20px; font-size: .95rem; line-height: 1.8; }
.mobile-menu.is-open nav a, .mobile-menu.is-open .mobile-menu-foot { opacity: 1; transform: none; }
.mobile-menu.is-open nav a:nth-child(1) { transition-delay: .18s; }
.mobile-menu.is-open nav a:nth-child(2) { transition-delay: .23s; }
.mobile-menu.is-open nav a:nth-child(3) { transition-delay: .28s; }
.mobile-menu.is-open nav a:nth-child(4) { transition-delay: .33s; }
.mobile-menu.is-open nav a:nth-child(5) { transition-delay: .38s; }
.mobile-menu.is-open nav a:nth-child(6) { transition-delay: .43s; }
.mobile-menu.is-open .mobile-menu-foot { transition-delay: .5s; }
html.menu-open { overflow: hidden; }
html.menu-open .site-header::before { opacity: 0; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(40px, 6vw, 80px));
  padding-bottom: clamp(64px, 8vw, 104px);
  background: radial-gradient(60% 50% at 8% 0%, rgba(163, 168, 42, .09), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 88px); align-items: center; }

.hero-title {
  font-weight: 600;
  font-size: clamp(3.2rem, 7.4vw, 6.4rem);
  line-height: 1; letter-spacing: -0.05em;
  color: var(--ink);
  margin-bottom: 32px;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .line > span { display: inline-block; }
.hero-title em { font-style: normal; color: var(--olive-deep); }
.hero-lead { font-size: clamp(1.05rem, 1.3vw, 1.18rem); line-height: 1.65; max-width: 46ch; margin-bottom: 40px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-media { position: relative; }
.hero-img {
  position: relative; overflow: hidden; border-radius: 22px;
  aspect-ratio: 4 / 5; max-height: calc(100svh - var(--header-h) - 80px); width: 100%;
  background: var(--paper-2);
  box-shadow: var(--shadow-lg);
}
.hero-img img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; }

.hero-mark {
  position: absolute; z-index: 2; width: clamp(96px, 11vw, 144px); height: auto;
  top: -34px; left: -52px;
  fill: none; stroke: var(--olive); stroke-width: 5.5; stroke-linejoin: round;
}
.hero-mark path { stroke-dasharray: 1; stroke-dashoffset: 0; }

.float-card {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 14px 14px; border-radius: 16px;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.float-card strong { display: block; font-size: .95rem; font-weight: 700; line-height: 1.2; }
.float-card small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.fc-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ink); flex: none; }
.fc-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--olive-bright); stroke-width: 1.6; stroke-linejoin: round; }
.fc-1 { top: 9%; right: -22px; }
.fc-2 { bottom: 9%; left: -44px; padding: 16px 20px; gap: 14px; }
.float-card .fc-big { font-size: 2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--ink); }

/* Hero entrance (runs once fonts are ready) */
.js .hero-lead, .js .hero-actions { opacity: 0; transform: translateY(18px); }
.js .hero-title .line > span { transform: translateY(108%); }
.js .hero-img { clip-path: inset(100% 0 0 0 round 22px); }
.js .hero-img img { scale: 1.2; }
.js .hero-mark path { stroke-dashoffset: 1; }
.js .float-card { opacity: 0; transform: translateY(16px) scale(.96); }

.is-ready .hero-title .line > span { transform: none; transition: transform 1.15s var(--ease); }
.is-ready .hero-title .line:nth-child(1) > span { transition-delay: .1s; }
.is-ready .hero-title .line:nth-child(2) > span { transition-delay: .2s; }
.is-ready .hero-title .line:nth-child(3) > span { transition-delay: .3s; }
.is-ready .hero-lead { opacity: 1; transform: none; transition: opacity 1s var(--ease) .5s, transform 1s var(--ease) .5s; }
.is-ready .hero-actions { opacity: 1; transform: none; transition: opacity 1s var(--ease) .62s, transform 1s var(--ease) .62s; }
.is-ready .hero-img { clip-path: inset(0 0 0 0 round 22px); transition: clip-path 1.5s var(--ease-in-out) .15s; }
.is-ready .hero-img img { scale: 1; transition: scale 2.2s var(--ease) .15s; }
.is-ready .hero-mark path { stroke-dashoffset: 0; transition: stroke-dashoffset 2s var(--ease-in-out) .9s; }
.is-ready .hero-mark path + path { transition-delay: 1.15s; }
.is-ready .float-card { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.is-ready .fc-1 { transition-delay: 1.15s; animation: float 7s ease-in-out 2.2s infinite; }
.is-ready .fc-2 { transition-delay: 1.3s; animation: float 7s ease-in-out 3.2s infinite reverse; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ==========================================================================
   Sectors marquee
   ========================================================================== */
.sectors { background: var(--ink); color: #fff; overflow: hidden; }
.marquee { padding: 24px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-size: clamp(1.1rem, 1.9vw, 1.45rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; margin: 0 clamp(22px, 3vw, 40px); color: rgba(255,255,255,.9); }
.marquee-track span:nth-of-type(even) { color: rgba(255,255,255,.5); }
.marquee-track i { width: 6px; height: 6px; flex: none; background: var(--olive); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 110px); align-items: center; }
.about-media { position: relative; padding: 0 13% 15% 0; }
.about-img { overflow: hidden; border-radius: var(--radius); aspect-ratio: 5 / 6; background: var(--paper-2); transition: clip-path 1.5s var(--ease-in-out); }
.about-img img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.8s var(--ease); }
.about-inset {
  position: absolute; right: 0; bottom: 0; width: 54%;
  border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3;
  border: 8px solid var(--paper); box-shadow: var(--shadow-md);
  background: var(--paper-2);
}
.about-inset img { width: 100%; height: 100%; object-fit: cover; }

.about-copy .h2 { margin-bottom: 26px; }
.prose p + p { margin-top: 1em; }
.prose strong { color: var(--ink); font-weight: 600; }

.creds { display: flex; gap: 0; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.creds li { display: flex; flex-direction: column; gap: 2px; padding: 0 28px; border-left: 1px solid var(--line); }
.creds li:first-child { padding-left: 0; border-left: 0; }
.cred-k { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; color: var(--ink); }
.cred-k sup { font-size: .5em; font-weight: 600; margin-left: 1px; }
.cred-v { font-size: .85rem; color: var(--muted); }

/* ==========================================================================
   Services
   ========================================================================== */
.services { background: var(--white); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  padding: clamp(28px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color .6s var(--ease), transform .6s var(--ease), box-shadow .6s var(--ease);
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .7s var(--ease);
}
.service-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 36px; transition: background-color .6s var(--ease), box-shadow .6s var(--ease); }
.service-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .6s var(--ease); }
.service h3 { font-size: 1.22rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; color: var(--ink); margin-bottom: 12px; transition: color .6s var(--ease); }
.service p { font-size: .97rem; line-height: 1.65; transition: color .6s var(--ease); }

@media (hover: hover) {
  .service:not(.service-cta):hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
  .service:not(.service-cta):hover::before { transform: none; }
  .service:not(.service-cta):hover h3 { color: #fff; }
  .service:not(.service-cta):hover p { color: rgba(255,255,255,.72); }
  .service:not(.service-cta):hover .service-icon { background: var(--olive); box-shadow: none; }
  .service:not(.service-cta):hover .service-icon svg { stroke: var(--ink); }
}

.service-cta { background: var(--olive); border-color: transparent; justify-content: flex-end; }
.service-cta::before { display: none; }
.service-cta h3 { font-size: 1.5rem; }
.service-cta p { color: rgba(24,33,42,.8); margin-bottom: 28px; }
.service-cta .btn { align-self: flex-start; }

/* ==========================================================================
   Approach
   ========================================================================== */
.approach { background: var(--ink); color: rgba(255,255,255,.7); overflow: hidden; }
.approach .h2 { color: #fff; }

.steps { position: relative; }
.steps-track { position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: rgba(255,255,255,.14); }
.steps-track span { position: absolute; inset: 0; background: var(--olive); transform: scaleX(0); transform-origin: left; transition: transform 2s var(--ease-in-out) .2s; }
.steps.is-in .steps-track span { transform: scaleX(1); }
.steps-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 64px); }
.step { position: relative; padding-top: 48px; }
.step-node { position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); transition: background-color .5s var(--ease), box-shadow .5s var(--ease); }
.steps.is-in .step-node { background: var(--olive); box-shadow: none; }
.steps.is-in .step:nth-child(1) .step-node { transition-delay: .2s; }
.steps.is-in .step:nth-child(2) .step-node { transition-delay: 1.1s; }
.steps.is-in .step:nth-child(3) .step-node { transition-delay: 2s; }
.step h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; color: #fff; margin-bottom: 14px; }
.step p { font-size: 1rem; line-height: 1.7; max-width: 34ch; }

/* ==========================================================================
   Work / case studies
   ========================================================================== */
.work { background: var(--paper); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .6s var(--ease);
}
.case-img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.case-img img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease); }
.case-body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 26px; }
.case-sector { font-size: .78rem; font-weight: 600; color: var(--olive-ink); margin-bottom: 8px; }
.case-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; color: var(--ink); margin-bottom: 24px; text-wrap: balance; }
.case-open { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--ink); align-self: flex-start; }
.case-open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.case-open .i-arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.case-open:focus-visible { outline: none; }
.case:focus-within { outline: 2px solid var(--olive-deep); outline-offset: 3px; }
.case:has(.case-open:focus:not(:focus-visible)) { outline: none; }
.case-swipe { display: none; }
@media (hover: hover) {
  .case:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
  .case:hover .case-img img { scale: 1.05; }
  .case:hover .case-open .i-arrow { transform: translateX(4px); }
}

/* Dialog */
html.dialog-open { overflow: hidden; }
.case-dialog {
  padding: 0; border: 0; margin: auto;
  width: min(960px, calc(100% - 40px));
  max-height: calc(100dvh - 48px);
  border-radius: 24px; overflow: hidden;
  background: var(--paper); color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.5);
}
.case-dialog::backdrop { background: rgba(12, 17, 22, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.case-dialog[open] { animation: dlg-in .6s var(--ease); }
.case-dialog[open]::backdrop { animation: fade-in .5s var(--ease); }
.case-dialog.is-closing { animation: dlg-out .35s var(--ease) forwards; }
.case-dialog.is-closing::backdrop { animation: fade-out .35s var(--ease) forwards; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(40px) scale(.97); } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.cd-inner { position: relative; display: grid; grid-template-columns: .85fr 1.15fr; max-height: inherit; }
.cd-media { position: relative; min-height: 100%; background: var(--paper-2); }
.cd-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cd-content { padding: clamp(28px, 4vw, 44px); overflow-y: auto; max-height: calc(100dvh - 48px); overscroll-behavior: contain; }
.cd-title { font-size: clamp(1.5rem, 2.4vw, 1.95rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; color: var(--ink); margin-bottom: 26px; padding-right: 40px; text-wrap: balance; }
.cd-block { padding: 18px 0; border-top: 1px solid var(--line); }
.cd-block h4 { font-size: .8rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.cd-block p { font-size: 1rem; line-height: 1.7; }
.cd-outcome { margin-top: 6px; padding: 20px 22px; border: 0; border-radius: 14px; background: var(--ink); }
.cd-outcome h4 { color: var(--olive-bright); }
.cd-outcome p { color: #fff; }
.cd-body > * { animation: cd-rise .7s var(--ease) both; }
.cd-body > *:nth-child(2) { animation-delay: .06s; }
.cd-body > *:nth-child(3) { animation-delay: .12s; }
@keyframes cd-rise { from { opacity: 0; transform: translateY(14px); } }
.cd-close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--white); box-shadow: var(--shadow-sm); transition: transform .5s var(--ease), background-color .3s; }
.cd-close:hover { transform: rotate(90deg); background: var(--olive); }
.cd-close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.cd-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.cd-nav button { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--ink); padding: 8px 4px; transition: color .3s; }
.cd-nav button:hover { color: var(--olive-ink); }
.cd-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.cd-prev:hover svg { transform: translateX(-3px); }
.cd-next:hover svg { transform: translateX(3px); }
.cd-count { font-size: .82rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { background: var(--white); }
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(48px, 7vw, 110px); align-items: start; }
.faq-aside { position: sticky; top: 110px; }
.faq-aside .h2 { margin-bottom: 18px; }

.accordion { border-bottom: 1px solid var(--line-2); }
.acc-item { border-top: 1px solid var(--line-2); }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 0; text-align: left;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; color: var(--ink);
  transition: color .3s var(--ease);
}
.acc-btn:hover { color: var(--olive-deep); }
.acc-icon { position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .5s var(--ease), box-shadow .5s var(--ease), transform .6s var(--ease); }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 1.6px; margin: -.8px 0 0 -6.5px; background: var(--ink); border-radius: 2px; transition: transform .6s var(--ease); }
.acc-icon::after { transform: rotate(90deg); }
.acc-btn[aria-expanded="true"] .acc-icon { background: var(--olive); box-shadow: none; transform: rotate(180deg); }
.acc-btn[aria-expanded="true"] .acc-icon::after { transform: rotate(0deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.acc-panel > div { overflow: hidden; }
.acc-panel p { padding: 0 62px 28px 0; font-size: 1rem; line-height: 1.7; opacity: 0; transform: translateY(-8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-item.is-open .acc-panel p { opacity: 1; transform: none; transition-delay: .1s; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(48px, 6vw, 96px); align-items: start; }
.contact-info .h2 { margin-bottom: 18px; }
.contact-list { display: grid; margin-top: 40px; border-top: 1px solid var(--line-2); }
.contact-list li { display: flex; flex-direction: column; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cl-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.contact-list a { font-size: 1.05rem; font-weight: 600; color: var(--ink); line-height: 1.5; word-break: break-word; background: linear-gradient(var(--olive), var(--olive)) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease); }
.contact-list a:hover { background-size: 100% 1.5px; }
.contact-list small { margin-top: 8px; font-size: .78rem; font-weight: 600; color: var(--olive-ink); background: rgba(163,168,42,.14); padding: 3px 10px; border-radius: 999px; }

.form-card { position: relative; background: var(--white); border-radius: 24px; padding: clamp(24px, 3.5vw, 40px); box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; margin-bottom: 14px; }
.field input, .field textarea {
  width: 100%; display: block;
  padding: 26px 16px 10px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
.field label {
  position: absolute; left: 17px; top: 18px;
  font-size: 1rem; color: var(--muted); pointer-events: none;
  transform-origin: left top;
  transition: transform .3s var(--ease), color .3s var(--ease);
}
.field input:hover, .field textarea:hover { border-color: var(--line-2); }
.field input:focus, .field textarea:focus { outline: none; background: var(--white); border-color: var(--ink); box-shadow: 0 0 0 4px rgba(163,168,42,.22); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.76); color: var(--olive-ink); font-weight: 600; }
.field-error { display: block; font-size: .8rem; font-weight: 600; color: var(--error); margin-top: 6px; }
.field-error:empty, .form-error:empty { display: none; }
.field.has-error input, .field.has-error textarea { border-color: var(--error); background: #fdf6f4; }
.field.has-error label { color: var(--error); }
.form-error { font-size: .85rem; font-weight: 600; color: var(--error); margin-bottom: 8px; }
.contact-form .btn-block { margin-top: 8px; }

.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn-label, .btn.is-loading .i-arrow { opacity: 0; }
.btn.is-loading .spinner { display: block; position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -9px; }

.form-success { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 12px; }
.form-success[hidden] { display: none; }
.form-success:focus { outline: none; }
.form-success h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 8px; }
.form-success p { margin-bottom: 28px; }
.success-check { width: 72px; height: 72px; margin: 0 auto 24px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.success-check circle { stroke: var(--olive); stroke-width: 2; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 1s var(--ease) forwards; }
.success-check path { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s var(--ease) .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: rgba(255,255,255,.62); padding: clamp(64px, 8vw, 96px) 0 32px; font-size: .92rem; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand img { width: 210px; margin-bottom: 24px; }
.footer-tag { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; color: #fff; }
.footer-tag em { font-style: normal; color: var(--olive-bright); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a, .footer-contact a { transition: color .3s; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-top: 28px; font-size: .85rem; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* (JS removes data-reveal from simple elements once revealed so their own hover transforms apply) */

/* About media: clip reveal instead of fade */
.js .about-media[data-reveal] { opacity: 1; transform: none; }
.js .about-media .about-img { clip-path: inset(10% 10% 10% 10% round var(--radius)); }
.js .about-media .about-img img { scale: 1.25; }
.js .about-media .about-inset { opacity: 0; translate: 0 40px; transition: opacity 1.1s var(--ease) .5s, translate 1.1s var(--ease) .5s; }
.js .about-media.is-in .about-img { clip-path: inset(0 0 0 0 round var(--radius)); }
.js .about-media.is-in .about-img img { scale: 1; }
.js .about-media.is-in .about-inset { opacity: 1; translate: 0 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .primary-nav { display: none; }
  .menu-toggle { display: block; }
  .header-cta { margin-left: auto; }
  .service-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .fc-2 { left: -20px; }
}

@media (max-width: 900px) {
  :root { --header-h: 74px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; width: 100%; margin: 16px auto 0; }
  .hero-img { aspect-ratio: 4 / 4.2; max-height: none; }
  .hero-mark { left: -12px; top: -28px; }
  .fc-1 { right: 16px; }
  .fc-2 { left: 16px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 560px; width: 100%; margin-inline: auto; }
  .steps-track { top: 0; bottom: 0; left: 7px; right: auto; width: 1px; height: auto; }
  .steps-track span { transform: scaleY(0); transform-origin: top; }
  .steps.is-in .steps-track span { transform: scaleY(1); }
  .steps-list { grid-template-columns: 1fr; gap: 40px; }
  .step { padding: 0 0 0 44px; }
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-aside { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .case-dialog {
    width: 100%; max-width: 100%; max-height: 92dvh;
    margin: auto 0 0; border-radius: 24px 24px 0 0;
  }
  .case-dialog[open] { animation: sheet-in .55s var(--ease); }
  .case-dialog.is-closing { animation: sheet-out .35s var(--ease) forwards; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
  .cd-inner { grid-template-columns: 1fr; overflow-y: auto; max-height: 92dvh; overscroll-behavior: contain; }
  .cd-media { height: 200px; min-height: 0; }
  .cd-content { max-height: none; overflow: visible; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-cta { display: none; }
  .menu-toggle { margin-left: auto; }
  .hero-title { font-size: clamp(3rem, 15vw, 4.2rem); }
  .hero-actions .btn { width: 100%; }
  .hero-img { aspect-ratio: 1 / 1.05; border-radius: 18px; }
  .hero-mark { width: 84px; top: -22px; left: -4px; }
  .float-card { padding: 10px 14px 10px 10px; border-radius: 14px; }
  .fc-icon { width: 36px; height: 36px; border-radius: 10px; }
  .fc-1 { top: auto; bottom: 16px; right: 12px; }
  .fc-2 { top: 16px; bottom: auto; left: auto; right: 12px; padding: 10px 14px; }
  .float-card .fc-big { font-size: 1.6rem; }
  .creds li { padding: 0 18px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-icon { margin-bottom: 28px; }

  /* Case studies become a swipeable carousel */
  .case-grid {
    display: flex; gap: 14px;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 12px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .case-grid::-webkit-scrollbar { display: none; }
  .case { flex: 0 0 84%; scroll-snap-align: start; }
  .js .case[data-reveal] { transform: none; }
  .case-body { padding: 22px 22px 24px; }
  .case-swipe { display: block; margin-top: 16px; }
  .case-progress { position: relative; height: 2px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
  .case-progress span { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--sp, .167)); transition: transform .2s linear; }

  .acc-btn { padding: 22px 0; gap: 16px; }
  .acc-panel p { padding-right: 0; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { border-radius: 20px; }
  .footer-nav { gap: 10px 22px; }
  .footer-bottom { flex-direction: column-reverse; align-items: flex-start; }
}

@media (max-width: 340px) {
  .fc-2 { display: none; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee-track span[aria-hidden="true"], .marquee-track i:nth-of-type(n+5) { display: none; }
}
