/* Theme toggle + dark theme. Loaded after pages.css; assets/js/theme.js sets html[data-theme]. */

/* ---------- Toggle button ---------- */
.theme-toggle{position:relative;display:inline-grid;place-items:center;flex:none;width:40px;height:40px;margin-left:auto;padding:0;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--ink);cursor:pointer;transition:background-color .2s ease,border-color .2s ease}
.theme-toggle:hover{background:rgba(16,35,63,.06)}
.theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.theme-toggle svg{grid-area:1/1;width:18px;height:18px;transition:transform .45s cubic-bezier(.2,.8,.2,1),opacity .3s ease}
.theme-toggle .icon-sun{opacity:0;transform:rotate(-90deg) scale(.4)}
[data-theme="dark"] .theme-toggle .icon-sun{opacity:1;transform:none}
[data-theme="dark"] .theme-toggle .icon-moon{opacity:0;transform:rotate(90deg) scale(.4)}
/* Desktop menu visible: sit right after it. Menu button showing instead: push to the right, next to it. */
@media(min-width:1100px){.desktop-nav{margin-left:auto}.theme-toggle{margin-left:-10px}}
@media(max-width:1099px){.nav{gap:12px}}

/* Colour cross-fade while switching (theme.js adds this class for 400ms). */
html.theme-transition,html.theme-transition *,html.theme-transition *::before,html.theme-transition *::after{transition:background-color .35s ease,color .35s ease,border-color .35s ease,fill .35s ease!important}

