/* Atom Electrical — homepage styles */
:root {
  --accent: #E01E26;
  --accent-deep: #B01217; /* darker red for service cards with white text */
  --ink: #12161C;
  --ink-2: #1E232B;
  --ink-line: #2A2F37;
  --ink-field: #4A505A;
  --footer: #0B0E12;
  --paper: #F4F2EC;
  --paper-2: #E9E6DD;
  --paper-3: #D9D5CA;
  --line: #D4D0C5;
  --muted: #6B675E;
  --body: #55524A;
  --body-dark: #3F3C36;
  --on-dark: #C9C5BB;
  --on-dark-2: #B9B5AB;
  --on-dark-3: #9097A1;
  --placeholder: #6E7480;

  --f-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Montserrat', system-ui, sans-serif;
  --f-mono: 'Montserrat', system-ui, sans-serif;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* Shared type */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.eyebrow--accent { color: var(--accent); }
.h-display {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1;
  text-transform: uppercase;
}
.h-card {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
}
.label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 16px;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 16px;
  padding: 17px 28px;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter .15s, background-color .15s, border-color .15s;
}
.btn--accent { background: var(--accent); color: #FFFFFF; }
.btn--accent:hover { color: #FFFFFF; filter: brightness(1.08); }
.btn--ghost { border-color: var(--ink-field); color: var(--paper); font-weight: 500; }
.btn--ghost:hover { color: var(--paper); border-color: var(--paper); }

/* ---------- Header ---------- */
/* Header floats over the hero photo, then turns solid once you scroll */
.site-header {
  background: linear-gradient(to bottom, rgba(10, 13, 17, .75), rgba(10, 13, 17, 0));
  color: var(--paper);
  border-bottom: 1px solid rgba(244, 242, 236, .12);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color .25s, border-color .25s, box-shadow .25s;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: var(--ink);
  border-bottom-color: var(--ink-line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.site-header .wrap {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.brand:hover { color: var(--paper); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
}
.brand__sub {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--on-dark-2);
  margin-top: 4px;
}
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15px; }
.nav a { color: var(--paper); text-decoration: none; padding: 12px 0; }
.nav a:hover { color: var(--accent); }
.header-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.header-cta .phone { font-family: var(--f-mono); font-size: 14px; color: var(--paper); text-decoration: none; padding: 12px 0; }
.header-cta .phone:hover { color: var(--accent); }
.header-cta .btn { font-size: 15px; padding: 13px 22px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink-field);
  color: var(--paper);
  width: 46px;
  height: 46px;
  border-radius: 2px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  min-height: 82vh;
  min-height: 82svh;
  display: flex;
  flex-direction: column;
}
/* Photo fills the whole slider; dark fade on the left keeps the headline readable */
.hero__bg {
  position: absolute;
  inset: 0;
  background: url(../images/hero.jpg) 88% 0% / cover no-repeat;
  animation: hero-zoom 18s ease-out both;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 13, 17, .92) 0%, rgba(10, 13, 17, .78) 40%, rgba(10, 13, 17, .25) 75%, rgba(10, 13, 17, .1) 100%),
    linear-gradient(to bottom, rgba(10, 13, 17, .5) 0%, rgba(10, 13, 17, 0) 22%),
    linear-gradient(to top, rgba(10, 13, 17, .6) 0%, rgba(10, 13, 17, 0) 30%);
}
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero__inner {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 56px;
}
.hero__copy { display: flex; flex-direction: column; gap: 28px; max-width: 680px; }
.hero h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(38px, 5.6vw, 80px);
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero h1, .hero__lede { text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero__lede { margin: 0; font-size: 19px; line-height: 1.6; color: #DAD6CC; max-width: 540px; }

/* ---------- Current connects, then the neon headline lights up ---------- */
.hero__title-wrap { position: relative; display: inline-block; align-self: flex-start; }

/* Off by default (dark, unpowered). The .is-on class — flipped by the loader
   once the page is revealed, and by the light switch — runs the ignition. */
.hero__title {
  color: #2a2410;
  transition: color .3s ease, text-shadow .3s ease;
}
.hero__title-wrap.is-on .hero__title {
  animation: neon-ignite 1.7s cubic-bezier(.2,.7,.2,1) 1.25s both;
}
@keyframes neon-ignite {
  /* off — unpowered tube */
  0%, 8%    { color: #2a2410; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
  /* current connects: first strike */
  11%       { color: #e6c766; text-shadow: 0 2px 24px rgba(0,0,0,.35), 0 0 10px rgba(200,150,20,.6), 0 0 22px rgba(180,130,0,.45); }
  15%, 24%  { color: #2a2410; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
  /* second strike */
  27%       { color: #d6a92e; text-shadow: 0 2px 24px rgba(0,0,0,.35), 0 0 12px rgba(200,150,20,.6), 0 0 26px rgba(180,130,0,.5); }
  31%, 40%  { color: #2a2410; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
  /* final stutter, then hold steady on */
  43%       { color: #9c7f28; text-shadow: 0 2px 24px rgba(0,0,0,.35), 0 0 6px rgba(180,130,0,.45); }
  46%       { color: #2a2410; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
  56%, 100% { color: #cB9A2E; text-shadow: 0 2px 24px rgba(0,0,0,.35), 0 0 10px rgba(200,150,20,.55), 0 0 24px rgba(180,130,0,.4); }
}

/* Wiring diagram beneath the headline: switch → wire (current) → plug */
.hero__current { position: absolute; left: 0; right: 0; bottom: -26px; height: 24px; pointer-events: none; }

/* Switch and plug sit at the two ends of the wire */
.hero__switch, .hero__plug {
  position: absolute; top: 50%; width: 24px; height: 24px; margin-top: -12px;
  color: #b9b4a8;
}
.hero__switch { left: 0; }
.hero__plug  { right: 0; }
.hero__switch svg, .hero__plug svg { width: 100%; height: 100%; display: block; }
/* Switch lever is open (lifted) when off, snaps closed when powered on */
.hero__switch .ls-lever {
  transform-box: view-box; transform-origin: 4px 12px;
  transform: rotate(-34deg);
  transition: transform .22s cubic-bezier(.3,.75,.4,1.2);
}
.hero__title-wrap.is-on .hero__switch .ls-lever { transform: rotate(0deg); }
/* Plug lights up when the current reaches it */
.hero__title-wrap.is-on .hero__plug {
  animation: plug-connect 1.6s cubic-bezier(.4,.1,.2,1) both;
}
@keyframes plug-connect {
  0%, 74% { color: #b9b4a8; filter: none; }
  80%     { color: #fff; filter: drop-shadow(0 0 6px #ff5760) drop-shadow(0 0 13px rgba(224,30,38,.95)); }
  100%    { color: #ff7a80; filter: drop-shadow(0 0 5px rgba(224,30,38,.85)); }
}

/* The wire itself runs between the switch and the plug */
.hero__wire { position: absolute; left: 28px; right: 30px; top: 50%; height: 4px; margin-top: -2px; }
.hero__conduit {
  position: absolute; inset: 0;
  border-radius: 4px; background: rgba(224,30,38,.16);
}
/* The current filling the wire left→right. Empty when off; drains smoothly. */
.hero__charge {
  position: absolute; inset: 0;
  border-radius: 4px;
  transform: scaleX(0); transform-origin: left center;
  background: linear-gradient(90deg, rgba(224,30,38,.6), #ff5760 85%, #ffd3d5);
  box-shadow: 0 0 10px rgba(224,30,38,.9), 0 0 18px rgba(224,30,38,.6);
  transition: transform .4s ease;
}
.hero__title-wrap.is-on .hero__charge {
  animation: current-fill 1.3s cubic-bezier(.4,.1,.2,1) both;
}
@keyframes current-fill { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
/* Bright head of the current — travels the wire to the plug */
.hero__spark {
  position: absolute; top: 50%; left: 0;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #fff; opacity: 0;
  box-shadow: 0 0 8px #ff5760, 0 0 18px rgba(224,30,38,.95), 0 0 30px rgba(224,30,38,.7);
}
.hero__title-wrap.is-on .hero__spark {
  animation: current-head 1.6s cubic-bezier(.4,.1,.2,1) both;
}
@keyframes current-head {
  0%   { left: 0;    opacity: 1; transform: scale(.7); }
  78%  { left: 100%; opacity: 1; transform: scale(1); }
  84%  { left: 100%; opacity: 1; transform: scale(2.1); }   /* connect flare */
  100% { left: 100%; opacity: 0; transform: scale(1); }
}

@media (max-width: 720px) {
  .hero__current { bottom: -22px; height: 20px; }
  .hero__switch, .hero__plug { width: 20px; height: 20px; margin-top: -10px; }
  .hero__wire { left: 24px; right: 26px; height: 3px; }
  .hero__spark { width: 10px; height: 10px; margin: -5px 0 0 -5px; }
}

/* Light switch that powers the headline on/off — styled like a wall toggle */
.light-switch {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  font: 600 13px/1 var(--f-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
/* The wall plate */
.light-switch__track {
  position: relative;
  flex: none;
  width: 38px;
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ece9e0, #cdc8bb);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 3px 8px rgba(0,0,0,.45);
  perspective: 150px;
}
/* Recessed dark slot the lever sits in */
.light-switch__track::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 5px;
  background: #16181d;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.8);
  transition: box-shadow .2s ease;
}
/* Mounting screws, top and bottom, for that real-switch look */
.light-switch__track::after {
  content: '';
  position: absolute;
  left: 50%; top: 3px;
  width: 3px; height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff, #9a958a 70%);
  box-shadow: 0 50px 0 #9a958a, 0 50px 0 0.5px rgba(0,0,0,.3);
}
/* The flip lever */
.light-switch__knob {
  position: absolute;
  left: 50%; top: 9px;
  width: 22px; height: 24px;
  margin-left: -11px;
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(180deg, #f7f5ef 0%, #e2ddd1 55%, #cbc6b9 100%);
  box-shadow: 0 3px 4px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.9);
  transform-origin: center bottom;
  /* OFF: lever pushed down and tilted forward */
  transform: translateY(20px) rotateX(-20deg);
  transition: transform .18s cubic-bezier(.3,.75,.4,1.2), box-shadow .18s ease;
}
/* ON: lever snaps up and tilts back */
.light-switch[aria-checked="true"] .light-switch__knob {
  transform: translateY(0) rotateX(20deg);
}
/* Slot glows red when the power is on */
.light-switch[aria-checked="true"] .light-switch__track::before {
  box-shadow: inset 0 2px 6px rgba(0,0,0,.8), inset 0 0 10px rgba(224,30,38,.85);
}
.light-switch__label::after { content: 'Off'; }
.light-switch[aria-checked="true"] .light-switch__label::after { content: 'On'; }
.light-switch__label { min-width: 2.2em; text-align: left; }

/* Neon headline switch applied to inner-page heroes: reserve room below the
   headline for the wiring diagram so it doesn't overlap the lede text. */
.page-hero .hero__title-wrap { margin-bottom: 30px; }
@media (max-width: 720px) { .page-hero .hero__title-wrap { margin-bottom: 24px; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero .btn--ghost { border-color: rgba(244, 242, 236, .45); background: rgba(10, 13, 17, .25); backdrop-filter: blur(4px); }

/* ---------- Services ---------- */
.services { padding-top: 112px; padding-bottom: 96px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 48px;
}
.section-head__title { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.section-head__aside { margin: 0; max-width: 380px; font-size: 16px; line-height: 1.6; color: var(--body); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}
.service {
  padding: 32px 28px 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 240px;
  background: var(--paper);
  transition: background-color .2s;
}
.service:hover { background: #FBFAF6; }
.service:hover .service__icon { stroke: var(--ink); }
.service__top { display: flex; justify-content: space-between; align-items: start; }
.service__icon { width: 36px; height: 36px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.service__num { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.service .h-card { font-size: 22px; letter-spacing: 0.01em; }
.service p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }

/* ---------- Projects ---------- */
.projects { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.projects .wrap { padding-top: 104px; padding-bottom: 104px; }
.projects .section-head__title { max-width: 720px; margin-bottom: 48px; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: 24px;
}
.project { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; }
.project__photo { height: 240px; background: var(--ink) center / cover no-repeat; color: var(--placeholder); }
.project__body { padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 12px; }
.project__tag { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }
.project .h-card { font-size: 26px; }
.project p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); }

/* ---------- About ---------- */
.about { padding-top: 112px; padding-bottom: 112px; }
.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 64px;
  align-items: start;
}
.about__copy { display: flex; flex-direction: column; gap: 20px; }
.about__copy p { margin: 0; font-size: 17px; line-height: 1.7; color: var(--body-dark); }
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.person { display: flex; flex-direction: column; gap: 16px; }
.person__photo { aspect-ratio: 4 / 5; background: var(--paper-3) center / cover no-repeat; color: var(--muted); }
.person__meta { display: flex; flex-direction: column; gap: 4px; }
.person .h-card { font-size: 22px; }
.person__role { font-size: 15px; color: var(--body); }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--paper); }
.contact .wrap {
  padding-top: 104px;
  padding-bottom: 104px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 64px;
}
.contact__copy { display: flex; flex-direction: column; gap: 24px; }
.contact h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.96;
  text-transform: uppercase;
}
.contact__lede { margin: 0; font-size: 17px; line-height: 1.65; color: var(--on-dark); max-width: 460px; }
.contact__list { margin-top: 12px; border-top: 1px solid var(--ink-line); }
.contact__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-line);
}
.contact__row .label { color: var(--on-dark-3); }
.contact__row a, .contact__row span:last-child { color: var(--paper); text-decoration: none; font-size: 16px; text-align: right; }
.contact__row a:hover { color: var(--accent); }

.form {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field .label { color: var(--on-dark-2); }
.field input, .field select, .field textarea {
  background: var(--ink);
  border: 1px solid var(--ink-field);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  border-radius: 2px;
  width: 100%;
}
.field input, .field select { height: 52px; padding: 0 16px; }
.field textarea { padding: 14px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form .btn { border: none; align-self: start; padding: 18px 28px; }
.form__note { margin: 0; font-size: 14px; color: var(--accent); min-height: 1em; }

/* ---------- CTA band (above footer) ---------- */
.cta-band { background: var(--accent); color: var(--ink); }
.cta-band__inner {
  padding-top: 64px;
  padding-bottom: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}
.cta-band .h-display { font-size: clamp(32px, 4vw, 52px); max-width: 640px; color: #FFFFFF; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-band .btn--accent { background: var(--ink); color: var(--paper); }
.cta-band .btn--accent:hover { color: var(--paper); filter: none; background: #000; }
.cta-band .btn--ghost { border-color: var(--ink); color: var(--ink); }
.cta-band .btn--ghost:hover { background: rgba(18, 22, 28, .08); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: var(--on-dark-3); font-size: 15px; }
.footer__grid {
  padding-top: 72px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 40px 48px;
}
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer__brand p { margin: 0; line-height: 1.6; max-width: 340px; }
.footer__brand .btn { font-size: 15px; padding: 13px 22px; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer__title {
  margin: 0 0 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.footer__col a { color: var(--on-dark); text-decoration: none; }
.footer__col a:hover { color: var(--paper); }
.footer__areas { font-size: 13px; line-height: 1.5; color: #6F757F; }
.footer__bottom { border-top: 1px solid #1C2128; }
.footer__bottom .wrap {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 16px;
  font-size: 13px;
}
.site-footer .label { font-size: 12px; letter-spacing: 0.16em; }

/* ---------- Inner page banner (About, Contact) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.page-hero__inner {
  position: relative;
  padding-top: 180px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.page-hero h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(36px, 4.8vw, 64px);
  line-height: 0.95;
  text-transform: uppercase;
  max-width: 820px;
}
.nav a[aria-current="page"] { color: var(--accent); }

/* Link with arrow */
.link-arrow { align-self: flex-start; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
.link-arrow span { display: inline-block; transition: transform .15s; }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- About page ---------- */
.story { padding-top: 112px; padding-bottom: 112px; }
.story__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 64px;
  align-items: center;
}
.story__copy { display: flex; flex-direction: column; gap: 20px; }
.story__copy p { margin: 0; font-size: 18px; line-height: 1.75; color: var(--body-dark); }
.story__photo {
  aspect-ratio: 1 / 1;
  background: var(--paper-3) url(../images/hero-owner.jpg) center / cover no-repeat;
  border: 1px solid var(--line);
}
.values { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.values__grid {
  padding-top: 96px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 24px;
}
.value {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.value .h-card { font-size: 26px; }
.value p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--body); }
.about__kicker { font-family: var(--f-display); font-weight: 700; font-size: 22px !important; text-transform: uppercase; color: var(--ink) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav, .header-cta { display: none; width: 100%; }
  .site-header.is-open .nav { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
  .site-header.is-open .nav a { width: 100%; border-top: 1px solid var(--ink-line); }
  .site-header.is-open .header-cta { display: flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
/* Narrow screens: even dark overlay over the photo so text reads anywhere */
@media (max-width: 900px) {
  .hero__bg { background-position: 86% center; }
  .hero__bg::after { background: linear-gradient(to bottom, rgba(10, 13, 17, .6), rgba(10, 13, 17, .85)); }
}
@media (max-width: 600px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .hero__inner { padding-top: 110px; padding-bottom: 48px; }
        .services, .about { padding-top: 80px; padding-bottom: 80px; }
  .projects .wrap, .contact .wrap { padding-top: 80px; padding-bottom: 80px; }
  .story { padding-top: 72px; padding-bottom: 72px; }
  .values__grid { padding-top: 64px; padding-bottom: 64px; }
  .value { padding: 28px 24px; }
  .page-hero__inner { padding-top: 130px; padding-bottom: 56px; }
  .footer__grid { grid-template-columns: 1fr; padding-top: 56px; }
  .form { padding: 24px; }
  .project__body { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg { animation: none; }
  .hero__title-wrap.is-on .hero__title,
  .hero__title { animation: none !important; }
  .hero__title-wrap.is-on .hero__title { color: #cB9A2E; text-shadow: 0 2px 24px rgba(0,0,0,.35), 0 0 10px rgba(200,150,20,.55), 0 0 24px rgba(180,130,0,.4); }
  .hero__current { display: none; }
}

/* ---------- Google reviews ---------- */
.reviews { padding-top: 104px; padding-bottom: 104px; }
.reviews__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}
.g-logo { width: 22px; height: 22px; flex: none; }
.stars { color: #E01E26; letter-spacing: 2px; font-size: 17px; line-height: 1; }
.btn--outline { border-color: var(--ink); color: var(--ink); font-size: 15px; padding: 14px 22px; }
.btn--outline:hover { background: var(--ink); color: var(--paper); }
.review-grid { columns: 3 320px; column-gap: 24px; }
.review {
  break-inside: avoid;
  margin: 0 0 24px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: box-shadow .2s, transform .2s;
}
.review:hover { box-shadow: 0 10px 30px rgba(18, 22, 28, .08); transform: translateY(-2px); }
.review__top { display: flex; justify-content: space-between; align-items: center; }
.review__top .g-logo { width: 18px; height: 18px; }
.review blockquote { margin: 0; font-size: 15px; line-height: 1.7; color: var(--body-dark); }
.review figcaption { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--paper-2); }
.review__avatar { display: none; }
.review__who { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.review__who strong { font-weight: 700; color: var(--ink); }
.review__who span { color: var(--muted); font-size: 13px; }
@media (max-width: 600px) {
  .reviews { padding-top: 72px; padding-bottom: 72px; }
  .review { padding: 22px; }
}

/* Reviews become a swipe slider on phones */
.review-dots { display: none; }
@media (max-width: 700px) {
  .review-grid {
    columns: auto;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    margin-inline: -20px;
    padding: 4px 20px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .review-grid::-webkit-scrollbar { display: none; }
  .review { flex: 0 0 86%; margin: 0; scroll-snap-align: start; }
  .review:hover { transform: none; }
  .review-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
  .review-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--line);
    cursor: pointer;
    transition: width .2s, background-color .2s;
  }
  .review-dots button[aria-current="true"] { width: 24px; background: var(--ink); }
}

/* Services: alternating yellow / white cards (checkerboard on multi-column layouts) */
.service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service { background: #FFFFFF; }
.service:hover { background: #FFFFFF; }
.service:nth-child(8n+1), .service:nth-child(8n+3),
.service:nth-child(8n+6), .service:nth-child(8n+8) { background: var(--accent-deep); color: #FFFFFF; }
.service:nth-child(8n+1) p, .service:nth-child(8n+3) p,
.service:nth-child(8n+6) p, .service:nth-child(8n+8) p { color: #FFFFFF; }
@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service:nth-child(n) { background: #FFFFFF; color: var(--ink); }
  .service:nth-child(n) p { color: var(--body); }
  .service:nth-child(4n+1), .service:nth-child(4n+4) { background: var(--accent-deep); color: #FFFFFF; }
  .service:nth-child(4n+1) p, .service:nth-child(4n+4) p { color: #FFFFFF; }
}
@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
  .service:nth-child(n) { background: #FFFFFF; color: var(--ink); min-height: 0; }
  .service:nth-child(n) p { color: var(--body); }
  .service:nth-child(odd) { background: var(--accent-deep); color: #FFFFFF; }
  .service:nth-child(odd) p { color: #FFFFFF; }
}
/* Icons follow the card text colour; soft shadow helps white text read on yellow */
.service { color: var(--ink); }
.service .service__icon { stroke: currentColor; }
.service:nth-child(8n+1), .service:nth-child(8n+3),
.service:nth-child(8n+6), .service:nth-child(8n+8) { text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
@media (max-width: 1100px) {
  .service:nth-child(n) { text-shadow: none; }
  .service:nth-child(4n+1), .service:nth-child(4n+4) { text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
}
@media (max-width: 600px) {
  .service:nth-child(n) { text-shadow: none; }
  .service:nth-child(odd) { text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
}

/* Crew photo in homepage About section */
.about__grid { align-items: center; }
.crew-photo { margin: 0; border: 1px solid var(--line); background: var(--paper-3); }
.crew-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }


/* ---------- Hero photo (all pages) ----------
   Barbershop photo is only 680px wide, so on desktop it sits full-height on the
   right at close to its real size and fades into the dark side behind the text. */
.hero__bg {
  inset: 0 0 0 auto;
  width: min(66%, 1000px);
  background: var(--ink) url(../images/barbershop.webp) center center / cover no-repeat;
}
.hero__bg::after {
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(18, 22, 28, .8) 20%, rgba(18, 22, 28, .25) 50%, rgba(18, 22, 28, .05) 75%),
    linear-gradient(to bottom, rgba(18, 22, 28, .55) 0%, rgba(18, 22, 28, 0) 25%),
    linear-gradient(to top, rgba(18, 22, 28, .6) 0%, rgba(18, 22, 28, 0) 30%);
}
@media (max-width: 900px) {
  .hero__bg { width: 100%; background-position: 40% center; }
  .hero__bg::after { background: linear-gradient(to bottom, rgba(10, 13, 17, .65), rgba(10, 13, 17, .88)); }
}

/* Header "Call Now" button */
.btn--call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(244, 242, 236, .45);
  color: var(--paper);
  font-size: 15px;
  padding: 13px 20px;
}
.btn--call:hover { border-color: var(--accent); color: var(--accent); }
.header-cta .btn--call { font-size: 15px; padding: 13px 20px; }
/* Header Call Now = solid yellow */
.btn--call.btn--accent { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.btn--call.btn--accent:hover { color: #FFFFFF; border-color: var(--accent); filter: brightness(1.08); }

/* Project card photos */
img.project__photo { display: block; width: 100%; height: 240px; object-fit: cover; padding: 0; }

/* ---------- Service pages ---------- */
.page-hero .hero__actions { margin-top: 8px; }
.svc-photo { margin: 0; border: 1px solid var(--line); }
.svc-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.svc-detail {
  padding-top: 96px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px;
  align-items: start;
}
.svc-list .h-card { font-size: 28px; margin-bottom: 24px; }
.svc-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.svc-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 16px;
}
.svc-list li svg { flex: none; color: var(--accent-deep); }
.svc-review { margin: 0; align-self: center; }
.svc-review blockquote { font-size: 17px; }
.svc-others { padding-top: 96px; padding-bottom: 96px; }
.svc-others .h-display { margin-bottom: 32px; }
.svc-others__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.svc-link {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-height: 200px;
  padding: 22px;
  color: var(--paper);
  text-decoration: none;
  overflow: hidden;
  background: var(--ink);
}
.svc-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .25s, transform .4s; }
.svc-link span { position: relative; font-weight: 800; font-size: 20px; text-transform: uppercase; }
.svc-link .svc-link__arrow { color: var(--accent); font-size: 24px; transition: transform .2s; }
.svc-link:hover { color: var(--paper); }
.svc-link:hover img { opacity: .4; transform: scale(1.04); }
.svc-link:hover .svc-link__arrow { transform: translateX(4px); }
.project__body .link-arrow { margin-top: 4px; }
@media (max-width: 600px) {
  .svc-detail, .svc-others { padding-top: 64px; padding-bottom: 64px; }
  .svc-link { min-height: 150px; }
}
/* Reviews band on service pages */
.reviews--alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Bigger header logo */
.site-header .brand { gap: 14px; }
.site-header .brand svg { width: 58px; height: 58px; }
.site-header .brand__name { font-size: 29px; letter-spacing: 0.05em; }
.site-header .brand__sub { font-size: 12.5px; margin-top: 5px; }
@media (max-width: 600px) {
  .site-header .brand svg { width: 46px; height: 46px; }
  .site-header .brand__name { font-size: 23px; }
  .site-header .brand__sub { font-size: 11px; }
}

/* No tiny spaced-out caps: labels and footer headings read as normal text */
.label, .field .label, .contact__row .label {
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.footer__title {
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--paper);
}
.brand__sub { letter-spacing: 0.08em; }

/* ---------- Services dropdown ---------- */
.nav__item { position: relative; display: flex; align-items: center; }
.nav__parent { display: inline-flex; align-items: center; gap: 6px; }
.nav__caret { transition: transform .2s; }
.nav__menu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 230px;
  padding: 8px 0;
  background: var(--ink);
  border: 1px solid var(--ink-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 60;
}
.nav .nav__menu a { padding: 11px 18px; font-size: 15px; white-space: nowrap; }
.nav .nav__menu a:hover { background: rgba(244, 242, 236, .06); color: var(--accent); }
.nav .nav__menu .nav__all { border-top: 1px solid var(--ink-line); margin-top: 6px; padding-top: 14px; color: var(--accent); font-weight: 600; }
.nav__item:hover .nav__menu,
.nav__item:focus-within .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__item:hover .nav__caret,
.nav__item:focus-within .nav__caret { transform: rotate(180deg); }

/* Phone menu: service links listed under Services, indented */
@media (max-width: 900px) {
  .site-header.is-open .nav__item { flex-direction: column; align-items: stretch; width: 100%; }
  .site-header.is-open .nav__item > a { border-top: 1px solid var(--ink-line); }
  .nav__caret { display: none; }
  .nav__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0 0 6px;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .site-header.is-open .nav .nav__menu a { border-top: 0; padding: 9px 0 9px 18px; font-size: 15px; color: var(--on-dark); width: auto; }
  .nav .nav__menu .nav__all { display: none; }
}

/* ---------- Homepage slideshow ---------- */
.hero__bg--slides { background: var(--ink); animation: none; z-index: 0; }
.hero__bg--slides::after { z-index: 1; }
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }
/* Portrait photo: frame on the Atom logo on his back */
.hero__slide--shirt { background-image: url(../images/hero-atom-shirt.jpg); background-position: center 58%; }
.hero__slide--shop { background-image: url(../images/barbershop.webp); background-position: center center; }
.hero__dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.hero__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 242, 236, .45);
  cursor: pointer;
  transition: width .25s, background-color .25s;
}
.hero__dots button[aria-current="true"] { width: 30px; background: var(--accent); }
@media (max-width: 900px) {
  .hero__slide--shirt { background-position: center 45%; }
}
@media (max-width: 600px) {
  .hero__dots { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
}
/* Desktop: push the portrait shirt photo right so the logo sits in the bright part of the fade */
@media (min-width: 901px) {
  .hero__slide--shirt {
    left: 30%;
    background-position: center 62%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 28%);
    mask-image: linear-gradient(to right, transparent 0%, #000 28%);
  }
}

/* ---- Contact page: phone + email boxes ---- */
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding-block: 80px; }
.contact-card { display: flex; flex-direction: column; gap: 8px; padding: 40px 36px; background: #fff; border: 1px solid rgba(18,22,28,.1); border-radius: 6px; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.contact-card:hover { border-color: var(--accent-deep); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(18,22,28,.08); }
.contact-card__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%; background: var(--accent); color: #FFFFFF; }
.contact-card__label { font-size: 15px; font-weight: 600; color: rgba(18,22,28,.6); }
.contact-card__value { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; overflow-wrap: anywhere; }
.contact-card__action { margin-top: 12px; font-weight: 600; color: var(--accent-deep); }
@media (max-width: 700px) { .contact-cards { grid-template-columns: 1fr; padding-block: 48px; gap: 16px; } .contact-card { padding: 28px 24px; } }

/* ---- Homepage services slider: one row, 4 visible, slides sideways ---- */
.service-grid--slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.service-grid--slider::-webkit-scrollbar { display: none; }
.service-grid--slider .service { flex: 0 0 25%; scroll-snap-align: start; min-height: 280px; }
/* simple alternation in a single row: yellow, white, yellow, white */
.service-grid--slider .service:nth-child(n) { background: #FFFFFF; color: var(--ink); text-shadow: none; }
.service-grid--slider .service:nth-child(n) p { color: var(--body); }
.service-grid--slider .service:nth-child(odd) { background: var(--accent-deep); color: #FFFFFF; text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
.service-grid--slider .service:nth-child(odd) p { color: #FFFFFF; }
@media (max-width: 1100px) { .service-grid--slider .service { flex-basis: 50%; } }
@media (max-width: 600px)  { .service-grid--slider .service { flex-basis: 85%; } }
/* ---- Projects slider: one row, 2 visible, slides sideways ---- */
.project-grid--slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  gap: 24px;
}
.project-grid--slider::-webkit-scrollbar { display: none; }
.project-grid--slider .project { flex: 0 0 calc((100% - 24px) / 2); scroll-snap-align: start; }
@media (max-width: 900px) { .project-grid--slider .project { flex-basis: 88%; } }
/* The title now lives inside .section-head, which carries the spacing */
.projects .section-head { margin-bottom: 48px; }
.projects .section-head .section-head__title { margin-bottom: 0; }

.slider-arrows { display: flex; gap: 10px; }
.slider-arrow {
  display: grid; place-items: center; width: 52px; height: 52px;
  border: 1px solid var(--ink); border-radius: 50%; background: transparent; color: var(--ink);
  cursor: pointer; transition: background-color .2s, color .2s;
}
.slider-arrow:hover { background: var(--accent); border-color: var(--accent); }
@media (max-width: 600px) { .slider-arrows { display: none; } }

/* ---- Services cards: all white with yellow accents ---- */
.service-grid .service:nth-child(n),
.service-grid--slider .service:nth-child(n) {
  position: relative; background: #FFFFFF; color: var(--ink); text-shadow: none;
}
.service-grid .service:nth-child(n) p { color: var(--body); }
.service-grid .service__top { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); }
.service-grid .service:nth-child(n) .service__icon { width: 28px; height: 28px; stroke: #FFFFFF; }
.service-grid .service:nth-child(n)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.service-grid .service:nth-child(n):hover::after { transform: scaleX(1); }

/* ---- Services cards: separate boxes with gaps, centered icons, no top bar ---- */
.service-grid { gap: 20px; border: 0; }
.service-grid .service:nth-child(n) {
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.service-grid .service__top {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; padding: 0; border-radius: 50%; background: var(--accent);
}
.service-grid .service__top .service__icon { display: block; margin: 0; flex: none; }
.service-grid .service:nth-child(n)::after { bottom: 0; }
.service-grid--slider .service { flex: 0 0 calc((100% - 60px) / 4); }
@media (max-width: 1100px) { .service-grid--slider .service { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 600px)  { .service-grid--slider .service { flex-basis: 85%; } .service-grid { gap: 14px; } }

/* Footer credit */
.footer__credit strong { color: var(--accent); font-weight: 600; }

/* CTA band: keep "Ready to start your project?" on one line */
.cta-band .h-display { max-width: none; }
@media (min-width: 1000px) {
  .cta-band__inner { flex-wrap: nowrap; }
  .cta-band .h-display { white-space: nowrap; font-size: clamp(28px, 3.1vw, 42px); }
  .cta-band__actions { flex: none; }
}

/* =========================================================
   Site-wide animation
   ========================================================= */

/* Hero / page banner text slides in on load */
@keyframes rise-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.hero__inner > *, .page-hero__inner > * { animation: rise-in .9s cubic-bezier(.2,.7,.2,1) both; }
.hero__inner > :nth-child(2), .page-hero__inner > :nth-child(2) { animation-delay: .15s; }
.hero__inner > :nth-child(3), .page-hero__inner > :nth-child(3) { animation-delay: .3s; }
.hero__inner > :nth-child(4), .page-hero__inner > :nth-child(4) { animation-delay: .45s; }

/* Header drops in */
@keyframes drop-in { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.site-header .wrap { animation: drop-in .7s ease-out both; }

/* Homepage slides: slow zoom while each photo is showing */
/* Zoom runs only on the incoming photo; the outgoing one stays still while it fades */
@keyframes slide-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero__slide { transition: opacity 1.4s ease-in-out; will-change: opacity, transform; }
/* Slideshow disabled: static hero photo, no auto-advance zoom, no slide dots */
.hero__slide.is-active { animation: none; }
.hero__dots { display: none; }

/* Scroll reveal (main.js adds .reveal to elements, .is-in when they scroll into view) */
.anim .reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.anim .reveal.reveal--left  { transform: translateX(-40px); }
.anim .reveal.reveal--right { transform: translateX(40px); }
.anim .reveal.reveal--zoom  { transform: scale(.94); }
.anim .reveal.is-in { opacity: 1; transform: none; }
/* Safety net: cards inside a horizontal slider must never be hidden by the
   scroll-reveal (they can't trigger it off-screen, which leaves the slider blank). */
.service-grid--slider .service,
.project-grid--slider .project { opacity: 1 !important; transform: none !important; }

/* Hover lift on cards and buttons */
.project, .review, .value, .svc-link, .contact-card, .service { transition: transform .3s ease, box-shadow .3s ease, opacity .8s ease, background-color .2s; }
.project:hover, .review:hover, .value:hover, .svc-link:hover, .service-grid .service:hover {
  transform: translateY(-6px); box-shadow: 0 18px 36px rgba(18, 22, 28, .10);
}
.project__photo, .svc-photo, .crew-photo, .story__photo { overflow: hidden; }
.project__photo img, .svc-photo img, .crew-photo img, .story__photo img, .svc-link img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.project:hover .project__photo img, .svc-photo:hover img, .crew-photo:hover img, .story__photo:hover img, .svc-link:hover img { transform: scale(1.06); }
.btn { transition: transform .2s ease, background-color .2s, color .2s, filter .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.link-arrow span, .contact-card__action span, .svc-link__arrow { display: inline-block; transition: transform .25s ease; }
.link-arrow:hover span, .contact-card:hover .contact-card__action span, .svc-link:hover .svc-link__arrow { transform: translateX(5px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .anim .reveal { opacity: 1 !important; transform: none !important; }
}
/* Crossfade: new photo fades in on top, old photo stays visible underneath until it's covered */
.hero__slide { z-index: 0; }
@keyframes slide-out { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
.hero__slide.is-leaving { z-index: 1; transition: none; animation: slide-out 1.5s ease-in-out both; }
.hero__slide.is-active { z-index: 2; }
.hero__bg--slides::after { z-index: 3; }

/* ============================================================
   LOADING SCREEN — atom + electrons (homepage, once per session)
   ============================================================ */
.atom-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(60% 60% at 50% 42%, #1A2129 0%, var(--ink) 60%, #0B0E12 100%);
  opacity: 1;
  transition: opacity .7s ease;
}
.atom-loader.is-hidden { opacity: 0; }
.atom-loader.is-gone { display: none; }
/* Lock scrolling behind the loader */
body.loader-active { overflow: hidden; }

.atom-loader__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  animation: al-rise .8s ease both;
}
@keyframes al-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.atom-loader__atom {
  width: clamp(200px, 44vw, 280px);
  aspect-ratio: 1;
  perspective: 900px;
}
/* The whole atom tumbles slowly in 3D so the orbits read as real electron shells */
.atom-loader__atom svg {
  width: 100%; height: 100%; overflow: visible;
  transform-style: preserve-3d;
  animation: al-tumble 16s linear infinite;
}
@keyframes al-tumble {
  from { transform: rotateX(16deg) rotateY(0deg); }
  to   { transform: rotateX(16deg) rotateY(360deg); }
}

/* Nucleus: the cluster pulses, and each proton/neutron jitters independently */
.al-nucleus { animation: al-pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes al-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .82; } }
.al-core { transform-box: fill-box; transform-origin: center; animation: al-jitter 1.1s ease-in-out infinite; }
.al-core:nth-child(2) { animation-delay: -.3s; }
.al-core:nth-child(3) { animation-delay: -.6s; }
.al-core:nth-child(4) { animation-delay: -.9s; }
@keyframes al-jitter {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1.2px); }
  50% { transform: translate(-1.2px, 1px); }
  75% { transform: translate(.8px, 1px); }
}

.al-electron { animation: al-flicker 1.6s ease-in-out infinite; }
@keyframes al-flicker { 0%, 100% { opacity: 1; } 45% { opacity: .6; } }

.atom-loader__brand {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.atom-loader__name {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(30px, 6vw, 46px);
  letter-spacing: .14em;
  color: var(--paper);
}
.atom-loader__sub {
  margin-top: 8px;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: clamp(11px, 2.4vw, 14px);
  letter-spacing: .34em;
  color: #FF6E73; /* lighter red so it reads clearly on the dark backdrop */
}

/* Progress bar */
.atom-loader__bar {
  margin-top: 30px;
  width: clamp(160px, 46vw, 240px);
  height: 3px;
  border-radius: 99px;
  background: rgba(244, 242, 236, .14);
  overflow: hidden;
}
.atom-loader__bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, #ff5a60 60%, transparent);
  animation: al-sweep 1.25s ease-in-out infinite;
}
@keyframes al-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.atom-loader__tag {
  margin: 16px 0 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}

/* Respect reduced-motion: the loader is removed by JS, but if anything
   lingers, keep it calm and static. */
@media (prefers-reduced-motion: reduce) {
  .atom-loader__stage,
  .al-nucleus, .al-nucleus-halo, .al-electron,
  .atom-loader__bar span { animation: none; }
}

/* ============================================================
   HERO BACKGROUND ATOMS — subtle drifting decoration
   ============================================================ */
.hero__inner { z-index: 4; }        /* keep headline above the atoms */
.hero__atoms {
  position: absolute;
  inset: 0;
  z-index: 1;                       /* above the photo + dark overlay, below the copy */
  pointer-events: none;
  overflow: hidden;
}
.hero__atom {
  position: absolute;
  opacity: .14;
  will-change: transform;
}
.hero__atom svg { width: 100%; height: 100%; overflow: visible; }
.hero__atom--1 { width: 340px; height: 340px; top: -60px; right: 4%; animation: atom-drift-a 26s ease-in-out infinite; }
.hero__atom--2 { width: 200px; height: 200px; bottom: 6%; right: 26%; opacity: .1; animation: atom-drift-b 32s ease-in-out infinite; }
.hero__atom--3 { width: 150px; height: 150px; top: 30%; right: 40%; opacity: .08; animation: atom-drift-a 22s ease-in-out infinite reverse; }
/* The SVG spins slowly inside its drifting wrapper for compound motion */
.hero__atom svg { animation: atom-spin 60s linear infinite; transform-origin: 50% 50%; }
.hero__atom--2 svg { animation-duration: 48s; animation-direction: reverse; }
.hero__atom--3 svg { animation-duration: 40s; }

@keyframes atom-spin { to { transform: rotate(360deg); } }
@keyframes atom-drift-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-26px, 22px); }
}
@keyframes atom-drift-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -24px); }
}
@media (max-width: 720px) {
  .hero__atom--2, .hero__atom--3 { display: none; } /* keep phones clean + fast */
  .hero__atom--1 { width: 240px; height: 240px; right: -40px; }
}

/* ============================================================
   HEADER / FOOTER LOGO — electrons spin up on hover (site-wide)
   ============================================================ */
.brand svg { transition: filter .4s ease; }
/* Electrons orbit the rings continuously (added in main.js); hover adds a glow */
.brand:hover svg { filter: drop-shadow(0 0 3px rgba(244, 242, 236, .5)); }
.brand-electron { filter: drop-shadow(0 0 1.5px rgba(244, 242, 236, .8)); }
.brand svg circle:not(.brand-electron) { transition: transform .3s ease; transform-box: fill-box; transform-origin: center; }
/* Nucleus energises: pulses larger with a red glow on hover */
.brand:hover svg circle:not(.brand-electron) { animation: logo-nucleus 1s ease-in-out infinite; }
@keyframes logo-nucleus {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(224, 30, 38, .7)); }
  50%      { transform: scale(1.7); filter: drop-shadow(0 0 7px rgba(224, 30, 38, 1)); }
}

/* ============================================================
   Reduced motion: hold everything still
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero__atoms { display: none; } /* decorative only — drop it entirely */
  .brand:hover svg, .brand:hover svg circle { animation: none; }
}

/* ============================================================
   SLIDER DOTS — services + projects position indicators
   ============================================================ */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.slider-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: width .25s ease, background-color .25s ease;
}
.slider-dots button:hover { background: var(--muted); }
.slider-dots button[aria-current="true"] { width: 26px; background: var(--accent); }

/* ============================================================
   MOBILE MENU — right-side slide-in panel (built in JS)
   ============================================================ */
body.menu-open { overflow: hidden; }

.m-nav {
  position: fixed;
  inset: 0;
  z-index: 1200;
  visibility: hidden;
}
.m-nav.is-open { visibility: visible; }

.m-nav__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 12, .62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .35s ease;
}
.m-nav.is-open .m-nav__scrim { opacity: 1; }

.m-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  background: var(--ink);
  border-left: 1px solid var(--ink-line);
  box-shadow: -24px 0 60px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.m-nav.is-open .m-nav__panel { transform: none; }

.m-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink-line);
}
.m-nav__brand { pointer-events: none; }   /* logo is decorative inside the panel */
.m-nav__brand svg { width: 40px; height: 40px; }
.m-nav__brand .brand__name { font-size: 20px; }
.m-nav__brand .brand__sub { font-size: 10px; }

.m-nav__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink-field);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.m-nav__close:hover { background: var(--accent); border-color: var(--accent); transform: rotate(90deg); }

.m-nav__links {
  display: flex;
  flex-direction: column;
  padding: 10px 0 4px;
}
/* Top-level rows: plain links + the collapsible "Services" toggle button */
.m-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 18px;
  padding: 15px 2px;
  border: 0;
  border-bottom: 1px solid rgba(244, 242, 236, .08);
  background: none;
  cursor: pointer;
  /* staggered slide-in */
  opacity: 0;
  transform: translateX(22px);
}
.m-nav__row:hover,
.m-nav__row[aria-current="page"] { color: var(--accent); }
.m-nav.is-open .m-nav__row {
  animation: m-link-in .45s ease forwards;
  animation-delay: calc(var(--i, 0) * 55ms + 140ms);
}
@keyframes m-link-in { to { opacity: 1; transform: none; } }

/* Collapsible submenu (accordion) */
.m-nav__caret { flex: none; transition: transform .3s ease; }
.m-nav__group.is-expanded .m-nav__caret { transform: rotate(180deg); }
.m-nav__sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.m-nav__sub a {
  display: block;
  color: var(--on-dark);
  text-decoration: none;
  font-family: var(--f-sans);
  font-size: 15px;
  padding: 12px 2px 12px 18px;
  border-bottom: 1px solid rgba(244, 242, 236, .06);
}
.m-nav__sub a:hover,
.m-nav__sub a[aria-current="page"] { color: var(--accent); }

.m-nav__foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.m-nav__phone { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.m-nav__phone-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}
.m-nav__phone-num {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--paper);
  transition: color .2s;
}
.m-nav__phone:hover .m-nav__phone-num { color: var(--accent); }
.m-nav__call { width: 100%; justify-content: center; }
/* Dark-mode row inside the hamburger menu */
.m-nav__theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--ink-line);
}
.m-nav__theme-label {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--paper);
}

@media (prefers-reduced-motion: reduce) {
  .m-nav__scrim, .m-nav__panel, .m-nav__close, .m-nav__sub, .m-nav__caret { transition: none; }
  .m-nav.is-open .m-nav__row { animation: none; opacity: 1; transform: none; }
}

/* ============================================================
   SITE SEARCH — header search bar on every page (built in JS)
   ============================================================ */
.site-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 260px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink-field);
  border-radius: 999px;
  background: rgba(244, 242, 236, .07);
  transition: border-color .2s, background-color .2s;
}
.site-search:focus-within {
  border-color: var(--accent);
  background: rgba(244, 242, 236, .12);
}
.site-search__icon { flex: none; color: var(--on-dark-3); }
.site-search__input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--paper);
  font-family: var(--f-sans);
  font-size: 14px;
}
.site-search__input::placeholder { color: var(--on-dark-3); }

.site-search__results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  padding: 6px;
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: 14px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .45);
  z-index: 60;
  max-height: 60vh;
  overflow-y: auto;
}
.site-search__item {
  display: block;
  padding: 11px 13px;
  border-radius: 9px;
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
}
.site-search__item:hover,
.site-search__item[aria-selected="true"] { background: rgba(244, 242, 236, .08); color: var(--accent); }
.site-search__empty { padding: 11px 13px; color: var(--on-dark-3); font-size: 14px; }

/* Search is removed everywhere */
.site-search { display: none; }

@media (prefers-reduced-motion: reduce) {
  .atom-loader__atom svg,
  .al-core,
  .al-nucleus,
  .al-electron { animation: none; }
}


/* ============================================================
   THEME TOGGLE — header pill switch (built in JS, lives in .header-cta)
   Sits on the always-dark header, so it uses the header's light text
   colour (var(--paper)) in BOTH light and dark modes.
   ============================================================ */
.theme-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--paper);
  cursor: pointer;
  line-height: 0;
}
.theme-toggle__track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 58px;
  height: 30px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(244, 242, 236, .45);
  background: rgba(244, 242, 236, .08);
  transition: border-color .2s, background-color .2s;
}
.theme-toggle:hover .theme-toggle__track { border-color: var(--accent); }
.theme-toggle__icon { flex: none; display: block; }
.theme-toggle__icon--sun { color: #F4C04E; }
.theme-toggle__icon--moon { color: var(--paper); }
/* Sliding knob: left over the sun (light), right over the moon (dark) */
.theme-toggle__knob {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  transition: transform .22s cubic-bezier(.3, .75, .4, 1.2);
}
.theme-toggle[aria-checked="true"] .theme-toggle__knob { transform: translateX(28px); }
.theme-toggle:focus-visible { outline: none; }
.theme-toggle:focus-visible .theme-toggle__track { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 900px) {
  /* In the mobile header-cta area the toggle still shows; keep it tidy */
  .theme-toggle { order: 1; }
}

/* ============================================================
   THEME: DARK
   Light mode is the default and is left completely untouched. Everything
   below is scoped to html[data-theme="dark"]. We remap ONLY the safe light-
   surface tokens (--paper-2/3, --line, --muted, --body, --body-dark) and
   NEVER --ink / --paper (which double as the always-dark section bg + its
   light text). Then we explicitly darken every remaining light surface and
   recolour every piece of text that hardcoded --ink or white.
   ============================================================ */
html[data-theme="dark"] {
  color-scheme: dark;
  --paper-2: #151a21;  /* card / secondary surface */
  --paper-3: #1b212a;  /* deeper surface (photo placeholders) */
  --line:    #272e38;  /* borders */
  --muted:   #8b919c;  /* muted text */
  --body:    #b9bec7;  /* soft body text */
  --body-dark: #e9ebef; /* primary body text */
}

/* Page base */
html[data-theme="dark"] body { background: #0f1217; color: #e9ebef; }
html[data-theme="dark"] a { color: #e9ebef; }
html[data-theme="dark"] a:hover { color: #fff; }

/* Services grid — all the hardcoded white card surfaces + ink text/icons */
html[data-theme="dark"] .service { background: #151a21; color: #e9ebef; }
html[data-theme="dark"] .service:hover { background: #1b212a; }
html[data-theme="dark"] .service:hover .service__icon { stroke: #e9ebef; }
html[data-theme="dark"] .service__icon { stroke: #e9ebef; }
html[data-theme="dark"] .service-grid .service:nth-child(n),
html[data-theme="dark"] .service-grid--slider .service:nth-child(n) { background: #151a21; color: #e9ebef; }
html[data-theme="dark"] .service-grid .service:nth-child(n) p,
html[data-theme="dark"] .service-grid--slider .service:nth-child(n) p { color: var(--body); }
html[data-theme="dark"] .service:nth-child(n) { background: #151a21; color: #e9ebef; }
html[data-theme="dark"] .service:nth-child(n) p { color: var(--body); }
/* Keep the red accent cards (checkerboard + slider odd) reading with white text */
html[data-theme="dark"] .service:nth-child(8n+1), html[data-theme="dark"] .service:nth-child(8n+3),
html[data-theme="dark"] .service:nth-child(8n+6), html[data-theme="dark"] .service:nth-child(8n+8),
html[data-theme="dark"] .service:nth-child(4n+1), html[data-theme="dark"] .service:nth-child(4n+4),
html[data-theme="dark"] .service-grid--slider .service:nth-child(odd) { background: var(--accent-deep); color: #FFFFFF; }
/* The icon badge keeps the accent circle with a white glyph */
html[data-theme="dark"] .service-grid .service:nth-child(n) .service__icon { stroke: #FFFFFF; }

/* Projects */
html[data-theme="dark"] .project { background: #151a21; }

/* About / values */
html[data-theme="dark"] .value { background: #151a21; }
html[data-theme="dark"] .about__kicker { color: #e9ebef !important; }

/* Reviews */
html[data-theme="dark"] .review { background: #151a21; }
html[data-theme="dark"] .review__who strong { color: #e9ebef; }
html[data-theme="dark"] .review:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }

/* Outline button (reviews "See all") + slider arrows use --ink text/border */
html[data-theme="dark"] .btn--outline { border-color: #39414d; color: #e9ebef; }
html[data-theme="dark"] .btn--outline:hover { background: #e9ebef; color: #0f1217; }
html[data-theme="dark"] .slider-arrow { border-color: #39414d; color: #e9ebef; }
html[data-theme="dark"] .slider-arrow:hover { color: #FFFFFF; }

/* Service pages: the "what's included" list items are hardcoded white */
html[data-theme="dark"] .svc-list li { background: #151a21; color: #e9ebef; }

/* Contact page phone/email cards (hardcoded #fff, ink text, light borders) */
html[data-theme="dark"] .contact-card { background: #151a21; color: #e9ebef; border-color: #272e38; }
html[data-theme="dark"] .contact-card:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .contact-card__label { color: #8b919c; }

/* Generic card-hover shadow softened for dark */
html[data-theme="dark"] .project:hover,
html[data-theme="dark"] .value:hover,
html[data-theme="dark"] .service-grid .service:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, .5);
}

/* Form: already dark in light mode (uses --ink/--ink-2/--ink-field, which we
   do not remap), so it stays correct — no overrides needed. The contact
   section, hero, page-hero, footer, cta-band and svc heroes are intentionally
   dark in both modes and are deliberately left untouched. */
