/* Kersani Global — public site
   Brand colours/fonts are injected as CSS variables from Admin → Settings. */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --ink: #f4f4f5;
  --muted: rgba(255, 255, 255, .74);
  --radius: 10px;
  --radius-lg: 18px;
  --wrap: 1200px;
  --gutter: clamp(18px, 4vw, 40px);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, .8);
  --grid-line: rgba(255, 255, 255, .05);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--secondary); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.h2 { font-size: clamp(1.65rem, 2.6vw, 2.25rem); font-weight: 600; }
.h3 { font-size: 1.35rem; font-weight: 600; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.lead--dark { color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tint { background: var(--surface); }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 6px; z-index: 100; }
.skip:focus { top: 12px; }
.empty { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px;
  background: var(--primary); color: var(--on-primary);
  border: 2px solid var(--primary); border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--on-primary); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.link-arrow { font-family: var(--font-head); font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 2px solid currentColor; padding-bottom: 2px; }

/* ---------- Top bar (company registration, every page) ---------- */
.topbar { background: var(--topbar); font-family: var(--font-head); font-size: .8rem; font-weight: 700; letter-spacing: .01em; }
.topbar .wrap { padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.topbar a:hover { color: var(--primary); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .55); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 96px; gap: 24px; transition: min-height .25s ease; }
.is-scrolled .header-row { min-height: 72px; }
.brand { text-decoration: none; flex-shrink: 0; display: block; }
.brand img { height: 72px; width: auto; transition: height .25s ease; }
.is-scrolled .brand img { height: 54px; }
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--ink); }

/* Desktop menu */
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 13px;
  font-family: var(--font-head); font-weight: 700; font-size: .84rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; position: relative; white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.nav-link:hover, .nav-item:focus-within > .nav-link { color: var(--primary); }
.nav-item.is-active > .nav-link { color: var(--primary); }
.nav-item.is-active > .nav-link::after, .nav-link:hover::after { transform: scaleX(1); }
.nav-caret { width: 12px; height: 12px; transition: transform .2s ease; }
.has-sub:hover > .nav-link .nav-caret, .has-sub:focus-within > .nav-link .nav-caret { transform: rotate(180deg); }
.sub-toggle { display: none; }

.sub {
  position: absolute; top: 100%; left: 50%; padding-top: 12px; z-index: 70;
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.sub-list {
  list-style: none; margin: 0; padding: 8px; width: 320px;
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--primary);
  border-radius: 4px 4px 12px 12px; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .6);
}
.sub-list--wide { width: 600px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.sub-link { display: block; padding: 11px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); border-left: 2px solid transparent; transition: background .15s, border-color .15s; }
.sub-link:hover, .sub-link:focus-visible { background: var(--surface); border-left-color: var(--primary); }
.sub-label { display: flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 600; font-size: .95rem; line-height: 1.3; }
.sub-link:hover .sub-label { color: var(--primary); }
.sub-label .ext { width: 11px; height: 11px; opacity: .7; flex-shrink: 0; }
.sub-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: .82rem; line-height: 1.45; color: var(--muted); text-align: left; }
/* Keep the last dropdowns inside the screen */
.nav-item:nth-last-child(-n+2) > .sub { left: auto; right: 0; transform: translate(0, 8px); }
.nav-item:nth-last-child(-n+2):hover > .sub, .nav-item:nth-last-child(-n+2):focus-within > .sub { transform: translate(0, 0); }
.nav-mobile-foot { display: none; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); width: 46px; height: 46px; cursor: pointer; border-radius: 10px; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); margin: 0 auto; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] { border-color: var(--primary); }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); background: var(--primary); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); background: var(--primary); }

@media (max-width: 1100px) and (min-width: 961px) { .nav-link { padding: 0 9px; font-size: .8rem; } .nav-link::after { left: 9px; right: 9px; } }

