/* ==========================================================================
   Million Design Labs — shared stylesheet
   --------------------------------------------------------------------------
   To rebrand for a client, edit the variables in :root below. Everything
   else reads from them. See TEMPLATE-NOTES.md for the full checklist.
   ========================================================================== */

:root {
  /* Brand colours */
  --color-ink: #121212;            /* dark backgrounds, body text */
  --color-paper: #faf8f5;          /* main page background */
  --color-surface: #ffffff;        /* cards, form fields */
  --color-muted: #5c5c5c;          /* secondary text on light (6.3:1) */
  --color-line: #e6e2dc;           /* borders and dividers on light */
  --color-accent: #ff8a00;         /* buttons and highlights; pair with --color-ink text */
  --color-accent-strong: #a34e00;  /* accent as text on light backgrounds (5.4:1) */
  --color-on-dark: #f5f3f0;        /* text on --color-ink */
  --color-on-dark-muted: #a6a6a6;  /* secondary text on --color-ink (7.7:1) */
  --color-line-dark: #2a2a2a;      /* borders on --color-ink */
  --color-placeholder-bg: #fff4d6;
  --color-placeholder-ink: #6b4a00;

  /* Fonts (loaded in each page <head>) */
  --font-heading: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Type scale (fluid between 375px and 1280px) */
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.75vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.4rem + 1.5vw, 2.625rem);
  --text-3xl: clamp(2.25rem, 1.6rem + 2.8vw, 4rem);

  /* Spacing */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: clamp(3rem, 2rem + 4vw, 5.5rem);
  --space-3xl: clamp(4rem, 2.5rem + 6vw, 8rem);

  /* Layout */
  --container: 72rem;
  --container-narrow: 44rem;
  --gutter: 1rem;
  --header-height: 3.5rem;                       /* height of the floating nav bar */
  --header-gap: 0.75rem;                         /* space between the bar and the top of the window */
  --header-offset: calc(var(--header-height) + var(--header-gap) * 2);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);
  --transition: 160ms ease;

  /* Signature layer (see the "Signature" section at the end of this file) */
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --font-accent: "Instrument Serif", Georgia, "Times New Roman", serif; /* accent words in headlines */
  --radius-sig: 1.5rem 0.25rem 1.5rem 0.25rem;   /* the logo mark's corners: round, sharp, round, sharp */
  --radius-sig-sm: 0.875rem 0.1875rem 0.875rem 0.1875rem;
  --slant: clamp(1.5rem, 4vw, 3.5rem);           /* depth of the diagonal cut on hero edges */
  --grid-line: rgb(255 255 255 / 0.045);         /* blueprint grid on dark sections */
}

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
}

/* ==========================================================================
   Reset and base
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-offset) + var(--space-md));
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

/* Nothing that animates in from the side may widen the page on phones.
   clip (not hidden) keeps the sticky header working. */
body { overflow-x: clip; }

img, svg, video { display: block; max-width: 100%; height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); line-height: 1.2; }
h4 { font-size: var(--text-lg); line-height: 1.3; }

p { text-wrap: pretty; }

a { color: var(--color-accent-strong); text-underline-offset: 0.2em; }
a:hover { color: var(--color-ink); }

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

::selection { background: var(--color-accent); color: var(--color-ink); }

/* ==========================================================================
   Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 100;
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent);
  color: var(--color-ink);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-md); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }

.section--dark {
  background: var(--color-ink);
  color: var(--color-on-dark);
}
.section--dark a:not(.btn) { color: var(--color-accent); }
.section--dark a:not(.btn):hover { color: var(--color-on-dark); }

.section--surface { background: var(--color-surface); }

.stack > * + * { margin-top: var(--space-md); }
.stack-lg > * + * { margin-top: var(--space-lg); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
}
.section--dark .eyebrow { color: var(--color-accent); }

.lead { font-size: var(--text-lg); color: var(--color-muted); max-width: 40rem; }
.section--dark .lead { color: var(--color-on-dark-muted); }

.muted { color: var(--color-muted); }
.section--dark .muted { color: var(--color-on-dark-muted); }

.text-center { text-align: center; }
.text-center .lead { margin-inline: auto; }

.section-head { max-width: 44rem; margin-bottom: var(--space-xl); }
.section-head > * + * { margin-top: var(--space-sm); }
.section-head .eyebrow { display: block; }
.section-head.text-center { margin-inline: auto; }

.grid { display: grid; gap: var(--space-lg); }

/* Phones: long card rows become a sideways swipe, with the next card peeking
   in, instead of a tall stack. Everything stays in the page for search. */
@media (max-width: 47.99rem) {
  .swipe {
    display: flex;
    gap: var(--space-md);
    margin-inline: calc(var(--gutter) * -1);
    padding: var(--space-2xs) var(--gutter) var(--space-sm);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe > * { flex: 0 0 86%; scroll-snap-align: start; }
}

@media (min-width: 48rem) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Clearly visible marker for content still to be supplied */
.placeholder {
  display: inline-block;
  padding: 0.1em 0.45em;
  background: var(--color-placeholder-bg);
  color: var(--color-placeholder-ink);
  border: 1px dashed currentColor;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  /* Hover ring: --btn-ring is the outline colour, chosen to contrast with
     the button's hover colour and with whatever sits behind it */
  --btn-ring: var(--color-accent);
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: background-color var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    outline-color var(--transition);
}
.btn:hover { outline-color: var(--btn-ring); }
.btn:focus-visible { outline: 3px solid var(--btn-ring); }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--color-accent); color: var(--color-ink); }
.btn--primary:hover { background: var(--color-ink); color: var(--color-on-dark); }
.section--dark .btn--primary:hover,
.hero .btn--primary:hover,
.site-header .btn--primary:hover { background: var(--color-on-dark); color: var(--color-ink); }

