/*
 * Shared styles for the cue demo pages.
 *
 * Site-level presentation only. The framework itself styles nothing beyond
 * what pin geometry, header transitions and submenu visibility require —
 * see cue/cue.css.
 */

:root {
  --bg:        #0b0f16;
  --bg-raised: #121826;
  --ink:       #e8edf5;
  --ink-dim:   #93a1b8;
  --line:      #1e2839;
  --brand:     #0b76ef;
  --brand-lt:  #6ec1e4;
  --shell:     min(1180px, 92vw);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 12% -5%, rgb(11 118 239 / 0.09), transparent 60%),
    radial-gradient(1000px 800px at 88% 38%, rgb(11 118 239 / 0.045), transparent 60%),
    radial-gradient(900px 600px at 105% 105%, rgb(110 193 228 / 0.06), transparent 55%);
  background-color: var(--bg);
  color: var(--ink);
  font: 400 clamp(1rem, 0.95rem + 0.25vw, 1.125rem)/1.65
        ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/*
 * Circuit rails along the viewport edges: a five-trace bus with 45-degree
 * jogs, an IC footprint, vias. The mask clips the artwork exactly at the
 * free margin (--rail = space outside the content shell), so no trace ever
 * runs behind text at any viewport width — the rails simply narrow away as
 * the screen shrinks.
 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  --rail: max(4vw, calc((100vw - 1180px) / 2));
  background:
    url("assets/circuit-rail-left.svg")  left  top repeat-y,
    url("assets/circuit-rail-right.svg") right top repeat-y;
  background-size: 220px 960px;
  /* --rail-drift comes from the site pack's railDrift effect: the rails
     scroll at a fraction of page speed for parallax depth. */
  background-position:
    left  0 top var(--rail-drift, 0px),
    right 0 top var(--rail-drift, 0px);
  -webkit-mask-image: linear-gradient(90deg,
    #000 0, #000 calc(var(--rail) - 32px), transparent var(--rail),
    transparent calc(100% - var(--rail)), #000 calc(100% - var(--rail) + 32px), #000 100%);
  mask-image: linear-gradient(90deg,
    #000 0, #000 calc(var(--rail) - 32px), transparent var(--rail),
    transparent calc(100% - var(--rail)), #000 calc(100% - var(--rail) + 32px), #000 100%);
}

/*
 * Film grain over everything: a tiled SVG turbulence noise, fixed to the
 * viewport, faint enough to feel rather than see. This is what keeps large
 * flat navy areas from reading as empty — texture without any asset request
 * or per-frame cost.
 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 0.5em; font-weight: 640; }
h1 { font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.5rem); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; color: var(--ink-dim); max-width: 62ch; }
a  { color: inherit; }

.shell { width: var(--shell); margin-inline: auto; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-lt); margin-bottom: 1rem;
}

/*
 * Attribute labels. These exist so the template documents itself — delete
 * `.tag` and every element carrying it once you start building for real.
 */
.tag {
  margin-top: 1.75rem; font-size: 0.76rem; color: #61748f;
  letter-spacing: 0.02em;
}
.tag code {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 5px; padding: 0.16em 0.45em; font-size: 0.95em;
}


/* ---------------------------------------------------------- progress bar */
.readout {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--brand), var(--brand-lt));
  transform-origin: 0 50%;
  /* --page comes from the `progress` effect, scoped to :root */
  transform: scaleX(var(--page, 0));
}

