/* ==========================================================================
   Alvi Hassan — Portfolio stylesheet
   --------------------------------------------------------------------------
   1. Fonts
   2. Design tokens (colours, type, spacing, layout)
   3. Base / reset
   4. Layout helpers
   5. Header + navigation
   6. Buttons + links
   7. Page sections (hero, index rows, process, empty state, band)
   8. Project presentation (reusable)
   9. Services, about, contact
   10. Footer
   11. 404
   12. Motion + print
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------
   Poppins (SIL Open Font License 1.1) — self-hosted Latin subset.
   See assets/fonts/OFL.txt. Used for headings, the wordmark and prices. */
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-bold.woff") format("woff");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-medium.woff") format("woff");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* 2. Design tokens ------------------------------------------------------- */
:root {
  /* Colour */
  --color-bg: #f8f9fc;          /* cool off-white page */
  --color-bg-raised: #ffffff;   /* cards and panels */
  --color-bg-sunken: #eef1f8;   /* quiet panels */
  --color-ink: #111827;         /* near-black text */
  --color-ink-2: #4b5563;       /* secondary text */
  --color-ink-3: #5f6673;       /* tertiary text, meta */
  --color-line: #e3e7ef;        /* hairlines */
  --color-line-strong: #c5ccd9;
  --color-accent: #4338ca;      /* indigo — links and small accents */
  --color-accent-ink: #3730a3;  /* hover / pressed */
  --color-accent-soft: #eef0ff;
  --color-on-dark: #ffffff;
  --color-on-dark-2: #e0e4ff;
  --color-accent-on-dark: #ffffff;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-soft: linear-gradient(135deg, #dbe4ff 0%, #e9ddff 100%);
  --grad-band: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
  --blob-1: rgb(99 102 241 / 0.18);
  --blob-2: rgb(168 85 247 / 0.16);
  --band-bg: #1e3a8a;
  --header-bg: rgb(255 255 255 / 0.92);
  --header-bg-blur: rgb(255 255 255 / 0.78);
  --shadow-m: 0 20px 45px -24px rgb(49 46 129 / 0.35);
  --shadow-glow: 0 12px 30px -10px rgb(79 70 229 / 0.55);

  /* Typography */
  --font-display: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.7vw, 1.8rem);
  --step-3: clamp(1.75rem, 1.45rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.8vw, 4rem);
  --step-5: clamp(2.5rem, 1.6rem + 4.2vw, 5.2rem);

  --leading-tight: 1.08;
  --leading-snug: 1.3;
  --leading-body: 1.65;

  /* Spacing */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --space-3xl: clamp(4.5rem, 3rem + 6vw, 8.5rem);

  /* Layout */
  --container: 76rem;
  --measure: 38rem;
  --gutter: clamp(1rem, 0.5rem + 3vw, 2.5rem);
  --radius: 6px;
  --radius-s: 3px;
  --header-h: 4.5rem;
  --shadow-s: 0 1px 2px rgb(29 28 26 / 0.06);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 3. Base / reset -------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  color: var(--color-ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); letter-spacing: -0.025em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); line-height: var(--leading-snug); }
h4 { font-size: var(--step-1); line-height: var(--leading-snug); }

p, ul, ol, dl, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
p + p { margin-top: 1em; }

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

a { color: var(--color-accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-accent-ink); text-decoration-thickness: 2px; }

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-sunken);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-s);
}

.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(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-ink);
  color: var(--color-bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 0.75rem; color: var(--color-bg); }

/* 4. Layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.section + .section { border-top: 1px solid var(--color-line); }

.prose { max-width: var(--measure); color: var(--color-ink-2); }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--color-ink); font-weight: 600; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-m);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-3);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--color-ink-2);
  max-width: 36rem;
}

/* Section head: title on the left, short note on the right */
.section-head {
  display: grid;
  gap: var(--space-s) var(--space-xl);
  margin-bottom: var(--space-xl);
}
.section-head h2 { font-size: var(--step-3); max-width: 18ch; }
.section-head p { color: var(--color-ink-2); max-width: 32rem; }
@media (min-width: 56em) {
  .section-head {
    grid-template-columns: 5fr 7fr;
    align-items: end;
  }
  .section-head p { justify-self: end; }
}

/* 5. Header + navigation ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--color-line);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: var(--header-bg-blur); backdrop-filter: saturate(1.2) blur(8px); }
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-m);
  min-height: var(--header-h);
  padding-block: var(--space-2xs);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--color-ink); }
.wordmark-dot { color: var(--color-accent); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-3xs);
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.7rem;
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--color-ink-2);
  text-decoration: none;
  border-radius: var(--radius-s);
}
.site-nav a:hover { color: var(--color-ink); background: var(--color-bg-sunken); }
.site-nav a[aria-current="page"] {
  color: var(--color-ink);
  box-shadow: inset 0 -2px 0 var(--color-accent);
  border-radius: 0;
}
.site-nav .nav-cta {
  margin-left: var(--space-2xs);
  color: var(--color-bg);
  background: var(--color-ink);
  border-radius: 999px;
  padding-inline: 1.05rem;
}
.site-nav .nav-cta:hover { color: var(--color-bg); background: var(--color-accent); }
.site-nav .nav-cta[aria-current="page"] { box-shadow: none; border-radius: 999px; background: var(--color-accent); }

.nav-toggle { display: none; }

/* Without JavaScript the nav simply wraps under the wordmark on small screens.
   With JavaScript (html.js, set in <head>) small screens get a toggle. */
@media (max-width: 47.99em) {
  .site-nav { width: 100%; }
  .site-nav ul { margin-inline: -0.7rem; }
  .site-nav .nav-cta { margin-left: 0; }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0 0.95rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-ink);
    background: transparent;
    border: 1px solid var(--color-line-strong);
    border-radius: 999px;
    cursor: pointer;
  }
  .js .nav-toggle:hover { border-color: var(--color-ink); }
  .nav-toggle-icon {
    position: relative;
    width: 14px;
    height: 10px;
  }
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.2s var(--ease), top 0.2s var(--ease);
  }
  .nav-toggle-icon::before { top: 1px; }
  .nav-toggle-icon::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 4px; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 4px; transform: rotate(-45deg); }

  .js .site-nav { display: none; }
  .js .site-nav[data-open="true"] {
    display: block;
    padding-bottom: var(--space-s);
  }
  .js .site-nav[data-open="true"] ul {
    flex-direction: column;
    margin-inline: 0;
    border-top: 1px solid var(--color-line);
  }
  .js .site-nav[data-open="true"] li { border-bottom: 1px solid var(--color-line); }
  .js .site-nav[data-open="true"] a {
    display: flex;
    min-height: 52px;
    padding-inline: 0;
    font-size: 1.1rem;
    border-radius: 0;
  }
  .js .site-nav[data-open="true"] a:hover { background: transparent; color: var(--color-accent); }
  .js .site-nav[data-open="true"] a[aria-current="page"] { box-shadow: none; color: var(--color-accent); }
  .js .site-nav[data-open="true"] li:last-child { border-bottom: 0; padding-top: var(--space-s); }
  .js .site-nav[data-open="true"] .nav-cta { justify-content: center; padding-inline: 1rem; border-radius: 999px; }
}