.btn--secondary { border-color: var(--color-ink); color: var(--color-ink); background: transparent; }
.btn--secondary:hover { background: var(--color-ink); color: var(--color-on-dark); }
.section--dark .btn--secondary,
.hero .btn--secondary { border-color: var(--color-on-dark); color: var(--color-on-dark); }
.section--dark .btn--secondary:hover,
.hero .btn--secondary:hover { background: var(--color-on-dark); color: var(--color-ink); }

.btn--sm { min-height: 2.5rem; padding: 0.5rem 1.1rem; font-size: 0.9375rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ==========================================================================
   Header
   ========================================================================== */

/* The header floats over the page: a transparent wrapper fixed to the top,
   holding a glass bar shaped like the buttons. The hero's grid and glow
   show through it, and it stays readable over light sections too. */
.site-header {
  position: fixed;
  top: var(--header-gap);
  left: 0;
  right: 0;
  z-index: 50;
  padding-inline: var(--gutter);
  color: var(--color-on-dark);
  pointer-events: none; /* only the bar itself catches clicks */
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: calc(var(--container) + 1.5rem);
  min-height: var(--header-height);
  margin-inline: auto;
  padding: 0.375rem 0.375rem 0.375rem 0.75rem;
  background: rgb(18 18 18 / 0.72);
  border: 1px solid rgb(255 255 255 / 0.09);
  border-radius: var(--radius-sig-sm);
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.5), inset 0 1px 0 rgb(255 255 255 / 0.04);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  pointer-events: auto;
}

/* Browsers without backdrop blur get a solid bar instead */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header-inner { background: var(--color-ink); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-on-dark);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.brand:hover { color: var(--color-on-dark); }
.brand img { width: 36px; height: 36px; border-radius: var(--radius-sig-sm); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-line-dark);
  border-radius: var(--radius-sm);
  color: var(--color-on-dark);
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: outline-color var(--transition);
}
.nav-toggle:hover { outline-color: var(--color-accent); }

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile: nav opens as a second floating panel below the bar */
.site-nav {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  background: var(--color-ink);
  border: 1px solid rgb(255 255 255 / 0.09);
  border-radius: var(--radius-sig);
  box-shadow: 0 24px 50px -20px rgb(0 0 0 / 0.6);
  /* The header is fixed, so a tall menu (Services open) scrolls inside itself */
  max-height: calc(100vh - var(--header-offset) - var(--space-md));
  max-height: calc(100dvh - var(--header-offset) - var(--space-md));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.site-nav.is-open { display: block; }

.site-nav ul { list-style: none; padding: 0; }
.site-nav > ul { margin-bottom: var(--space-md); }

/* Top-level links and the Services button (phone menu) */
.site-nav > ul > li > a,
.nav-menu-btn {
  display: block;
  width: 100%;
  padding: var(--space-sm) 0;
  color: var(--color-on-dark);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--color-line-dark);
  background: none;
  cursor: pointer;
}
.site-nav > ul > li > a:hover,
.site-nav > ul > li > a[aria-current="page"],
.nav-menu-btn:hover,
.nav-menu-btn.is-current { color: var(--color-accent); }

.nav-menu-btn { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.nav-menu-btn__chevron {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.2rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition);
}
.nav-menu-btn[aria-expanded="true"] .nav-menu-btn__chevron { transform: translateY(0.2rem) rotate(-135deg); }

/* Services dropdown: on phones it opens as a list inside the menu */
.mega { display: none; padding: var(--space-xs) 0 var(--space-md); border-bottom: 1px solid var(--color-line-dark); }
.nav-menu-btn[aria-expanded="true"] + .mega { display: grid; gap: var(--space-xs); }

.mega__list { display: grid; gap: 0.125rem; margin: 0; }
.mega__list a {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-xs);
  border-radius: var(--radius-sig-sm);
  color: var(--color-on-dark);
  text-decoration: none;
  transition: background-color var(--transition);
}
.mega__list a:hover { background: rgb(255 255 255 / 0.06); color: var(--color-on-dark); }

.mega__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sig-sm);
  background: rgb(255 138 0 / 0.12);
  color: var(--color-accent);
}
.mega__text { display: grid; gap: 0.125rem; }
.mega__text strong { font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 600; }
.mega__text span { font-size: 0.8125rem; line-height: 1.4; color: var(--color-on-dark-muted); }

.mega__promo { display: none; }
.mega__all { padding: var(--space-xs); font-size: 0.875rem; font-weight: 600; color: var(--color-accent); }
.mega__all::after { content: " →" / ""; }

.site-nav .btn { width: 100%; white-space: nowrap; }

/* No-JS fallback: show nav inline so links are always reachable */
.no-js .nav-toggle { display: none; }
.no-js .site-nav { display: block; position: static; padding: 0 0 var(--space-md); border: 0; background: none; box-shadow: none; }
.no-js .header-inner { flex-wrap: wrap; }