/* --------------------------------------------------------------- header */
.site-header {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.header-inner {
  width: var(--shell); margin-inline: auto;
  display: flex; align-items: center; gap: 2rem;
  min-height: 84px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700; letter-spacing: -0.02em; text-decoration: none;
  font-size: clamp(0.85rem, 0.7rem + 0.6vw, 1.05rem);
  white-space: nowrap;
  transform-origin: left center;
  transition: transform 220ms ease;
}
.wordmark .logo { display: block; height: 4rem; width: auto; }
.wordmark span { color: var(--brand-lt); font-weight: 500; }
.wordmark:hover, .wordmark:focus-visible { transform: scale(1.25); }

/* Phone number between the wordmark and the menu; pushes the nav right. */
.header-phone {
  margin-inline: auto; /* centres it in the gap between wordmark and menu */
  font: 700 0.98rem/1 ui-monospace, monospace;
  color: var(--brand-lt); text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}
.header-phone:hover, .header-phone:focus-visible { color: var(--ink); }
@media (max-width: 560px) {
  .header-phone { display: none; } /* too tight next to the drawer button */
}

.site-nav { margin-left: 0; }
.site-nav > ul {
  display: flex; align-items: center; gap: 0.35rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav li { position: relative; }
.site-nav a {
  display: inline-block; padding: 0.5rem 0.7rem; border-radius: 7px;
  text-decoration: none; font-size: 0.94rem; color: var(--ink-dim);
  transition: color 160ms ease, background-color 160ms ease;
}
.site-nav a:hover,
.site-nav a.is-current { color: var(--ink); background: var(--bg-raised); }

.site-nav .cue-submenu {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.4rem;
  box-shadow: 0 18px 44px rgb(0 0 0 / 0.5);
}
.site-nav .cue-submenu a { display: block; white-space: nowrap; color: var(--ink-dim); }
.cue-submenu-toggle { color: var(--ink-dim); vertical-align: middle; }

/* --- mega panel: picture cards --- */
.site-nav .cue-submenu--mega {
  /* Card sizing, all tunable from here — see cue.css for the full list.
     11rem yields six auto-fit slots at this width, which is what the five
     items need given "Website Design" spans two. */
  --cue-menu-card: 11rem;
  --cue-menu-gap: 0.7rem;
  --cue-menu-pad: 0.85rem;
  --cue-menu-ratio: 16/10;

  /* Match the page gutter rather than bleeding to the viewport edge. */
  left: max(2rem, calc((100vw - var(--shell)) / 2));
  right: max(2rem, calc((100vw - var(--shell)) / 2));
  margin-top: 0.4rem;
}
.site-nav .cue-submenu--mega a {
  white-space: normal;
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.site-nav .cue-submenu--mega a:hover {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand) 38%, transparent);
}
/* Ratio comes from --cue-menu-ratio; only the trim is site-specific. */
.site-nav .cue-submenu--mega .shot { border-radius: 7px; margin-bottom: 0.6rem; }

/* Link to the page you're already on. */
.site-nav a.is-current-page { color: var(--ink); background: var(--bg-raised); }
.site-nav .is-current-page-parent > a { color: var(--ink); }
.site-nav .cue-submenu--mega span {
  display: block; color: var(--ink); font-weight: 600; font-size: 0.9rem;
}
.site-nav .cue-submenu--mega small {
  display: block; color: var(--ink-dim); font-size: 0.78rem; margin-top: 0.1rem;
}

/* Stays blue even when the menu pack marks it as the current page (on the
   home page its index.html#contact href matches the current URL). */
.cta, .site-nav a.cta.is-current-page {
  background: var(--brand); color: #fff !important;
  padding: 0.55rem 1.1rem !important; border-radius: 8px; font-weight: 600;
}

/* ----------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -12% 0; z-index: -1;
  background: url('assets/dots.svg') center/cover no-repeat;
  /* Whatever you swap in here, keep it blurred and low-contrast — a hero
     background should read as texture, not compete with the headline. */
  opacity: 0.5;
  filter: blur(3px) saturate(1.2);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 22%, transparent 62%, var(--bg) 100%),
    radial-gradient(58% 52% at 32% 45%, color-mix(in srgb, var(--bg) 88%, transparent), transparent 72%);
}
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: 1.15rem; max-width: 52ch; }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; translate: -50% 0;
  font-size: 0.76rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------------------------------------------------------------- stats */
.band { padding: clamp(5rem, 12vh, 9rem) 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2.5rem; }
.stat .n { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); font-weight: 700; letter-spacing: -0.04em; }
.stat .n em { font-style: normal; color: var(--brand-lt); }
.stat p { font-size: 0.94rem; margin: 0; }