/* 6. Buttons + links ----------------------------------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.button--primary { background: var(--color-ink); color: var(--color-bg); }
.button--primary:hover { background: var(--color-accent); color: #fff; }
.button--secondary { background: transparent; color: var(--color-ink); border-color: var(--color-line-strong); }
.button--secondary:hover { color: var(--color-ink); border-color: var(--color-ink); background: var(--color-bg-raised); }
.button .arrow { transition: transform 0.2s var(--ease); }
.button:hover .arrow { transform: translateX(3px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-accent);
}
.text-link:hover { text-decoration: underline; }
.text-link .arrow { transition: transform 0.2s var(--ease); }
.text-link:hover .arrow { transform: translateX(3px); }

/* 7. Page sections ------------------------------------------------------- */

/* Home hero */
.hero {
  padding-block: clamp(3rem, 2rem + 6vw, 7.5rem) var(--space-2xl);
}
.hero-grid {
  display: grid;
  gap: var(--space-xl);
}
.hero h1 { max-width: 15ch; }
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
}
.hero .lead { margin-top: var(--space-l); }
.hero .actions { margin-top: var(--space-l); }

.hero-aside {
  align-self: end;
  width: 100%;
  max-width: 24rem;
}
@media (min-width: 60em) { .hero-aside { max-width: none; } }

/* Photos */
.portrait,
.photo {
  margin: 0;
  overflow: hidden;
  background: var(--color-bg-sunken);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait + .facts { margin-top: var(--space-m); }
.photo img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; }
.photo figcaption {
  padding: 0.6rem 0.9rem;
  font-size: var(--step--1);
  color: var(--color-ink-3);
  border-top: 1px solid var(--color-line);
}
.photo--tall img { aspect-ratio: 4 / 5; }
.gallery { display: grid; gap: var(--space-m); align-items: start; }
.gallery-note { margin-top: var(--space-m); font-size: var(--step--1); color: var(--color-ink-3); }
@media (min-width: 40em) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 60em) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery .photo:nth-child(2) { margin-top: var(--space-xl); }
}
.split-aside { display: grid; gap: var(--space-l); align-content: start; }
.split-aside .photo { max-width: 24rem; }

.facts { display: grid; gap: 0; border-top: 1px solid var(--color-ink); }
.facts div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--space-s);
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--color-line);
}
.facts dt {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-3);
  padding-top: 0.15em;
}
.facts dd { margin: 0; color: var(--color-ink); }
.facts a { display: inline-block; padding-block: 0.2rem; overflow-wrap: anywhere; }

@media (min-width: 60em) {
  .hero-grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--space-2xl); }
}

/* Page intro (inner pages) */
.page-intro {
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) var(--space-xl);
  border-bottom: 1px solid var(--color-line);
}
.page-intro h1 { font-size: var(--step-4); max-width: 18ch; }
.page-intro .lead { margin-top: var(--space-m); }
.page-intro-grid { display: grid; gap: var(--space-l); }
@media (min-width: 60em) {
  .page-intro-grid { grid-template-columns: 7fr 5fr; align-items: end; }
  .page-intro-grid .lead { margin-top: 0; }
}

/* Numbered index rows — used for capabilities and grouped lists.
   Deliberately a list with rules, not a grid of cards. */
.index-list { list-style: none; padding: 0; border-top: 1px solid var(--color-ink); }
.index-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-2xs) var(--space-s);
  padding-block: var(--space-m);
  border-bottom: 1px solid var(--color-line);
}
.index-num {
  font-family: var(--font-display);
  font-size: var(--step-0);
  color: var(--color-accent);
  font-variant-numeric: lining-nums tabular-nums;
  padding-top: 0.2em;
}
.index-row h3 { font-size: var(--step-2); }
.index-body { grid-column: 2; color: var(--color-ink-2); max-width: 36rem; }
.index-link { grid-column: 2; }
@media (min-width: 56em) {
  .index-row {
    grid-template-columns: 3.5rem minmax(0, 4fr) minmax(0, 6fr) 11rem;
    align-items: baseline;
    padding-block: var(--space-l);
  }
  .index-body { grid-column: auto; }
  .index-link { grid-column: auto; justify-self: end; }
}

/* Process steps */
.steps {
  display: grid;
  gap: 0;
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--space-m) 0;
  border-top: 1px solid var(--color-line);
}
.step-num {
  display: block;
  margin-bottom: var(--space-s);
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  color: var(--color-accent);
  font-variant-numeric: lining-nums;
}
.step h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 650; letter-spacing: 0; }
.step p { margin-top: var(--space-2xs); color: var(--color-ink-2); font-size: 0.98rem; }
@media (min-width: 40em) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-l); }
}
@media (min-width: 64em) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step { padding-right: var(--space-s); border-top-color: var(--color-ink); }
}

/* Empty state — used where real content has not been supplied yet */
.empty-state {
  display: grid;
  gap: var(--space-l);
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.empty-state-mark {
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 5vw, 7.5rem);
  font-style: italic;
  line-height: 0.85;
  color: var(--color-line-strong);
  user-select: none;
}
.empty-state h3 { font-size: var(--step-3); max-width: 20ch; }
.empty-state p { margin-top: var(--space-s); color: var(--color-ink-2); max-width: 34rem; }
.empty-state .actions { margin-top: var(--space-l); }
@media (min-width: 56em) {
  .empty-state { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); align-items: start; }
}