@media (min-width: 72rem) { /* full nav: keep in step with main.js */
  .nav-toggle { display: none; }

  .site-nav,
  .no-js .site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    max-height: none;
    overflow: visible;
  }

  .site-nav > ul { display: flex; gap: 0.25rem; margin: 0; }

  /* Links share the button shape: a soft tile on hover, orange tint when current */
  .site-nav > ul > li > a,
  .nav-menu-btn {
    width: auto;
    padding: 0.5rem 0.875rem;
    border: 0;
    border-radius: var(--radius-sig-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--color-on-dark-muted);
    transition: background-color var(--transition), color var(--transition);
  }
  .site-nav > ul > li > a:hover,
  .nav-menu-btn:hover,
  .has-menu:hover .nav-menu-btn { color: var(--color-on-dark); background: rgb(255 255 255 / 0.06); }
  .site-nav > ul > li > a[aria-current="page"],
  .nav-menu-btn.is-current { color: var(--color-accent); background: rgb(255 138 0 / 0.12); }
  .nav-menu-btn__chevron { width: 0.375rem; height: 0.375rem; }

  /* Services dropdown: a floating panel under the bar, same glass and shape.
     Opens on hover, or on click/Enter via main.js. */
  .mega {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    width: min(50rem, calc(100vw - var(--gutter) * 2));
    transform: translateX(-50%);
    grid-template-columns: 1fr 15rem;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-ink);
    border: 1px solid rgb(255 255 255 / 0.09);
    border-radius: var(--radius-sig);
    box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.65);
  }
  /* Invisible bridge so moving the mouse down from "Services" keeps it open */
  .mega::before { content: ""; position: absolute; left: 0; right: 0; top: -0.75rem; height: 0.75rem; }
  .has-menu:hover .mega,
  .nav-menu-btn[aria-expanded="true"] + .mega { display: grid; }

  .mega__list { grid-template-columns: 1fr 1fr; align-content: start; }

  .mega__promo {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    border-radius: var(--radius-sig-sm);
    background:
      radial-gradient(circle at 100% 0%, rgb(255 138 0 / 0.25), transparent 60%),
      #1b1b1b;
    border: 1px solid var(--color-line-dark);
  }
  .mega__promo .eyebrow { color: var(--color-accent); font-size: 0.6875rem; }
  .mega__promo-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.125rem; line-height: 1.25; color: var(--color-on-dark); }
  .mega__promo a { margin-top: auto; font-size: 0.875rem; font-weight: 600; color: var(--color-accent); }
  .mega__promo a::after { content: " →" / ""; }

  .mega__all { grid-column: 1 / -1; padding: var(--space-xs) var(--space-xs) 0; border-top: 1px solid var(--color-line-dark); }

  .site-nav .btn { width: auto; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-ink);
  color: var(--color-on-dark-muted);
  padding-block: var(--space-xl) var(--space-lg);
  font-size: 0.9375rem;
}
.site-footer a { color: var(--color-on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--color-accent); text-decoration: underline; }
.site-footer .brand { color: var(--color-on-dark); }

/* Brand and page links on one row (they wrap on phones) */
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md) var(--space-xl);
}

.footer-nav,
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  list-style: none;
  padding: 0;
}
.footer-nav a { color: var(--color-on-dark); }

.footer-contact {
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line-dark);
  font-size: var(--text-sm);
}

/* Contact-page link list (outside the footer) */
.footer-links { list-style: none; padding: 0; }
.footer-links li + li { margin-top: var(--space-xs); }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.card > * + * { margin-top: var(--space-sm); }

.section--dark .card {
  background: #1b1b1b;
  border-color: var(--color-line-dark);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-2xl) var(--space-3xl);
  background: var(--color-ink);
  color: var(--color-on-dark);
}

/* Soft accent glow, echoing the logo mark */
.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -35%;
  width: 70vw;
  max-width: 48rem;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgb(255 138 0 / 0.22), transparent 65%);
  pointer-events: none;
}

.hero .container { position: relative; }

.hero h1 { max-width: 14ch; }
/* .hero h1 em styling lives in the Signature section (accent words) */

.hero .lead { color: var(--color-on-dark-muted); }

/* Shorter hero for inner pages */
.hero--page { padding-block: var(--space-2xl); }
.hero--page h1 { max-width: 20ch; }

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-on-dark-muted);
}

.trust-list li { display: flex; align-items: center; gap: var(--space-xs); }

.trust-list li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ==========================================================================
   Lists, steps and feature blocks
   ========================================================================== */

.check-list { padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 1.75rem; }
.check-list li + li { margin-top: var(--space-xs); }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 0.9rem;
  height: 0.5rem;
  border-left: 2px solid var(--color-accent-strong);
  border-bottom: 2px solid var(--color-accent-strong);
  transform: rotate(-45deg);
}
.section--dark .check-list li::before { border-color: var(--color-accent); }

.problem-card h3 { font-size: var(--text-lg); }

.steps {
  display: grid;
  gap: var(--space-lg);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step { counter-increment: step; }

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--space-md);
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
}

.step h3 { font-size: var(--text-lg); }

/* ==========================================================================
   Pricing cards
   ========================================================================== */

.price-card { display: flex; flex-direction: column; }
.price-card .check-list { margin-top: var(--space-md); }

.price-card--featured {
  border: 2px solid var(--color-ink);
  box-shadow: var(--shadow);
}

.price {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* How a service is charged, in place of a figure (e.g. "Fixed quote") */
.price-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sig-sm);
  background: rgb(255 138 0 / 0.12);
  color: var(--color-accent-strong);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.package .price-tag { color: var(--color-accent); }

.price small {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--color-muted);
}

.guarantee {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  border-left: 4px solid var(--color-accent);
  background: var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.guarantee strong { font-family: var(--font-heading); }

.price-card__note { font-size: var(--text-sm); color: var(--color-muted); }
.price-card .btn { margin-top: auto; }
.price-card .check-list { margin-bottom: var(--space-lg); }

.badge {
  align-self: flex-start;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ==========================================================================
   FAQs (native <details>, no JavaScript needed)
   ========================================================================== */

.faq { border-top: 1px solid var(--color-line); }

.faq details { border-bottom: 1px solid var(--color-line); }

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }

.faq details > div { padding-bottom: var(--space-lg); color: var(--color-muted); max-width: 40rem; }
.faq details > div > * + * { margin-top: var(--space-sm); }

/* ==========================================================================
   Case study previews
   ========================================================================== */

.case-card {
  display: block;
  overflow: hidden;
  padding: 0;
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.case-card:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow); }

.case-card__media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: var(--space-md);
  background: #efebe5;
  text-align: center;
}
.case-card__media:has(img) { padding: 0; }
.case-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

.review-quote { padding: var(--space-lg); border-left: 4px solid var(--color-accent); background: var(--color-surface); border-radius: 0 var(--radius) var(--radius) 0; }
.review-quote blockquote { font-size: var(--text-lg); line-height: 1.5; color: var(--color-ink); }
.review-quote figcaption { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }

.case-card__body { padding: var(--space-lg); }
.case-card__body > * + * { margin-top: var(--space-xs); }

.case-card__link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-weight: 600;
  color: var(--color-accent-strong);
}

/* Dashed "next could be you" card on the Work page */
.case-card--invite {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-xl);
  border-style: dashed;
  border-width: 2px;
  background: transparent;
}
.case-card--invite > * + * { margin-top: 0; }

/* ==========================================================================
   Case study page
   ========================================================================== */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-on-dark-muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: var(--space-xs); }
.breadcrumb a { color: var(--color-on-dark-muted); }
.breadcrumb a:hover { color: var(--color-accent); }

/* Screenshot frame; holds a placeholder until a real image is added */
.shot {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  padding: var(--space-md);
  background: #efebe5;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  text-align: center;
}
.shot img { width: 100%; height: auto; }
.shot:has(img) { padding: 0; aspect-ratio: auto; }

.shot--overlap { margin-top: calc(var(--space-2xl) * -1); position: relative; box-shadow: var(--shadow); }

.case-layout { display: grid; gap: var(--space-xl); align-items: start; }

@media (min-width: 56rem) {
  .case-layout { grid-template-columns: 1fr 2fr; gap: var(--space-2xl); }
  .case-facts { position: sticky; top: calc(var(--header-offset) + var(--space-md)); }
}

.case-facts dl { display: grid; gap: var(--space-md); }
.case-facts dt {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.case-facts dd { margin: var(--space-2xs) 0 0; font-weight: 500; }
.case-facts .btn { width: 100%; margin-top: var(--space-lg); }

.case-body > section + section { margin-top: var(--space-2xl); }
.case-body h2 { font-size: var(--text-xl); }
.case-body .lead { max-width: none; }

.next-project {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

/* ==========================================================================
   About page
   ========================================================================== */

.story { display: grid; gap: var(--space-xl); align-items: center; }

@media (min-width: 56rem) {
  .story { grid-template-columns: 1fr 1.3fr; gap: var(--space-2xl); }
}

.portrait {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  padding: var(--space-md);
  background: #efebe5;
  border-radius: var(--radius);
  text-align: center;
}
.portrait:has(img) { padding: 0; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.signature { font-family: var(--font-heading); font-weight: 600; }
.signature span { display: block; font-family: var(--font-body); font-weight: 400; font-size: var(--text-sm); color: var(--color-muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.1;
  color: var(--color-accent);
}
.stats span { display: block; margin-top: var(--space-2xs); line-height: 1.4; color: var(--color-on-dark-muted); font-size: 0.9375rem; }

.promise-num {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-accent-strong);
}

.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding: 0; list-style: none; }
.chips li {
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: var(--text-sm);
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl) var(--space-2xl);
  padding: 0;
  list-style: none;
}
.h-sm { font-size: var(--text-xl); }

.review-quote--center { max-width: 44rem; margin: var(--space-2xl) auto 0; }

.logo-row img { height: 56px; width: auto; filter: grayscale(1); opacity: 0.75; transition: filter var(--transition), opacity var(--transition); }
.logo-row a:hover img, .logo-row a:focus-visible img { filter: none; opacity: 1; }

/* ==========================================================================
   Reviews
   ========================================================================== */

.review-card { display: flex; flex-direction: column; gap: var(--space-md); }
.review-card > * + * { margin-top: 0; }
.review-card h3 { font-size: var(--text-lg); line-height: 1.3; }
.review-card blockquote { color: var(--color-muted); }

/* Phones: long reviews show four lines; main.js adds a "Read full review"
   button. The full words stay in the page for search engines. */
@media (max-width: 47.99rem) {
  .review-card.is-clamped blockquote {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
}
.review-more {
  align-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-accent-strong);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
@media (min-width: 48rem) { .review-more { display: none; } }
.review-card figcaption { margin-top: auto; font-size: var(--text-sm); color: var(--color-muted); }

.stars { color: var(--color-accent-strong); letter-spacing: 0.15em; font-size: 1.125rem; }

/* ==========================================================================
   Call-to-action band
   ========================================================================== */

.section--accent { background: var(--color-accent); color: var(--color-ink); }
.section--accent .lead,
.section--accent .eyebrow { color: var(--color-ink); }

.btn--dark { background: var(--color-ink); color: var(--color-on-dark); }
.btn--dark:hover { background: var(--color-surface); color: var(--color-ink); }

/* On the orange band an orange ring would vanish, so it turns dark */
.section--accent .btn { --btn-ring: var(--color-ink); }

/* ==========================================================================
   Forms
   ========================================================================== */

.form { display: grid; gap: var(--space-lg); }
.form.card > * + * { margin-top: 0; } /* the grid gap handles spacing */

.form-row { display: grid; gap: var(--space-lg); }

@media (min-width: 40rem) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.field { display: grid; gap: var(--space-xs); }

.field label { font-weight: 600; font-size: 0.9375rem; }
.field .optional { font-weight: 400; color: var(--color-muted); }

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid #8a857e; /* 3.4:1 against surface for non-text contrast */
  border-radius: var(--radius-sm);
  font-size: 1rem; /* 16px stops iOS zooming on focus */
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field textarea { min-height: 9rem; resize: vertical; }

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: var(--color-ink);
  box-shadow: 0 0 0 3px var(--color-accent);
}

.field-hint { font-size: var(--text-sm); color: var(--color-muted); }

/* Honeypot: hidden from people, visible to bots */
.hidden-field { display: none; }

.required-note { font-size: var(--text-sm); color: var(--color-muted); }

.form .btn { justify-self: start; }

/* Contact page: form beside a short "what happens next" panel */
.contact-layout { display: grid; gap: var(--space-xl); align-items: start; }

@media (min-width: 56rem) {
  .contact-layout { grid-template-columns: 1.6fr 1fr; gap: var(--space-2xl); }
}

.contact-aside .steps { grid-template-columns: 1fr; gap: var(--space-md); }
.contact-aside .step { display: grid; grid-template-columns: auto 1fr; gap: 0 var(--space-md); }
.contact-aside .step::before { grid-row: span 2; margin: 0; width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.contact-aside h2 { font-size: var(--text-xl); }

.form-note { font-size: var(--text-sm); color: var(--color-muted); }

/* Long-form text: privacy policy, terms */
.prose { max-width: calc(40rem + var(--gutter) * 2); }
.prose > * + * { margin-top: var(--space-md); }
.prose h2 { margin-top: var(--space-xl); font-size: var(--text-xl); }
.prose h3 { margin-top: var(--space-lg); font-size: var(--text-lg); }
.prose h2 + *, .prose h3 + * { margin-top: var(--space-sm); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: var(--space-xs); }
.prose li::marker { color: var(--color-accent-strong); }

/* Cal.com booking calendar on the contact page */
.booking-embed {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sig);
  box-shadow: var(--shadow);
}
.booking-embed iframe { display: block; width: 100%; height: 56rem; border: 0; }

@media (min-width: 56rem) {
  .booking-embed iframe { height: 38rem; }
}

.booking-fallback { margin-top: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.contact-links a { color: var(--color-accent-strong); }
.contact-aside h3 { font-size: 1.0625rem; }

/* ==========================================================================
   Signature
   --------------------------------------------------------------------------
   The details that make this site recognisably Million Design Labs:
   - the logo mark's asymmetric corners on cards, images and buttons
   - the mark's diagonal cut on hero edges
   - a "designer who codes" layer: monospace spec labels, numbered
     sections, a blueprint grid, browser-framed screenshots
   For a client build, restyle or remove this section to give them
   their own signature (see TEMPLATE-NOTES.md).
   ========================================================================== */

/* --- Shapes from the logo mark ----------------------------------------- */

.card,
.shot,
.portrait,
.guarantee,
.review-quote,
.launch-log { border-radius: var(--radius-sig); }

.btn,
.nav-toggle,
.chips li,
.badge { border-radius: var(--radius-sig-sm); }

/* Primary actions carry a sliding arrow */
.btn--primary::after,
.btn--dark::after {
  content: "→" / "";
  display: inline-block;
  transition: transform var(--transition);
}
.btn--primary:hover::after,
.btn--dark:hover::after { transform: translateX(4px); }

/* --- Monospace spec labels ---------------------------------------------- */

.eyebrow,
.case-facts dt,
.badge,
.price small,
.price-card__note,
.promise-num,
.chips li,
.breadcrumb {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.eyebrow { font-weight: 500; font-size: 0.8125rem; }
.hero .eyebrow { color: var(--color-accent); }

/* --- Hero: blueprint grid, pointer glow and the diagonal cut ------------- */

.hero {
  --mx: 82%;
  --my: 18%;
  padding-bottom: calc(var(--space-3xl) + var(--slant));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
  background-color: var(--color-ink);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 3rem 3rem;
  background-position: -1px -1px;
}
.hero--page { padding-bottom: calc(var(--space-2xl) + var(--slant)); }

/* The hero runs up behind the floating header, so its content starts below it */
.hero { padding-top: calc(var(--header-offset) + var(--space-2xl)); }
.hero--page { padding-top: calc(var(--header-offset) + var(--space-xl)); }
main > :first-child:not(.hero) { padding-top: calc(var(--header-offset) + var(--space-xl)); }

/* Glow follows the pointer on devices that have one (set in main.js) */
.hero::before {
  top: auto;
  right: auto;
  left: var(--mx);
  top: var(--my);
  width: 46rem;
  max-width: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgb(255 138 0 / 0.2), transparent 62%);
  transition: left 600ms ease-out, top 600ms ease-out;
}

/* Grid fades out towards the bottom-left, away from the glow */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, transparent 30%, var(--color-ink) 85%);
  pointer-events: none;
}
.hero .container { z-index: 1; }