/* ------------------------------------------------------------- approach */
.approach {
  min-height: 100svh; display: grid; align-items: center;
  background: var(--bg-raised); border-block: 1px solid var(--line);
}
.approach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
  padding: 1.1rem 1.2rem; border-radius: 13px; border: 1px solid transparent;
  opacity: 0.36; transition: opacity 320ms ease, background-color 320ms ease, border-color 320ms ease;
}
.steps li.is-active {
  opacity: 1; background: color-mix(in srgb, var(--brand) 9%, transparent);
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
}
.steps .idx {
  width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--bg); color: var(--brand-lt); font-size: 0.85rem; font-weight: 700;
}
.steps h3 { margin: 0 0 0.15rem; }
.steps p { margin: 0; font-size: 0.94rem; }

/*
 * Duotone treatment. The source library is a mix of photography, flat
 * illustration and diagrams — wildly inconsistent. Desaturating and
 * tinting everything to the brand hue makes them read as one set.
 */
.shot { position: relative; overflow: hidden; margin: 0; background: var(--bg); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(0.92); }
.shot::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--brand); mix-blend-mode: color; opacity: 0.72;
}
.shot::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--bg) 70%, transparent));
}

.approach-visual { aspect-ratio: 4/3; border-radius: 16px; border: 1px solid var(--line); }
.approach-visual img {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 420ms ease;
}
.approach-visual img.is-active { opacity: 1; }

/* ----------------------------------------------------------- horizontal */
.reel { min-height: 100svh; display: grid; align-content: center; overflow: hidden; }
.reel-strip { display: flex; gap: 1.6rem; padding-inline: max(4vw, 2rem); width: max-content; }
.card {
  width: min(30rem, 74vw); border-radius: 16px; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line);
}
.card .shot { aspect-ratio: 16/10; }
.card .body { padding: 1.3rem 1.5rem 1.6rem; }
.card p { font-size: 0.94rem; margin: 0; }

/* ------------------------------------------------------------- services */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 1.4rem; }
.tile {
  padding: 1.7rem; border-radius: 15px; background: var(--bg-raised);
  border: 1px solid var(--line);
  transition: border-color 220ms ease, transform 220ms ease;
}
.tile:hover { border-color: color-mix(in srgb, var(--brand) 45%, transparent); transform: translateY(-3px); }
.tile p { font-size: 0.94rem; margin: 0; }

/* ------------------------------------------------------------------ map */
.mapsec {
  /* Same vertical rhythm as .band. */
  padding: clamp(5rem, 12vh, 9rem) 0;
  display: grid;
  align-items: center;
  border-block: 1px solid var(--line);
}

.mapsec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.map-card h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.map-phone {
  display: inline-block;
  margin-top: 0.4rem;
  font: 700 clamp(1.2rem, 1rem + 1vw, 1.6rem)/1 ui-monospace, monospace;
  letter-spacing: 0.02em;
  color: var(--brand-lt);
  text-decoration: none;
  border-bottom: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
  padding-bottom: 0.15rem;
}
.map-phone:hover, .map-phone:focus-visible { color: var(--ink); border-bottom-color: var(--brand-lt); }
.map-card p:last-of-type { margin-bottom: 0; }
.map-mail {
  display: block;
  margin-top: 0.5rem;
  font: 600 clamp(0.9rem, 0.8rem + 0.4vw, 1.05rem)/1 ui-monospace, monospace;
  color: var(--brand-lt); text-decoration: none;
}
.map-mail:hover, .map-mail:focus-visible { color: var(--ink); }

/*
 * Deliberately modest. Leaflet's cost scales with the map's pixel area, and
 * this fly-through crosses ~12 integer zoom levels — each one re-tiling the
 * whole surface. A 620x440 panel is roughly a quarter of the pixels a
 * full-bleed map would need, so roughly a quarter of the tiles.
 */
.map-panel {
  aspect-ratio: 7 / 5;
  max-height: 48svh;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
  background: var(--bg-raised);
}

/* Pin colours, consumed by cue.css: red pin, bold black label on white. */
.map-panel {
  --cue-pin-color: #e02424;
  --cue-pin-label-bg: rgb(255 255 255 / 0.95);
  --cue-pin-label-color: #000;
}
.map-panel .cue-pin-label { font-size: 15px; font-weight: 700; }