/* Dark band — contact invitation */
.band {
  background: var(--band-bg);
  color: var(--color-on-dark);
  padding-block: var(--space-3xl);
}
.band h2 { color: var(--color-on-dark); font-size: var(--step-4); max-width: 17ch; }
.band h2 em { font-style: italic; font-weight: 400; color: var(--color-accent-on-dark); }
.band p { color: var(--color-on-dark-2); max-width: 34rem; margin-top: var(--space-m); font-size: var(--step-1); line-height: 1.55; }
.band .actions { margin-top: var(--space-l); }
.band .button--primary { background: var(--color-on-dark); color: #1d1c1a; }
.band .button--primary:hover { background: var(--color-accent-on-dark); color: #1d1c1a; }
.band .button--secondary { color: var(--color-on-dark); border-color: #5f5b53; }
.band .button--secondary:hover { border-color: var(--color-on-dark); background: transparent; color: var(--color-on-dark); }
.band :focus-visible { outline-color: var(--color-accent-on-dark); }
.band-grid { display: grid; gap: var(--space-l); }
@media (min-width: 60em) {
  .band-grid { grid-template-columns: 8fr 4fr; align-items: end; }
  .band-grid .actions { justify-content: flex-end; }
}

/* 8. Project presentation (reusable) ------------------------------------
   Markup pattern lives in projects/index.html (commented template) and
   docs/adding-projects.md. */
.project-list { display: grid; gap: var(--space-2xl); list-style: none; padding: 0; }

.project {
  display: grid;
  gap: var(--space-l);
  padding-top: var(--space-l);
  border-top: 1px solid var(--color-ink);
}
.project-media {
  overflow: hidden;
  background: var(--color-bg-sunken);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.project-media img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.project-media figcaption {
  padding: 0.6rem 0.9rem;
  font-size: var(--step--1);
  color: var(--color-ink-3);
  border-top: 1px solid var(--color-line);
}
.project-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.project h3 { font-size: var(--step-3); }
.project-summary { margin-top: var(--space-s); color: var(--color-ink-2); max-width: 36rem; }
.project-meta {
  display: grid;
  gap: 0;
  margin-top: var(--space-m);
  border-top: 1px solid var(--color-line);
}
.project-meta div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: var(--space-s);
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--color-line);
  font-size: 0.97rem;
}
.project-meta dt { color: var(--color-ink-3); font-weight: 600; font-size: var(--step--1); letter-spacing: 0.05em; text-transform: uppercase; padding-top: 0.15em; }
.project-meta dd { margin: 0; }
.project-outcomes { margin-top: var(--space-m); padding-left: 1.1rem; color: var(--color-ink-2); }
.project-outcomes li + li { margin-top: 0.35rem; }
@media (min-width: 60em) {
  .project { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl); align-items: start; }
  .project--reverse .project-media { order: 2; }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--completed { color: var(--color-accent); background: var(--color-accent-soft); border-color: transparent; }
.status--experiment { color: var(--color-ink-2); background: transparent; border-style: dashed; }
.status--in-progress { color: var(--color-ink-2); background: var(--color-bg-sunken); border-color: transparent; }

/* Legend on the projects page explaining the status labels */
.legend { display: flex; flex-wrap: wrap; gap: var(--space-s) var(--space-l); margin-top: var(--space-l); color: var(--color-ink-2); font-size: 0.95rem; }
.legend div { display: flex; align-items: center; gap: var(--space-2xs); }

/* 9. Services, about, contact ------------------------------------------- */
.service {
  display: grid;
  gap: var(--space-l);
  padding-block: var(--space-2xl);
  border-top: 1px solid var(--color-line);
}
.service:first-of-type { border-top: 0; }
.service-head h2 { font-size: var(--step-3); max-width: 16ch; }
.service-head .index-num { display: block; margin-bottom: var(--space-s); font-size: var(--step-1); }
.service-head p { margin-top: var(--space-s); color: var(--color-ink-2); max-width: 30rem; }
.service-detail { display: grid; gap: var(--space-l); }
.service-detail h3 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-3);
  margin-bottom: var(--space-xs);
  padding-bottom: var(--space-2xs);
  border-bottom: 1px solid var(--color-line);
}
.service-detail p,
.service-detail li { color: var(--color-ink-2); font-size: 0.98rem; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 1.3rem; }
.ticks li + li { margin-top: 0.45rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.55rem;
  height: 1px;
  background: var(--color-accent);
}
@media (min-width: 48em) {
  .service-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-l); }
}
@media (min-width: 64em) {
  .service { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-2xl); }
  .service-head { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
  .service-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Notes / callouts */
.note {
  padding: var(--space-m) var(--space-l);
  background: var(--color-bg-sunken);
  border-left: 2px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-ink-2);
}
.note h2, .note h3 { font-size: var(--step-1); margin-bottom: var(--space-2xs); }

/* Two-column editorial split */
.split { display: grid; gap: var(--space-l) var(--space-2xl); }
.split h2 { font-size: var(--step-3); max-width: 16ch; }
@media (min-width: 60em) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}

/* Capability groups (about) */
.groups { display: grid; gap: 0; }
.group { padding-block: var(--space-m); border-top: 1px solid var(--color-line); }
.group:first-child { border-top-color: var(--color-ink); }
.group h3 { font-size: var(--step-2); margin-bottom: var(--space-xs); }
@media (min-width: 48em) {
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-xl); }
  .group:nth-child(2) { border-top-color: var(--color-ink); }
}

/* Principles list (about) */
.principles { list-style: none; padding: 0; counter-reset: p; }
.principles li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-s);
  padding-block: var(--space-m);
  border-top: 1px solid var(--color-line);
  counter-increment: p;
}
.principles li::before {
  content: counter(p, decimal-leading-zero);
  font-family: var(--font-display);
  color: var(--color-accent);
  padding-top: 0.15em;
}
.principles strong { display: block; font-size: var(--step-1); font-weight: 650; color: var(--color-ink); margin-bottom: 0.25rem; }
.principles span { color: var(--color-ink-2); }

/* Pull quote style statement */
.statement {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 26ch;
  color: var(--color-ink);
}
.statement em { color: var(--color-accent); }

/* Contact channels */
.channels { list-style: none; padding: 0; border-top: 1px solid var(--color-ink); }
.channel {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xs) var(--space-m);
  padding-block: var(--space-m);
  border-bottom: 1px solid var(--color-line);
}
.channel-label {
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-3);
}
.channel-value { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.2; overflow-wrap: anywhere; }
.channel-value a { text-decoration: none; }
.channel-value a:hover { text-decoration: underline; }
.channel-note { color: var(--color-ink-2); font-size: 0.97rem; }
@media (min-width: 48em) {
  .channel { grid-template-columns: 9rem 1fr; align-items: baseline; }
  .channel-note { grid-column: 2; }
}

.checklist { list-style: none; padding: 0; counter-reset: c; }
.checklist li {
  position: relative;
  padding: 0.8rem 0 0.8rem 2.25rem;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-ink-2);
  counter-increment: c;
}
.checklist li::before {
  content: counter(c);
  position: absolute;
  left: 0;
  top: 0.8rem;
  font-family: var(--font-display);
  color: var(--color-accent);
}