/* Accent word: one word per headline set in serif italic (an <em> inside
   h1/h2). Orange on dark backgrounds, darker orange on light ones, ink on
   the orange band. */
h1 em,
h2 em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em; /* the serif runs smaller than Inter Tight */
  letter-spacing: -0.01em;
  color: var(--color-accent-strong);
}
.hero h1 em,
.hero h2 em,
.section--dark h2 em,
.package h2 em { color: var(--color-accent); }
.section--accent h2 em { color: var(--color-ink); }

/* Homepage hero: copy beside the launch log */
.hero__grid { display: grid; gap: var(--space-2xl); align-items: center; }

@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: 1.15fr 1fr; }
}

/* --- Launch log: the 7-day build, played out as a terminal ------------- */

.launch-log {
  overflow: hidden;
  background: #0b0b0b;
  border: 1px solid var(--color-line-dark);
  box-shadow: 0 0 0 1px rgb(255 138 0 / 0.08), 0 30px 80px -30px rgb(255 138 0 / 0.35);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-on-dark-muted);
  animation: log-swipe 1s cubic-bezier(.7, 0, .2, 1) 0.15s both;
}

.launch-log__bar {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-line-dark);
  font-size: 0.75rem;
}
.launch-log__bar::before {
  content: "";
  width: 2.75rem;
  height: 0.625rem;
  background:
    radial-gradient(circle at 5px 50%, #3a3a3a 4px, transparent 4.5px),
    radial-gradient(circle at 21px 50%, #3a3a3a 4px, transparent 4.5px),
    radial-gradient(circle at 37px 50%, var(--color-accent) 4px, transparent 4.5px);
}

.launch-log ol { margin: 0; padding: var(--space-md); list-style: none; }

/* Blinking cursor once the build has played out */
.launch-log ol::after {
  content: "";
  display: block;
  width: 0.55em;
  height: 1.1em;
  margin-top: 0.3rem;
  background: var(--color-accent);
  opacity: 0;
  animation: caret 1.1s step-end 4s infinite;
}

.launch-log li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 0.2rem;
  opacity: 0;
  animation: log-in 360ms ease-out forwards;
  animation-delay: calc(var(--i, 0) * 420ms + 1000ms);
}
.launch-log li span:last-child { flex-shrink: 0; color: #6f6f6f; }
.launch-log .cmd { color: var(--color-on-dark); }
.launch-log .cmd::before { content: "$ "; color: var(--color-accent); }
.launch-log .ok::before { content: "✓ "; color: var(--color-accent); }

.launch-log .live { color: var(--color-on-dark); font-weight: 600; }
.launch-log .live::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgb(34 197 94 / 0.6);
  animation: pulse 2s infinite 4s;
}

/* --- Services page ------------------------------------------------------- */

.service-jump { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding: 0; list-style: none; }
.service-jump a {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: var(--radius-sig-sm);
  color: var(--color-on-dark);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}
.service-jump a:hover { border-color: var(--color-accent); color: var(--color-accent); }

.service { display: grid; gap: var(--space-xl); align-items: start; }
.service__text h2 { max-width: 22ch; }
.service__text .lead { max-width: 38rem; }
.service__text .check-list { margin-top: var(--space-lg); }

.service__price { display: grid; gap: var(--space-sm); justify-items: start; }
.service__price > * + * { margin-top: 0; }
.service__price .btn { margin-top: var(--space-xs); }
.service__price a:not(.btn) { font-size: var(--text-sm); }

@media (min-width: 56rem) {
  .service { grid-template-columns: 1fr 20rem; gap: var(--space-2xl); }
  .service__price { position: sticky; top: calc(var(--header-offset) + var(--space-md)); }
}

/* --- Loading screen -----------------------------------------------------
   Shown only when <html> has .is-loading (set by the inline script in each
   page head on the first page of a visit). main.js adds .is-loaded to wipe
   it away on the hero's diagonal. If JavaScript fails, it clears itself. */

.loader { display: none; }

.is-loading .loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background-color: var(--color-ink);
  background-image:
    radial-gradient(circle at 50% 45%, rgb(255 138 0 / 0.16), transparent 55%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 3rem 3rem, 3rem 3rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 112%);
  transition: clip-path 750ms cubic-bezier(.7, 0, .2, 1);
  animation: loader-out 750ms cubic-bezier(.7, 0, .2, 1) 3.5s forwards; /* failsafe */
}
.is-loaded .loader { clip-path: polygon(0 0, 100% 0, 100% -12%, 0 0%); }

