/* =========================================================
   Sachin Insurance Consultancy - styles
   Design read: trust-first local-business landing, Apple-clean.
   Dials: VARIANCE 6 / MOTION 4 / DENSITY 3.
   Accent: single bright blue (#0071e3). One radius scale.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --ink: #1d1d1f;
  --ink-soft: #55585f;
  --ink-mute: #86868b;
  --navy: #0a2540;
  --navy-2: #0d2f52;
  --accent: #2f86ec;
  --accent-strong: #1d6fd6;
  --accent-tint: #eaf4fe;
  --line: #e4e7ec;
  --danger: #c0362c;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-body);

  /* one radius scale (documented rule): cards 18, inputs 12, buttons pill */
  --r-card: 18px;
  --r-input: 12px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(10, 37, 64, .06), 0 1px 3px rgba(10, 37, 64, .05);
  --shadow-md: 0 10px 30px rgba(10, 37, 64, .10);
  --shadow-lg: 0 24px 60px rgba(10, 37, 64, .16);

  --maxw: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --surface: #14171e;
    --surface-2: #1b1f28;
    --ink: #f5f6f8;
    --ink-soft: #b9bec8;
    --ink-mute: #8a909c;
    --navy: #0a1220;
    --navy-2: #0f1a2c;
    --accent: #4c9bff;
    --accent-strong: #74b2ff;
    --accent-tint: #14243b;
    --line: #262b35;
    --danger: #ff8a80;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 12px 32px rgba(0,0,0,.5);
    --shadow-lg: 0 28px 64px rgba(0,0,0,.6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img, svg { display: block; max-width: 100%; }
address { font-style: normal; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
  margin: 0 0 .9rem;
}
.accent { color: var(--accent); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--r-input) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0,113,227,.28); }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); background: var(--surface); }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.brand-text em { font-style: normal; font-size: .72rem; color: var(--ink-mute); letter-spacing: .01em; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links > a:not(.btn) { color: var(--ink-soft); font-weight: 500; font-size: .98rem; }
.nav-links > a:not(.btn):hover { color: var(--ink); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line);
  border-radius: var(--r-input); cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); transition: .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); font-weight: 800; margin: 0 0 1.1rem; }
.hero-copy .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 34ch; margin: 0 0 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-note { margin: 1.6rem 0 0; font-size: .88rem; color: var(--ink-mute); max-width: 46ch; }

.hero-visual { position: relative; }
.portrait {
  margin: 0; background: linear-gradient(160deg, var(--navy), var(--navy-2));
  border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: flex-end;
}
.portrait-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 12vw, 7rem);
  color: rgba(255,255,255,.14); letter-spacing: .05em;
}
.portrait figcaption {
  position: relative; z-index: 1; padding: 1.2rem 1.3rem; color: #fff;
  background: linear-gradient(to top, rgba(4,15,28,.85), transparent);
  display: flex; flex-direction: column; line-height: 1.3;
}
.portrait figcaption strong { font-family: var(--font-display); font-size: 1.1rem; }
.portrait figcaption { font-size: .85rem; color: rgba(255,255,255,.8); }
.portrait-badge {
  position: absolute; top: 1rem; right: -.6rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r-input); padding: .7rem 1rem; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; text-align: center;
}
.portrait-badge .badge-num { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--accent); line-height: 1; }
.portrait-badge .badge-label { font-size: .72rem; color: var(--ink-mute); }

/* ---------- Stats band ---------- */
.stats { border-block: 1px solid var(--line); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(1.5rem, 4vw, 2.5rem) 1rem; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--ink); letter-spacing: -.02em; }
.stat-label { display: block; font-size: .88rem; color: var(--ink-mute); margin-top: .25rem; }