/* 10. Footer ------------------------------------------------------------- */
.site-footer {
  padding-block: var(--space-xl) var(--space-l);
  border-top: 1px solid var(--color-line);
  font-size: 0.95rem;
  color: var(--color-ink-2);
}
.footer-grid { display: grid; gap: var(--space-l); }
.footer-grid .wordmark { font-size: 1.25rem; min-height: 0; }
.footer-tagline { margin-top: var(--space-2xs); max-width: 22rem; }
.footer-nav ul,
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-m); list-style: none; padding: 0; }
.footer-nav a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-ink-2);
  text-decoration: none;
}
.footer-nav a:hover,
.footer-links a:hover { color: var(--color-accent); text-decoration: underline; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-m);
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid var(--color-line);
  font-size: var(--step--1);
  color: var(--color-ink-3);
}
.footer-base p + p { margin-top: 0; }
@media (min-width: 56em) {
  .footer-grid { grid-template-columns: 4fr 6fr 2fr; align-items: start; }
  .footer-links { justify-content: flex-end; }
}

/* 11. 404 ---------------------------------------------------------------- */
.not-found { padding-block: var(--space-3xl); }
.not-found-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 3rem + 10vw, 11rem);
  font-style: italic;
  line-height: 0.85;
  color: var(--color-line-strong);
  margin-bottom: var(--space-l);
}
.not-found h1 { font-size: var(--step-4); max-width: 16ch; }
.not-found .lead { margin-top: var(--space-m); }
.not-found .actions { margin-top: var(--space-l); }


/* ==========================================================================
   13. Dark theme — follows the system unless the visitor picks a theme
   ========================================================================== */
:root[data-theme="dark"] {
  --color-bg: #0b1020;
  --color-bg-raised: #121a2e;
  --color-bg-sunken: #182238;
  --color-ink: #f3f4f6;
  --color-ink-2: #c7cbd6;
  --color-ink-3: #9aa2b3;
  --color-line: #243049;
  --color-line-strong: #3a4766;
  --color-accent: #a5b4fc;
  --color-accent-ink: #c7d2fe;
  --color-accent-soft: #1e2547;
  --grad: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  --grad-soft: linear-gradient(135deg, #1e2a55 0%, #2e1f55 100%);
  --grad-band: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
  --blob-1: rgb(96 165 250 / 0.14);
  --blob-2: rgb(167 139 250 / 0.14);
  --band-bg: #1e3a8a;
  --header-bg: rgb(11 16 32 / 0.92);
  --header-bg-blur: rgb(11 16 32 / 0.78);
  --shadow-m: 0 20px 45px -24px rgb(0 0 0 / 0.8);
  --shadow-glow: 0 12px 30px -10px rgb(129 140 248 / 0.45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --color-bg: #0b1020;
  --color-bg-raised: #121a2e;
  --color-bg-sunken: #182238;
  --color-ink: #f3f4f6;
  --color-ink-2: #c7cbd6;
  --color-ink-3: #9aa2b3;
  --color-line: #243049;
  --color-line-strong: #3a4766;
  --color-accent: #a5b4fc;
  --color-accent-ink: #c7d2fe;
  --color-accent-soft: #1e2547;
  --grad: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  --grad-soft: linear-gradient(135deg, #1e2a55 0%, #2e1f55 100%);
  --grad-band: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
  --blob-1: rgb(96 165 250 / 0.14);
  --blob-2: rgb(167 139 250 / 0.14);
  --band-bg: #1e3a8a;
  --header-bg: rgb(11 16 32 / 0.92);
  --header-bg-blur: rgb(11 16 32 / 0.78);
  --shadow-m: 0 20px 45px -24px rgb(0 0 0 / 0.8);
  --shadow-glow: 0 12px 30px -10px rgb(129 140 248 / 0.45);
  color-scheme: dark;
  }
}


/* Theme toggle (JavaScript only) */
.header-tools { display: flex; align-items: center; gap: var(--space-2xs); margin-left: auto; }
@media (min-width: 48em) { .header-tools { margin-left: var(--space-2xs); } }
.theme-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--color-ink-2);
  background: transparent;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  cursor: pointer;
}
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { color: var(--color-ink); border-color: var(--color-ink); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
@media (min-width: 48em) {
  .header-inner { flex-wrap: nowrap; }
  .site-nav { margin-left: auto; }
}
@media (max-width: 47.99em) {
  .site-nav { order: 3; }
}

/* ==========================================================================
   14. Home v2 — hero badges, framed portrait, highlights, services grid,
       tools, about teaser
   ========================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-bottom: var(--space-m); padding: 0; list-style: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--color-ink-2);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: 999px;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-s);
  margin-top: var(--space-xl);
  padding-top: var(--space-m);
  border-top: 1px solid var(--color-line);
  list-style: none;
  padding-left: 0;
}
.highlights strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.1;
  color: var(--color-ink);
}
@media (max-width: 30em) {
  .highlights { grid-template-columns: 1fr; gap: 0; }
  .highlights li { display: grid; grid-template-columns: 7.5rem 1fr; align-items: baseline; padding-block: 0.6rem; border-bottom: 1px solid var(--color-line); }
  .highlights span { margin-top: 0; }
}
.highlights span { display: block; margin-top: 0.3rem; font-size: var(--step--1); color: var(--color-ink-3); line-height: 1.4; }

.portrait-frame { position: relative; margin: 0 0 1.25rem 0; }
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-line);
  border-radius: calc(var(--radius) * 2);
  z-index: 0;
}
.portrait-frame .portrait {
  position: relative;
  z-index: 1;
  border-radius: calc(var(--radius) * 2);
  box-shadow: var(--shadow-m);
}
.float-badge {
  position: absolute;
  z-index: 2;
  left: -1rem;
  bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 15rem;
  padding: 0.7rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-ink);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-m);
}
.float-badge svg { flex: none; width: 20px; height: 20px; color: var(--color-accent); }
@media (max-width: 30em) {
  .portrait-frame::before { inset: 0.75rem -0.6rem -0.75rem 0.75rem; }
  .float-badge { left: 0.5rem; bottom: 1rem; }
}
.hero-aside--frame { max-width: 26rem; padding-right: 1.25rem; }
@media (min-width: 60em) {
  .hero-aside--frame { max-width: none; align-self: center; }
  .hero-grid:has(.hero-aside--frame) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); }
}

/* Services grid — shared-border cells, not floating cards */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--color-line);
  border-left: 1px solid var(--color-line);
  list-style: none;
  padding: 0;
}
.service-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--space-l);
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg);
  transition: background-color 0.25s var(--ease);
}
.service-cell:hover { background: var(--color-bg-raised); }
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: var(--radius);
}
.service-icon svg { width: 22px; height: 22px; }
.service-cell h3 { font-size: var(--step-1); font-family: var(--font-display); font-weight: 600; }
.service-cell p { color: var(--color-ink-2); font-size: 0.97rem; }
.service-cell .ticks { font-size: 0.93rem; color: var(--color-ink-2); }
.service-cell .text-link { margin-top: auto; }
@media (min-width: 40em) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Tools strip */
.tools { display: flex; flex-wrap: wrap; gap: var(--space-2xs); padding: 0; list-style: none; }
.tools li {
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--color-ink);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.tools-note { margin-top: var(--space-m); font-size: var(--step--1); color: var(--color-ink-3); }