/* ---------------------------------------------------------------- deck */
.deck {
  height: 100svh;
  border-block: 1px solid var(--line);
  background: var(--bg-raised);
}

.slide {
  display: grid;
  align-items: center;
}

.slide-inner { max-width: 46rem; }
.slide h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); }

/* Give each slide its own tint so movement is obvious at a glance. */
.slide:nth-child(1) { background: linear-gradient(115deg, #101a2b, #0d1420); }
.slide:nth-child(2) { background: linear-gradient(115deg, #12212f, #0e1826); }
.slide:nth-child(3) { background: linear-gradient(115deg, #131d33, #0f1522); }
.slide:nth-child(4) { background: linear-gradient(115deg, #0f2433, #0d1a24); }

@media (max-width: 820px) {
  .mapsec-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .map-panel { max-height: 40svh; }
}

/* ----------------------------------------------------------------- form */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  grid-template-areas:
    "name    message"
    "email   message"
    "button  button"
    "status  status";
  gap: 0.9rem 1.2rem;
  margin-top: 1.5rem;
}
.contact-form label:nth-of-type(1) { grid-area: name; }
.contact-form label:nth-of-type(2) { grid-area: email; }
.contact-form label:nth-of-type(3) { grid-area: message; }
.contact-form label:nth-of-type(3) textarea { flex: 1; min-height: 0; resize: vertical; }
.contact-form label { display: flex; flex-direction: column; gap: 0.35rem; }
.contact-form button { grid-area: button; }
.contact-form .cue-form-status { grid-area: status; margin: 0; }
@media (max-width: 640px) {
  .contact-form { grid-template-columns: 1fr; grid-template-areas: "name" "email" "message" "button" "status"; }
}
.contact-form label { font-size: 0.92rem; color: var(--ink-dim); }
.contact-form input, .contact-form textarea {
  padding: 0.65rem 0.8rem; border-radius: 9px; font: inherit;
  color: var(--ink); background: var(--bg-raised); border: 1px solid var(--line);
}
.contact-form input:focus-visible, .contact-form textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}
.contact-form [aria-invalid="true"] { border-color: #d9534f; }
.contact-form .cue-field-error { color: #e88; font-size: 0.85rem; }
.contact-form button {
  justify-self: start; padding: 0.7rem 1.6rem; border-radius: 9px; border: 0;
  font: 600 1rem/1 inherit; color: #fff; background: var(--brand); cursor: pointer;
}
.contact-form button[disabled] { opacity: 0.6; cursor: wait; }
.contact-form .cue-form-status { color: var(--brand-lt); }
.contact-form.is-error .cue-form-status { color: #e88; }

/* ------------------------------------------------------ inner-page head */
/* Inner pages open with extra air above the h1, echoing the home hero. */
.page-head, .about-jon { padding-top: clamp(8rem, 20vh, 13rem); }
.page-head { padding-bottom: clamp(2rem, 5vh, 3.5rem); }
.page-head h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  letter-spacing: -0.03em;
  max-width: 24ch;
}
.page-head .lede { max-width: 62ch; }
.page-head .lede a { color: var(--brand-lt); }

/* ------------------------------------------------------------------ faq */
.faq { display: grid; gap: 0.7rem; max-width: 54rem; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-raised);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  font: 400 1.3rem/1 ui-monospace, monospace;
  color: var(--brand-lt);
  transition: rotate 200ms ease;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq summary:hover, .faq summary:focus-visible { color: var(--brand-lt); }
.faq .faq-body { padding: 0 1.2rem 1.1rem; }
.faq .faq-body p { margin: 0 0 0.6rem; max-width: 65ch; }
.faq .faq-body p:last-child { margin-bottom: 0; }
.faq .faq-body a { color: var(--brand-lt); }

/* Unmissable placeholder for answers the owner still has to supply.
   Must never ship — grep for .todo before launch. */
.todo {
  color: #ffb84d;
  border-left: 3px solid #ffb84d;
  padding-left: 0.8rem;
  font-style: italic;
}

.faq-cta a { color: var(--brand-lt); }

/* ---------------------------------------------------------------- about */
.page-h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  letter-spacing: -0.03em;
  max-width: 24ch;
}
.about-jon .lede { max-width: 62ch; }
/* Second text block in the same column: clear break from the intro. */
.about-second { margin-top: clamp(2.5rem, 6vh, 4.5rem); }
.about-grid {
  display: grid;
  /* Photo column trimmed ~20% (was 1.15fr/1fr); the text takes the slack. */
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-photos { display: grid; gap: 1.4rem; align-content: start; }
.about-photos figure { margin: 0; }
.about-photos img {
  display: block; width: 100%; height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgb(0 0 0 / 0.4);
}
.about-photos figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------- footer */
.site-footer { padding: 5rem 0 3rem; border-top: 1px solid var(--line); }
.site-footer p { font-size: 0.87rem; }

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

/*
 * Drawer skin. cue.css handles position/transition; appearance is ours.
 * These hang off .cue-drawer-mode, which the drawer effect toggles at its
 * breakpoint — no media query needed here.
 */
.site-nav.cue-drawer-mode {
  background: var(--bg-raised);
  border-left: 1px solid var(--line);
  padding: 5rem 1.4rem 2rem;
}

.site-nav.cue-drawer-mode > ul { display: block; }
.site-nav.cue-drawer-mode li { margin-bottom: 0.25rem; }
.site-nav.cue-drawer-mode a {
  display: block;
  padding: 0.7rem 0.8rem;
  font-size: 1.05rem;
}

/* Items with submenus: label and caret share a row; the panel drops below. */
.site-nav.cue-drawer-mode .cue-has-submenu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.site-nav.cue-drawer-mode .cue-has-submenu > a { flex: 1; }
.site-nav.cue-drawer-mode .cue-submenu { width: 100%; }

/* Mega cards stack as a compact list in the drawer. */
.site-nav.cue-drawer-mode .cue-submenu {
  padding: 0.2rem 0 0.4rem 0.8rem;
}
.site-nav.cue-drawer-mode .cue-submenu a { font-size: 0.95rem; padding: 0.5rem 0.8rem; }
.site-nav.cue-drawer-mode .cue-submenu .shot { display: none; }
.site-nav.cue-drawer-mode .cue-submenu small { display: block; color: var(--ink-dim); font-size: 0.78rem; }

.cue-drawer-toggle { color: var(--ink); margin-left: auto; }
/* Keep the toggle usable while the header itself is peeking/hidden. */
.site-header .cue-drawer-toggle { position: relative; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ═══════════════════════════════════════════ macphersoncc.com homepage ═══ */

/* --- hero: headline left, devices panel right --- */
.hero-home { min-height: 92svh; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-home h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4.2rem); max-width: 18ch; }
.eyebrow .amp { color: var(--ink-dim); }

/* Framed-panel variant (photos). */
.hero-visual {
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 28px 70px rgb(0 0 0 / 0.5);
  aspect-ratio: 16 / 10;
}

/* Free-floating variant: transparent illustration, no card chrome. */
.hero-visual.hero-float {
  border: 0;
  background: none;
  box-shadow: none;
  aspect-ratio: auto;
  overflow: visible;
  margin: 0;
}
.hero-float img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 48px rgb(0 0 0 / 0.55));
}
/* No duotone pseudo-layers on the float variant. */
.hero-float::before, .hero-float::after { display: none; }

/* --- hero work stack: real client sites fanned like a hand of cards --- */
.work-stack {
  position: relative;
  aspect-ratio: 1 / 1.02;
  /* Explicit width: auto margins defeat grid stretch, and the absolutely
     positioned cards give the box no intrinsic size of its own. */
  width: min(100%, 36rem);
  margin-inline: auto;
}
.work-card {
  position: absolute;
  width: 58%;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  box-shadow: 0 22px 55px rgb(0 0 0 / 0.55);
  overflow: hidden;
  transition: translate 220ms ease, box-shadow 220ms ease;
}
.work-card:nth-child(1) { top: 0;   left: 2%;  rotate: -4deg;   z-index: 1; }
.work-card:nth-child(2) { top: 15%; left: 38%; rotate: 2.5deg;  z-index: 2; }
.work-card:nth-child(3) { top: 36%; left: 0;   rotate: -2deg;   z-index: 3; }
.work-card:nth-child(4) { top: 52%; left: 34%; rotate: 3.5deg;  z-index: 4; }
.work-card:hover { translate: 0 -6px; box-shadow: 0 30px 70px rgb(0 0 0 / 0.65); }
.work-card img { display: block; width: 100%; height: auto; }

/* Miniature browser chrome: three dots and the client's domain. */
.work-chrome {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 10px;
  background: color-mix(in srgb, var(--bg) 65%, var(--bg-raised));
  border-bottom: 1px solid var(--line);
}
.work-chrome i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line);
}
.work-chrome span {
  margin-left: 6px;
  font: 500 0.66rem/1 ui-monospace, monospace;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.checks {
  list-style: none; margin: 1.6rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1.5rem;
  max-width: 30rem;
}
.checks li {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: 0.98rem;
}
.checks li::before {
  content: '✓';
  display: grid; place-items: center;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  color: var(--brand-lt); font-size: 0.8rem; flex: none;
}

/* --- featured clients: live site videos --- */
.clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: 1.4rem;
  margin-top: 2.5rem;
}
.client-card {
  display: block; text-decoration: none;
  border-radius: 15px; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line);
  transition: border-color 220ms ease;
}
.client-card:hover { border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.client-card video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.client-name {
  display: block; padding: 0.9rem 1.2rem;
  font-weight: 600; font-size: 0.95rem; color: var(--brand-lt);
}

/* --- three-phase process --- */
.process { background: var(--bg-raised); border-block: 1px solid var(--line); }
.process h2 { text-align: center; }
.process-intro { max-width: 68ch; margin-inline: auto; text-align: center; }
.steps-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.2rem;
}
.step-tile {
  flex: 1 1 16rem;
  position: relative;
  padding: 1.8rem;
  border-radius: 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: box-shadow 250ms ease, border-color 250ms ease, transform 250ms ease;
}

/* Glow pools underneath on hover — and on keyboard focus, same courtesy. */
.step-tile:hover, .step-tile:focus-within {
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  box-shadow: 0 24px 60px -14px rgb(11 118 239 / 0.5);
  transform: translateY(-3px);
}

.step-icon {
  position: absolute;
  top: 1.4rem; right: 1.4rem;
  width: auto; height: 60px;
  opacity: 0.95;
}
.step-chip {
  display: inline-block;
  font: 700 0.75rem/1 ui-monospace, monospace;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand-lt);
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  margin-bottom: 1rem;
}
.step-tile h3 { font-size: 1.25rem; }
.step-tile p { font-size: 0.94rem; margin: 0; }
.beyond {
  margin: 2.2rem auto 0; max-width: 74ch;
  font-size: 0.95rem;
  text-align: center;
}
.beyond strong { color: var(--ink); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 34rem; }
  .hero-home { min-height: auto; padding-top: 7rem; }
}

/* --- homepage service cards --- */
.svc-cards {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
}
.svc-card {
  flex: 1 1 24rem;
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  text-decoration: none; overflow: hidden;
  border-radius: 15px; background: var(--bg-raised); border: 1px solid var(--line);
  transition: border-color 220ms ease, box-shadow 250ms ease;
}
.svc-card:hover, .svc-card:focus-visible {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 22px 55px -14px rgb(11 118 239 / 0.45);
}
.svc-card .shot { height: 100%; min-height: 11rem; }
.svc-body { padding: 1.4rem 1.5rem; }
.svc-body h3 { font-size: 1.15rem; color: var(--ink); }
.svc-body p { font-size: 0.92rem; margin: 0 0 0.8rem; }
.svc-more { font-size: 0.88rem; font-weight: 600; color: var(--brand-lt); }

/* --- software product bands --- */
.product { border-block: 1px solid var(--line); background: var(--bg-raised); }
.product-alt { background: transparent; }
.product-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 60rem;
  padding: clamp(1.6rem, 4vw, 2.8rem);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: box-shadow 250ms ease, border-color 250ms ease, transform 250ms ease;
}
.product-alt .product-inner { background: var(--bg-raised); }