/* Mobile menu */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .header-row, .is-scrolled .header-row { min-height: 72px; }
  .brand img, .is-scrolled .brand img { height: 50px; }
  .site-nav {
    position: fixed; inset: var(--nav-top, 72px) 0 0 0; z-index: 60; background: var(--bg);
    display: flex; flex-direction: column; padding: 8px var(--gutter) 24px; overflow-y: auto; overscroll-behavior: contain;
    border-top: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; }
  .nav-link { flex: 1; height: 58px; padding: 0 2px; font-size: 1rem; }
  .nav-link::after, .nav-caret { display: none; }
  .nav-item.is-active > .nav-link { box-shadow: inset 3px 0 0 var(--primary); padding-left: 14px; }
  .sub-toggle { display: grid; place-items: center; width: 48px; height: 48px; background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
  .sub-toggle span { width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s; margin-top: -4px; }
  .sub-toggle[aria-expanded="true"] { border-color: var(--primary); }
  .sub-toggle[aria-expanded="true"] span { transform: rotate(-135deg); margin-top: 4px; border-color: var(--primary); }
  .sub, .nav-item:nth-last-child(-n+2) > .sub { position: static; width: 100%; padding: 0 0 12px; opacity: 1; visibility: visible; transform: none; display: none; transition: none; }
  .sub.is-open { display: block; }
  .sub-list, .sub-list--wide { width: 100%; display: block; padding: 6px; box-shadow: none; border-radius: 10px; border-top-width: 1px; border-left: 3px solid var(--primary); }
  .sub-link { padding: 12px; }
  .sub-desc { -webkit-line-clamp: 1; }
  .nav-mobile-foot { display: grid; gap: 10px; margin-top: auto; padding-top: 28px; }
  .nav-mobile-foot a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; text-align: center; }
  .nav-mobile-foot a:first-child { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 960px) {
  .has-sub:hover > .sub, .has-sub:focus-within > .sub,
  .nav-item:nth-last-child(-n+2):hover > .sub, .nav-item:nth-last-child(-n+2):focus-within > .sub { transform: none; left: auto; right: auto; }
}
/* Same mobile menu when the menu items don't fit on a wider screen (set by site.js) */
html.nav-mobile .nav-toggle { display: block; }
html.nav-mobile .header-row, html.nav-mobile .is-scrolled .header-row { min-height: 72px; }
html.nav-mobile .brand img, html.nav-mobile .is-scrolled .brand img { height: 50px; }
html.nav-mobile .site-nav {
    position: fixed; inset: var(--nav-top, 72px) 0 0 0; z-index: 60; background: var(--bg);
    display: flex; flex-direction: column; padding: 8px var(--gutter) 24px; overflow-y: auto; overscroll-behavior: contain;
    border-top: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
html.nav-mobile .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
html.nav-mobile .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
html.nav-mobile .nav-item { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; }
html.nav-mobile .nav-link { flex: 1; height: 58px; padding: 0 2px; font-size: 1rem; }
html.nav-mobile .nav-link::after, html.nav-mobile .nav-caret { display: none; }
html.nav-mobile .nav-item.is-active > .nav-link { box-shadow: inset 3px 0 0 var(--primary); padding-left: 14px; }
html.nav-mobile .sub-toggle { display: grid; place-items: center; width: 48px; height: 48px; background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
html.nav-mobile .sub-toggle span { width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s; margin-top: -4px; }
html.nav-mobile .sub-toggle[aria-expanded="true"] { border-color: var(--primary); }
html.nav-mobile .sub-toggle[aria-expanded="true"] span { transform: rotate(-135deg); margin-top: 4px; border-color: var(--primary); }
html.nav-mobile .sub, html.nav-mobile .nav-item:nth-last-child(-n+2) > .sub { position: static; width: 100%; padding: 0 0 12px; opacity: 1; visibility: visible; transform: none; display: none; transition: none; }
html.nav-mobile .sub.is-open { display: block; }
html.nav-mobile .sub-list, html.nav-mobile .sub-list--wide { width: 100%; display: block; padding: 6px; box-shadow: none; border-radius: 10px; border-top-width: 1px; border-left: 3px solid var(--primary); }
html.nav-mobile .sub-link { padding: 12px; }
html.nav-mobile .sub-desc { -webkit-line-clamp: 1; }
html.nav-mobile .nav-mobile-foot { display: grid; gap: 10px; margin-top: auto; padding-top: 28px; }
html.nav-mobile .nav-mobile-foot a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; text-align: center; }
html.nav-mobile .nav-mobile-foot a:first-child { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
html.nav-mobile body.nav-open { overflow: hidden; }



html.nav-mobile .has-sub:hover > .sub, html.nav-mobile .has-sub:focus-within > .sub,
html.nav-mobile .nav-item:nth-last-child(-n+2):hover > .sub, html.nav-mobile .nav-item:nth-last-child(-n+2):focus-within > .sub { transform: none; left: auto; right: auto; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 78% 45%, rgba(var(--primary-rgb), .10), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 112px);
}
.hero-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-grid .hero-media { order: -1; }
.hero-kicker { font-family: var(--font-head); font-weight: 600; font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--primary); margin: 0 0 14px; }
.hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 700; line-height: 1.14;
  letter-spacing: -.022em; max-width: 21ch; margin-bottom: 22px;
}
.hero .lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.hero-media { margin: 0; position: relative; }
.hero-media img { width: 100%; border-radius: 4px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .hero-media { order: -1; max-width: 520px; }
}