.loader__inner { display: grid; justify-items: center; gap: var(--space-md); }

.loader__mark {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sig-sm);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 0 48px -6px rgb(255 138 0 / 0.55);
  animation: loader-mark 700ms cubic-bezier(.2, .7, .2, 1) both;
}

.loader__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-on-dark);
  animation: loader-fade 600ms ease 250ms both;
}

.loader__bar {
  display: block;
  width: 10rem;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--color-line-dark);
  animation: loader-fade 400ms ease 350ms both;
}
.loader__bar span {
  display: block;
  height: 100%;
  background: var(--color-accent);
  transform-origin: left;
  animation: loader-fill 1s cubic-bezier(.4, 0, .2, 1) 400ms both;
}

/* Hold the hero's own animations until the loading screen starts to leave,
   and (on phones, where it starts below the fold) until the log is on screen */
.hero__visual.is-waiting :is(.launch-log, .launch-log ol::after, .launch-log li, .launch-log .live::before, .enquiry-toast) {
  animation-play-state: paused;
}
/* Hold the hero's own animations until the loading screen starts to leave */
.is-loading:not(.is-loaded) :is(.launch-log, .launch-log ol::after, .launch-log li, .launch-log .live::before, .enquiry-toast, .book-call) {
  animation-play-state: paused;
}

@keyframes loader-mark {
  from { opacity: 0; transform: scale(0.6) rotate(-90deg); }
  to { opacity: 1; transform: none; }
}
@keyframes loader-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes loader-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes loader-out {
  to { clip-path: polygon(0 0, 100% 0, 100% -12%, 0 0%); visibility: hidden; }
}

@media print { .loader { display: none !important; } }

/* --- Credentials ticker under the homepage hero ------------------------ */

.ticker {
  overflow: hidden;
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--color-line);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.ticker__track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }

.ticker__list { display: flex; flex-shrink: 0; margin: 0; padding: 0; list-style: none; }
.ticker__list li { display: flex; align-items: center; white-space: nowrap; }
.ticker__list li::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-inline: var(--space-lg);
  border-radius: 1px;
  background: var(--color-accent);
  transform: rotate(45deg);
}

@keyframes ticker { to { transform: translateX(-50%); } }

/* --- "New enquiry" notification: what launch day leads to ------------- */

.hero__visual { position: relative; }

.enquiry-toast {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  max-width: 21rem;
  margin: -0.75rem var(--space-md) 0 auto; /* overlaps the log's bottom edge, clear of its last line */
  position: relative;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  color: var(--color-ink);
  border-radius: var(--radius-sig-sm);
  box-shadow: 0 20px 44px -16px rgb(0 0 0 / 0.6);
  font-size: var(--text-sm);
  line-height: 1.4;
  animation: toast-in 500ms cubic-bezier(.2, .7, .2, 1) 4.2s backwards;
}

@media (min-width: 60rem) {
  .enquiry-toast { position: absolute; left: -2.5rem; top: calc(100% - 0.75rem); margin: 0; }
}

.enquiry-toast__icon {
  position: relative;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-accent);
}
/* Envelope drawn in CSS */
.enquiry-toast__icon::before {
  content: "";
  position: absolute;
  inset: 0.7rem 0.55rem;
  border: 2px solid var(--color-ink);
  border-radius: 2px;
}
.enquiry-toast__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.62rem;
  width: 0.62rem;
  height: 0.62rem;
  border-right: 2px solid var(--color-ink);
  border-bottom: 2px solid var(--color-ink);
  transform: translateX(-50%) rotate(45deg);
}