/* About teaser */
.teaser { display: grid; gap: var(--space-xl); align-items: center; }
.teaser .photo { max-width: 30rem; border-radius: calc(var(--radius) * 2); box-shadow: var(--shadow-m); }
.teaser h2 { font-size: var(--step-3); max-width: 18ch; }
.teaser .prose { margin-top: var(--space-m); }
.teaser .actions { margin-top: var(--space-l); }
@media (min-width: 60em) { .teaser { grid-template-columns: 5fr 7fr; gap: var(--space-2xl); } }

/* Footer v2 */
.footer-grid--4 { gap: var(--space-l) var(--space-xl); }
.footer-grid--4 h2 {
  margin-bottom: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-3);
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 36px; color: var(--color-ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--color-accent); text-decoration: underline; }
@media (min-width: 40em) { .footer-grid.footer-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 60em) { .footer-grid.footer-grid--4 { grid-template-columns: 4fr 2fr 3fr 2fr; } }

/* Back to top */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--color-bg);
  background: var(--color-ink);
  border-radius: 50%;
  box-shadow: var(--shadow-m);
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), background-color 0.2s var(--ease);
}
.js .to-top { display: inline-flex; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top:hover { background: var(--color-accent); color: var(--color-bg); }
.to-top svg { width: 18px; height: 18px; }

/* Scroll reveal — only armed by main.js, and never under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* 12. Motion + print ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .site-header, .nav-toggle, .skip-link, .band .actions { display: none !important; }
  body { background: #fff; color: #000; }
  .band { background: #fff; color: #000; }
  .band h2, .band p { color: #000; }
  a { color: #000; }
}

/* ==========================================================================
   15. Contact form (static: submits through the visitor's email app)
   ========================================================================== */
.contact-grid { display: grid; gap: var(--space-xl); align-items: start; }
.contact-info h2 { font-size: var(--step-3); max-width: 16ch; }
.contact-intro { margin-top: var(--space-s); margin-bottom: var(--space-l); color: var(--color-ink-2); max-width: 30rem; }
.channel-value--small { font-size: var(--step-1); }
@media (min-width: 60em) { .contact-grid { grid-template-columns: 5fr 7fr; gap: var(--space-2xl); } }

.contact-form {
  display: grid;
  gap: var(--space-m);
  padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: calc(var(--radius) * 2);
  box-shadow: var(--shadow-m);
}
.field-row { display: grid; gap: var(--space-m); }
@media (min-width: 40em) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.93rem; font-weight: 600; color: var(--color-ink); }
.field .req { color: var(--color-accent); }
.field .optional { font-weight: 400; color: var(--color-ink-3); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--color-ink);
  background: var(--color-bg);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 9rem; line-height: 1.55; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--color-ink-3); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--color-ink-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #b3261e; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.form-note { font-size: var(--step--1); color: var(--color-ink-3); }
.form-note.is-success { color: var(--color-accent); font-weight: 600; }

/* ==========================================================================
   16. Home animations and image strip
   ========================================================================== */
.image-strip { display: grid; gap: var(--space-m); }
.image-strip .photo { border-radius: calc(var(--radius) * 2); }
.image-strip .photo img { transition: transform 0.9s var(--ease); }
.image-strip .photo:hover img { transform: scale(1.04); }
.image-strip .photo--tall img { aspect-ratio: 4 / 5; }
.strip-copy h2 { font-size: var(--step-3); max-width: 16ch; }
.strip-copy p { margin-top: var(--space-s); color: var(--color-ink-2); max-width: 28rem; }
.strip-copy .gallery-note { margin-top: var(--space-l); }
@media (min-width: 48em) { .image-strip { grid-template-columns: 1fr 1fr; } .strip-copy { grid-column: 1 / -1; } }
@media (min-width: 64em) {
  .image-strip { grid-template-columns: 4fr 4fr 4fr; align-items: end; }
  .strip-copy { grid-column: auto; align-self: center; }
  .image-strip .photo:nth-of-type(2) { margin-bottom: var(--space-2xl); }
}

.service-icon svg { transition: transform 0.35s var(--ease); }
.service-cell::after {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.service-cell:hover::after { transform: scaleX(1); }
.service-cell:hover .service-icon svg { transform: scale(1.12) rotate(-6deg); }
.tools li { transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease); }
.tools li:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }
.portrait-frame .portrait img { transition: transform 0.9s var(--ease); }
.portrait-frame:hover .portrait img { transform: scale(1.03); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
  @keyframes frame-in { from { opacity: 0; transform: translate(-14px, -14px); } to { opacity: 1; transform: none; } }
  @keyframes pulse-dot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: 0.45; } }
  @keyframes underline-in { from { background-size: 0% 2px; } to { background-size: 100% 2px; } }

  .js .hero .chips,
  .js .hero h1,
  .js .hero .lead,
  .js .hero .actions,
  .js .hero .highlights,
  .js .hero .portrait { animation: rise 0.9s var(--ease) both; }
  .js .hero h1 { animation-delay: 0.08s; }
  .js .hero .lead { animation-delay: 0.18s; }
  .js .hero .actions { animation-delay: 0.28s; }
  .js .hero .highlights { animation-delay: 0.38s; }
  .js .hero .portrait { animation-delay: 0.2s; animation-duration: 1.1s; }
  .js .portrait-frame::before { animation: frame-in 1.1s var(--ease) 0.45s both; }
  .js .float-badge { animation: rise 0.8s var(--ease) 0.7s both, float 6s ease-in-out 1.6s infinite; }
  .chip:first-child::before { animation: pulse-dot 2.4s ease-in-out infinite; }
  .hero h1 em {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 92%;
    background-size: 100% 2px;
  }
  .js .hero h1 em { animation: underline-in 1s var(--ease) 1s both; }

  /* staggered children for revealed grids */
  .reveal-ready .service-grid[data-reveal] { opacity: 1; transform: none; }
  .reveal-ready .service-grid[data-reveal] .service-cell,
  .reveal-ready .tools[data-reveal] li,
  .reveal-ready .steps[data-reveal] .step {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  }
  .reveal-ready [data-reveal].is-visible .service-cell,
  .reveal-ready [data-reveal].is-visible li,
  .reveal-ready [data-reveal].is-visible .step { opacity: 1; transform: none; }
  .reveal-ready .tools[data-reveal] { opacity: 1; transform: none; }
  .reveal-ready .steps[data-reveal] { opacity: 1; transform: none; }
  .reveal-ready [data-reveal] > :nth-child(2) { transition-delay: 0.08s; }
  .reveal-ready [data-reveal] > :nth-child(3) { transition-delay: 0.16s; }
  .reveal-ready [data-reveal] > :nth-child(4) { transition-delay: 0.24s; }
  .reveal-ready [data-reveal] > :nth-child(5) { transition-delay: 0.32s; }
  .reveal-ready [data-reveal] > :nth-child(6) { transition-delay: 0.4s; }
  .reveal-ready [data-reveal] > :nth-child(n+7) { transition-delay: 0.48s; }
}
.reveal-ready [data-reveal].reveal-done > * { transition-delay: 0s !important; }

