/* Amman Industriess: colours taken from the visiting card
   cream card stock, crimson lettering, red-to-vermilion band, navy logo ring and contact text.
   Design system: shell radius 28px, core 22px (concentric, 6px bezel), inputs 14px, interactive elements are pills. */

/* Self-hosted fonts (SIL Open Font License, see /fonts/OFL-*.txt) */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/barlow-400.woff") format("woff"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/barlow-500.woff") format("woff"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/barlow-600.woff") format("woff"); }
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/chakra-petch-500.woff") format("woff"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/chakra-petch-600.woff") format("woff"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/chakra-petch-700.woff") format("woff"); }
@font-face { font-family: "Libre Baskerville"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/libre-baskerville-700.woff") format("woff"); }

:root {
  --cream: #FCF5CB;        /* card stock */
  --cream-2: #F5EBB3;      /* deeper cream for alternate sections */
  --paper: #FFFCEC;        /* cards and inputs */
  --navy: #1C2C6E;         /* logo ring, contact text */
  --navy-deep: #121D4D;
  --ink: #1B2040;          /* body text */
  --muted: #565B76;
  --red: #D3222A;          /* "AMMAN INDUSTRIESS" lettering */
  --vermilion: #EF4B3A;    /* right end of the card's bottom band */
  --band: linear-gradient(90deg, #D3222A 0%, #E63A33 55%, #EF4B3A 100%);
  --band-ui: linear-gradient(90deg, #C41C24 0%, #D3222A 100%);  /* same red, kept dark enough for small white text (AA) */
  --line: rgba(28, 44, 110, .16);
  --line-strong: rgba(28, 44, 110, .32);
  --on-navy: #F6EFCB;
  --on-navy-muted: #B9BEDA;
  --salmon: #FF8A73;       /* red text on navy, readable contrast */
  --wa: #15803D;            /* WhatsApp green, darkened for AA contrast with white text */
  --ok: #157A43;
  --err: #C0182A;
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --serif: "Libre Baskerville", "Times New Roman", Georgia, serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-shell: 28px;
  --r-core: 22px;
  --r-input: 14px;
  --r-small: 12px;
  --header: 88px;
  --ease: cubic-bezier(.32, .72, 0, 1);        /* heavy, settles softly */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-pop: cubic-bezier(.2, 1.4, .4, 1);
  --shadow-soft: 0 24px 48px -24px rgba(28, 44, 110, .28);
  --shadow-lift: 0 30px 60px -28px rgba(28, 44, 110, .38);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--cream); scroll-padding-top: var(--header); -webkit-tap-highlight-color: rgba(211, 34, 42, .14); }
@media (pointer: fine) { html { overscroll-behavior: none; } }
body { margin: 0; font: 400 1.0625rem/1.65 var(--body); color: var(--ink); background: var(--cream); min-height: 100dvh; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a, button, input, select, textarea, label, summary { touch-action: manipulation; }
a { color: var(--navy); text-underline-offset: 3px; transition: color .25s var(--ease); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0 0 .5em; color: var(--navy); letter-spacing: -.012em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); }
h3 { font-size: 1.3rem; }
h1:focus, h2:focus { outline: none; }
h1:focus-visible, h2:focus-visible { outline: 3px solid var(--red); outline-offset: 6px; }
p { margin: 0 0 1em; text-wrap: pretty; }
.serif { font-family: var(--serif); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.skip { position: fixed; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 400; transition: top .2s var(--ease); }
.skip:focus { top: 12px; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { padding-top: var(--header); }
main:focus { outline: none; }
body[data-view="home"] main { padding-top: 0; }
.ssr { padding: 40px var(--gutter) 60px; max-width: var(--wrap); margin: 0 auto; }
.ssr nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.ph { flex: none; }

/* Faint drafting grid on the cream, like a drawing sheet (fixed layer, never repaints on scroll) */
.bg-grid { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  opacity: .3; }

/* ============ Buttons: pills with the icon nested in its own circle ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-height: 48px; padding: .4rem .45rem .4rem 1.35rem; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.15 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease); }
.btn:not(:has(.btn-ico)) { padding: .4rem 1.35rem; }
.btn > .ph:first-child { margin-left: -.25rem; }
.btn-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .18); transition: transform .5s var(--ease), background-color .4s var(--ease); }
.btn-ico .ph { width: 18px; height: 18px; }
.btn:hover .btn-ico { transform: translate(2px, -1px) scale(1.06); }
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 40px; font-size: .95rem; padding: .3rem .35rem .3rem 1.05rem; gap: .55rem; }
.btn-sm:not(:has(.btn-ico)) { padding: .3rem 1.05rem; }
.btn-sm .btn-ico { width: 30px; height: 30px; }
.btn-primary { background: var(--band-ui); color: #fff; box-shadow: 0 14px 28px -14px rgba(211, 34, 42, .65), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { color: #fff; box-shadow: 0 18px 34px -14px rgba(211, 34, 42, .8), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.btn-wa:hover { background: #126B33; color: #fff; }
.btn-ghost { background: rgba(255, 252, 236, .6); color: var(--navy); border-color: var(--line-strong); }
.btn-ghost .btn-ico { background: rgba(28, 44, 110, .08); }
.btn-ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.btn-ghost:hover .btn-ico { background: rgba(246, 239, 203, .16); }
.btn-light { background: var(--paper); color: var(--navy); box-shadow: var(--shadow-soft); }
.btn-light .btn-ico { background: var(--navy); color: var(--cream); }
.btn-light:hover { color: var(--red); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ============ Double bezel: outer shell + inner core ============ */
.bezel { padding: 6px; border-radius: var(--r-shell); background: rgba(28, 44, 110, .045); box-shadow: inset 0 0 0 1px rgba(28, 44, 110, .08); }
.core { border-radius: var(--r-core); background: var(--paper); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .9), 0 1px 2px rgba(28, 44, 110, .06); overflow: hidden; }
.bezel-navy { background: rgba(28, 44, 110, .14); }

.kicker { display: inline-flex; align-items: center; gap: .55rem; font: 600 .78rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--red);
  margin: 0 0 1.1rem; padding: .5rem .85rem; border-radius: 999px; background: rgba(211, 34, 42, .07); box-shadow: inset 0 0 0 1px rgba(211, 34, 42, .16); }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--band); }

/* ============ Top bar: floating island ============ */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 14px var(--gutter) 0; pointer-events: none; transition: transform .7s var(--ease), opacity .5s var(--ease), visibility 0s; }
/* Hidden (and out of the tab order) while the opening screen fills the view */
body[data-view="home"]:not(.past-splash):not(.menu-open) .topbar { transform: translateY(-140%); opacity: 0; visibility: hidden; transition: transform .7s var(--ease), opacity .5s var(--ease), visibility 0s .7s; }
.island { pointer-events: auto; position: relative; z-index: 2; max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 auto; height: 60px; display: flex; align-items: center; gap: 1rem;
  padding: 0 8px 0 12px; border-radius: 999px; background: rgba(255, 252, 236, .82); box-shadow: inset 0 0 0 1px rgba(28, 44, 110, .1), 0 18px 40px -22px rgba(28, 44, 110, .35);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
.progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; overflow: hidden; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--band); transform-origin: left; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .progress span { animation: grow linear both; animation-timeline: scroll(root block); }
}
@keyframes grow { to { transform: scaleX(1); } }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--navy); text-decoration: none; min-width: 0; }
.brand strong { display: block; font: 700 1.02rem/1 var(--serif); color: var(--red); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:hover { color: var(--navy); }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav ul a { display: block; color: var(--navy); text-decoration: none; font-weight: 500; padding: .5rem .85rem; border-radius: 999px; transition: background-color .35s var(--ease), color .35s var(--ease); }
.nav ul a:hover { background: rgba(28, 44, 110, .07); color: var(--navy); }
.nav ul a[aria-current] { background: var(--navy); color: var(--cream); }
.nav-wa { flex: none; }
.menu-btn { display: none; position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: var(--cream); cursor: pointer; margin-left: auto; flex: none; }
.bars { position: absolute; inset: 0; }
.bars i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .5s var(--ease); }
.bars i:first-child { top: 17px; } .bars i:last-child { top: 25px; }
.menu-open .bars i:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .bars i:last-child { transform: translateY(-4px) rotate(-45deg); }
/* Full-screen menu overlay (fixed, so the blur never repaints on scroll) */
.menu { pointer-events: auto; position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 2.5rem;
  padding: calc(var(--header) + 1rem) var(--gutter) calc(2rem + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
  background: rgba(252, 245, 203, .9); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); opacity: 0; transition: opacity .45s var(--ease); }