.enquiry-toast__meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-muted); }
.enquiry-toast__meta strong { color: #1f7a3d; font-weight: 600; } /* 5.1:1 on white */
.enquiry-toast__from { font-size: 0.75rem; color: var(--color-muted); }
.enquiry-toast__msg { margin-top: 0.25rem; font-weight: 500; }

@keyframes toast-in {
  from { opacity: 0; translate: 0 14px; scale: 0.96; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes log-swipe {
  from { clip-path: inset(-50% 100% -50% 0); translate: 3rem 0; }
  to { clip-path: inset(-50%); translate: 0 0; }
}

@keyframes caret { 0% { opacity: 1; } 50% { opacity: 0; } }

@keyframes log-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgb(34 197 94 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0); }
}

/* --- 7-day ruler above "How it works" ---------------------------------- */

.day-ruler {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: var(--space-xl);
  padding-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-muted);
}

.day-ruler span { padding: var(--space-xs) 0 0 var(--space-2xs); border-left: 1px solid var(--color-line); }
.day-ruler span:last-child { color: var(--color-accent-strong); font-weight: 600; }

/* The orange bar fills across the week, ending in a LIVE flag */
.day-ruler::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-strong));
  transform-origin: left;
}
.day-ruler::after {
  content: "LIVE";
  position: absolute;
  top: -0.6rem;
  right: 0;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.day-ruler.is-pending::before { transform: scaleX(0); }
.day-ruler::before { transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }

.step::before { border-radius: var(--radius-sig-sm); font-family: var(--font-mono); }

/* --- Browser frames around screenshots --------------------------------- */

.browser { position: relative; padding-top: 1.875rem; background: #e9e5df; }

.browser::before {
  content: attr(data-url);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: 1.875rem;
  display: flex;
  align-items: center;
  padding-left: 3.75rem;
  overflow: hidden;
  white-space: nowrap;
  background:
    radial-gradient(circle at 14px 50%, #cfc9c0 4px, transparent 4.5px),
    radial-gradient(circle at 28px 50%, #cfc9c0 4px, transparent 4.5px),
    radial-gradient(circle at 42px 50%, var(--color-accent) 4px, transparent 4.5px),
    #f3f0eb;
  border-bottom: 1px solid var(--color-line);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-muted);
}

.case-card__media.browser:has(img) { padding: 1.875rem 0 0; }
.shot.browser:has(img) { padding-top: 1.875rem; }

/* --- Hover to scroll a client's whole site ------------------------------
   The card shows the top of a full-page screenshot. On hover (or keyboard
   focus) the image glides up until its bottom meets the frame: top moves
   to 100% while translateY(-100%) lifts it by its own height, so the
   motion works for any image length without measuring anything.
   --scroll-time: how long the full scroll takes (longer pages, more time)
   --crop: hides an editor toolbar captured at the top of a screenshot,
           as a percentage of the image width                              */

.case-card__media:has(.site-scroll) { display: block; place-items: normal; }

.site-scroll { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--color-surface); }

.case-card__media .site-scroll img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  margin-top: calc(var(--crop, 0%) * -1);
  object-fit: initial;
  transition: top 0.9s ease, transform 0.9s ease, margin-top 0.9s ease;
}

.case-card:hover .site-scroll img,
.case-card:focus-visible .site-scroll img {
  top: 100%;
  transform: translateY(-100%);
  margin-top: 0;
  transition-duration: var(--scroll-time, 6s);
  transition-timing-function: ease-in-out;
}

/* "Hover to scroll" hint, only on devices that can hover */
@media (hover: hover) {
  .case-card__media:has(.site-scroll)::after {
    content: "↕ Hover to scroll the site";
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 1;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sig-sm);
    background: rgb(18 18 18 / 0.82);
    color: var(--color-on-dark);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    pointer-events: none;
    transition: opacity var(--transition);
  }
  .case-card:hover .case-card__media::after,
  .case-card:focus-visible .case-card__media::after { opacity: 0; }
}

/* --- Floating "Book a call" button, bottom right of every page --------- */

.book-call {
  position: fixed;
  right: var(--gutter);
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  z-index: 40; /* under the header (50) so the open menu stays on top */
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 1rem 0.375rem 0.375rem;
  background: var(--color-ink);
  color: var(--color-on-dark);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius-sig-sm);
  box-shadow: 0 14px 34px -10px rgb(0 0 0 / 0.55), 0 0 0 1px rgb(255 138 0 / 0.08);
  text-decoration: none;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: transform var(--transition), outline-color var(--transition), background-color var(--transition),
    opacity 250ms ease, visibility 250ms;
  animation: book-call-in 500ms cubic-bezier(.2, .7, .2, 1) 1.2s backwards;
}

/* Hidden while the booking calendar itself is on screen (set in main.js) */
.book-call.is-hidden { opacity: 0; visibility: hidden; }
.book-call:hover { color: var(--color-on-dark); transform: translateY(-2px); outline-color: var(--color-accent); }
.book-call:focus-visible { outline: 3px solid var(--color-accent); }

/* Face in a circle, with an orange ring like the logo mark */
.book-call__face {
  position: relative;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  overflow: hidden;
  border-radius: 50%;
  background: #f1efe9;
  box-shadow: 0 0 0 2px var(--color-accent);
}
/* Positioned so the head (measured in the 192×256 photo: centre at 50% across,
   44.5% down; hair-to-chin about 36% of its height) sits dead centre and fills
   about two-thirds of the circle. For a new photo, re-measure and adjust. */
.book-call__face img {
  position: absolute;
  width: 142%;
  max-width: none;
  height: auto;
  left: -21.5%;
  top: -34.4%;
}

.book-call__text { display: grid; line-height: 1.2; }
.book-call__text strong { font-family: var(--font-heading); font-size: 0.9375rem; }
.book-call__text span { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--color-on-dark-muted); }