/* ==========================================================================
   17. Pricing cards and budget planner
   ========================================================================== */
@media (min-width: 64em) { .service-grid.service-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .service-grid--4 .service-cell { padding: var(--space-m); } }

.price-heading { margin: var(--space-xl) 0 var(--space-m); font-size: var(--step-2); }
.price-heading:first-of-type { margin-top: 0; }
.price-heading span { font-family: var(--font-body); font-size: var(--step-0); font-weight: 400; color: var(--color-ink-3); letter-spacing: 0; }
.price-grid { display: grid; gap: var(--space-m); list-style: none; padding: 0; }
@media (min-width: 40em) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .price-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .price-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--space-l);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: calc(var(--radius) * 2);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.price-card:hover { transform: translateY(-4px); border-color: var(--color-line-strong); box-shadow: var(--shadow-m); }
.price-card--featured { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }
.price-card--featured:hover { border-color: var(--color-accent); }
.price-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: var(--step--1); font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-3); }
.price-tag { padding: 0.15rem 0.55rem; font-size: 0.7rem; letter-spacing: 0.04em; color: var(--color-accent); background: var(--color-accent-soft); border-radius: 999px; }
.price { font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; line-height: 1; color: var(--color-ink); font-variant-numeric: lining-nums; }
.price-from { font-family: var(--font-body); font-size: var(--step--1); font-weight: 500; color: var(--color-ink-3); vertical-align: middle; margin-right: 0.2rem; }
.price-per { font-family: var(--font-body); font-size: var(--step--1); color: var(--color-ink-3); margin-left: 0.2rem; }
.price-card .ticks { padding-top: var(--space-s); border-top: 1px solid var(--color-line); font-size: 0.95rem; color: var(--color-ink-2); }
.price-extras { display: grid; gap: var(--space-s); margin-top: var(--space-xl); color: var(--color-ink-2); max-width: 48rem; }
.price-extras strong { color: var(--color-ink); }
.price-rules { margin-top: var(--space-l); padding: var(--space-m) var(--space-l); background: var(--color-bg-sunken); border-left: 2px solid var(--color-accent); border-radius: 0 var(--radius) var(--radius) 0; }
.price-rules h3 { font-size: var(--step-1); margin-bottom: var(--space-xs); }
.price-rules li { color: var(--color-ink-2); }

.planner {
  display: grid;
  gap: var(--space-m);
  margin-top: var(--space-xl);
  padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-line);
  border-radius: calc(var(--radius) * 2);
  box-shadow: var(--shadow-m);
}
.planner h3 { font-size: var(--step-2); }
.planner-grid { display: grid; gap: var(--space-m); }
@media (min-width: 40em) { .planner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .planner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.field--check { display: flex; align-items: center; gap: 0.7rem; align-self: end; min-height: 48px; }
.field--check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--color-accent); }
.field--check label { font-weight: 500; }
.planner-result {
  display: grid;
  gap: var(--space-s);
  padding: var(--space-m);
  background: var(--color-accent-soft);
  border-radius: var(--radius);
}
.planner-result div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-s); }
.planner-label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-ink-2); }
.planner-result strong { font-family: var(--font-display); font-size: var(--step-2); font-weight: 500; color: var(--color-ink); font-variant-numeric: tabular-nums lining-nums; }
@media (min-width: 48em) {
  .planner-result { grid-template-columns: repeat(3, 1fr); }
  .planner-result div { flex-direction: column; justify-content: flex-start; gap: 0.2rem; }
}
.planner-result strong.bump { animation: bump 0.35s var(--ease); }
@media (prefers-reduced-motion: no-preference) { @keyframes bump { 50% { transform: scale(1.06); } } }
/* Without JavaScript the planner can't calculate, so hide it and keep the sample plans. */
.planner { display: none; }
.js .planner { display: grid; }
.reveal-ready .price-grid[data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .price-grid[data-reveal] .price-card { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
  .reveal-ready .price-grid[data-reveal].is-visible .price-card { opacity: 1; transform: none; }
  .reveal-ready .price-grid[data-reveal].is-visible .price-card:hover { transform: translateY(-4px); }
}

/* ==========================================================================
   18. Brand v3 — blue→violet gradient, Poppins headings, motion
   ========================================================================== */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.025em; }
h1 { letter-spacing: -0.035em; line-height: 1.05; }
.highlights strong, .price, .index-num, .step-num, .channel-value, .statement,
.empty-state-mark, .not-found-code, .planner-result strong { font-weight: 700; font-style: normal; }
.statement { font-weight: 600; }
.channel-value { font-weight: 600; }
.service-cell h3, .index-row h3 { font-weight: 650; }

