/* =========================================================
   Dr Sachin's Dental Clinic — Design tokens & base styles
   ========================================================= */

:root {
  /* Accent (tweakable) */
  --accent: #7A9A8A;
  --accent-soft: color-mix(in oklab, var(--accent) 12%, #ffffff);
  --accent-ink: color-mix(in oklab, var(--accent) 70%, #1a1a1a);

  /* Neutrals — warm off-white base */
  --bg: #FAF7F2;
  --bg-alt: #F2ECE2;
  --surface: #FFFFFF;
  --ink: #1F2320;
  --ink-2: #4A4F4B;
  --ink-3: #8A8F8B;
  --line: #E8E2D6;
  --line-soft: #EFEAE0;

  /* Type */
  --font-heading: 'DM Sans', system-ui, sans-serif;
  --font-body: 'Nunito', 'Inter', system-ui, -apple-system, sans-serif;

  /* Radii & shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(24, 28, 26, 0.04), 0 2px 8px rgba(24, 28, 26, 0.04);
  --shadow-md: 0 4px 16px rgba(24, 28, 26, 0.06), 0 12px 40px rgba(24, 28, 26, 0.06);
  --shadow-lg: 0 20px 60px rgba(24, 28, 26, 0.12);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(72px, 10vw, 140px);
}

[data-theme="dark"] {
  --bg: #14171A;
  --bg-alt: #1B1F22;
  --surface: #1F2428;
  --ink: #F1EEE8;
  --ink-2: #C9C6BF;
  --ink-3: #8F938E;
  --line: #2A2F33;
  --line-soft: #232729;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35), 0 12px 40px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  width: 100%;
}
body.menu-locked {
  position: fixed;
  width: 100%;
  overflow: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: var(--section-y) 0; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  will-change: transform;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px color-mix(in oklab, var(--accent) 35%, transparent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px color-mix(in oklab, var(--accent) 45%, transparent);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn .arrow {
  transition: transform 0.25s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.over-hero {
  color: #fff;
}
.site-header.over-hero .brand,
.site-header.over-hero .nav-links a { color: #fff; }
.site-header.over-hero .nav-links a:hover { color: rgba(255,255,255,0.75); }
.site-header.over-hero .menu-toggle { border-color: rgba(255,255,255,0.35); color: #fff; }
.site-header.scrolled {
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-soft);
  color: var(--ink);
}
.site-header.scrolled .brand { color: var(--ink); }
.site-header.scrolled .nav-links a { color: var(--ink-2); }
.site-header.scrolled .nav-links a:hover { color: var(--ink); }
.site-header.scrolled .menu-toggle { border-color: var(--line); color: var(--ink); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 14px;
}
.nav-links {
  display: flex; gap: 32px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a { position: relative; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: inline-flex; }
.nav-cta .btn { padding: 12px 20px; font-size: 14px; }

.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* Mobile nav open — header itself becomes the full-screen overlay */
.site-header.nav-open {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  padding: 0;
  animation: menuFadeIn 0.25s ease;
  overflow-y: auto;
}
.site-header.nav-open .nav-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: none;
  margin: 0;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter)
           max(28px, calc(env(safe-area-inset-bottom) + 16px));
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "brand  toggle"
    "links  links"
    "cta    cta";
  gap: 0;
  align-items: center;
  justify-items: center;
}
.site-header.nav-open .brand {
  grid-area: brand;
  justify-self: start;
  color: var(--ink);
}
.site-header.nav-open .menu-toggle {
  grid-area: toggle;
  justify-self: end;
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.site-header.nav-open .nav-links {
  grid-area: links;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: static;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  font-family: var(--font-heading);
  width: 100%;
  max-width: 360px;
  align-self: center;
}
.site-header.nav-open .nav-links a {
  padding: 18px 0;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  width: 100%;
  text-align: center;
  display: block;
}
.site-header.nav-open .nav-links a:last-child { border-bottom: none; }
.site-header.nav-open .nav-links a:active { color: var(--accent-ink); }
.site-header.nav-open .nav-cta {
  grid-area: cta;
  display: inline-flex;
  position: static;
  transform: none;
  justify-self: center;
  align-self: end;
}
@keyframes menuFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: 0;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #1b1f1d;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1b1f1d;
  transform: scale(1.05);
  animation: heroZoom 18s ease-out forwards;
}
@media (max-width: 860px) {
  .hero-bg {
    background-position: 65% center;
  }
}
/* Portrait phones — cover full hero, anchor to upper-center to keep subject visible */
@media (max-width: 540px) and (orientation: portrait) {
  .hero-bg {
    background-size: cover;
    background-position: 65% 25%;
    background-repeat: no-repeat;
  }
}
@keyframes heroZoom {
  from { transform: scale(1.12); }
  to { transform: scale(1.0); }
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,14,12,0.45) 0%, rgba(10,14,12,0.35) 45%, rgba(10,14,12,0.8) 100%);
}
@media (max-width: 540px) and (orientation: portrait) {
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(10,14,12,0.3) 0%, rgba(10,14,12,0.5) 40%, rgba(10,14,12,0.92) 65%, rgba(10,14,12,1) 100%);
  }
}
.hero-inner {
  position: relative;
  width: 100%;
  padding-bottom: clamp(60px, 10vh, 120px);
  padding-top: 140px;
}
.hero-eyebrow {
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}
.hero-eyebrow::before { background: rgba(255,255,255,0.7); }
.hero-title {
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.98;
  color: #fff;
  max-width: 14ch;
  margin-bottom: 28px;
}
.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: color-mix(in oklab, var(--accent) 50%, #fff);
}
.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(255,255,255,0.82);
  max-width: 52ch;
  margin-bottom: 36px;
  line-height: 1.55;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-ctas .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.35); }