/* ---------- Why Kersani ---------- */
.why-head { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; padding-bottom: 44px; margin-bottom: 52px; border-bottom: 1px solid var(--line); }
.why-head .h2 { margin: 0; }
.why-index { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.why-index li { font-family: var(--font-head); font-weight: 500; padding: 7px 0 7px 22px; position: relative; break-inside: avoid; }
.why-index a { color: var(--ink); text-decoration: none; }
.why-index a:hover { color: var(--primary); text-decoration: underline; }
.why-item { scroll-margin-top: 110px; }
.why-index li::before { content: ""; position: absolute; left: 0; top: 15px; width: 10px; height: 10px; background: var(--primary); border-radius: 2px; }

.why-row { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.why-row + .why-row { margin-top: clamp(56px, 7vw, 96px); }
.why-row--flip { grid-template-columns: 1.3fr .7fr; }
.why-media { margin: 0; }
.why-media img { width: 100%; border-radius: var(--radius-lg); }
.why-media--stack { display: grid; gap: 18px; }
.why-media--stack figure { margin: 0; }
.why-items { display: grid; gap: 30px; }
.why-row--flip .why-items { grid-template-columns: 1fr 1fr; gap: 32px 36px; }
.why-item { border-top: 2px solid var(--primary); padding-top: 16px; }
.why-item h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.why-item p { color: var(--muted); margin: 0; }
@media (max-width: 860px) {
  .why-head, .why-row, .why-row--flip { grid-template-columns: 1fr; }
  .why-row--flip .why-media--stack { order: -1; grid-template-columns: 1fr 1fr; }
  .why-row--flip .why-items { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .why-index { columns: 1; } }

/* ---------- Section heads ---------- */
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.section-head--split { max-width: none; display: flex; align-items: end; gap: 12px 28px; flex-wrap: wrap; }
.section-head--split .sh-copy { flex: 1 1 420px; }

/* ---------- Services band (home) ---------- */
.svc-band { background: var(--surface); }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.svc-tile {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--ink);
  transition: border-color .2s, transform .2s;
}
.svc-tile:hover { border-color: var(--primary); transform: translateY(-3px); color: var(--ink); }
.svc-img { aspect-ratio: 4 / 3; background: var(--surface); display: grid; place-items: center; padding: 18px; }
.svc-img img { max-height: 100%; width: auto; object-fit: contain; }
.svc-body { padding: 20px 22px 24px; display: grid; gap: 6px; }
.svc-title { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
.svc-sum { color: var(--muted); font-size: .95rem; line-height: 1.55; }
@media (max-width: 1024px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---------- Home gallery ---------- */
.hg-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 16vw, 220px); gap: 12px; }
.hg-item { display: block; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.hg-item:first-child { grid-column: span 2; grid-row: span 2; }
.hg-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hg-item:hover img { transform: scale(1.04); }
@media (max-width: 760px) { .hg-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; } .hg-item:first-child { grid-column: 1 / -1; } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--surface); color: var(--ink); border-block: 1px solid var(--line); padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: linear-gradient(90deg, transparent 30%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.cta-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.cta-band .h2 { color: inherit; }
.cta-band p { font-size: 1.12rem; max-width: 60ch; color: var(--muted); margin-bottom: 28px; }
.cta-media { margin: 0; }
.cta-media img { width: 100%; border-radius: var(--radius-lg); }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } .cta-media { max-width: 420px; } }

/* ---------- Inner page hero ---------- */
.page-hero {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--surface);
  padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.page-hero-sub { color: var(--muted); font-size: 1.12rem; max-width: 64ch; margin: 12px 0 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }
.svc-hero { display: grid; grid-template-columns: 1fr minmax(220px, 380px); gap: 40px; align-items: center; }
.svc-hero-media { margin: 0; }
.svc-hero-media img { width: 100%; max-height: 300px; object-fit: contain; }
@media (max-width: 760px) { .svc-hero { grid-template-columns: 1fr; } .svc-hero-media { max-width: 280px; } }

/* ---------- Split (about / services) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.split--top { align-items: start; }
.split-copy p { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.split-media { margin: 0; }
.split-media img { width: 100%; border-radius: var(--radius-lg); }
.about-lead { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.18; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.area-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.area-list li { border-bottom: 1px solid var(--line); }
.area-list a { display: grid; gap: 4px; padding: 20px 44px 20px 0; text-decoration: none; position: relative; }
.area-list a::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px;
  border-top: 2px solid var(--primary); border-right: 2px solid var(--primary); transform: translateY(-50%) rotate(45deg); transition: right .2s;
}
.area-list a:hover::after { right: 2px; }
.area-title { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; color: var(--ink); }
.area-list a:hover .area-title { color: var(--primary); }
.area-sum { color: var(--muted); font-size: .98rem; }

/* ---------- Vision / mission ---------- */
.vm { background: var(--surface); }
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.vm-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 44px); }
.vm-card p { color: var(--muted); }
.vm-card--accent { border-top: 4px solid var(--primary); }
.vm-card:first-child { border-top: 4px solid var(--secondary); }
.vm-img { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
@media (max-width: 860px) { .vm-grid { grid-template-columns: 1fr; } }

/* ---------- Service items ---------- */
.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.item-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.item-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 26px 26px; overflow: hidden; }
.item-card--banner { padding-top: 0; }
.item-banner { margin: 0 -26px 22px; aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden; }
.item-banner img { width: 100%; height: 100%; object-fit: cover; }
.item-icon { width: 88px; height: 88px; display: grid; place-items: center; margin-bottom: 16px; }
.item-icon img { width: 88px; height: 88px; object-fit: contain; }
.item-initial { width: 64px; height: 64px; display: grid; place-items: center; border: 2px solid var(--primary); border-radius: 14px; font-family: var(--font-head); font-weight: 700; font-size: 1.8rem; color: var(--primary); }
.item-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; }
.item-card p { color: var(--muted); margin: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ticks li { overflow-wrap: anywhere; }
/* Two columns only when the card is wide enough (each column at least ~12rem) */
.ticks--cols { display: block; columns: 2 12rem; column-gap: 24px; }
.ticks--cols li { break-inside: avoid; margin-bottom: 6px; }
.ticks li { position: relative; padding-left: 22px; color: var(--muted); line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 9px; height: 5px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
@media (max-width: 1024px) { .item-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .item-grid, .item-grid--wide { grid-template-columns: 1fr; } }


.more-head { margin-bottom: 20px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.more-link { display: grid; gap: 4px; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s; }
.more-link:hover { border-color: var(--primary); }
.more-title { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.more-sum { color: var(--muted); font-size: .92rem; line-height: 1.5; }
@media (max-width: 860px) { .more-grid { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.g-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 36px; }
.tabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs button {
  border: 0; background: none; cursor: pointer; padding: 10px 20px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--line); color: var(--ink); }
.tabs .count { font-weight: 500; color: var(--muted); margin-left: 4px; }
.year-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 16px; font: inherit; font-size: .92rem; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--primary); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.year-group + .year-group { margin-top: 52px; }
.year-label { font-size: 1.05rem; font-weight: 600; color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 16px; }
.year-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 22px; }
.album-card { text-decoration: none; color: var(--ink); display: block; }
.album-cover { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.album-card:hover .album-cover img { transform: scale(1.05); }
.album-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 2px 0; }
.album-title { font-family: var(--font-head); font-weight: 600; }
.album-card:hover .album-title { color: var(--primary); }
.album-n { color: var(--muted); font-size: .9rem; white-space: nowrap; }


.album-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.album-pager a { text-decoration: none; font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.album-pager a:hover { color: var(--primary); }
.album-pager a span { display: block; font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--muted); }
.pg-older { text-align: right; }
.pg-all { border: 1px solid var(--line); padding: 10px 18px; border-radius: 999px; }
@media (max-width: 560px) { .album-pager { grid-template-columns: 1fr 1fr; } .pg-all { grid-column: 1 / -1; grid-row: 2; text-align: center; } }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.video-card { margin: 0; }
.video-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #0d1117; display: block; }
.video-card video { width: 100%; aspect-ratio: 16 / 9; background: #0d1117; border-radius: var(--radius); object-fit: contain; }
.video-card figcaption { font-family: var(--font-head); font-weight: 500; padding-top: 10px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 6vw, 72px); align-items: start; }
.contact-img { width: 100%; max-height: 280px; object-fit: contain; object-position: left center; border-radius: var(--radius-lg); margin-bottom: 28px; }
.contact-info address { font-style: normal; color: var(--muted); font-size: 1.05rem; margin-bottom: 24px; }
.contact-list { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-list div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted); font-size: .92rem; }
.contact-list dd { margin: 0; font-weight: 600; word-break: break-word; }
.contact-form-wrap { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); scroll-margin-top: 100px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 18px; margin-top: 18px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.field.has-err input, .field.has-err textarea { border-color: #f87171; }
.err { color: #f87171; font-size: .9rem; margin: 6px 0 0; }
.form .btn { justify-self: start; }
.notice { border-radius: var(--radius); padding: 18px 20px; margin-top: 14px; }
.notice p { margin: 0 0 .4em; }
.notice--ok { background: var(--card); border-left: 4px solid #4ade80; }
.notice--err { background: rgba(248, 113, 113, .12); border-left: 4px solid #f87171; color: #fecaca; }

.map iframe { display: block; width: 100%; height: 380px; border: 0; filter: grayscale(1) invert(.9) contrast(.85); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: rgba(255, 255, 255, .68); font-size: .97rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.3fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.f-logo { height: 46px; width: auto; margin-bottom: 18px; }
.f-reg { font-size: .85rem; color: rgba(255, 255, 255, .5); }
.f-h { font-size: 1rem; color: #fff; font-weight: 600; margin-bottom: 14px; }
.f-links, .f-social { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.f-addr { font-style: normal; line-height: 1.75; }
.f-social { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.f-base { border-top: 1px solid rgba(255, 255, 255, .1); }
.f-base .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; padding-bottom: 24px; font-size: .88rem; flex-wrap: wrap; }
.f-base p { margin: 0; }
.f-base strong { color: #fff; font-weight: 600; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 22px; }
.proj-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.proj-media { text-decoration: none; aspect-ratio: 16 / 9; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.proj-media img { width: 100%; height: 100%; object-fit: cover; }
.proj-media { position: relative; background:
  linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px, var(--surface); }
.proj-initial { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: .08em; color: var(--primary);
  padding: 10px 22px; border: 2px solid var(--primary); border-radius: 10px; }
.proj-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.proj-body .proj-client { color: var(--primary); font-size: .9rem; font-weight: 600; margin: 0; }
.proj-title { font-size: 1.3rem; font-weight: 600; margin: 0; }
.proj-body p { color: var(--muted); margin: 0; }
.proj-body .btn { margin-top: auto; align-self: flex-start; }
.proj-body .btn-wrap { margin-top: auto; padding-top: 14px; }

/* ---------- Justified body text ---------- */
main p, .prose li {
  text-align: justify; text-justify: inter-word;
  hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word;
}
/* …except short labels, captions, notices and centred items */
main p.hero-kicker, main p.proj-client, main p.empty, main p.err, main p.hint, main .notice p,
main .album-meta p, main .crumbs, main .lb-cap, main .video-card p { text-align: left; hyphens: manual; }

/* ---------- Custom pages (rich text) ---------- */
.prose { max-width: 78ch; font-size: 1.07rem; line-height: 1.75; }
.prose > * + * { margin-top: 1em; }
.prose p { margin: 0; color: var(--ink); opacity: .92; }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 1.6em 0 .2em; }
.prose h3 { font-size: 1.3rem; margin: 1.4em 0 .2em; }
.prose h4 { font-size: 1.1rem; margin: 1.2em 0 .2em; color: var(--primary); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0; }
.prose li { margin: .35em 0; }
.prose ul li::marker { color: var(--primary); }
.prose a { color: var(--primary); }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--primary); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; } .prose .ql-align-justify { text-align: justify; }
.prose .ql-size-small { font-size: .85em; } .prose .ql-size-large { font-size: 1.3em; } .prose .ql-size-huge { font-size: 1.7em; }
.prose .ql-indent-1 { padding-left: 2em; } .prose .ql-indent-2 { padding-left: 4em; }

/* ---------- Media grid (albums: photos + videos) ---------- */
.g-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.g-filter .chip span { opacity: .7; margin-left: 4px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); grid-auto-flow: dense; gap: 12px; }
.m-item { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: zoom-in; isolation: isolate; }
.m-item[hidden] { display: none; }

@media (max-width: 520px) { .media-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.m-item img, .m-item video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease, filter .3s; }
.m-item:hover img, .m-item:hover video, .m-item:focus-visible img { transform: scale(1.04); }
.m-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .45)); opacity: 0; transition: opacity .3s; pointer-events: none; }
.m-item:hover::after { opacity: 1; }
.m-item--video, .m-item--youtube { cursor: pointer; }
.m-item--video::after, .m-item--youtube::after { opacity: 1; }
.m-play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 62px; height: 62px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
  transition: transform .25s ease;
}
.m-play svg { width: 26px; height: 26px; margin-left: 3px; }
.m-item:hover .m-play { transform: translate(-50%, -50%) scale(1.1); }
.m-dur { position: absolute; z-index: 2; right: 10px; bottom: 10px; font-size: .8rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .6); padding: 2px 8px; border-radius: 6px; }
.m-dur:empty { display: none; }

.album-badge { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px 4px 7px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .8rem; font-weight: 700; }
.album-badge svg { width: 14px; height: 14px; color: var(--primary); }
.album-cover { position: relative; }

/* Videos tab */
.video-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 26px 22px; }
.vcard { margin: 0; }
.vcard .m-item { aspect-ratio: 16 / 9; }
.vcard figcaption { display: grid; gap: 2px; padding-top: 12px; }
.vcard-title { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.vcard-album { color: var(--primary); font-size: .9rem; text-decoration: none; }
.vcard-album:hover { text-decoration: underline; }

/* ---------- Viewer ---------- */
.lb { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr auto auto; color: #fff;
  background: rgba(3, 12, 13, .97); backdrop-filter: blur(6px); }
.lb[hidden] { display: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; }
.lb-info { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.lb-album { font-family: var(--font-head); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { color: rgba(255, 255, 255, .65); font-size: .9rem; white-space: nowrap; }
.lb-tools { display: flex; gap: 6px; }
.lb-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; text-decoration: none; }
.lb-btn:hover { background: rgba(255, 255, 255, .18); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-btn[hidden] { display: none; }
.lb.is-playing .lb-slide { background: var(--primary); color: var(--on-primary); }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 0 70px; touch-action: pan-y; }
.lb-media { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
.lb-media img, .lb-media video { max-width: 100%; max-height: calc(100vh - 210px); object-fit: contain; border-radius: 6px; opacity: 0; transition: opacity .25s ease; user-select: none; }
.lb-media video { background: #000; width: min(100%, 1280px); }
.lb-media iframe { width: min(100%, 1280px); aspect-ratio: 16 / 9; max-height: calc(100vh - 210px); border: 0; border-radius: 6px; }
.lb-media .is-in { opacity: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; z-index: 2; }
.lb-nav:hover { background: var(--primary); color: var(--on-primary); }
.lb-nav svg { width: 24px; height: 24px; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-spin { position: absolute; width: 38px; height: 38px; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb-cap { text-align: center; padding: 10px 16px 4px; color: rgba(255, 255, 255, .85); min-height: 34px; }
.lb-strip { display: flex; gap: 6px; padding: 8px 14px 14px; overflow-x: auto; scrollbar-width: thin; justify-content: safe center; }
.lb-strip[hidden] { display: none; }
.lb-thumb { flex: 0 0 auto; width: 70px; height: 50px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #111; cursor: pointer; opacity: .55; position: relative; transition: opacity .2s, border-color .2s; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb:hover { opacity: .9; }
.lb-thumb.is-on { opacity: 1; border-color: var(--primary); }
.lb-thumb.is-video::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z' fill='white'/%3E%3C/svg%3E") center / 20px no-repeat; }
.lb-thumb-v { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; }
.lb-thumb-v svg { width: 18px; }
.lb:fullscreen { background: #000; }
@media (max-width: 640px) {
  .lb-stage { padding: 0 6px; }
  .lb-nav { top: auto; bottom: 8px; transform: none; width: 46px; height: 46px; }
  .lb-media img, .lb-media video, .lb-media iframe { max-height: calc(100vh - 230px); }
  .lb-full { display: none; }
  .lb-thumb { width: 56px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) { .m-item img, .m-item video, .lb-media img { transition: none; } }