/* Gradient text helper — used on accents in headings */
.hero h1 em, .band h2 em, .statement em, .grad-text {
  font-style: normal;
  font-weight: inherit;
  color: var(--color-accent);
  background-image: var(--grad);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.band h2 em { background-image: linear-gradient(135deg, #bfdbfe, #e9d5ff); }

/* Wordmark: "Alvi" ink + "Hassan" gradient + dot */
.wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; font-size: 1.4rem; }
.wordmark-accent {
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wordmark-dot {
  display: inline-block;
  width: 0.3em; height: 0.3em;
  margin-left: 0.08em;
  border-radius: 50%;
  background: var(--grad);
  color: transparent;
  overflow: hidden;
  vertical-align: baseline;
}

/* Header — clean white bar with soft shadow */
.site-header { box-shadow: 0 1px 0 var(--color-line), 0 8px 24px -18px rgb(17 24 39 / 0.25); border-bottom: 0; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 transparent; background-image: var(--grad); background-size: 100% 2px; background-position: 0 100%; background-repeat: no-repeat; }
.site-nav .nav-cta, .site-nav .nav-cta[aria-current="page"] { color: #fff; background: var(--grad); box-shadow: var(--shadow-glow); }
.site-nav .nav-cta:hover { color: #fff; background: var(--grad); filter: brightness(1.08); }

/* Buttons */
.button--primary { color: #fff; background: var(--grad); border: 0; box-shadow: var(--shadow-glow); }
.button--primary:hover { color: #fff; background: var(--grad); filter: brightness(1.08); }
.button--secondary { color: var(--color-accent); border: 1.5px solid var(--color-accent); background: transparent; }
.button--secondary:hover { color: #fff; background: var(--grad); border-color: transparent; }
.button { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease); }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }

/* Eyebrow line and chips */
.eyebrow { color: var(--color-accent); }
.eyebrow::before { height: 2px; background: var(--grad); }
.chip { background: var(--color-bg-raised); border-color: var(--color-line); box-shadow: 0 4px 14px -10px rgb(49 46 129 / 0.4); }
.chip::before { background: var(--grad); }

/* Hero background — soft animated colour blobs */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.hero::before { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; right: -8vw; top: -12vw; background: var(--blob-1); }
.hero::after { width: 38vw; height: 38vw; max-width: 520px; max-height: 520px; left: -10vw; bottom: -14vw; background: var(--blob-2); }
.page-intro { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, var(--color-bg-sunken), var(--color-bg)); }

/* Portrait frame — gradient backdrop like a brand card */
.portrait-frame::before { background: var(--grad); opacity: 0.9; border: 0; }
.portrait-frame .portrait { border: 4px solid var(--color-bg-raised); }
.float-badge svg { color: #7c3aed; }

/* Highlights and numbers */
.highlights strong, .step-num, .index-num, .empty-state-mark, .not-found-code {
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.empty-state-mark, .not-found-code { opacity: 0.35; }

/* Service cells — gradient icon tiles, lift on hover */
.service-grid { border: 0; gap: var(--space-m); }
.service-cell {
  border: 1px solid var(--color-line);
  border-radius: calc(var(--radius) * 2.5);
  background: var(--color-bg-raised);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  overflow: hidden;
}
.service-cell:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); border-color: transparent; background: var(--color-bg-raised); }
.service-cell::after { top: 0; height: 3px; background: var(--grad); }
.service-icon { color: #fff; background: var(--grad); border-radius: 12px; width: 48px; height: 48px; box-shadow: var(--shadow-glow); }
.ticks li::before { background: var(--grad); height: 2px; }

/* Cards: price, planner, form, empty state */
.price-card, .contact-form, .planner, .empty-state { border-radius: calc(var(--radius) * 2.5); }
.price-card--featured { border: 0; box-shadow: var(--shadow-m); background:
  linear-gradient(var(--color-bg-raised), var(--color-bg-raised)) padding-box,
  var(--grad) border-box; border: 2px solid transparent; }
.price-tag { color: #fff; background: var(--grad); }
.planner-result { background: var(--grad-soft); }
.tools li { background: var(--color-bg-raised); border-radius: 999px; }
.tools li:hover { color: #fff; background: var(--grad); border-color: transparent; }
.steps .step { border-top-width: 2px; }
.photo, .teaser .photo, .image-strip .photo { border-radius: calc(var(--radius) * 2.5); }
.note, .price-rules { border-left: 3px solid transparent; border-image: var(--grad) 1; border-radius: 0; }

/* Contact band — deep gradient */
.band { background: var(--grad-band); position: relative; overflow: hidden; isolation: isolate; }
.band::before {
  content: ""; position: absolute; z-index: -1; right: -10%; top: -40%;
  width: 50%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgb(167 139 250 / 0.45), transparent 65%);
}
.band p { color: #dbe2ff; }
.band .button--primary { color: #1e1b4b; background: #fff; box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.5); }
.band .button--primary:hover { color: #1e1b4b; background: #fff; filter: none; }
.band .button--secondary { color: #fff; border-color: rgb(255 255 255 / 0.55); }
.band .button--secondary:hover { color: #1e1b4b; background: #fff; border-color: #fff; }

/* Back to top and theme toggle */
.to-top { background: var(--grad); color: #fff; }
.to-top:hover { color: #fff; background: var(--grad); filter: brightness(1.1); }
.theme-toggle:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* Form focus with brand ring */
.field input:focus, .field select:focus, .field textarea:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgb(99 102 241 / 0.18); }

/* Footer */
.site-footer { background: var(--color-bg-raised); border-top: 1px solid var(--color-line); }

/* ---- Motion (all disabled under reduced motion) ---- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes blob-a { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-40px, 30px) scale(1.08); } 66% { transform: translate(25px, -20px) scale(0.95); } }
  @keyframes blob-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px, -35px) scale(1.1); } }
  @keyframes grad-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
  @keyframes header-in { from { transform: translateY(-100%); } to { transform: none; } }
  @keyframes glow { 0%,100% { box-shadow: var(--shadow-glow); } 50% { box-shadow: 0 14px 38px -8px rgb(124 58 237 / 0.6); } }
  @keyframes spin-slow { to { transform: rotate(360deg); } }

  .hero::before { animation: blob-a 18s ease-in-out infinite; }
  .hero::after { animation: blob-b 22s ease-in-out infinite; }
  .band::before { animation: blob-b 20s ease-in-out infinite; }
  .hero h1 em, .grad-text { animation: grad-shift 8s ease-in-out infinite; }
  .js .site-header { animation: header-in 0.6s var(--ease) both; }
  .hero .button--primary { animation: glow 3.2s ease-in-out infinite; }
  .js .hero h1 em { animation: rise 0.9s var(--ease) 0.25s both, grad-shift 8s ease-in-out 1.2s infinite; }
  .hero h1 em { background-size: 200% 200%; background-position: 0 50%; background-repeat: repeat; }
  .service-cell:hover .service-icon { animation: glow 1.6s ease-in-out infinite; }
  .price-card--featured { animation: none; }
  .portrait-frame::before { transition: transform 0.6s var(--ease); }
  .portrait-frame:hover::before { transform: translate(6px, 6px) rotate(1.5deg); }
}
/* the old underline draw is replaced by the gradient accent */
.hero h1 em { background-image: var(--grad); }
.wordmark-accent { margin-left: 0.24em; }
.hero h1 { font-size: clamp(2.3rem, 1.5rem + 3.3vw, 4.3rem); max-width: 17ch; }
.page-intro h1 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.5rem); }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3.1rem); }
.section-head h2, .split h2, .teaser h2, .strip-copy h2, .contact-info h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.4rem); }

/* Dark theme: light gradient needs dark text for contrast */
:root[data-theme="dark"] :is(.button--primary, .button--primary:hover, .button--secondary:hover, .site-nav .nav-cta, .site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current="page"], .price-tag, .to-top, .to-top:hover, .service-icon, .tools li:hover) { color: #0b1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.button--primary, .button--primary:hover, .button--secondary:hover, .site-nav .nav-cta, .site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current="page"], .price-tag, .to-top, .to-top:hover, .service-icon, .tools li:hover) { color: #0b1020; } }
h1 { letter-spacing: -0.028em; }
.hero h1 { letter-spacing: -0.03em; line-height: 1.07; }
.float-badge { top: 1.75rem; bottom: auto; }

/* ==========================================================================
   19. Mobile polish (phones and small tablets)
   ========================================================================== */
@media (max-width: 47.99em) {
  .section { padding-block: clamp(2.75rem, 2rem + 4vw, 4rem); }

  /* Hero: text → buttons → photo → highlights, all in one tidy column */
  .hero { padding-block: 1.75rem 2.75rem; }
  .hero-grid { gap: 1.25rem; }
  .hero-grid > div:first-child { display: contents; }
  .hero .chips { order: 1; margin-bottom: 0; gap: 0.4rem; }
  .hero h1 { order: 2; font-size: clamp(2rem, 1.2rem + 4.6vw, 2.6rem); line-height: 1.1; max-width: 16ch; }
  .hero .lead { order: 3; margin-top: 0; font-size: 1.05rem; line-height: 1.6; }
  .hero .actions { order: 4; margin-top: 0.25rem; }
  .hero .hero-aside { order: 5; }
  .hero .highlights { order: 6; margin-top: 0.25rem; }

  .chip { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

  /* Two equal buttons side by side */
  .hero .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .hero .actions .button { width: 100%; padding-inline: 0.75rem; font-size: 0.95rem; }

  /* Photo: square crop that keeps the face, badge at the bottom */
  .hero-aside--frame { max-width: 100%; padding-right: 0.75rem; margin-top: 0.5rem; }
  .portrait-frame { margin-bottom: 0.75rem; }
  .portrait-frame::before { inset: 0.75rem -0.75rem -0.75rem 0.75rem; }
  .hero .portrait img { aspect-ratio: 1 / 1; object-position: 50% 12%; }
  .float-badge {
    top: auto; bottom: 0.75rem; left: 0.75rem; right: auto;
    max-width: calc(100% - 1.5rem);
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
  }
  .float-badge svg { width: 16px; height: 16px; }

  /* Highlights: compact three-up stat row, no awkward word breaks */
  .highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding-top: 1rem;
  }
  .highlights li { display: block; padding: 0; border: 0; }
  .highlights strong { font-size: 1.05rem; white-space: nowrap; letter-spacing: -0.02em; }
  .highlights span { margin-top: 0.25rem; font-size: 0.75rem; line-height: 1.35; }

  /* Section heads */
  .section-head { margin-bottom: 1.75rem; gap: 0.6rem; }
  .section-head h2, .split h2, .teaser h2, .strip-copy h2, .contact-info h2 { font-size: clamp(1.55rem, 1.2rem + 2vw, 1.9rem); line-height: 1.15; }
  .eyebrow { margin-bottom: 0.75rem; }

  /* Service cards: shorter on phones — icon beside title, details on the services page */
  .service-grid { gap: 0.85rem; }
  .service-cell {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 0.9rem;
    row-gap: 0.35rem;
    padding: 1.1rem 1.15rem;
    align-items: center;
  }
  .service-cell .service-icon { width: 44px; height: 44px; grid-row: span 1; }
  .service-cell h3 { font-size: 1.05rem; }
  .service-cell p { grid-column: 1 / -1; font-size: 0.93rem; }
  .service-cell .ticks { display: none; }
  .service-cell .text-link { grid-column: 1 / -1; min-height: 36px; font-size: 0.93rem; }

  /* Photos in later sections: a little shorter */
  .teaser .photo img { aspect-ratio: 4 / 3; }
  .image-strip .photo--tall img { aspect-ratio: 1 / 1; object-position: 50% 15%; }

  /* Steps and empty state */
  .step { padding-block: 1.1rem; }
  .step-num { font-size: 1.6rem; margin-bottom: 0.4rem; }
  .empty-state { padding: 1.25rem; gap: 0.75rem; }
  .empty-state-mark { font-size: 3rem; }
  .empty-state h3 { font-size: 1.35rem; }

  /* Pricing cards */
  .price-card { padding: 1.35rem; }
  .price { font-size: 2rem; }

  /* Contact band */
  .band { padding-block: 3.25rem; }
  .band h2 { font-size: clamp(1.75rem, 1.3rem + 2.4vw, 2.2rem); }
  .band p { font-size: 1rem; }
  .band .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .band .actions .button { width: 100%; padding-inline: 0.75rem; }

  /* Inner page intros */
  .page-intro { padding-block: 2.25rem 1.75rem; }
  .page-intro h1 { font-size: clamp(1.9rem, 1.3rem + 3.2vw, 2.4rem); line-height: 1.12; }
  .page-intro .lead { font-size: 1.02rem; }

  /* Footer: two columns for link lists */
  .footer-grid.footer-grid--4 { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .footer-grid--4 > div:first-child { grid-column: 1 / -1; }
  .footer-base { flex-direction: column; gap: 0.25rem; }

  .to-top { width: 42px; height: 42px; }
}

/* Very small phones (≤360px): stack the hero buttons */
@media (max-width: 22.5em) {
  .hero .actions, .band .actions { grid-template-columns: 1fr; }
  .highlights strong { font-size: 0.95rem; }
}
@media (max-width: 47.99em) { .hero .float-badge { display: none; } }
@media (max-width: 47.99em) {
  .page-intro-grid { gap: 0.9rem; }
  /* Services quick links: one swipeable row of chips */
  nav.legend {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0.25rem var(--gutter) 0.6rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  nav.legend::-webkit-scrollbar { display: none; }
  nav.legend .text-link {
    flex: none;
    min-height: 38px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    background: var(--color-bg-raised);
  }
  /* Service detail sections: tighter */
  .service { padding-block: 2.5rem; gap: 1.25rem; }
  .service-head h2 { font-size: clamp(1.5rem, 1.2rem + 1.8vw, 1.85rem); }
  .service-head .index-num { margin-bottom: 0.4rem; }
  .service-detail { gap: 1.1rem; }
  .service-detail h3 { margin-bottom: 0.5rem; }
  .price-heading { margin: 2rem 0 1rem; font-size: 1.25rem; }
  .price-heading span { display: block; font-size: 0.9rem; margin-top: 0.15rem; }
  .planner { padding: 1.25rem; }
  .planner-result div { flex-direction: row; }
  .contact-form { padding: 1.25rem; }
  .channel-value { font-size: 1.15rem; }
}
.price-card p + p { margin-top: 0; }
.price-card { gap: 0.75rem; }
@media (max-width: 47.99em) { .page-intro .lead { margin-top: 0; } }