.hero-ctas .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }

.hero-meta {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(60px, 10vh, 120px);
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  text-align: right;
  line-height: 1.7;
  display: none;
}
@media (min-width: 1000px) { .hero-meta { display: block; } }

.hero-meta strong { color: #fff; display: block; font-weight: 600; font-size: 14px; }

/* Hero variants */
.hero[data-variant="split"] { align-items: center; background: var(--bg); color: var(--ink); }
.hero[data-variant="split"] .hero-bg { display: none; }
.hero[data-variant="split"] .hero-scrim { display: none; }
.hero[data-variant="split"] .hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
  padding: 140px 0 80px;
}
.hero[data-variant="split"] .hero-title { color: var(--ink); }
.hero[data-variant="split"] .hero-title em { color: var(--accent-ink); }
.hero[data-variant="split"] .hero-sub { color: var(--ink-2); }
.hero[data-variant="split"] .hero-eyebrow { color: var(--accent-ink); }
.hero[data-variant="split"] .hero-eyebrow::before { background: var(--accent); }
.hero[data-variant="split"] .hero-ctas .btn-ghost { color: var(--ink); border-color: var(--line); }
.hero[data-variant="split"] .hero-ctas .btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); background: transparent; }
.hero-image-right {
  display: none;
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero[data-variant="split"] .hero-image-right { display: block; }
.hero-image-right img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .hero[data-variant="split"] .hero-inner { grid-template-columns: 1fr; }
  .hero-image-right { display: none !important; }
}