/* ---------- Dark theme ---------- */
[data-theme="dark"]{color-scheme:dark;--navy:#0f2140;--ink:#e6ecf3;--muted:#a7b4c6;--paper:#0b121e;--line:#26344b;--accent:#cfa565;--surface:#111a2a;--surface-2:#172338;--tint:rgba(255,255,255,.04)}
[data-theme="dark"] body{background:#070d17;color:var(--ink)}

/* Surfaces: header, section cards, footer, menus */
[data-theme="dark"] .site-header,[data-theme="dark"] .section,[data-theme="dark"] .footer,[data-theme="dark"] .page-body{background:var(--surface)}
[data-theme="dark"] .site-header{border-color:var(--line)}
@media(max-width:760px){[data-theme="dark"] .site-header{background:rgba(11,18,30,.96)}}
[data-theme="dark"] .mobile-menu{background:var(--surface);border-color:var(--line)}
[data-theme="dark"] .page-hero,[data-theme="dark"] .cta-band{background:linear-gradient(135deg,#132a4d 0%,#0c1a30 100%)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
[data-theme="dark"] .method,[data-theme="dark"] .environment-grid ul{background:#0d2234}

/* Brand logo: navy artwork, so dark mode swaps in a light version (images/eagle-page-consult-logo-dark.png) */
.brand .brand-dark{display:none}
[data-theme="dark"] .brand .brand-light{display:none}
[data-theme="dark"] .brand .brand-dark{display:block;mix-blend-mode:normal}

/* Text */
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3{color:var(--ink)}
[data-theme="dark"] .page-hero h1,[data-theme="dark"] .hero h1,[data-theme="dark"] .cta-band h2,[data-theme="dark"] .contact h2{color:#fff}
[data-theme="dark"] .kicker{color:#93a3bc}
[data-theme="dark"] .kicker.light{color:#e2c595}
[data-theme="dark"] .text-link,[data-theme="dark"] .footer>a:last-child,[data-theme="dark"] .page-body a:not(.button){color:#e0b97f}
[data-theme="dark"] .desktop-nav a[aria-current="page"]:not(.nav-cta){color:#fff}
[data-theme="dark"] .mobile-menu a[aria-current="page"]{color:#e0b97f}
[data-theme="dark"] .footer-links a{color:var(--muted)}
[data-theme="dark"] .footer-links a:hover,[data-theme="dark"] .footer-links a:focus-visible{color:#fff}
[data-theme="dark"] .nav-cta{background:var(--accent);border-color:var(--accent);color:#17130b}
[data-theme="dark"] .theme-toggle:hover{background:rgba(255,255,255,.08)}

/* Cards, lists, steps */
[data-theme="dark"] .card-grid li{background:var(--surface-2);border-color:var(--line)}
[data-theme="dark"] .service-card,[data-theme="dark"] .partner-strip a{background:var(--surface-2);border-color:var(--line)}
[data-theme="dark"] .service-card:hover,[data-theme="dark"] .partner-strip a:hover{box-shadow:0 18px 40px rgba(0,0,0,.45)}
[data-theme="dark"] .partner-strip strong{color:var(--ink)}
[data-theme="dark"] .assessment li,[data-theme="dark"] .faq details,[data-theme="dark"] .environment-grid li{border-color:var(--line)}
[data-theme="dark"] .partner .partner-features{border-top-color:rgba(255,255,255,.1)}

/* Partner and product sections: dark tints of each brand; logo plates stay light so the artwork reads */
[data-theme="dark"] .stepworth-branded{background:#17130f}
[data-theme="dark"] .stepworth-branded .kicker{color:#f29a63}
[data-theme="dark"] .stepworth-branded .partner-features{border-top-color:rgba(242,154,99,.2)}
[data-theme="dark"] .stepworth-branded .partner-ctas .text-link{color:#d3a6f0}
[data-theme="dark"] .stepworth-branded .partner-ctas .button.primary{background:#7b3bb0;border-color:#7b3bb0}
[data-theme="dark"] .stepworth-branded .partner-badge{background:transparent;border-color:rgba(242,154,99,.35);color:#e9c6ff}
[data-theme="dark"] .vv-branded{background:#0c1a16}
[data-theme="dark"] .vv-branded .kicker,[data-theme="dark"] .vv-branded .partner-features li:before,[data-theme="dark"] .vv-branded .partner-ctas .text-link{color:#3fdca0}
[data-theme="dark"] .vv-branded .partner-badge{background:transparent;border-color:rgba(63,220,160,.3);color:var(--muted)}
[data-theme="dark"] .vv-branded .split>img{background:radial-gradient(120% 90% at 30% 20%,#1d3a30 0%,#0f231c 70%)!important}
[data-theme="dark"] .fyc-branded .kicker,[data-theme="dark"] .fyc-branded .partner-features li:before{color:#3fdca0}
[data-theme="dark"] .fyc-branded .partner-ctas .button.primary{background:#1f3a63;border-color:#2d4f80}
[data-theme="dark"] .partner-strip-logo.vv{background:#0f231c}
[data-theme="dark"] .partner-badge{background:transparent;border-color:var(--line)}

/* Forms */
[data-theme="dark"] .contact form{background:rgba(17,26,42,.96);color:var(--ink);box-shadow:0 24px 60px rgba(0,0,0,.5)}
[data-theme="dark"] input,[data-theme="dark"] textarea,[data-theme="dark"] select{background:#0b1320;border-color:#33435c;color:var(--ink)}
[data-theme="dark"] input:focus,[data-theme="dark"] textarea:focus,[data-theme="dark"] select:focus{border-color:var(--accent);outline:none}
[data-theme="dark"] .form-status{color:var(--muted)!important}

/* Photography: take the edge off bright images at night */
[data-theme="dark"] main img:not(.partner-strip-logo img):not([src*="logo"]){filter:brightness(.92) contrast(1.02)}
[data-theme="dark"] .contact form label,[data-theme="dark"] .contact form small{color:var(--ink)}

/* Paired light/dark artwork: exactly one of each pair is displayed, so grid layouts keep one item. */
.only-dark{display:none!important}
[data-theme="dark"] .only-light{display:none!important}
[data-theme="dark"] .only-dark{display:block!important}

/* Stepworth in dark mode: white logo on a dark, warm panel (orange glow from the brand gradient) */
[data-theme="dark"] .stepworth-branded .split>img,[data-theme="dark"] .service-card-logo{background:radial-gradient(120% 90% at 30% 20%,#3a2418 0%,#1f1510 55%,#1a1220 100%)!important}
[data-theme="dark"] .partner-strip-logo.stepworth{background:#24180f}