/* ---------- Section heads ---------- */
.section-head { max-width: 44ch; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head h2, .about-copy h2, .contact-copy h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; margin: 0 0 .8rem; }
.section-sub { font-size: 1.08rem; color: var(--ink-soft); margin: 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-copy p { color: var(--ink-soft); max-width: 60ch; }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .75rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .15rem; width: 1.25rem; height: 1.25rem;
  border-radius: var(--r-pill); background: var(--accent-tint) center / 62% no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071e3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.about-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.75rem; box-shadow: var(--shadow-sm); position: sticky; top: 96px;
}
.about-card h3 { font-size: 1.15rem; margin-bottom: .75rem; }
.about-card .addr { color: var(--ink-soft); margin-bottom: 1.25rem; }
.mini-contact { margin: 0; display: grid; gap: .8rem; }
.mini-contact div { display: flex; flex-direction: column; }
.mini-contact dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.mini-contact dd { margin: 0; font-weight: 500; }

/* ---------- Services (bento) ---------- */
.services { background: var(--surface-2); }
.services-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.svc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.svc h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.svc p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.svc-icon {
  width: 3rem; height: 3rem; border-radius: var(--r-input); display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent); margin-bottom: 1rem;
}
.svc-icon svg { width: 1.6rem; height: 1.6rem; }
/* feature tile spans 2 cols and pairs with a solid accent feel */
.svc-feature {
  grid-column: span 2; grid-row: span 1;
  background: linear-gradient(155deg, var(--navy), var(--navy-2)); color: #fff; border-color: transparent;
}
.svc-feature h3 { color: #fff; font-size: 1.5rem; }
.svc-feature p { color: rgba(255,255,255,.82); max-width: 42ch; }
.svc-feature .svc-icon { background: rgba(255,255,255,.12); color: #fff; }
.svc-feature .svc-link { color: #cfe4ff; }
.svc-feature .svc-link:hover { color: #ffffff; }
.services-foot { margin: 1.75rem 0 0; color: var(--ink-soft); }
.svc-link {
  display: inline-flex; align-items: center; gap: .35rem; margin-top: .9rem;
  font-weight: 600; font-size: .92rem;
}
.svc-link::after { content: "\2192"; transition: transform .2s ease; }
.svc:hover .svc-link::after { transform: translateX(3px); }

/* ---------- Categories we cover ---------- */
.cover-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.cover-col {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-sm);
}
.cover-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: .6rem;
  font-size: 1.25rem; padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line);
}
.cover-ic { flex: none; width: 2.2rem; height: 2.2rem; border-radius: var(--r-input); background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.cover-ic svg { width: 1.25rem; height: 1.25rem; }
.cover-count {
  margin-left: auto; font-family: var(--font-body); font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute);
}
.chips { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.chips li {
  position: relative; padding: .7rem .9rem .7rem 2.3rem;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-input);
  font-weight: 500; font-size: .96rem;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.chips li::before {
  content: ""; position: absolute; left: .8rem; top: 1.02rem; width: .45rem; height: .45rem;
  border-radius: var(--r-pill); background: var(--accent);
}
.chips li:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--surface); }
.chips li em { display: block; font-style: normal; font-size: .84rem; font-weight: 400; color: var(--ink-mute); margin-top: .1rem; }

