/* NorthStar Global Exports - theme layer
   Dark mode, glass surfaces, tactile (skeuomorphic) details and motion.
   Loaded after site.css. All motion is removed for visitors who prefer reduced motion. */

:root {
  --glass: rgba(255, 255, 255, .72);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-border: rgba(255, 255, 255, .65);
  --glass-edge: rgba(12, 42, 77, .08);
  --glass-dark: rgba(12, 42, 77, .55);
  --shadow-1: 0 1px 2px rgba(12, 42, 77, .06), 0 2px 6px -2px rgba(12, 42, 77, .08);
  --shadow-2: 0 2px 4px rgba(12, 42, 77, .05), 0 12px 28px -10px rgba(12, 42, 77, .28);
  --shadow-3: 0 4px 8px rgba(12, 42, 77, .06), 0 24px 48px -16px rgba(12, 42, 77, .38);
  --inset-field: inset 0 1px 2px rgba(12, 42, 77, .08), inset 0 0 0 1px rgba(255, 255, 255, .6);
  --btn-navy: #0c2a4d;
  --btn-navy-2: #13395f;
  --skeleton: linear-gradient(100deg, #eef1f5 30%, #f7f9fb 50%, #eef1f5 70%);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

/* ---------------------------------------------------------------- dark palette */
html[data-theme="dark"] {
  --bg: #07111e;
  --surface: #0e1b2c;
  --mist: #0b1726;
  --white: #0e1b2c;
  --ink: #e3eaf3;
  --muted: #9cadc1;
  --line: #1f3550;
  --heading: #f3f6fa;
  --link: #8cc0ff;
  --navy: #0b2240;
  --navy-2: #12345a;
  --navy-3: #040b15;
  --amber-ink: #f7b955;
  --amber-soft: rgba(242, 161, 30, .14);
  --green: #63d295;
  --green-soft: rgba(99, 210, 149, .13);
  --ok: #4cc483;
  --bad: #f07a6b;
  --glass: rgba(10, 22, 38, .66);
  --glass-strong: rgba(12, 26, 44, .86);
  --glass-border: rgba(255, 255, 255, .08);
  --glass-edge: rgba(0, 0, 0, .4);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px -2px rgba(0, 0, 0, .45);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 30px -12px rgba(0, 0, 0, .7);
  --shadow-3: 0 4px 10px rgba(0, 0, 0, .4), 0 26px 50px -18px rgba(0, 0, 0, .8);
  --shadow: var(--shadow-2);
  --inset-field: inset 0 2px 4px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .03);
  --btn-navy: #1d4a7a;
  --btn-navy-2: #255a92;
  --skeleton: linear-gradient(100deg, #0f1f33 30%, #16294197 50%, #0f1f33 70%);
  color-scheme: dark;
}
html[data-theme="dark"] .alert-error { background: rgba(240, 122, 107, .12); color: #ffb3a8; border-color: rgba(240, 122, 107, .35); }
html[data-theme="dark"] .alert-success { background: rgba(76, 196, 131, .12); color: #9ce7bd; border-color: rgba(76, 196, 131, .35); }
html[data-theme="dark"] .alert-info { background: rgba(140, 192, 255, .1); color: #bcd9ff; border-color: rgba(140, 192, 255, .3); }
html[data-theme="dark"] .cta-band { background: linear-gradient(135deg, #f6d10a, #f2b81e); }
html[data-theme="dark"] .cta-band h2 { color: #0c2a4d; }
html[data-theme="dark"] .cta-band p { color: #2a3a4c; }
html[data-theme="dark"] .p-card .media, html[data-theme="dark"] .post-card .media { background: #0b1726; }
html[data-theme="dark"] .placeholder-img { background: repeating-linear-gradient(135deg, #0f1f33 0 10px, #0c1a2b 10px 20px); }
html[data-theme="dark"] .spec-table th { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .chip[aria-current="true"], html[data-theme="dark"] .chip.on,
html[data-theme="dark"] .pager [aria-current] { background: var(--amber); color: #2b1a00; border-color: var(--amber); }
html[data-theme="dark"] .masonry figure, html[data-theme="dark"] .pd-gallery .main { background: #0b1726; }
html[data-theme="dark"] img:not(.no-dim) { filter: brightness(.93) contrast(1.02); }
html[data-theme="dark"] .brand img, html[data-theme="dark"] .footer-brand img { filter: none; background: #fff; border-radius: 10px; padding: 3px; }
html[data-theme="dark"] .ref-box { color: #f7b955; }
html[data-theme="dark"] .steps li::before { color: #f7b955; }
html[data-theme="dark"] ::selection { background: rgba(242, 161, 30, .45); color: #fff; }
::selection { background: rgba(242, 161, 30, .35); }

/* Smooth colour change when switching theme (only during the switch) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease), fill .45s, box-shadow .45s !important;
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------------------------------------------------------------- theme toggle (tactile switch) */
.theme-toggle {
  position: relative; flex: none; width: 64px; height: 34px; border-radius: 999px; cursor: pointer; padding: 0;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #dfe6ee, #f5f8fb);
  box-shadow: inset 0 2px 4px rgba(12, 42, 77, .18), inset 0 -1px 0 rgba(255, 255, 255, .8), 0 1px 0 rgba(255, 255, 255, .7);
  transition: background .4s var(--ease), border-color .4s;
}
.theme-toggle .tt-sky { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.theme-toggle .tt-sky i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .4s .1s; }
.theme-toggle .tt-sky i:nth-child(1) { top: 9px; left: 12px; } .theme-toggle .tt-sky i:nth-child(2) { top: 20px; left: 20px; } .theme-toggle .tt-sky i:nth-child(3) { top: 12px; left: 27px; width: 1.5px; height: 1.5px; }
.theme-toggle .tt-knob {
  position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: #b86e00;
  background: radial-gradient(circle at 35% 30%, #fff8e1, #ffd36b 55%, #f2a11e);
  box-shadow: 0 2px 4px rgba(12, 42, 77, .3), inset 0 -2px 3px rgba(154, 92, 0, .35), inset 0 2px 2px rgba(255, 255, 255, .8);
  transition: transform .45s var(--spring), background .4s, color .4s;
}
.theme-toggle .tt-knob svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .tt-moon { display: none; }
html[data-theme="dark"] .theme-toggle { background: linear-gradient(180deg, #050d18, #10223a); border-color: #23405f; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .06); }
html[data-theme="dark"] .theme-toggle .tt-sky i { opacity: .9; }
html[data-theme="dark"] .theme-toggle .tt-knob { transform: translateX(30px); background: radial-gradient(circle at 35% 30%, #ffffff, #dbe6f3 55%, #9fb4cc); color: #34506f; }
html[dir="rtl"][data-theme="dark"] .theme-toggle .tt-knob { transform: translateX(-30px); }
html[data-theme="dark"] .theme-toggle .tt-sun { display: none; }
html[data-theme="dark"] .theme-toggle .tt-moon { display: block; }
.theme-toggle:hover .tt-knob { box-shadow: 0 3px 8px rgba(12, 42, 77, .35), inset 0 -2px 3px rgba(154, 92, 0, .35), inset 0 2px 2px rgba(255, 255, 255, .8), 0 0 0 4px rgba(242, 161, 30, .18); }
.theme-toggle:active .tt-knob { width: 30px; }
.nav-extra .theme-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; color: #c9d6e6; font-weight: 600; }
.header-inner > .theme-toggle { display: none; }
@media (min-width: 420px) { .header-inner > .theme-toggle { display: inline-block; } }

/* ---------------------------------------------------------------- glass surfaces */
/* Glass lives on a pseudo-element: a backdrop-filter on the header itself would
   trap the fixed mobile drawer inside the header box. */
.site-header { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-block-end: 1px solid var(--glass-edge); transition: box-shadow .3s var(--ease); }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  transition: background .3s;
}
.site-header .header-inner { transition: min-height .3s var(--ease); }
.site-header.scrolled { box-shadow: 0 8px 30px -14px rgba(12, 42, 77, .35); }
.site-header.scrolled::before { background: var(--glass-strong); }
@media (min-width: 900px) { .site-header.scrolled .header-inner { min-height: 64px; } .site-header.scrolled .brand img { width: 40px; height: 40px; } }
.brand img { transition: width .3s var(--ease), height .3s var(--ease), transform .5s var(--spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.05); }

.lang-menu, .nav-sub {
  background: var(--glass-strong) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--shadow-3) !important;
}
.lang-switch[open] .lang-menu { animation: popIn .22s var(--ease); }
.lang-switch summary, .nav-toggle { background: var(--surface); box-shadow: var(--shadow-1); transition: transform .2s var(--ease), box-shadow .2s; }
.lang-switch summary:hover, .nav-toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.lang-switch summary .icon { transition: transform .6s var(--ease); }
.lang-switch summary:hover .icon { transform: rotate(180deg); }

.kpis { background: transparent; }
.kpis::before { content: ""; position: absolute; inset: 0; background: rgba(19, 57, 95, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-block-start: 1px solid rgba(255, 255, 255, .12); }
.kpis ul { position: relative; }
.kpis li { transition: background .3s; }
.kpis li:hover { background: rgba(255, 255, 255, .05); }

.mobile-bar {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border-block-start: 1px solid var(--glass-border);
}
.mobile-bar a { transition: transform .15s var(--ease), background .2s; }
.mobile-bar a:active { transform: scale(.95); }
.mobile-bar a.q { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 12px -4px rgba(242, 161, 30, .7); }

.cookie {
  background: rgba(11, 34, 64, .94);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .12);
  animation: slideUp .5s var(--ease) both .8s;
}
.mode-card { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; padding: 30px 22px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.contact-card { background: linear-gradient(160deg, var(--navy) 0%, #0f3460 100%); box-shadow: var(--shadow-2); position: relative; overflow: hidden; }
.contact-card::after { content: ""; position: absolute; width: 260px; height: 260px; inset-inline-end: -80px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 161, 30, .25), transparent 65%); pointer-events: none; }
.contact-card .ic { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .3s var(--spring); }
.contact-card li:hover .ic { transform: scale(1.1) rotate(-6deg); }

/* ---------------------------------------------------------------- hero atmosphere */
.hero, .page-hero, .section.navy { isolation: isolate; }
.hero::before, .page-hero .aurora, .section.navy::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 15% 20%, rgba(242, 161, 30, .18), transparent 70%),
    radial-gradient(35% 45% at 85% 75%, rgba(99, 160, 255, .16), transparent 70%),
    radial-gradient(30% 40% at 60% 10%, rgba(31, 93, 58, .25), transparent 70%);
  animation: aurora 22s ease-in-out infinite alternate;
}
.section.navy { position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); }
[dir="rtl"] .page-hero::after { mask-image: linear-gradient(270deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(270deg, transparent, #000 70%); }
.hero-text > * { animation: rise .8s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: .08s; } .hero-text > :nth-child(3) { animation-delay: .16s; } .hero-text > :nth-child(4) { animation-delay: .24s; }
.hero h1 span { background: linear-gradient(90deg, #f2a11e, #ffd36b, #f2a11e); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmerText 6s linear infinite; }
.hero-media { animation: fadeIn 1s var(--ease) both .15s; overflow: hidden; }
.hero-media img { animation: kenburns 18s ease-in-out infinite alternate; }
.page-hero h1, .page-hero p, .page-hero .crumbs { animation: rise .7s var(--ease) both; }
.page-hero p { animation-delay: .08s; }

/* ---------------------------------------------------------------- tactile buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s; }
.btn-amber {
  background: linear-gradient(180deg, #ffb840 0%, #f2a11e 55%, #e2900c 100%);
  border-color: #d98a0a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(154, 92, 0, .25), 0 6px 16px -8px rgba(226, 144, 12, .9);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-amber:hover { background: linear-gradient(180deg, #ffc35a 0%, #f7ab2a 55%, #e8970f 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 0 rgba(154, 92, 0, .25), 0 10px 22px -8px rgba(226, 144, 12, .95); }
.btn-navy {
  background: linear-gradient(180deg, var(--btn-navy-2) 0%, var(--btn-navy) 100%);
  border-color: rgba(0, 0, 0, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 6px 16px -8px rgba(12, 42, 77, .8);
}
.btn-navy:hover { background: linear-gradient(180deg, #1c4a78 0%, var(--btn-navy-2) 100%); color: #fff; }
.btn-ghost { background: var(--surface); box-shadow: var(--shadow-1); }
.btn-ghost:hover { box-shadow: var(--shadow-2); border-color: var(--heading); }
.btn-light { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); background: rgba(255, 255, 255, .06); }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .45) 48%, transparent 66%); transform: translateX(-120%); transition: transform .7s var(--ease); pointer-events: none; }
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .25) !important; transition-duration: .06s; }
.btn .icon { transition: transform .3s var(--spring); }
.btn:hover .icon.flip, .btn:hover .icon:last-child:not(:first-child) { transform: translateX(3px); }
[dir="rtl"] .btn:hover .icon.flip { transform: scaleX(-1) translateX(3px); }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .45); pointer-events: none; animation: ripple .6s var(--ease); z-index: -1; }
.link-arrow .icon { transition: transform .3s var(--spring); }
.link-arrow:hover .icon { transform: translateX(5px); }
[dir="rtl"] .link-arrow:hover .icon { transform: scaleX(-1) translateX(5px); }

/* ---------------------------------------------------------------- navigation */
@media (min-width: 900px) {
  .nav-list > li > a { position: relative; }
  .nav-list > li > a::after { content: ""; position: absolute; inset-inline: 12px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--amber); transform: scaleX(0); transition: transform .3s var(--ease); }
  .nav-list > li > a:hover::after { transform: scaleX(1); }
  .nav-list a[aria-current="page"] { box-shadow: none; }
  .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
  .nav-list a:hover { background: transparent; }
  .nav-list li:hover > .nav-sub, .nav-list li:focus-within > .nav-sub { animation: popIn .2s var(--ease); }
  .has-sub > a .icon { transition: transform .3s var(--ease); }
  .has-sub:hover > a .icon { transform: rotate(180deg); }
  .nav-sub a { border-radius: 8px; transition: background .2s, padding .2s; }
  .nav-sub a:hover { background: var(--amber-soft); padding-inline-start: 18px; }
}
.primary-nav.open .nav-list > li { animation: rise .45s var(--ease) both; }
.primary-nav.open .nav-list > li:nth-child(2) { animation-delay: .04s; } .primary-nav.open .nav-list > li:nth-child(3) { animation-delay: .08s; } .primary-nav.open .nav-list > li:nth-child(4) { animation-delay: .12s; } .primary-nav.open .nav-list > li:nth-child(5) { animation-delay: .16s; }

/* ---------------------------------------------------------------- cards & surfaces */
.card, .feature, .cert-card, .member, .quote, .region, .panel, .faq-item, .steps li {
  box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.p-card:hover, .post-card:hover, .member:hover, .region:hover, .cert-card:hover, .quote:hover, .feature:hover, .steps li:hover {
  transform: translateY(-5px); box-shadow: var(--shadow-3); border-color: rgba(242, 161, 30, .45);
}
.p-card .media { position: relative; }
.p-card .media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(12, 42, 77, .35)); opacity: 0; transition: opacity .35s; }
.p-card:hover .media::after { opacity: 1; }
.p-card .media img { transition: transform .7s var(--ease); }
.p-card:hover .media img { transform: scale(1.07); }
.p-card .body h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.p-card:hover .body h3 a { background-size: 100% 1.5px; }
.post-card .media img { transition: transform .7s var(--ease); }
.post-card:hover .media img { transform: scale(1.06); }
.feature .ic { background: linear-gradient(160deg, #1a4a7d, var(--navy)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 4px 10px -4px rgba(12, 42, 77, .6); transition: transform .4s var(--spring); }
.feature:hover .ic { transform: rotate(-8deg) scale(1.08); }
.member .photo img { transition: transform .8s var(--ease), filter .5s; }
.member:hover .photo img { transform: scale(1.05); }
.chip { transition: background .25s, color .25s, border-color .25s, transform .2s var(--ease), box-shadow .25s; box-shadow: var(--shadow-1); }
.chip:hover { transform: translateY(-2px); border-color: var(--amber); box-shadow: var(--shadow-2); }
.faq-item { overflow: hidden; }
.faq-item:hover { border-color: rgba(242, 161, 30, .45); }
.faq-item[open] { box-shadow: var(--shadow-2); border-color: rgba(242, 161, 30, .55); }
.faq-item[open] .ans { animation: rise .35s var(--ease); }
.faq-item summary { transition: color .2s; }
.faq-item summary:hover { color: var(--amber-ink); }

/* embossed step numbers */
.steps li::before {
  background: linear-gradient(180deg, #fff7e6, #ffe3b0);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(154, 92, 0, .18), 0 2px 6px -2px rgba(154, 92, 0, .45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform .4s var(--spring);
}
html[data-theme="dark"] .steps li::before { background: linear-gradient(180deg, #2a1f0c, #1a1306); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 8px -2px rgba(0, 0, 0, .7); text-shadow: none; }
.steps li:hover::before { transform: scale(1.1) rotate(-4deg); }

/* certificate seals */
.cert { box-shadow: var(--shadow-1); transition: transform .3s var(--spring), box-shadow .3s; }
.cert:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-2); }
.cert-card .logo { background: radial-gradient(circle at 35% 30%, #ffffff, #e9eef4 70%); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px rgba(31, 138, 76, .35), 0 3px 8px -3px rgba(12, 42, 77, .4); border-radius: 50%; }
html[data-theme="dark"] .cert-card .logo { background: radial-gradient(circle at 35% 30%, #1a2f48, #0d1b2c 70%); box-shadow: inset 0 0 0 3px #0e1b2c, inset 0 0 0 4px rgba(76, 196, 131, .4); }

/* paper-like spec table */
.spec-table-wrap { box-shadow: var(--shadow-1); background: var(--surface); }
.spec-table tr { transition: background .2s; }
.spec-table tr:hover td, .spec-table tr:hover th { background: var(--amber-soft); }

/* rubber-stamp reference number */
.ref-box { border: 2px dashed currentColor; transform: rotate(-2deg); box-shadow: inset 0 0 0 4px var(--amber-soft); animation: stamp .6s var(--spring) both .2s; }

/* carved form fields */
.input, .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field input[type="date"], .field input[type="url"], .field input[type="password"], .field input[type="search"], .field select, .field textarea, .newsletter-form input {
  box-shadow: var(--inset-field);
  background-color: var(--surface);
  color: var(--ink);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b7c3d1; }
html[data-theme="dark"] .field input:hover, html[data-theme="dark"] .field select:hover, html[data-theme="dark"] .field textarea:hover { border-color: #2f4d70; }
.field input:focus, .field select:focus, .field textarea:focus, .newsletter-form input:focus { box-shadow: var(--inset-field), 0 0 0 4px rgba(242, 161, 30, .28); }
.check input { transition: transform .2s var(--spring); }
.check input:checked { transform: scale(1.12); }
.item-row { background: var(--mist); box-shadow: inset 0 1px 3px rgba(12, 42, 77, .06); }
.stepper li::before { transition: background .5s var(--ease); }
.qstep:not([hidden]) { animation: rise .4s var(--ease); }
.panel { background: linear-gradient(180deg, var(--surface), var(--surface)); }

/* ---------------------------------------------------------------- lazy images */
.media, .photo, .pd-gallery .main, .masonry figure, .split .media { background-image: var(--skeleton); background-size: 300% 100%; animation: skeleton 1.4s linear infinite; }
.media:has(img.loaded), .photo:has(img.loaded), .pd-gallery .main:has(img.loaded), .masonry figure:has(img.loaded), .split .media:has(img.loaded), .photo:has(.initials), .media:has(.placeholder-img) { animation: none; background-image: none; }
html.js img[loading="lazy"] { opacity: 0; transition: opacity .6s var(--ease), transform .7s var(--ease); }
html.js img[loading="lazy"].loaded { opacity: 1; }

/* ---------------------------------------------------------------- scroll reveal */
html.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
html.js .rv.in { opacity: 1; transform: none; }
html.js .rv.in.p-card:hover, html.js .rv.in.member:hover, html.js .rv.in.post-card:hover, html.js .rv.in.feature:hover, html.js .rv.in.region:hover, html.js .rv.in.cert-card:hover, html.js .rv.in.quote:hover { transform: translateY(-5px); transition-delay: 0s; }
html.js .steps li.rv.in:hover { transform: translateY(-5px); }

/* ---------------------------------------------------------------- progress bar, back to top */
.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 1100; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #f2a11e, #ffd36b); box-shadow: 0 0 10px rgba(242, 161, 30, .6); }
[dir="rtl"] .scroll-progress { transform-origin: 100% 50%; }
.to-top {
  position: fixed; inset-inline-end: 16px; bottom: 82px; z-index: 790; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--heading);
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), box-shadow .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { box-shadow: var(--shadow-3); transform: translateY(-3px); }
.to-top .icon { transform: rotate(-90deg); }
@media (min-width: 900px) { .to-top { bottom: 94px; inset-inline-end: 30px; } }

/* WhatsApp button pulse */
.wa-fab { animation: pulse 2.6s ease-out infinite; transition: transform .3s var(--spring); }
.wa-fab:hover { transform: scale(1.08) rotate(-6deg); animation-play-state: paused; }

/* Footer polish */
.site-footer { position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(242, 161, 30, .6), transparent); }
.site-footer a { transition: color .2s, padding .2s; }
.footer-links a:hover { padding-inline-start: 4px; }
.socials a { transition: transform .3s var(--spring), background .3s, border-color .3s; }
.socials a:hover { transform: translateY(-3px); background: rgba(242, 161, 30, .15); border-color: var(--amber); }

/* Gallery */
.masonry figure { box-shadow: var(--shadow-1); transition: box-shadow .35s, transform .35s var(--ease); }
.masonry figure:hover { box-shadow: var(--shadow-3); transform: translateY(-3px); }
.masonry img { transition: transform .8s var(--ease) !important; }
.masonry figure:hover img { transform: scale(1.06) !important; }
.lightbox { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: rgba(4, 11, 21, .88); animation: fadeIn .25s; }
.lightbox img { animation: zoomIn .35s var(--ease); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }

/* Pager, misc */
.pager a { transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.pager a:hover { transform: translateY(-2px); border-color: var(--amber); box-shadow: var(--shadow-1); }
.big-ic { animation: pop .6s var(--spring) both; box-shadow: 0 0 0 8px var(--green-soft); }
.err-code { background: linear-gradient(90deg, #f2a11e, #ffd36b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip-link:focus { box-shadow: var(--shadow-2); }
:focus-visible { outline-offset: 3px; }

/* ---------------------------------------------------------------- keyframes */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes stamp { 0% { transform: rotate(-12deg) scale(1.6); opacity: 0; } 100% { transform: rotate(-2deg) scale(1); opacity: 1; } }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes aurora { 0% { transform: translate3d(0, 0, 0) rotate(0deg); } 100% { transform: translate3d(-4%, 3%, 0) rotate(8deg); } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes shimmerText { to { background-position: -200% 0; } }
@keyframes pulse { 0% { box-shadow: 0 8px 24px -8px rgba(31, 138, 76, .7), 0 0 0 0 rgba(31, 138, 76, .45); } 70% { box-shadow: 0 8px 24px -8px rgba(31, 138, 76, .7), 0 0 0 16px rgba(31, 138, 76, 0); } 100% { box-shadow: 0 8px 24px -8px rgba(31, 138, 76, .7), 0 0 0 0 rgba(31, 138, 76, 0); } }

/* ---------------------------------------------------------------- respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .rv { opacity: 1 !important; transform: none !important; }
  html.js img[loading="lazy"] { opacity: 1 !important; }
  .hero h1 span { color: var(--amber); background: none; }
}

/* Browsers without backdrop-filter: use solid surfaces */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header, .mobile-bar, .lang-menu, .nav-sub, .to-top { background: var(--surface) !important; }
  .cookie { background: var(--navy); }
}

@media print {
  .scroll-progress, .to-top, .theme-toggle { display: none !important; }
  html[data-theme="dark"] { --bg: #fff; --surface: #fff; --ink: #16212e; --heading: #0c2a4d; }
}

/* Drawer sub-menus stay dark on every theme; the drawer sits above the cookie notice */
@media (max-width: 899.98px) {
  .primary-nav .nav-sub { background: rgba(255, 255, 255, .04) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border: 0 !important; box-shadow: none !important; border-radius: 10px; }
  body.nav-open .cookie, body.nav-open .to-top, body.nav-open .wa-fab { visibility: hidden; }
}