.hero[data-variant="centered"] { background: var(--bg); color: var(--ink); text-align: center; align-items: center; }
.hero[data-variant="centered"] .hero-bg { display: none; }
.hero[data-variant="centered"] .hero-scrim { display: none; }
.hero[data-variant="centered"] .hero-inner { padding: 140px 0 40px; display: flex; flex-direction: column; align-items: center; }
.hero[data-variant="centered"] .hero-title { color: var(--ink); max-width: 16ch; }
.hero[data-variant="centered"] .hero-title em { color: var(--accent-ink); }
.hero[data-variant="centered"] .hero-sub { color: var(--ink-2); margin-left: auto; margin-right: auto; }
.hero[data-variant="centered"] .hero-eyebrow { color: var(--accent-ink); }
.hero[data-variant="centered"] .hero-eyebrow::before { background: var(--accent); }
.hero[data-variant="centered"] .hero-ctas { justify-content: center; }
.hero[data-variant="centered"] .hero-ctas .btn-ghost { color: var(--ink); border-color: var(--line); }
.hero-image-below {
  display: none;
  width: 100%;
  max-width: 1200px;
  aspect-ratio: 16/7;
  margin: 40px auto 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero[data-variant="centered"] .hero-image-below { display: block; }
.hero-image-below img { width: 100%; height: 100%; object-fit: cover; }
.hero[data-variant="centered"] .hero-meta { display: none !important; }

/* =========================================================
   Section headers
   ========================================================= */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(24px, 4vw, 80px);
  margin-bottom: clamp(40px, 6vw, 72px);
  align-items: end;
}
.section-head h2 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.section-head h2 em { font-style: italic; font-weight: 300; color: var(--accent-ink); }
.section-head p { color: var(--ink-2); font-size: 17px; margin: 0; max-width: 55ch; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* =========================================================
   About
   ========================================================= */
.about { background: var(--bg); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
}
.about-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.about-visual img { width: 100%; height: 100%; object-fit: cover; }
.about-badge {
  position: absolute;
  left: -20px; bottom: 32px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 14px;
  font-size: 14px;
}
.about-badge .num { font-family: var(--font-heading); font-size: 32px; color: var(--accent-ink); line-height: 1; font-weight: 500; }
.about-badge .lbl { color: var(--ink-2); line-height: 1.3; }

.about-body h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.about-body h2 em { font-style: italic; font-weight: 300; color: var(--accent-ink); }
.about-body p {
  color: var(--ink-2);
  font-size: 17px;
  margin: 0 0 18px;
  max-width: 52ch;
}
.about-sign {
  margin-top: 32px;
  display: flex; align-items: center; gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.about-sign .sig {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
}
.about-sign .who { font-size: 13px; color: var(--ink-3); }

@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-badge { left: 20px; } }

/* =========================================================
   Services
   ========================================================= */
.services { background: var(--bg-alt); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.service {
  background: var(--surface);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 280px;
  transition: background 0.3s ease;
  cursor: pointer;
  position: relative;
}
.service:hover { background: color-mix(in oklab, var(--accent) 5%, var(--surface)); }
.service-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-ink);
  transition: transform 0.3s ease;
}
.service:hover .service-icon { transform: scale(1.05); }
.service-icon svg { width: 24px; height: 24px; }
.service h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-heading);
}
.service p { color: var(--ink-2); font-size: 15px; margin: 0; flex: 1; }
.service-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent-ink);
  transition: gap 0.2s ease;
}
.service:hover .service-link { gap: 10px; }
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Why Us
   ========================================================= */