.menu[hidden] { display: none; }
.menu-open .menu { opacity: 1; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.menu ul a { display: inline-block; font: 600 clamp(2rem, 9vw, 3.2rem)/1.15 var(--display); color: var(--navy); text-decoration: none; padding: .15rem 0; }
.menu ul a[aria-current] { color: var(--red); }
.menu li, .menu-foot { opacity: 0; transform: translateY(2.5rem); transition: opacity .6s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i) * 55ms + 80ms); }
.menu-open .menu li, .menu-open .menu-foot { opacity: 1; transform: none; }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.menu-tel { display: inline-flex; align-items: center; gap: .5rem; font: 600 1.05rem var(--display); text-decoration: none; }
@media (max-width: 1080px) {
  .nav, .nav-wa { display: none; }
  .menu-btn { display: block; }
}
@media (max-width: 380px) { .brand strong { font-size: .9rem; } .brand img { width: 30px; height: 30px; } }

/* ============ Opening screen ============ */
.splash { position: relative; min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; overflow: hidden; view-timeline: --splash block;
  background: radial-gradient(circle at 50% 42%, #FFFBE3 0%, var(--cream) 55%, var(--cream-2) 100%); }
.splash::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, transparent 18%, #000 75%); mask-image: radial-gradient(circle at 50% 45%, transparent 18%, #000 75%); opacity: .55; }
.splash-inner { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(1.25rem, 3vw, 2rem); padding: 2rem var(--gutter); }
.splash-logo { width: clamp(140px, 30vmin, 260px); height: auto; overflow: visible; filter: drop-shadow(0 12px 28px rgba(28,44,110,.18)); }
.lg-fill { fill: #FFF9DA; }
.lg-ring { fill: none; stroke: var(--navy); stroke-width: 5; stroke-dasharray: 1.02; stroke-dashoffset: 0; }
.lg-ring2 { fill: none; stroke: var(--navy); stroke-width: 1.2; stroke-dasharray: 1.02; stroke-dashoffset: 0; }
.lg-a { fill: var(--red); transform-box: fill-box; transform-origin: center; }
.wordmark { margin: 0; text-align: center; font: 700 clamp(2.1rem, 7.6vw, 6.4rem)/1.08 var(--serif); color: var(--red); letter-spacing: .04em; }
.wordmark .w { display: inline-block; white-space: nowrap; }
.wordmark span span { display: inline-block; }
.splash-band { position: relative; background: var(--band); color: var(--on-navy); box-shadow: 0 -8px 24px rgba(211,34,42,.18); }
.scroll-cue { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1.15rem var(--gutter) calc(1.15rem + env(safe-area-inset-bottom)); color: #fff; text-decoration: none; font: 700 1.2rem var(--display); }
.scroll-cue:hover { color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .lg-fill { animation: fade .6s ease-out both; }
  .lg-ring { stroke-dashoffset: 1.02; animation: draw 1.1s .15s var(--ease) forwards; }
  .lg-ring2 { stroke-dashoffset: 1.02; animation: draw 1s .45s var(--ease) forwards; }
  .lg-a { animation: pop .7s .85s var(--ease-pop) both; }
  .wordmark span span { animation: letter .7s calc(1.05s + var(--i) * 45ms) var(--ease-out) both; }
  .splash-band { animation: band .8s 1.6s var(--ease) both; }
  .scroll-cue .ph { animation: nudge 1.8s 2.4s ease-in-out infinite; }
  /* The opening screen eases away as it scrolls out: CSS scroll timeline, no scroll listener */
  @supports (animation-timeline: view()) {
    .splash-inner { animation: splash-out linear both; animation-timeline: --splash; animation-range: exit 0% exit 70%; }
  }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.4) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes letter { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: none; } }
@keyframes band { from { transform: translateY(100%); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes splash-out { to { opacity: 0; transform: translateY(-70px) scale(.86); } }

/* ============ Hero ============ */
.hero { padding: calc(var(--header) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(3rem, 6vw, 5rem); scroll-margin-top: 0; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.status { display: inline-flex; align-items: center; gap: .6rem; font-size: .95rem; font-weight: 500; color: var(--navy); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: .4rem 1rem; margin-bottom: 1.6rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #1FAF56; }
@media (prefers-reduced-motion: no-preference) { .dot { animation: pulse 2.4s infinite; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,175,86,.5); } 70% { box-shadow: 0 0 0 10px rgba(31,175,86,0); } 100% { box-shadow: 0 0 0 0 rgba(31,175,86,0); } }
.hero-title { font-size: clamp(2.3rem, 3.7vw, 3.5rem); font-weight: 700; line-height: 1.04; letter-spacing: -.025em; margin-bottom: .5em; }
.hero-text { font-size: 1.2rem; line-height: 1.6; color: var(--muted); max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.1rem; }
/* The 3D model sits in a navy core inside the bezel, like the logo ring */
.hero-model { margin: 0; }
.hero-model .core { position: relative; aspect-ratio: 1 / 1; max-height: 600px;
  background: radial-gradient(closest-side, rgba(143,176,255,.18), transparent 75%), linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.12), var(--shadow-lift);
  --hud: #8FB0FF; --hud-hot: #F6EFCB; --mark: #F05A47; }
.hero-model .core::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--band); }
.hero-model figcaption { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 0 .25rem; font-size: .92rem; color: var(--muted); }
#hero-model { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#hero-model.grabbing, .item-canvas.grabbing { cursor: grabbing; user-select: none; }
.model-chips { position: absolute; left: 14px; right: 14px; bottom: 18px; display: flex; flex-wrap: wrap; gap: .4rem; }
.model-chips button { font: 600 .85rem var(--display); color: var(--on-navy); background: rgba(246,239,203,.08); border: 1px solid rgba(246,239,203,.28); border-radius: 999px; padding: .45rem .9rem; cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease); }
@media (max-width: 600px) {
  .hero-model .core { aspect-ratio: auto; }
  #hero-model { aspect-ratio: 1 / 1; height: auto; }
  .model-chips { position: static; padding: 0 12px 20px; }
}
.model-chips button:hover { background: rgba(246,239,203,.18); }
.model-chips button[aria-pressed="true"] { background: var(--band-ui); border-color: transparent; color: #fff; }
/* Stats as an inline strip, not cards */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: clamp(3rem, 6vw, 4.5rem) auto 0; }
.stats > div { padding: 1.4rem clamp(1rem, 2.5vw, 2rem) .2rem; border-top: 1px solid var(--line-strong); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .35rem; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: .98rem; max-width: 22em; }
.stats dd { margin: 0; font: 700 clamp(1.8rem, 3vw, 2.5rem)/1.05 var(--display); color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-model { max-width: 560px; width: 100%; justify-self: center; }
  .stats { grid-template-columns: 1fr; }
  .stats > div + div { border-left: 0; }
}

/* Reveal on scroll (IntersectionObserver adds .in) */
.js-reveal .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js-reveal .rv.in { opacity: 1; transform: none; }

/* ============ Sections ============ */
.sec { padding: clamp(5rem, 11vw, 9rem) 0; position: relative; }
.sec-cream2 { background: var(--cream-2); }
.sec-navy { background: linear-gradient(170deg, var(--navy) 0%, var(--navy-deep) 100%); color: var(--on-navy); }
.sec-navy h2, .sec-navy h3 { color: #fff; }
.sec-navy::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--band); }
.sec-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.sec-head > p:not(.kicker) { color: var(--muted); font-size: 1.15rem; max-width: 36em; }
.lead { font-size: 1.15rem; }
.sec-navy .lead { color: var(--on-navy-muted); }

/* ============ What we do: item selector ============ */
.viewer { display: grid; grid-template-columns: 260px 1fr; gap: clamp(1rem, 2.5vw, 2rem); align-items: start; }
.viewer-tabs { display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--header) + 12px); }
.viewer-tabs button { text-align: left; background: transparent; border: 0; border-radius: 999px; color: var(--navy); padding: .8rem 1.2rem; font: 500 1.08rem var(--display); cursor: pointer;
  transition: background-color .4s var(--ease), color .4s var(--ease), transform .4s var(--ease); }
.viewer-tabs button:hover { background: rgba(28, 44, 110, .07); }
.viewer-tabs button[aria-selected="true"] { background: var(--navy); color: var(--on-navy); transform: translateX(6px); }
.viewer-panel { display: grid; grid-template-columns: 1.3fr 1fr; min-height: 460px; }
.viewer-media { position: relative; overflow: hidden; min-height: 460px; --hud: #8FB0FF; --hud-hot: #F6EFCB; --mark: #F05A47; --hud-accent: #FFB199;
  background: radial-gradient(closest-side, rgba(143,176,255,.16), transparent 75%), linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); }
