/* =========================================================
   Accord ACES — "wow" layer: display type, cinematic hero,
   scroll storytelling. Loaded after style.css.
   ========================================================= */
:root {
  --display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --lime: #a6e3a1;
  --glow: rgba(66, 142, 79, .55);
}
h1, h2, .display { font-family: var(--display); letter-spacing: -.035em; }
h1 { font-weight: 800; }
h2 { font-weight: 700; }

/* ---------- Header over dark hero ---------- */
body[data-page="home"] .topbar { display: none; }
body[data-page="home"] .header { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; backdrop-filter: none; transition: background .3s, border-color .3s; }
body[data-page="home"] .header .brand-name, body[data-page="home"] .header .nav > a, body[data-page="home"] .header .nav-item > a, body[data-page="home"] .header .menu-toggle { color: #fff; }
body[data-page="home"] .header .brand-name small { color: rgba(255,255,255,.6); }
body[data-page="home"] .header .nav > a:hover, body[data-page="home"] .header .nav-item > a:hover { background: rgba(255,255,255,.1); color: #fff; }
body[data-page="home"] .header.scrolled { background: rgba(13,18,48,.82); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.08); }

/* ---------- Cinematic hero ---------- */
.xhero { position: relative; min-height: 100svh; display: grid; align-items: end; color: #fff; overflow: hidden; isolation: isolate; background: var(--navy-950); }
.xhero-slides { position: absolute; inset: 0; z-index: -3; }
.xhero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1.6s ease, transform 7s ease-out; }
.xhero-slides img.on { opacity: 1; transform: scale(1); }
.xhero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 15% 85%, rgba(66,142,79,.45), transparent 70%),
    linear-gradient(180deg, rgba(13,18,48,.55) 0%, rgba(13,18,48,.35) 35%, rgba(13,18,48,.92) 100%); }