/* ---------- Claims / outsourcing ---------- */
.claims { background: linear-gradient(165deg, var(--navy), var(--navy-2)); color: #fff; }
.claims-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.claims h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: .9rem; }
.claims .eyebrow { color: #7ab8ff; }
.claims p { color: rgba(255,255,255,.82); max-width: 52ch; }
.claims strong { color: #fff; }
.claims .btn-ghost { color: #fff; border-color: rgba(255,255,255,.32); }
.claims .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); color: #fff; }
.claims-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.claims-list li {
  display: flex; flex-direction: column; gap: .2rem;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-input); padding: 1.05rem 1.2rem;
  /* ponytail: alpha over the navy section resolves to ~#c9ced6 — linter's contrast warning ignores the gradient behind it */
  font-size: .93rem; color: rgba(255,255,255,.85); line-height: 1.5;
  transition: transform .2s ease, background .2s ease;
}
.claims-list li:hover { transform: translateY(-3px); background: rgba(255,255,255,.11); }
.claims-list strong { font-family: var(--font-display); font-size: 1.04rem; color: #fff; font-weight: 600; }

/* ---------- Associated agencies ---------- */
.partners { background: var(--surface-2); }
.partner-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.partner {
  display: flex; flex-direction: column; gap: .15rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.partner:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.partner-mark {
  width: 2.5rem; height: 2.5rem; margin-bottom: .8rem; border-radius: var(--r-input);
  display: grid; place-items: center; background: var(--accent-tint); color: var(--accent);
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
}
.partner-logo {
  height: 56px; width: 100%; max-width: 220px; margin: 0 0 1rem;
  display: grid; place-items: center; padding: .55rem .8rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
/* px max-height: the grid row is auto, so % max-height on the img would resolve
   to auto (circular) and let a tall logo (LIC emblem) overflow the box.
   Usable height = 56px - 17.6px padding - 2px border ≈ 36px. */
.partner-logo img { max-width: 100%; max-height: 36px; object-fit: contain; }
.partner-name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.partner-kind { font-size: .8rem; color: var(--ink-mute); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-actions { display: grid; gap: .75rem; margin: 1.75rem 0; }
.contact-row {
  display: flex; align-items: center; gap: 1rem; padding: .95rem 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-input);
  color: var(--ink); transition: border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.contact-row:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--ink); }
.contact-row span:last-child { display: flex; flex-direction: column; font-size: .85rem; color: var(--ink-mute); line-height: 1.35; }
.contact-row span:last-child strong { font-family: var(--font-display); font-size: 1.02rem; color: var(--ink); font-weight: 600; }
.contact-ic { flex: none; width: 2.6rem; height: 2.6rem; border-radius: var(--r-pill); background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.contact-ic svg { width: 1.35rem; height: 1.35rem; }
.contact-addr { color: var(--ink-soft); }

/* form */
.contact-form-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow-md); }
.contact-form h3 { font-size: 1.35rem; margin-bottom: 1.25rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-weight: 500; font-size: .92rem; }
.field .req { color: var(--accent); }
.field .opt { color: var(--ink-mute); font-weight: 400; }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-input);
  padding: .8rem .95rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; cursor: pointer; padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 1.1rem;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
/* reserve error-line space so validation feedback never reflows the form card */
.err { color: var(--danger); font-size: .82rem; margin: 0; min-height: 1em; }
.err:empty { min-height: 0; }
.form-status { margin: 1rem 0 0; font-size: .95rem; }
.form-status.success { color: var(--accent-strong); font-weight: 600; }
.form-status.error { color: var(--danger); }
/* Honeypot: visually hidden but NOT display:none (bots often skip display:none
   fields, so we hide it off-screen instead). Any submission with a filled
   "company" value is spam — filter it out in the Netlify dashboard. */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}
#submit-btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.85); padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; padding-bottom: 2rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand strong { display: block; font-family: var(--font-display); color: #fff; }
.footer-brand span { font-size: .85rem; color: rgba(255,255,255,.65); }
.footer-brand img { display: block; }
.footer-contact { display: flex; flex-direction: column; gap: .3rem; text-align: right; }
.footer-contact a { color: #fff; }
.footer-contact span { font-size: .88rem; color: rgba(255,255,255,.65); }
.footer-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.25rem; margin-top: .5rem;
  font-size: .82rem; color: rgba(255,255,255,.6);
}