.why { background: var(--bg); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-item {
  padding: 32px 28px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-num {
  font-family: var(--font-heading);
  font-size: 28px; font-weight: 500;
  color: var(--accent-ink);
  display: block; margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.why-item h4 { font-size: 17px; font-weight: 600; margin-bottom: 8px; font-family: var(--font-heading); }
.why-item p { font-size: 14px; color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Stats
   ========================================================= */
.stats {
  background: var(--ink);
  color: #fff;
  padding: clamp(60px, 8vw, 100px) 0;
}
[data-theme="dark"] .stats { background: var(--accent); color: #fff; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.stat { text-align: left; }
.stat-num {
  font-family: var(--font-heading);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 10px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-num .unit { font-size: 0.5em; color: color-mix(in oklab, var(--accent) 70%, #fff); margin-left: 4px; font-weight: 300; }
.stat-lbl { color: rgba(255,255,255,0.65); font-size: 14px; }
@media (max-width: 860px) { .stats-grid { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   Testimonials
   ========================================================= */
.testimonials { background: var(--bg-alt); }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testi-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 34px 32px;
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 20px;
  min-height: 260px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testi-stars { display: inline-flex; gap: 2px; color: var(--accent); }
.testi-quote { font-size: 16px; color: var(--ink); line-height: 1.6; flex: 1; }
.testi-who {
  display: flex; align-items: center; gap: 12px;
  padding-top: 20px; border-top: 1px solid var(--line-soft);
}
.testi-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  font-family: var(--font-heading);
}
.testi-name { font-size: 14px; font-weight: 600; }
.testi-role { font-size: 12px; color: var(--ink-3); }
@media (max-width: 860px) { .testi-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Gallery
   ========================================================= */
.gallery { background: var(--bg); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.gallery-item {
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  background: var(--bg-alt);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
  display: block;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.45));
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item::before {
  content: '';
  position: absolute;
  bottom: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231F2320' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center/16px no-repeat;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2;
  pointer-events: none;
}
.gallery-item:hover::before {
  opacity: 1;
  transform: translateY(0);
}

/* Featured (hero) tiles - first two */
.g-1, .g-2 {
  grid-column: span 6;
  height: 420px;
}
/* Standard tiles - 3 per row */
.g-3, .g-4, .g-5, .g-6, .g-7, .g-8 {
  grid-column: span 4;
  height: 280px;
}

/* Tablet: 6-col layout */
@media (max-width: 1000px) {
  .gallery-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .g-1, .g-2 { grid-column: span 6; height: 360px; }
  .g-3, .g-4, .g-5, .g-6, .g-7, .g-8 { grid-column: span 3; height: 240px; }
}

/* Mobile: single column for full image visibility */
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .g-1, .g-2, .g-3, .g-4, .g-5, .g-6, .g-7, .g-8 {
    grid-column: span 1;
    height: 260px;
  }
  .g-1, .g-2 { height: 300px; }
  .gallery-item::before {
    opacity: 1;
    transform: translateY(0);
    width: 32px; height: 32px;
    bottom: 10px; right: 10px;
  }
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 18, 16, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.lightbox.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}
.lightbox-stage {
  position: relative;
  width: min(90vw, 1100px);
  height: min(85vh, 800px);
  height: min(85dvh, 800px);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  transition: opacity 0.2s ease;
  -webkit-user-drag: none;
}
.lightbox-img.switching {
  opacity: 0;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.22);
  transform: rotate(90deg);
}

/* Navigation arrows */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

/* Counter */
.lightbox-counter {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.08);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 10;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
  .lightbox-stage {
    width: 96vw;
    height: 80vh;
    height: 80dvh;
  }
  .lightbox-close {
    top: 14px;
    right: 14px;
    width: 40px; height: 40px;
  }
  .lightbox-nav {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.18);
  }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-counter {
    top: 18px;
    font-size: 12px;
    padding: 6px 14px;
  }
}

/* =========================================================
   Contact
   ========================================================= */
.contact { background: var(--bg-alt); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: stretch;
}
.contact-info {
  display: flex; flex-direction: column; gap: 28px;
}
.contact-info h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.contact-info h2 em { font-style: italic; font-weight: 300; color: var(--accent-ink); }
.contact-info > p { color: var(--ink-2); font-size: 17px; margin: 0 0 8px; max-width: 44ch; }
.contact-methods { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.contact-method {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  transition: border-color 0.25s ease;
}
.contact-method:hover { border-color: var(--accent); }
.contact-method .ic {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-method .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 4px; }
.contact-method .val { font-size: 15px; color: var(--ink); line-height: 1.5; }

.contact-map {
  border-radius: var(--r-md);
  overflow: hidden;
  height: 200px;
  border: 1px solid var(--line-soft);
}
.contact-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.2) contrast(0.95); }

.contact-form {
  background: var(--surface);
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}
.contact-form h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: var(--font-heading);
}
.contact-form > p { color: var(--ink-3); font-size: 14px; margin: 0 0 26px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  font-weight: 600;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.contact-form .btn { width: 100%; margin-top: 6px; }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--ink);
  color: #E8E4DA;
  padding: 80px 0 32px;
}
[data-theme="dark"] .footer { background: #0C0F10; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-brand h3 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 14px;
  font-family: var(--font-heading);
  font-weight: 500;
}
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 14px; max-width: 36ch; margin: 0 0 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.75);
  transition: all 0.2s;
}
.footer-social a:hover { border-color: var(--accent); color: #fff; background: var(--accent); }

.footer-col h5 {
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-hours li { font-size: 14px; color: rgba(255,255,255,0.6); display: flex; justify-content: space-between; gap: 12px; }
.footer-hours li span:last-child { color: rgba(255,255,255,0.85); }

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* =========================================================
   Mobile Optimization - Premium Phone UI
   ========================================================= */
@media (max-width: 768px) {
  /* Improve touch targets */
  .btn {
    padding: 14px 24px;
    font-size: 14px;
    min-height: 44px;
    min-width: 44px;
  }

  /* Better form field spacing */
  .field {
    margin-bottom: 20px;
  }

  .field input, .field select, .field textarea {
    padding: 16px 14px;
    font-size: 16px;
    border-radius: var(--r-md);
  }

  .field label {
    font-size: 11px;
    margin-bottom: 10px;
  }

  /* Improve contact method spacing */
  .contact-method {
    padding: 20px 16px;
    gap: 14px;
  }

  .contact-method .ic {
    width: 44px;
    height: 44px;
  }

  /* Better service card padding */
  .service {
    padding: 32px 24px;
    min-height: 260px;
  }

  /* Improve testimonial cards */
  .testi-card {
    padding: 28px 24px;
  }

  /* Better hero spacing */
  .hero-title {
    font-size: clamp(36px, 7vw, 64px);
  }

  .hero-sub {
    font-size: clamp(14px, 1.2vw, 16px);
  }

  /* Improve section head on mobile */
  .section-head {
    grid-template-columns: 1fr;
    margin-bottom: clamp(30px, 5vw, 60px);
  }

  .section-head h2 {
    font-size: clamp(28px, 4vw, 42px);
  }

  /* Better footer spacing */
  .footer-grid {
    gap: 32px;
  }

  /* Improve nav items spacing */
  .nav-links {
    gap: 20px;
    font-size: 13px;
  }

  /* Better why items spacing */
  .why-item {
    padding: 28px 24px;
  }

  /* Better about badge positioning */
  .about-badge {
    left: 16px;
    bottom: 24px;
    padding: 16px 18px;
  }

  .about-badge .num {
    font-size: 28px;
  }

  .about-badge .lbl {
    font-size: 12px;
  }

  /* Contact form improvements */
  .contact-form {
    padding: clamp(24px, 4vw, 36px);
  }

  .contact-form h3 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .contact-form > p {
    font-size: 13px;
  }

  /* Better gallery on mobile */
  .gallery-grid {
    gap: 10px;
    grid-auto-rows: 120px;
  }

  /* Hero CTA buttons better spacing */
  .hero-ctas {
    gap: 10px;
  }

  .hero-ctas .btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  /* Stat cards more readable */
  .stat-num {
    font-size: clamp(36px, 5vw, 52px);
  }

  .stat-lbl {
    font-size: 13px;
  }

  /* Why num better sizing */
  .why-num {
    font-size: 24px;
  }

  .why-item h4 {
    font-size: 15px;
  }

  .why-item p {
    font-size: 13px;
  }
}

/* Extra small phones - 320px and up */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 13px;
    gap: 8px;
  }

  .hero-title {
    font-size: clamp(28px, 6.5vw, 48px);
    margin-bottom: 20px;
  }

  .hero-sub {
    font-size: clamp(13px, 1.1vw, 14px);
    margin-bottom: 28px;
    max-width: 45ch;
  }

  .service {
    padding: 28px 20px;
    min-height: 240px;
  }

  .service h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .service p {
    font-size: 14px;
  }

  .service-link {
    font-size: 12px;
  }

  .testi-card {
    padding: 24px 20px;
    min-height: 280px;
    gap: 16px;
  }

  .testi-quote {
    font-size: 14px;
    line-height: 1.5;
  }

  .testi-name {
    font-size: 13px;
  }

  .testi-role {
    font-size: 11px;
  }

  .why-item {
    padding: 24px 18px;
  }

  .why-item h4 {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .why-item p {
    font-size: 12px;
  }

  .contact-info > div:first-child {
    margin-bottom: 20px;
  }

  .contact-info h2 {
    font-size: clamp(24px, 4vw, 36px);
  }

  .contact-form {
    padding: 20px;
  }

  .contact-form h3 {
    font-size: 18px;
  }

  .field label {
    font-size: 10px;
    margin-bottom: 8px;
  }

  .field input, .field select, .field textarea {
    padding: 14px 12px;
    font-size: 16px;
  }

  .field-row {
    gap: 10px;
  }

  .footer-brand h3 {
    font-size: 18px;
  }

  .footer-col h5 {
    font-size: 11px;
    margin-bottom: 14px;
  }

  .footer-col a,
  .footer-col li {
    font-size: 12px;
  }

  /* Gallery adjustments */
  .gallery-grid {
    grid-auto-rows: 100px;
    gap: 8px;
  }

  /* Better form field-row */
  .field-row {
    grid-template-columns: 1fr;
  }

  /* About section improvements */
  .about-body h2 {
    font-size: clamp(24px, 4vw, 36px);
    margin-bottom: 18px;
  }

  .about-body p {
    font-size: 14px;
    margin-bottom: 14px;
  }

  .about-sign {
    margin-top: 20px;
    padding-top: 16px;
  }

  .about-sign .sig {
    font-size: 18px;
  }

  .about-sign .who {
    font-size: 11px;
  }
}

/* =========================================================
   iOS / iPhone polish — safe areas, viewport, scroll-lock
   ========================================================= */

/* Safe-area-inset support (notched iPhones) */
.site-header {
  padding-top: max(18px, env(safe-area-inset-top));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.footer {
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

/* Mobile-only refinements */
@media (max-width: 768px) {
  /* Force readable input size to prevent iOS focus-zoom */
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }

  /* Tighter hero padding so content fits on small viewports */
  .hero-inner {
    padding-top: 110px;
    padding-bottom: clamp(40px, 8vh, 80px);
  }

  /* Ensure header has solid background when mobile nav is open */
  .site-header.nav-open {
    background: var(--bg);
  }

  /* Larger, more reliable touch targets for nav links */
  .site-header.nav-open .nav-links a {
    padding: 16px 0;
    font-size: 20px;
  }

  /* Make sure mobile menu open CTA is reachable */
  .site-header.nav-open .nav-cta .btn {
    padding: 14px 28px;
    font-size: 14px;
  }

  /* Service icon scaling shouldn't trigger horizontal scroll */
  .service:hover .service-icon { transform: none; }
  .service:hover { background: var(--surface); }

  /* Disable transform hover effects that feel awkward on touch */
  .btn-primary:hover { transform: none; }
  .why-item:hover { transform: none; box-shadow: none; }
  .testi-card:hover { transform: none; box-shadow: none; }
  .gallery-item:hover img { transform: none; }

  /* Hero CTAs: full-width-friendly stacking on narrow screens */
  .hero-ctas .btn {
    min-height: 48px;
    padding: 14px 22px;
    font-size: 14px;
  }

  /* About badge — keep inside frame on small phones */
  .about-badge {
    left: 12px;
    bottom: 12px;
  }

  /* Contact map sized for thumbs */
  .contact-map { height: 220px; }

  /* Smooth momentum scroll for any horizontally scrollable areas */
  .gallery-grid,
  .testi-grid,
  .services-grid {
    -webkit-overflow-scrolling: touch;
  }
}

/* Extra-small phones (iPhone SE, mini, etc.) */
@media (max-width: 400px) {
  :root { --gutter: 16px; }

  .hero-title {
    font-size: clamp(30px, 9vw, 42px);
    margin-bottom: 16px;
  }
  .hero-sub {
    font-size: 14px;
    margin-bottom: 24px;
  }
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { flex: 1; justify-content: center; }

  .brand { font-size: 15px; }
  .brand-mark { width: 30px; height: 30px; }

  /* Section padding less aggressive */
  section { padding: clamp(56px, 12vw, 80px) 0; }
}

/* Landscape phones — keep hero from feeling cramped */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: auto; }
  .hero-inner {
    padding-top: 90px;
    padding-bottom: 40px;
  }
  .hero-title { font-size: clamp(28px, 5vw, 44px); }
  .hero-sub { font-size: 14px; margin-bottom: 20px; }
}