.xhero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.xhero .container { padding: 160px 0 56px; }
.xhero-kicker { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: .9rem; color: rgba(255,255,255,.85); margin-bottom: 26px; }
.xhero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 6px rgba(166,227,161,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(166,227,161,0); } }
.xhero h1 { color: #fff; font-size: clamp(2.8rem, 8.2vw, 7.4rem); line-height: .95; max-width: 13ch; margin-bottom: 30px; }
.rotator { display: inline-grid; vertical-align: bottom; overflow: hidden; color: var(--lime); }
.rotator span { grid-area: 1/1; transform: translateY(105%); opacity: 0; transition: transform .7s cubic-bezier(.7,0,.2,1), opacity .7s; white-space: nowrap; }
.rotator span.on { transform: none; opacity: 1; }
.rotator span.out { transform: translateY(-105%); opacity: 0; }
.xhero-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; }
.xhero-row p { font-size: 1.2rem; color: rgba(255,255,255,.82); max-width: 560px; margin: 0 0 30px; }
.xhero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.glass { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(16px); border-radius: 18px; padding: 20px 22px; }
.glass b { display: block; font-family: var(--display); font-size: 2.3rem; line-height: 1; letter-spacing: -.03em; }
.glass span { font-size: .85rem; color: rgba(255,255,255,.72); }
.xhero-logos { border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding-top: 26px; display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
.xhero-logos small { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); font-weight: 700; white-space: nowrap; }
.xhero-logos .marquee img { filter: brightness(0) invert(1); opacity: .75; height: 40px; }
.xhero-logos .marquee .wordmark { color: #fff; opacity: .8; }
.xhero-logos .marquee .wordmark small { color: rgba(255,255,255,.6); }
.slide-dots { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; z-index: 2; }
.slide-dots i { width: 4px; height: 26px; border-radius: 4px; background: rgba(255,255,255,.3); transition: .4s; }
.slide-dots i.on { background: #fff; height: 44px; }

/* ---------- Scroll-reveal statement ---------- */
.statement { padding: clamp(90px, 13vw, 180px) 0; }
.statement p { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.6vw, 4.1rem); line-height: 1.08; letter-spacing: -.035em; color: var(--ink); margin: 0; max-width: 20ch; }
.statement p .w { color: #d5d9e4; transition: color .4s; }
.statement p .w.lit { color: var(--ink); }
.statement p .w.hl.lit { color: var(--green); }
.statement-foot { display: flex; gap: 40px; margin-top: 50px; flex-wrap: wrap; align-items: center; }
.statement-foot .sig { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: .95rem; }

/* ---------- Services: hover-reveal ---------- */
.svc-x { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.svc-x-media { position: sticky; top: 110px; aspect-ratio: 4/5; border-radius: 28px; overflow: hidden; background: var(--navy-900); box-shadow: var(--shadow); }
.svc-x-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .6s, transform 1.2s; }
.svc-x-media img.on { opacity: 1; transform: none; }
.svc-x-media figcaption { position: absolute; left: 22px; bottom: 22px; right: 22px; color: #fff; z-index: 2; font-weight: 600; }
.svc-x-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(13,18,48,.75)); z-index: 1; }
.svc-x-list { border-top: 1px solid var(--line); }
.svc-x-item { display: grid; grid-template-columns: 54px 1fr 40px; gap: 18px; align-items: center; padding: 26px 6px; border-bottom: 1px solid var(--line); cursor: pointer; transition: padding .3s, background .3s; }
.svc-x-item .n { font-weight: 800; color: var(--muted); font-size: .85rem; }
.svc-x-item h3 { font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 2rem); margin: 0; letter-spacing: -.02em; transition: color .3s; }
.svc-x-item p { grid-column: 2; margin: 0; color: var(--muted); max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s, opacity .4s, margin .4s; }
.svc-x-item .arr { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: .3s; }
.svc-x-item .arr svg { width: 18px; }
.svc-x-item.on { padding-left: 18px; background: linear-gradient(90deg, var(--green-50), transparent); }
.svc-x-item.on h3 { color: var(--green); }
.svc-x-item.on p { max-height: 80px; opacity: 1; margin-top: 6px; }
.svc-x-item.on .arr { background: var(--green); color: #fff; border-color: var(--green); transform: rotate(-45deg); }

/* ---------- Big numbers ---------- */
.bignum { background: var(--navy-950); color: #fff; padding: clamp(80px, 10vw, 130px) 0; position: relative; overflow: hidden; }
.bignum::before { content: ""; position: absolute; width: 700px; height: 700px; right: -200px; top: -300px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 65%); }
.bignum-grid { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.bignum-grid > div { padding: 10px 30px; border-left: 1px solid rgba(255,255,255,.12); }
.bignum-grid b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 7vw, 6rem); line-height: 1; letter-spacing: -.05em;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.35)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bignum-grid span { color: #aab0cf; display: block; margin-top: 10px; max-width: 220px; }

/* ---------- Field film strip ---------- */
.film { padding: 90px 0 20px; overflow: hidden; }
.film-row { display: flex; gap: 16px; width: max-content; animation: scroll 60s linear infinite; margin-bottom: 16px; }
.film-row.rev { animation-direction: reverse; animation-duration: 70s; }
.film-row img { height: 260px; width: auto; aspect-ratio: 4/5; object-fit: cover; border-radius: 18px; }
.film-row img.w { aspect-ratio: 4/3; }
.film:hover .film-row { animation-play-state: paused; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 18px; }
.bento > * { border-radius: 24px; padding: 28px; position: relative; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line); }
.bento h3 { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em; }
.bento p { color: var(--muted); font-size: .95rem; margin: 0; }
.bento .ico { width: 46px; height: 46px; border-radius: 12px; background: #fff; color: var(--green); display: grid; place-items: center; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.bento .ico svg { width: 22px; }
.b-photo { grid-column: span 2; grid-row: span 2; padding: 0 !important; border: 0 !important; }
.b-photo img { width: 100%; height: 100%; object-fit: cover; }
.b-photo .cap { position: absolute; inset: auto 0 0 0; padding: 30px; color: #fff; background: linear-gradient(transparent, rgba(13,18,48,.88)); }
.b-photo .cap h3 { color: #fff; font-size: 1.8rem; margin-bottom: 6px; }
.b-photo .cap p { color: rgba(255,255,255,.8); }
.b-green { background: var(--green) !important; border: 0 !important; color: #e9f5eb; }
.b-green h3, .b-green b { color: #fff; }
.b-green p { color: rgba(255,255,255,.85); }
.b-green b { font-family: var(--display); font-size: 3.4rem; line-height: 1; display: block; letter-spacing: -.04em; margin-bottom: 6px; }
.b-navy { background: var(--navy-900) !important; border: 0 !important; }
.b-navy h3 { color: #fff; } .b-navy p { color: #aab0cf; }
.b-navy .ico { background: rgba(255,255,255,.08); color: var(--lime); box-shadow: none; }
.b-wide { grid-column: span 2; }

/* ---------- Insider feature ---------- */
.insider-x { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; }
.insider-x .feature { position: relative; border-radius: 28px; overflow: hidden; min-height: 520px; color: #fff; display: flex; align-items: flex-end; isolation: isolate; }
.insider-x .feature > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s; }
.insider-x .feature:hover > img { transform: scale(1.04); }
.insider-x .feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(13,18,48,.1), rgba(13,18,48,.92)); }
.insider-x .feature .inner { padding: 36px; }
.insider-x .feature h3 { font-family: var(--display); color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -.03em; }
.insider-x .feature p { color: rgba(255,255,255,.8); max-width: 560px; }
.insider-x .side { display: grid; gap: 22px; }
.insider-x .mini { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding: 14px; border-radius: 22px; border: 1px solid var(--line); transition: .25s; background: #fff; }
.insider-x .mini:hover { box-shadow: var(--shadow); border-color: transparent; }
.insider-x .mini img { width: 150px; height: 120px; object-fit: cover; border-radius: 14px; }
.insider-x .mini h4 { font-family: var(--display); font-size: 1.08rem; line-height: 1.25; margin: 6px 0 0; color: var(--ink); letter-spacing: -.01em; }

/* ---------- Final CTA ---------- */
.cta-x { position: relative; border-radius: 32px; overflow: hidden; padding: clamp(60px, 9vw, 120px) clamp(28px, 6vw, 80px); color: #fff; isolation: isolate; }
.cta-x img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-x::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(13,18,48,.95) 30%, rgba(44,98,54,.6)); }
.cta-x h2 { color: #fff; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1; max-width: 14ch; }
.cta-x p { color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 520px; }

/* Magnetic buttons */
.btn { will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .xhero-row, .svc-x, .insider-x { grid-template-columns: 1fr; }
  .svc-x-media { position: relative; top: 0; aspect-ratio: 16/10; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bignum-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .slide-dots { display: none; }
}
@media (max-width: 640px) {
  .xhero-stats { grid-template-columns: 1fr 1fr; }
  .xhero-stats .glass:last-child { display: none; }
  .xhero-logos { grid-template-columns: 1fr; gap: 14px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .b-photo { grid-column: auto; grid-row: auto; aspect-ratio: 4/3; }
  .b-wide { grid-column: auto; }
  .insider-x .mini { grid-template-columns: 110px 1fr; }
  .insider-x .mini img { width: 110px; height: 90px; }
  .film-row img { height: 190px; }
  .bignum-grid > div { padding: 6px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .xhero-slides img, .film-row, .rotator span { transition: none; animation: none; }
}
/* Active nav item on the transparent home header */
body[data-page="home"] .header:not(.scrolled) .nav a.active { background: transparent; color: #fff; box-shadow: inset 0 -2px 0 var(--lime); border-radius: 0; }
body[data-page="home"] .header.scrolled .nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.xhero .container { padding-bottom: 90px; }

.bignum-grid b span { display: inline; margin: 0; max-width: none; color: inherit; }
.insider-x .feature .byline img { width: 38px; height: 38px; }

/* ---------- Service detail page ---------- */
.svc-hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; padding: 170px 0 90px; min-height: 64vh; display: flex; align-items: flex-end; background: var(--navy-950); }
.svc-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kb 18s ease-out both; }
@keyframes kb { from { transform: scale(1.1); } to { transform: none; } }
.svc-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 60% at 10% 90%, rgba(66,142,79,.45), transparent 70%), linear-gradient(180deg, rgba(13,18,48,.5), rgba(13,18,48,.92)); }
.svc-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.6vw, 4.6rem); line-height: 1; max-width: 16ch; }
.svc-hero .lead { color: rgba(255,255,255,.85); font-size: 1.2rem; }
.svc-hero .breadcrumb { color: rgba(255,255,255,.7); }
.svc-hero.product { background: linear-gradient(135deg, var(--navy-950), #1d2a6b); align-items: center; padding-top: 140px; }
.svc-hero-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.svc-hero-split img { border-radius: 24px; background: #fff; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
body[data-page="services"] .header { position: fixed; left: 0; right: 0; }
.svc-body { display: grid; grid-template-columns: 1fr 340px; gap: 70px; align-items: start; }
.svc-body .prose p { font-size: 1.08rem; }
.incl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.incl li { padding: 10px 0 10px 32px; border-top: 1px solid var(--line); position: relative; font-weight: 600; color: var(--ink); font-size: .95rem; }
.incl li::before { content: ""; position: absolute; left: 0; top: 12px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23428e4f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.svc-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc-gallery[data-n="1"] { grid-template-columns: minmax(0, 720px); }
.svc-gallery[data-n="2"] { grid-template-columns: 1fr 1fr; }
.svc-gallery figure { margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; background: #fff; }
.svc-gallery figure:first-child:nth-last-child(5) { grid-row: span 2; aspect-ratio: auto; }
.svc-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.svc-gallery figure:hover img { transform: scale(1.04); }
.svc-gallery figure.contain img { object-fit: contain; }
.svc-gallery figure.contain { aspect-ratio: 16/9; }

/* ---------- Home: Who we are photo ---------- */
.whoweare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.anniv { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
.anniv img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.anniv figcaption { position: absolute; left: 18px; bottom: 18px; background: rgba(255,255,255,.95); border-radius: 14px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-sm); }
.anniv figcaption b { font-family: var(--display); font-size: 1.8rem; color: var(--green); line-height: 1; }
.anniv figcaption span { font-size: .85rem; color: var(--ink); font-weight: 600; line-height: 1.3; }
@media (max-width: 1080px) { .svc-body, .svc-hero-split, .whoweare { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .svc-gallery, .svc-gallery[data-n="2"] { grid-template-columns: 1fr; } .svc-gallery figure:first-child:nth-last-child(5) { grid-row: auto; aspect-ratio: 4/3; } }
.whoweare .statement-text, .whoweare #statement { font-size: clamp(1.8rem, 3.4vw, 3.2rem); }
/* Service hero: a mosaic of Accord field photos (sharper than stretching one phone photo full-width) */
.svc-hero .mosaic { position: absolute; inset: 0; z-index: -2; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 4px; }
.svc-hero .mosaic img { width: 100%; height: 100%; object-fit: cover; animation: kb 18s ease-out both; }
@media (max-width: 700px) { .svc-hero .mosaic { grid-template-columns: 1fr; } .svc-hero .mosaic img:not(:first-child) { display: none; } }