/* Same glow language as the step tiles above. */
.product-inner:hover, .product-inner:focus-within {
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  box-shadow: 0 24px 60px -14px rgb(11 118 239 / 0.5);
  transform: translateY(-3px);
}
.product-flip { grid-template-columns: minmax(0, 1fr) auto; }
.product-flip .product-badge { order: 2; }
.product-badge { margin: 0; }
/* The curbside badge is a circle on an opaque white square — crop it round. */
.product-alt .product-badge img { border-radius: 50%; }
.product-badge img {
  display: block; width: clamp(10rem, 20vw, 15rem); height: auto;
  filter: drop-shadow(0 16px 36px rgb(0 0 0 / 0.5));
}
.product-sub {
  display: block; font-size: 0.55em; font-weight: 500;
  color: var(--ink-dim); letter-spacing: 0; margin-top: 0.2em;
}
.product-copy { max-width: 52ch; }

@media (max-width: 700px) {
  .product-inner, .product-flip { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .product-flip .product-badge { order: 0; }
  .product-copy { margin-inline: auto; }
}

@media (max-width: 640px) {
  .svc-card { grid-template-columns: 1fr; }
  .svc-card .shot { min-height: 9rem; }
}

/* Brand badges in the mega menu: no duotone — contained on a light chip. */
.site-nav .cue-submenu--mega .logo-chip {
  margin: 0 0 0.6rem;
  border-radius: 7px;
  background: #f4f6fa;
  display: grid;
  place-items: center;
  padding: 0.5rem;
}
.site-nav .cue-submenu--mega .logo-chip img {
  height: 100%; width: auto; object-fit: contain;
}

/* Mega menu images: natural colours — the duotone haze reads wrong at
   thumbnail size. Kill the overlay and the grayscale filter. */
.site-nav .cue-submenu--mega .shot::before,
.site-nav .cue-submenu--mega .shot::after { display: none; }
.site-nav .cue-submenu--mega .shot img { filter: none; }

/* Logo chips: fill the chip box, contain the artwork — cannot overflow. */
.site-nav .cue-submenu--mega .logo-chip { display: block; }
.site-nav .cue-submenu--mega .logo-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* Footer */
.site-footer { padding: 3.5rem 0 0; border-top: 1px solid var(--line); background: var(--bg-raised); }
.foot-grid {
  display: grid;
  grid-template-columns: auto 1.4fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding-bottom: 2.5rem;
}
.foot-logo img { display: block; height: 152px; width: auto; }
.foot-name { font-weight: 700; color: var(--ink); margin: 0 0 0.15rem; }
.foot-name span { color: var(--brand-lt); font-weight: 500; }
.foot-where { font-size: 0.88rem; margin: 0 0 0.5rem; }
.foot-phone {
  font: 700 1.05rem/1 ui-monospace, monospace;
  color: var(--brand-lt); text-decoration: none;
}
.foot-phone:hover, .foot-phone:focus-visible { color: var(--ink); }
.foot-mail {
  display: block;
  margin-top: 0.45rem;
  font: 500 0.9rem/1 ui-monospace, monospace;
  color: var(--brand-lt); text-decoration: none;
}
.foot-mail:hover, .foot-mail:focus-visible { color: var(--ink); }
.foot-col h4 {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-dim); margin: 0 0 0.8rem;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.foot-col a { text-decoration: none; font-size: 0.92rem; color: var(--ink-dim); }
.foot-col a:hover, .foot-col a:focus-visible { color: var(--brand-lt); }
.foot-legal { border-top: 1px solid var(--line); padding-block: 1.1rem; }
.foot-legal p { font-size: 0.82rem; margin: 0; }
@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-logo { grid-column: 1 / -1; }
  .foot-logo img { height: 96px; }
}