/* ---------- Awards gallery ---------- */
.gallery-intro { padding-block: clamp(3.25rem, 7vw, 5.5rem) 2.25rem; }
.gallery-intro-inner { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.gallery-intro h1 { max-width: 12ch; font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; margin-bottom: .8rem; }
.gallery-intro .section-sub { max-width: 52ch; }
.gallery-count { flex: none; padding-bottom: .4rem; color: var(--ink-mute); font-size: .9rem; }
.gallery-count strong { color: var(--ink); font-family: var(--font-display); font-size: 1.4rem; }
.gallery-section { padding-block: 1.5rem clamp(4rem, 8vw, 7rem); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; align-items: start; }
.gallery-item { min-width: 0; margin: 0; }
.gallery-image {
  position: relative;
  display: grid; place-items: center; height: 330px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
}
.gallery-image img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.gallery-image img:not(.loaded) { opacity: 0; }
.gallery-image img.loaded { opacity: 1; transition: transform .35s ease, opacity .3s ease; }
.gallery-image:hover img { transform: scale(1.025); }
/* per-frame loader: a small spinner centred in each tile until its image is ready */
.gallery-image::after {
  content: ""; position: absolute; width: 22px; height: 22px;
  margin: auto; left: 0; right: 0; top: 0; bottom: 0;
  border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: img-spin .8s linear infinite; pointer-events: none;
}
.gallery-image.loaded::after { display: none; }
@keyframes img-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gallery-image::after { animation: none; } }
.gallery-item figcaption { padding: .8rem .1rem 0; }
.gallery-item figcaption strong { display: block; font-family: var(--font-display); font-size: 1rem; line-height: 1.35; }
.gallery-item figcaption span { display: block; margin-top: .25rem; color: var(--ink-mute); font-size: .82rem; }
.gallery-home-link { color: var(--ink); }
.gallery-home-link:hover { color: var(--accent); }

/* ---------- Motion (MOTION 5) ----------
   Rule: only transform + opacity are ever animated, so every effect below stays
   on the compositor and never triggers layout or paint on scroll. */
.reveal {
  opacity: 0; transform: translate3d(0, 24px, 0);
  transition: opacity .55s ease, transform .65s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* stagger: --d is set once per group by script.js, not per frame */
.chips .reveal { transform: translate3d(-14px, 0, 0); }
.partner.reveal, .svc.reveal { transform: translate3d(0, 28px, 0) scale(.985); }

/* hero ambient glow: one composited element, transform-only keyframes */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -18%; left: 42%; width: 46rem; height: 46rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent) 0%, transparent 62%);
  border-radius: var(--r-pill); pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1); }
  to   { transform: translate3d(6%, 5%, 0) scale(1.12); }
}

/* header condenses once the hero is scrolled past */
.site-header { transition: height .25s ease, box-shadow .25s ease, background .25s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(10, 37, 64, .09); }
.site-header.scrolled .nav { height: 62px; }
.nav { transition: height .25s ease; }

/* nav scroll-spy underline */
.nav-links > a:not(.btn) { position: relative; }
.nav-links > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.35rem; height: 2px;
  background: var(--accent); border-radius: var(--r-pill);
  transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.nav-links > a:not(.btn):hover::after,
.nav-links > a[aria-current="true"]::after { transform: scaleX(1); }
.nav-links > a[aria-current="true"] { color: var(--ink); }

/* stat count-up holds its own width so the band never reflows mid-animation */
.stat-num { font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; margin-inline: auto; width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .services-bento { grid-template-columns: repeat(2, 1fr); }
  .svc-feature { grid-column: span 2; }
  .cover-grid { grid-template-columns: 1fr; }
  .claims-inner { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .hero::before { width: 30rem; height: 30rem; left: 20%; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem; box-shadow: var(--shadow-md);
    transform: translateY(-140%); transition: transform .3s ease; visibility: hidden;
  }
  .nav-links.open { transform: none; visibility: visible; }
  .nav-links > a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: .9rem; }
  .nav-toggle { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .services-bento { grid-template-columns: 1fr; }
  .svc-feature { grid-column: span 1; }
  .partner-grid { grid-template-columns: 1fr; }
  .cover-count { margin-left: 0; width: 100%; }
  .footer-contact { text-align: left; }
  .gallery-intro-inner { align-items: start; flex-direction: column; gap: 1rem; }
  .gallery-intro h1 { max-width: none; }
  .gallery-grid { grid-template-columns: 1fr; gap: 1.7rem; }
  .gallery-image { height: min(82vw, 400px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .chips .reveal, .partner.reveal, .svc.reveal { opacity: 1; transform: none; transition: none; }
  .btn, .svc, .contact-row, .chips li, .claims-list li, .partner { transition: none; }
  .gallery-image img { transition: none; }
  .hero::before { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