.viewer-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.item-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.viewer-media[data-mode="3d"] img { visibility: hidden; }
.viewer-media[data-mode="photo"] .item-canvas { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) { .viewer-media.swap img, .viewer-media.swap .item-canvas { animation: swapin .7s var(--ease) both; } }
@keyframes swapin { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.mode-toggle { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; background: rgba(18,29,77,.72); box-shadow: inset 0 0 0 1px rgba(246,239,203,.22); border-radius: 999px; padding: 4px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mode-toggle button { display: inline-flex; align-items: center; gap: .4rem; font: 600 .85rem var(--display); color: var(--on-navy); background: none; border: 0; border-radius: 999px; padding: .4rem .85rem; cursor: pointer; transition: background-color .35s var(--ease); }
.mode-toggle button:hover { background: rgba(246,239,203,.12); }
.mode-toggle button[aria-pressed="true"] { background: var(--band-ui); color: #fff; }
.viewer-body { padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.viewer-body h3 { font-size: clamp(1.6rem, 2.4vw, 2rem); }
.viewer-body > p { color: var(--muted); font-size: 1.08rem; }
.model-note { display: flex; align-items: center; gap: .45rem; font-size: .92rem; color: var(--muted); }
.viewer-body .btn { align-self: flex-start; margin-top: .75rem; }
@media (max-width: 1000px) {
  .viewer { grid-template-columns: 1fr; }
  .viewer-tabs { position: static; flex-direction: row; overflow-x: auto; padding: 2px 2px .5rem; scroll-snap-type: x proximity; scrollbar-width: thin; overscroll-behavior-x: contain; }
  .viewer-tabs button { white-space: nowrap; scroll-snap-align: start; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
  .viewer-tabs button[aria-selected="true"] { transform: none; }
}
@media (max-width: 700px) { .viewer-panel { grid-template-columns: 1fr; min-height: 0; } .viewer-media { min-height: 0; aspect-ratio: 1 / 1; } }

/* ============ How a job runs ============ */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.sticky { position: sticky; top: calc(var(--header) + 24px); }
.small-photo { margin: 2rem 0 0; padding: 6px; border-radius: var(--r-shell); background: rgba(246,239,203,.08); box-shadow: inset 0 0 0 1px rgba(246,239,203,.14); }
.small-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-core); }
.small-photo figcaption { font-size: .92rem; color: var(--on-navy-muted); padding: .8rem .9rem .5rem; }
.rail { list-style: none; margin: 0; padding: 0 0 0 3.25rem; position: relative; counter-reset: step; view-timeline: --rail block; }
.rail-line { position: absolute; left: 13px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: rgba(246,239,203,.18); }
.rail-fill { position: absolute; inset: 0; border-radius: 2px; background: linear-gradient(#EF4B3A, #D3222A); transform-origin: top; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rail-fill { animation: fill-down linear both; animation-timeline: --rail; animation-range: entry 30% exit 40%; }
  }
}
@keyframes fill-down { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.rail li { position: relative; counter-increment: step; padding: 0 0 2.75rem; }
.rail li:last-child { padding-bottom: 0; }
.rail .node { position: absolute; left: calc(-3.25rem + 5px); top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--navy-deep); border: 3px solid rgba(246,239,203,.35);
  transition: border-color .5s var(--ease), background-color .5s var(--ease), box-shadow .5s var(--ease), transform .5s var(--ease); }
.rail li.lit .node { border-color: #FFD3C7; background: var(--vermilion); box-shadow: 0 0 0 6px rgba(239,75,58,.18); transform: scale(1.08); }
.rail h3::before { content: counter(step, decimal-leading-zero) "  "; color: var(--salmon); font-variant-numeric: tabular-nums; white-space: pre; }
.rail h3 { transition: color .5s var(--ease); }
.rail li:not(.lit) h3 { color: var(--on-navy-muted); }
.rail p { color: var(--on-navy-muted); margin: 0; max-width: 36em; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .sticky { position: static; } }

/* ============ Why customers come back: bento ============ */
.bento { list-style: none; padding: 0; margin: clamp(2rem, 4vw, 3rem) 0 0; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(220px, auto); gap: 14px; }
.bento > li { border-radius: var(--r-shell); padding: clamp(1.4rem, 2.5vw, 2rem); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: .2rem; min-width: 0; }
.bento h3 { font-size: 1.35rem; margin: .9rem 0 .35rem; }
.bento p { margin: 0; color: var(--muted); }
.b-feature { grid-column: 1 / 7; grid-row: span 2; padding: 0 !important; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft); justify-content: flex-start !important; }
.b-feature img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; flex: 1 1 auto; min-height: 0; }
.b-text { padding: clamp(1.4rem, 2.5vw, 2rem); }
.b-text > .ph { color: var(--red); }
.b-figure { margin-top: 1rem !important; font: 700 clamp(2.4rem, 4vw, 3.4rem)/1 var(--display); color: var(--navy) !important; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.b-0 { grid-column: 7 / 13; background: linear-gradient(160deg, var(--navy), var(--navy-deep)); color: var(--on-navy); }
.b-0 h3 { color: #fff; } .b-0 p { color: var(--on-navy-muted); } .b-0 > .ph { color: var(--salmon); }
.b-1 { grid-column: 7 / 10; background: linear-gradient(160deg, #D3222A, #B51A22); color: #fff; }
.b-1 h3 { color: #fff; } .b-1 p { color: rgba(255, 249, 218, .92); } .b-1 > .ph { color: #FFF9DA; }
.b-2 { grid-column: 10 / 13; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.b-2 > .ph { color: var(--red); }
.bento > li > .ph { width: 40px; height: 40px; margin-bottom: auto; }
@media (max-width: 1000px) {
  .b-feature { grid-column: 1 / -1; grid-row: auto; }
  .b-0 { grid-column: 1 / -1; } .b-1 { grid-column: 1 / 7; } .b-2 { grid-column: 7 / 13; }
}
@media (max-width: 640px) { .bento > li { grid-column: 1 / -1 !important; } }

/* ============ Gallery: moving rows per group ============ */
.gal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.gal-head > div { max-width: 720px; }
.gal-head p:not(.kicker) { color: var(--muted); font-size: 1.15rem; margin: 0; }
.gal-head h2 { margin-bottom: .4em; }
.g-row { margin-bottom: 2.5rem; }
.g-row:last-child { margin-bottom: 0; }
.g-row-head { display: flex; align-items: baseline; gap: .9rem; margin-bottom: .75rem; }
.g-row-head h3 { margin: 0; font-size: 1.25rem; }
.g-row-head span { color: var(--muted); font-size: .95rem; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.marquee-track { list-style: none; margin: 0; padding: .5rem 0; display: flex; gap: 1rem; width: max-content; animation: marquee var(--speed, 60s) linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, [data-motion].paused .marquee-track { animation-play-state: paused; }
.marquee-track li { width: clamp(240px, 26vw, 360px); flex: none; }
@keyframes marquee { to { transform: translateX(calc(-50% - .5rem)); } }
.g-photo { display: block; width: 100%; padding: 5px; border: 0; border-radius: 22px; background: rgba(28, 44, 110, .06); box-shadow: inset 0 0 0 1px rgba(28,44,110,.08); cursor: zoom-in; }
.g-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 17px; transition: transform .8s var(--ease), filter .5s var(--ease); }
.g-photo:hover img, .g-photo:focus-visible img { transform: scale(.985); filter: saturate(1.1); }
.g-cap { margin: .55rem .35rem 0; font-size: .93rem; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; overscroll-behavior-x: contain; }
  .marquee-track { animation: none; padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
  .marquee-track li[aria-hidden="true"] { display: none; }
  .motion-toggle { display: none; }
}
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; color: #fff; overscroll-behavior: contain; }
.lightbox::backdrop { background: rgba(12, 18, 48, .94); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px 80px; }
.lightbox img { max-height: calc(100dvh - 180px); width: auto; border-radius: var(--r-core); box-shadow: 0 0 0 6px rgba(255, 252, 236, .1); }
.lightbox figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin-top: 1rem; color: var(--on-navy-muted); text-align: center; }
.lb-count { color: var(--salmon); font-variant-numeric: tabular-nums; }
.lb-group { color: var(--salmon); font-weight: 600; }
.lb-btn { position: fixed; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; display: grid; place-items: center; background: var(--paper); color: var(--navy); border: 0; border-radius: 50%; cursor: pointer; transition: transform .4s var(--ease), background-color .3s var(--ease); }
.lb-btn:hover { background: #fff; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close { position: fixed; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: .45rem; background: var(--band-ui); color: #fff; border: 0; border-radius: 999px; padding: .6rem 1.1rem; font: 600 1rem var(--body); cursor: pointer; }
@media (max-width: 600px) { .lightbox figure { padding: 70px 10px 100px; } .lb-btn { top: auto; bottom: 20px; transform: none; } }

/* ============ About: copy + stacked photo cascade ============ */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.prose { max-width: 40em; font-size: 1.1rem; }
.prose > p { color: #3A3F5C; }
.facts { display: flex; flex-wrap: wrap; margin: 2.25rem 0 0; border-top: 1px solid var(--line-strong); }
.facts > div { flex: 1 1 auto; padding: 1rem 1.25rem 0 0; }
.facts > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.facts dt { font-size: .9rem; color: var(--muted); }
.facts dd { margin: .15rem 0 0; font: 600 1.15rem var(--display); color: var(--navy); white-space: nowrap; }
.cascade { position: relative; min-height: 520px; }
.cascade figure { position: absolute; margin: 0; padding: 6px; border-radius: var(--r-shell); background: var(--paper); box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--line); width: 72%; }
.cascade img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--r-core); }
.c-back { top: 0; left: 0; transform: rotate(-2.5deg); }
.c-front { right: 0; bottom: 0; transform: rotate(2deg); }
@media (prefers-reduced-motion: no-preference) {
  .cascade figure { transition: transform .9s var(--ease); }
  .cascade:hover .c-back { transform: rotate(-4deg) translate(-8px, -6px); }
  .cascade:hover .c-front { transform: rotate(3deg) translate(8px, 6px); }
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .cascade { min-height: 0; display: grid; gap: 1rem; }
  .cascade figure { position: static; width: 100%; transform: none !important; }
  .cascade img { aspect-ratio: 4/3; }
}

/* ============ Founder: centred editorial ============ */
.founder { text-align: center; max-width: 760px; }
.founder-photo { width: 168px; height: 168px; margin: 0 auto 1.75rem; padding: 6px; border-radius: 50%; background: var(--band); box-shadow: var(--shadow-soft); }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: var(--paper); border: 4px solid var(--cream); }
.founder-photo .pending-logo { object-fit: contain; padding: 22px; }
.founder h2 { margin-bottom: .2em; }
.role { font: 600 1.05rem var(--display); color: var(--red); margin-bottom: 1.75rem; }
.founder .intro { font: 700 clamp(1.15rem, 1.9vw, 1.4rem)/1.55 var(--serif); color: var(--navy); }
.founder .story { color: #3A3F5C; font-size: 1.1rem; }
.pending { color: var(--muted); font-style: italic; }
.milestones { list-style: none; padding: 0; margin: clamp(3rem, 6vw, 4.5rem) 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; }
.milestones::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: var(--band); border-radius: 2px; }
.milestones li { position: relative; padding: 3rem 1.5rem 0 0; }
.milestones li::before { content: ""; position: absolute; left: 0; top: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--cream); border: 4px solid var(--navy); }
.milestones .yr { font: 700 1.9rem/1 var(--display); color: var(--navy); font-variant-numeric: tabular-nums; }
.milestones p { margin: .5rem 0 0; color: var(--muted); }
@media (max-width: 800px) {
  .milestones { grid-auto-flow: row; padding-left: 2rem; }
  .milestones::before { left: 9px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .milestones li { padding: 0 0 1.75rem 1rem; }
  .milestones li::before { left: -2rem; top: 4px; }
}

/* ============ Contact ============ */
.contact { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.25rem; align-items: start; }
.enquiry { padding: clamp(1.4rem, 3vw, 2.25rem); }
.enquiry h3 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.navy-card { background: linear-gradient(160deg, var(--navy), var(--navy-deep)); color: var(--on-navy); padding: clamp(1.4rem, 3vw, 2.25rem); position: relative; box-shadow: inset 0 1px 1px rgba(255,255,255,.1); }
.navy-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--band); }
.navy-card h3 { color: #fff; font-size: 1.5rem; }
.navy-card a:not(.btn) { color: #FFF9DA; }
.navy-card a:not(.btn):hover { color: #fff; }
.navy-card .btn { margin: .25rem 0 .5rem; }
.navy-card dl { margin: 0; }
.navy-card dt { display: flex; align-items: center; gap: .45rem; font: 600 .95rem var(--display); color: var(--salmon); margin-top: 1.2rem; }
.navy-card dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; flex: 1; min-width: 0; }
.row2 { display: flex; gap: 1rem; }
label { font-weight: 600; font-size: .95rem; color: var(--navy); }
input, select, textarea { font: inherit; color: var(--ink); background-color: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--r-input); padding: .8rem .95rem; width: 100%;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
textarea { resize: vertical; min-height: 7rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(28,44,110,.16); }
[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 4px rgba(192,24,42,.12); }
::placeholder { color: #6B6E85; }
.field-err { margin: 0; min-height: 0; font-size: .9rem; font-weight: 600; color: var(--err); }
.field-err:empty { display: none; }
.hp { position: absolute; left: -9999px; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.form-note { font-size: .92rem; color: var(--muted); margin: 1.1rem 0 0; }
.form-status { font-weight: 600; margin: .75rem 0 0; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--ok); } .form-status.err { color: var(--err); }
.map { margin-top: 1.25rem; }
.map .core { position: relative; }
.map iframe { display: block; width: 100%; height: 400px; border: 0; background: var(--cream-2); }
.map .btn { position: absolute; right: 14px; bottom: 14px; }
.map-switch { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; padding: 4px; border-radius: 999px; background: rgba(255, 252, 236, .92); box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); }
.map-switch button { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; color: var(--navy); font: 600 .92rem var(--body); padding: .5rem .95rem; border-radius: 999px; cursor: pointer; transition: background-color .35s var(--ease), color .35s var(--ease); }
.map-switch button:hover { background: rgba(28, 44, 110, .07); }
.map-switch button[aria-pressed="true"] { background: var(--navy); color: var(--cream); }
.map-addr { position: absolute; left: 14px; bottom: 14px; max-width: min(28rem, calc(100% - 15rem)); margin: 0; padding: .6rem .9rem; border-radius: var(--r-input); background: rgba(255, 252, 236, .94); box-shadow: var(--shadow-soft); font-size: .92rem; color: var(--ink); }
@media (max-width: 560px) { .map-addr { position: static; max-width: none; margin: 10px 10px 0; box-shadow: inset 0 0 0 1px var(--line); } }

/* Customer strip (About) */
.clients { margin-top: clamp(4rem, 8vw, 6rem); }
.clients-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.clients-head h3 { margin: 0; font-size: 1.3rem; }
.client-track { gap: 14px; align-items: stretch; }
.client-track li { width: auto; min-width: 200px; height: 96px; display: grid; place-items: center; padding: 0 2rem; border-radius: var(--r-core); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), 0 10px 24px -18px rgba(28,44,110,.4); }
.client-logo { max-height: 60px; width: auto; max-width: 180px; object-fit: contain; }
.client-name { font: 700 1.35rem/1 var(--display); color: var(--navy); letter-spacing: -.01em; white-space: nowrap; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .row2 { flex-direction: column; gap: 0; } .map iframe { height: 320px; } .map .btn { position: static; margin: 10px; } .form-actions .btn { width: 100%; } }

/* Page head (404) */
.phead { padding: calc(var(--header) + 3rem) 0 clamp(3rem, 7vw, 5rem); }
.phead h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.phead .lead { color: var(--muted); max-width: 42em; margin-bottom: 2rem; }

/* ============ Footer: cream with the card's red band underneath ============ */
.foot-main { background: var(--cream-2); border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; color: var(--ink); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
.foot h2 { font-size: 1.05rem; color: var(--red); margin: 0 0 .35rem; }
.foot .brand { margin-bottom: 1rem; }
.foot .brand strong { font-size: 1.25rem; }
.foot-band { background: var(--band); color: #FFF9DA; padding: 1.1rem 0 calc(1.2rem + env(safe-area-inset-bottom)); }
.foot-band a { color: #fff; }
.foot-band-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 2.5rem; font: 700 1.2rem var(--display); text-align: center; }
.foot-band-row p { margin: 0; }
.foot-base { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .foot-band { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); } }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; gap: 1.25rem; } }

/* Floating WhatsApp */
.wa-float { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff;
  display: grid; place-items: center; box-shadow: 0 16px 30px -12px rgba(18,29,77,.5), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .5s var(--ease), opacity .5s var(--ease); }
.wa-float .ph { width: 28px; height: 28px; }
.wa-float:hover { color: #fff; transform: scale(1.06); }
.wa-float[hidden] { display: none; }
body[data-view="home"]:not(.past-splash) .wa-float, .menu-open .wa-float { opacity: 0; pointer-events: none; transform: scale(.8); }

/* View transitions between pages */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .2s ease-out both; }
  ::view-transition-new(root) { animation: vt-in .45s var(--ease) both; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .rv { opacity: 1; transform: none; transition: none; }
  .menu li, .menu-foot, .menu, .topbar, .btn, .btn-ico { transition: none; }
}

/* ============ Admin ============ */
body[data-view="admin"] .foot, body[data-view="admin"] .bg-grid { display: none; }
.admin { padding-top: 2rem; padding-bottom: 6rem; }
.login-shell { max-width: 440px; margin: 4rem auto; }
.admin-login { padding: 2.25rem; display: grid; gap: .5rem; }
.admin-login h1 { font-size: 2rem; margin: .5rem 0 .25rem; }
.admin-login .btn { justify-self: start; margin-top: .25rem; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.admin-title { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-bar h1 { font-size: 1.9rem; margin: 0; }
.admin-bar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.live-badge { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #A3A6B8; }
.live-badge[data-state="live"] { color: var(--ok); } .live-badge[data-state="live"] i { background: #1FAF56; }
.live-badge[data-state="offline"] { color: var(--err); } .live-badge[data-state="offline"] i { background: var(--err); }
.admin-grid { display: grid; grid-template-columns: 230px 1fr; gap: 1.75rem; align-items: start; }
.admin-nav { display: flex; flex-direction: column; gap: 3px; position: sticky; top: calc(var(--header) + 16px); }
.admin-nav button { display: flex; align-items: center; justify-content: space-between; gap: .5rem; text-align: left; background: none; border: 0; color: var(--navy); padding: .65rem 1rem; font: 500 1rem var(--body); cursor: pointer; border-radius: 999px; transition: background-color .3s var(--ease), color .3s var(--ease); }
.admin-nav button:hover { background: rgba(28, 44, 110, .07); }
.admin-nav button[aria-current="page"] { background: var(--navy); color: var(--on-navy); }
.admin-nav button.dirty::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.count { min-width: 1.5rem; padding: 0 .4rem; border-radius: 999px; background: var(--band-ui); color: #fff; font-size: .8rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.count[hidden] { display: none; }
.admin-main { min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-head h2 { margin: 0; font-size: 1.6rem; }
.inline { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.inline select { width: auto; padding: .45rem .8rem; border-radius: 999px; }
.note { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-radius: var(--r-input); background: rgba(28,44,110,.06); color: var(--navy); }
.err-box { padding: 1rem 1.25rem; margin-bottom: 1rem; border-radius: var(--r-input); background: rgba(192,24,42,.07); box-shadow: inset 0 0 0 1px rgba(192,24,42,.3); color: var(--err); max-width: 820px; }
.err-box[hidden] { display: none; }
.err-box ul { margin: .25rem 0 0; padding-left: 1.25rem; }
.editor { display: grid; gap: .25rem; max-width: 820px; }
.hint-text { color: var(--muted); font-size: .88rem; }
.list-field { border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: var(--r-core); padding: 1.1rem; margin: 0 0 1.25rem; min-width: 0; background: rgba(255,252,236,.5); }
.list-field legend { font: 600 1.05rem var(--display); color: var(--navy); padding: 0 .4rem; }
.list-items { display: grid; gap: .6rem; margin-bottom: .9rem; }
.list-item { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-input); }
.list-item summary { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .9rem; cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; }
.list-item summary::-webkit-details-marker { display: none; }
.list-item summary > span { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; overflow-wrap: anywhere; }
.caret { color: var(--red); transition: transform .3s var(--ease); }
.list-item[open] > summary .caret { transform: rotate(90deg); }
.list-body { padding: 0 .9rem .5rem; }
.item-controls { display: flex; gap: .3rem; flex-shrink: 0; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line-strong); color: var(--navy); border-radius: 50%; cursor: pointer; transition: border-color .3s var(--ease), color .3s var(--ease); }
.icon-btn.flip .ph { transform: rotate(180deg); }
.icon-btn:hover:not([disabled]) { border-color: var(--red); color: var(--red); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.simple-item { display: flex; gap: .6rem; align-items: flex-start; }
.simple-item > :first-child { flex: 1; min-width: 0; }
.img-picker { display: flex; gap: 1rem; align-items: flex-start; }
.img-preview { width: 140px; aspect-ratio: 4/3; flex-shrink: 0; box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: var(--r-input); overflow: hidden; display: grid; place-items: center; background: #fff; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-picker label.btn { margin-right: .4rem; }
.img-meta { margin-top: .5rem; display: grid; gap: .2rem; font-size: .85rem; overflow-wrap: anywhere; }
.img-meta code { color: var(--muted); }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; margin-top: 1rem; background: linear-gradient(transparent, var(--cream) 30%); max-width: 820px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: .8rem 1.3rem; border-radius: 999px; background: var(--navy); color: var(--on-navy); font-weight: 600; max-width: calc(100vw - 32px);
  transition: opacity .4s var(--ease), transform .5s var(--ease); z-index: 300; box-shadow: var(--shadow-lift); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { box-shadow: inset 4px 0 0 #3FD27F, var(--shadow-lift); } .toast.err { background: var(--err); color: #fff; }
.enq-list { display: grid; gap: .9rem; }
.enq { padding: 1.2rem 1.35rem; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), inset 4px 0 0 var(--red); border-radius: var(--r-core); }
.enq.replied { box-shadow: inset 0 0 0 1px var(--line), inset 4px 0 0 var(--ok); } .enq.closed { box-shadow: inset 0 0 0 1px var(--line), inset 4px 0 0 var(--line-strong); opacity: .78; }
.enq header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.enq-side { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.enq header select { width: auto; padding: .4rem .8rem; border-radius: 999px; }
.enq h3 { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.enq header p { margin: .15rem 0 0; font-size: .92rem; }
.enq-item { font-weight: 600; color: var(--red); margin: .6rem 0 .3rem; }
.enq-msg { white-space: pre-wrap; color: var(--ink); overflow-wrap: anywhere; }
.enq-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill { display: inline-flex; align-items: center; padding: .2rem .7rem; margin: 0; border-radius: 999px; font-size: .82rem; font-weight: 600; background: rgba(28,44,110,.07); color: var(--muted); }
.pill.ok { background: rgba(21,122,67,.1); color: var(--ok); } .pill.err { background: rgba(192,24,42,.1); color: var(--err); } .pill.wait { background: rgba(239,75,58,.1); color: #A6321F; }
.empty { display: grid; justify-items: center; gap: .5rem; padding: 3rem 1rem; text-align: center; color: var(--muted); border-radius: var(--r-core); box-shadow: inset 0 0 0 1.5px var(--line); }
.empty p { margin: 0; max-width: 32em; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-card { padding: 1.3rem 1.4rem; background: var(--paper); border-radius: var(--r-core); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.stat-card.wide { grid-column: 1 / -1; }
.stat-card h3 { font-size: 1.15rem; }
.stat-card dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: .75rem 0 0; }
.stat-card dt { color: var(--muted); }
.stat-card dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dead-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.dead { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1rem; border-radius: var(--r-input); background: rgba(192,24,42,.05); }
.dead p { margin: .2rem 0 0; font-size: .92rem; }
.jobs { width: 100%; border-collapse: collapse; font-size: .95rem; }
.jobs th, .jobs td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.jobs th { font-weight: 600; color: var(--navy); }
.jobs td { font-variant-numeric: tabular-nums; }
.events { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; font-size: .92rem; }
.events li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.skeleton { display: grid; gap: .9rem; }
.sk-card { padding: 1.3rem; border-radius: var(--r-core); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: .6rem; }
.sk-card i { display: block; height: 14px; border-radius: 999px; background: linear-gradient(90deg, rgba(28,44,110,.07), rgba(28,44,110,.13), rgba(28,44,110,.07)); background-size: 200% 100%; }
.sk-card i:first-child { width: 40%; height: 18px; } .sk-card i:nth-child(2) { width: 75%; } .sk-card i:last-child { width: 55%; }
@media (prefers-reduced-motion: no-preference) { .sk-card i { animation: shimmer 1.4s linear infinite; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 860px) {
  .admin-grid, .status-grid { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; overscroll-behavior-x: contain; }
  .admin-nav button { white-space: nowrap; }
  .img-picker { flex-direction: column; }
  .jobs { display: block; overflow-x: auto; }
}
@media (max-width: 560px) {
  .facts { display: grid; grid-template-columns: 1fr 1fr; }
  .facts > div + div { border-left: 0; padding-left: 0; }
  .facts > div:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--line); }
}