.book-call::after {
  content: "→" / "";
  margin-left: 0.25rem;
  color: var(--color-accent);
  transition: transform var(--transition);
}
.book-call:hover::after { transform: translateX(3px); }

/* Animates `translate`, not `transform`, so the hover lift still works afterwards */
@keyframes book-call-in {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

/* Leave room at the very bottom so the button never covers the footer's last line */
.site-footer { padding-bottom: calc(var(--space-lg) + 4.5rem); }

@media print { .book-call { display: none; } }

/* --- Pricing: the build + Care Plan package, with Squarespace as the
       alternative. The package is one dark card holding both parts, joined
       by an orange "+", so they read as a pair. ------------------------- */

.package {
  padding: var(--space-lg);
  background: var(--color-ink);
  color: var(--color-on-dark);
  border-radius: var(--radius-sig);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.45);
}
@media (min-width: 48rem) { .package { padding: var(--space-xl); } }

.package .muted,
.package .price small { color: var(--color-on-dark-muted); }
.package .check-list li::before { border-color: var(--color-accent); }
.package .badge { background: var(--color-accent); color: var(--color-ink); }
.package .btn--primary:hover { background: var(--color-on-dark); color: var(--color-ink); }

.package__head > * + * { margin-top: var(--space-sm); }
.package__head .badge { display: inline-block; }
.package__head h3 { font-size: var(--text-2xl); }
.package__head p { max-width: 40rem; }

.package__parts { display: grid; gap: var(--space-md); margin-top: var(--space-xl); }

@media (min-width: 48rem) {
  .package__parts { grid-template-columns: 1fr auto 1fr; align-items: stretch; }
}

.package__part {
  padding: var(--space-lg);
  background: #1b1b1b;
  border: 1px solid var(--color-line-dark);
  border-radius: var(--radius-sig-sm);
}
.package__part > * + * { margin-top: var(--space-sm); }
.package__part h4 { font-size: var(--text-lg); }
.package__part .check-list { margin-top: var(--space-md); }

/* Phones: tighter parts, two-column checklists */
@media (max-width: 47.99rem) {
  .package__parts { margin-top: var(--space-lg); gap: var(--space-sm); }
  .package__part { padding: var(--space-md); }
  .package__part .check-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs) var(--space-sm);
    font-size: var(--text-sm);
  }
  .package__part .check-list li + li { margin-top: 0; }
  .package__plus { width: 2.25rem; height: 2.25rem; }
}

.package__plus {
  display: grid;
  place-items: center;
  justify-self: center;
  align-self: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.package__total {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-line-dark);
  color: var(--color-on-dark-muted);
}
.package__total p { max-width: 36rem; }
.package__total strong { color: var(--color-on-dark); font-family: var(--font-heading); font-size: 1.125rem; }

/* Squarespace: a lighter card below, framed as the alternative */
.alt-option {
  display: grid;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-lg);
  border-style: dashed;
  border-width: 2px;
}
.alt-option > * + * { margin-top: 0; }
.alt-option__text > * + * { margin-top: var(--space-xs); }
.alt-option__text h3 { font-size: var(--text-xl); }
.alt-option__text p { max-width: 40rem; }
.alt-option .price-tag { justify-self: start; }
.alt-option__side { display: grid; gap: var(--space-sm); justify-items: start; }

@media (min-width: 48rem) {
  .alt-option { grid-template-columns: 1fr auto; gap: var(--space-xl); }
  .alt-option__side { justify-items: end; }
}

/* --- Pricing: the featured package as a dark spec sheet ---------------- */

.price-card--featured {
  background: var(--color-ink);
  color: var(--color-on-dark);
  border-color: var(--color-ink);
}
.price-card--featured .muted,
.price-card--featured .price-card__note,
.price-card--featured .price small { color: var(--color-on-dark-muted); }
.price-card--featured .check-list li::before { border-color: var(--color-accent); }
.price-card--featured .badge { background: var(--color-accent); color: var(--color-ink); }
.price-card--featured .btn--primary:hover { background: var(--color-on-dark); color: var(--color-ink); }

/* --- Footer: oversized outline wordmark -------------------------------- */

/* Sits at the very bottom of the page, under the copyright row */
.footer-wordmark {
  margin-top: var(--space-xl);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: min(8.6vw, 7rem);
  line-height: 1;
  padding-bottom: 0.06em; /* room for the descender in "Design" */
  letter-spacing: -0.045em;
  color: var(--color-on-dark);
  user-select: none;
}
.footer-wordmark span { color: var(--color-accent); }

.footer-bottom .footer-sig { font-family: var(--font-mono); font-size: 0.75rem; }

/* --- Scroll reveal (added by main.js, so content is visible without JS) - */

.is-pending { opacity: 0; transform: translateY(28px); }
.reveal-ready {
  transition: opacity 700ms ease, transform 800ms cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0ms); /* main.js staggers cards in the same row */
}

/* Project pictures: the screenshot wipes in from the left and settles from a
   slight zoom, just after its card arrives */
.is-pending .site-scroll,
.shot.is-pending img { clip-path: inset(0 100% 0 0); transform: scale(1.15); }
.reveal-ready .site-scroll,
.shot.reveal-ready img {
  transition: clip-path 1s cubic-bezier(.7, 0, .2, 1), transform 1.6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--d, 0ms) + 200ms);
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
  .launch-log, .launch-log li { opacity: 1; animation: none; }
  .launch-log ol::after { display: none; }
  .ticker__track { animation: none; width: auto; padding-inline: var(--gutter); }
  .ticker__list { flex-wrap: wrap; row-gap: var(--space-xs); }
  .ticker__list[aria-hidden="true"] { display: none; }
  .case-card:hover .site-scroll img,
  .case-card:focus-visible .site-scroll img { top: 0; transform: none; margin-top: calc(var(--crop, 0%) * -1); }
  .case-card__media:has(.site-scroll)::after { display: none; }
  .is-pending { opacity: 1; transform: none; }
}
