/*
Theme Name:   Aly Mokhtar — Dossier
Theme URI:    https://alymokhtar.com
Description:  Modernist portfolio child theme for Hello Elementor. Editorial grid, hairline rules, oversized display type, single red accent. Built for the Projects CPT + ACF case-study system.
Author:       Aly Mokhtar
Author URI:   https://alymokhtar.com
Template:     hello-elementor
Version:      3.4.10
Text Domain:  amdossier
*/

/* ==========================================================================
   1. TOKENS
   ========================================================================== */

:root {
  /* Ink & paper */
  --am-paper:        #F2F1EE;
  --am-paper-alt:    #EAE8E4;
  --am-surface:      #FFFFFF;
  --am-ink:          #16161A;
  --am-ink-soft:     #55555C;
  --am-ink-faint:    #8A8A90;
  --am-rule:         #D6D3CD;
  --am-rule-strong:  #16161A;

  /* Accent */
  --am-accent:       #E8391A;
  --am-accent-dark:  #C42D12;

  /* Dark band */
  --am-night:        #131316;

  /* Type */
  --am-font: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont,
             "Helvetica Neue", Helvetica, Arial, sans-serif;

  --am-display-1: clamp(2.15rem, 6.4vw, 5.75rem);
  --am-display-2: clamp(1.75rem, 4.6vw, 4rem);
  --am-display-3: clamp(1.375rem, 2.6vw, 2.35rem);
  --am-lead:      clamp(1.0625rem, 1.35vw, 1.3125rem);
  --am-body:      1rem;
  --am-small:     0.875rem;
  --am-label:     0.6875rem;

  /* Rhythm */
  --am-shell:     1440px;
  --am-gutter:    clamp(1.25rem, 3.2vw, 3rem);
  --am-block:     clamp(3.5rem, 7vw, 6.5rem);

  --am-border:    1px solid var(--am-rule);

  /* The footer band. Dark in both themes, but not the same dark. */
  --am-band:      #131316;
  --am-band-ink:  #E7E6E3;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   1b. DARK
   Same grid, same type, same red. Only the ink and paper swap places, so
   nothing about the layout has to know which theme it is in.
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --am-paper:       #131316;
    --am-paper-alt:   #1A1A1F;
    --am-surface:     #202027;
    --am-ink:         #EAE9E6;
    --am-ink-soft:    #A5A4AA;
    --am-ink-faint:   #76757C;
    --am-rule:        #2F2F36;
    --am-rule-strong: #EAE9E6;
    --am-accent:      #FF5334;
    --am-accent-dark: #E8391A;
    --am-band:        #0C0C0E;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --am-paper:       #131316;
  --am-paper-alt:   #1A1A1F;
  --am-surface:     #202027;
  --am-ink:         #EAE9E6;
  --am-ink-soft:    #A5A4AA;
  --am-ink-faint:   #76757C;
  --am-rule:        #2F2F36;
  --am-rule-strong: #EAE9E6;
  --am-accent:      #FF5334;
  --am-accent-dark: #E8391A;
  --am-band:        #0C0C0E;
  color-scheme: dark;
}

/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.am-body {
  margin: 0;
  background: var(--am-paper);
  color: var(--am-ink);
  font-family: var(--am-font);
  font-size: var(--am-body);
  line-height: 1.55;
  font-feature-settings: "kern" 1, "liga" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }
svg { display: block; max-width: 100%; }

/* Links carry the colour of whatever they sit in. Hello Elementor's reset.css
   sets a { color:#c36 } and a:hover { color:#336 } — that second one outranks a
   bare `a` rule, which is why every card title went navy-purple on hover. Both
   are answered here, selector for selector, so load order settles it. Anything
   that genuinely wants a hover colour says so on its own class. */
a { color: inherit; text-decoration: none; }
a:link,
a:visited,
a:hover,
a:active,
a:focus { color: inherit; }

h1, h2, h3, h4, h5, h6, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--am-accent); color: #fff; }

/* Controls are not copy. Without this, dragging or tapping across a button
   leaves the browser's own selection highlight sitting on its label, which
   reads as a stray colour that belongs to no state in the design. */
button,
.am-btn,
.am-burger,
.am-theme {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Hello Elementor's reset.css paints EVERY button #c36 (pink) on hover and on
   focus. Nothing in this design is pink, and every button below states its own
   hover, so the parent rule is switched off here — matched selector for
   selector so ours wins on load order — and each control re-declares the
   background it should actually keep. */
button,
[type="button"],
[type="submit"],
[type="reset"] { color: inherit; }

button:hover,
button:focus,
[type="button"]:hover,
[type="button"]:focus,
[type="submit"]:hover,
[type="submit"]:focus,
[type="reset"]:hover,
[type="reset"]:focus {
  background-color: transparent;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--am-accent);
  outline-offset: 3px;
}

.am-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.am-skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--am-ink); color: #fff; padding: .75rem 1.25rem;
}
.am-skip:focus { left: 0; }

/* ==========================================================================
   3. SHELL & GRID
   ========================================================================== */

.am-shell {
  width: 100%;
  max-width: var(--am-shell);
  margin-inline: auto;
  border-inline: var(--am-border);
  background: var(--am-paper);
}

.am-pad { padding-inline: var(--am-gutter); }

/* Hairline grid: cells carry their own rules, no gaps. */
.am-grid { display: grid; }
.am-grid > * { border-bottom: var(--am-border); border-right: var(--am-border); }

.am-grid--2 { grid-template-columns: repeat(2, 1fr); }
.am-grid--3 { grid-template-columns: repeat(3, 1fr); }
.am-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Kill the outer right rule so it doesn't double up with the shell. */
.am-grid--2 > *:nth-child(2n),
.am-grid--3 > *:nth-child(3n),
.am-grid--4 > *:nth-child(4n) { border-right: 0; }

.am-rule-top    { border-top: var(--am-border); }
.am-rule-bottom { border-bottom: var(--am-border); }
.am-rule-heavy  { border-top: 2px solid var(--am-rule-strong); }

/* ==========================================================================
   4. TYPE PRIMITIVES
   ========================================================================== */

.am-label {
  font-size: var(--am-label);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--am-ink-faint);
  line-height: 1.2;
}
.am-label--accent { color: var(--am-accent); }
.am-label--ink    { color: var(--am-ink); }

.am-display {
  font-size: var(--am-display-1);
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.am-h2 {
  font-size: var(--am-display-2);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.03em;
}

.am-h3 {
  font-size: var(--am-display-3);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.am-lead {
  font-size: var(--am-lead);
  line-height: 1.5;
  color: var(--am-ink-soft);
  max-width: 46ch;
}

.am-copy { color: var(--am-ink-soft); max-width: 62ch; }
.am-copy p + p { margin-top: 1em; }

.am-num {
  font-size: clamp(2.25rem, 3.4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
}

/* Anchor targets clear the sticky header. */
[id] { scroll-margin-top: 5.5rem; }

/* ==========================================================================
   4b. ICONS
   ========================================================================== */

.am-icon {
  flex: none;
  flex-shrink: 0;
  display: block;
  overflow: visible;
  color: var(--am-ink-faint);
  transition: color .18s ease, transform .18s ease;
}

/* Icon sitting on the same line as a number label. */
.am-cardtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Big, faint icon used as the only real ornament on a card. */
.am-ghost {
  position: absolute;
  right: clamp(1rem, 2vw, 1.5rem);
  top: clamp(1rem, 2vw, 1.5rem);
  color: var(--am-ink);
  opacity: .09;
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}

/* Small icon + text pair, e.g. footer contact lines. */
.am-iconline {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.am-iconline .am-icon { color: inherit; opacity: .65; }

/* ==========================================================================
   5. BUTTONS & LINKS
   ========================================================================== */

.am-btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .85em 1.5em;
  font-size: var(--am-small);
  font-weight: 600;
  letter-spacing: -.01em;
  border: 1px solid var(--am-ink);
  background: transparent;
  color: var(--am-ink);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.am-btn:hover,
.am-btn:focus { background: var(--am-ink); color: var(--am-paper); }

.am-btn--accent {
  background: var(--am-accent);
  border-color: var(--am-accent);
  color: #fff;
}
.am-btn--accent:hover,
.am-btn--accent:focus { background: var(--am-accent-dark); border-color: var(--am-accent-dark); color: #fff; }

.am-btn__arrow { transition: transform .18s ease; }
.am-btn:hover .am-btn__arrow { transform: translateX(3px); }

.am-link {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.am-link:hover { color: var(--am-accent); }
.am-link { overflow-wrap: anywhere; }

/* ==========================================================================
   6. HEADER
   ========================================================================== */

.am-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--am-paper);
  border-bottom: var(--am-border);
}

.am-header__inner {
  max-width: var(--am-shell);
  margin-inline: auto;
  padding: 1.15rem var(--am-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.am-header__right {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  min-width: 0;
}
.am-header__tools { display: flex; align-items: center; gap: .5rem; }

/* Light / dark switch. Shows the theme you would get by pressing it. */
.am-theme {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--am-border);
  background: transparent;
  color: var(--am-ink-soft);
  cursor: pointer;
  padding: 0;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.am-theme:hover,
.am-theme:focus {
  background: var(--am-surface);
  color: var(--am-ink);
  border-color: var(--am-ink);
}
.am-theme .am-icon { color: currentColor; }

/* Light theme: offer the moon. Dark theme: offer the sun. */
.am-theme__sun { display: none; }
.am-theme__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .am-theme__sun { display: block; }
  :root:not([data-theme="light"]) .am-theme__moon { display: none; }
}
:root[data-theme="dark"] .am-theme__sun { display: block; }
:root[data-theme="dark"] .am-theme__moon { display: none; }
:root[data-theme="light"] .am-theme__sun { display: none; }
:root[data-theme="light"] .am-theme__moon { display: block; }

.am-brand {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.am-brand__dot { color: var(--am-accent); }

.am-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.25rem); }

.am-nav__link {
  font-size: var(--am-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--am-ink);
  transition: color .15s ease;
}
.am-nav__link:hover,
.am-nav__link[aria-current="page"] { color: var(--am-accent); }

.am-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  color: var(--am-ink);
  border: 1px solid var(--am-ink);
  cursor: pointer;
}
.am-burger:hover,
.am-burger:focus {
  background: var(--am-ink);
  color: var(--am-paper);
  border-color: var(--am-ink);
}

.am-burger__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}
.am-burger__bars i {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.am-burger[aria-expanded="true"] .am-burger__bars i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.am-burger[aria-expanded="true"] .am-burger__bars i:nth-child(2) { opacity: 0; }
.am-burger[aria-expanded="true"] .am-burger__bars i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .am-nav { display: none; }
  .am-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.15rem;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--am-paper);
    border-bottom: var(--am-border);
    padding: 1.5rem var(--am-gutter) 2rem;
  }
  .am-burger { display: inline-flex; }
  .am-header__inner { position: relative; }
}

/* ==========================================================================
   7. HERO
   ========================================================================== */

.am-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 24%);
  border-bottom: var(--am-border);
}

.am-hero__main {
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--am-gutter) clamp(2.75rem, 5vw, 4rem);
  border-right: var(--am-border);
}

.am-hero__eyebrow { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

/* Where I am and whether I am free, answered before the headline. */
.am-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.5rem;
  padding: .5em .9em;
  border: var(--am-border);
  background: var(--am-surface);
  font-size: var(--am-label);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
}
.am-pill__dot {
  width: .45rem; height: .45rem;
  background: var(--am-accent);
  flex: none;
}
.am-pill__where { color: var(--am-ink-soft); }
.am-pill__sep   { color: var(--am-ink-faint); }
.am-pill__state { color: var(--am-ink); }

.am-hero__title { margin-bottom: 1.75rem; }

/* The promise: a second line inside the headline, in the accent. */
.am-hero__promise {
  display: block;
  color: var(--am-accent);
}

.am-hero__lead { max-width: 54ch; margin-bottom: 2.25rem; }

.am-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Rail beside the hero — still used on the Experience page. */
.am-hero__rail { display: flex; flex-direction: column; }

/* Rail as a full-width band under the hero — the homepage layout. */
.am-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: var(--am-border);
}
.am-rail > .am-stat { border-bottom: 0; border-right: var(--am-border); }
.am-rail > .am-stat:last-child { border-right: 0; }
.am-rail .am-stat { padding-inline: var(--am-gutter); }

.am-rail .am-stat--avail {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.am-stat {
  padding: clamp(1.25rem, 2.2vw, 1.75rem) clamp(1.25rem, 2vw, 1.75rem);
  border-bottom: var(--am-border);
  transition: background .2s ease;
}
.am-stat:hover { background: var(--am-surface); }
.am-hero__rail .am-stat:last-child { border-bottom: 0; }
.am-stat__label { margin-bottom: .55rem; }
.am-stat__note {
  display: flex; align-items: baseline; gap: .5rem;
  font-size: var(--am-small); color: var(--am-ink-soft); margin-top: .5rem;
}
.am-stat__dot {
  width: .5rem; height: .5rem; background: var(--am-accent);
  flex: none; translate: 0 -1px;
}
.am-stat__value--text {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15;
}

.am-stat--avail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.am-stat__cta {
  padding: .7em 1.15em;
  font-size: .8125rem;
}
.am-stat__cta .am-icon { color: currentColor; }

.am-hero--solo { grid-template-columns: 1fr; }
.am-hero--solo .am-hero__main { border-right: 0; }

@media (max-width: 1000px) {
  .am-hero { grid-template-columns: 1fr; }
  .am-hero__main { border-right: 0; }
  .am-hero__rail { border-top: var(--am-border); }
  .am-hero__rail .am-stat:last-child { border-bottom: var(--am-border); }
}

/* The under-hero band: three across, then availability full width. */
@media (max-width: 820px) {
  .am-rail { grid-template-columns: repeat(2, 1fr); }
  .am-rail > .am-stat { border-bottom: var(--am-border); }
  .am-rail > .am-stat:nth-child(2n) { border-right: 0; }
  .am-rail > .am-stat:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }
}

/* ==========================================================================
   8. SECTION HEAD
   ========================================================================== */

.am-sechead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: clamp(2.25rem, 4vw, 3.5rem) var(--am-gutter) clamp(1.5rem, 2.5vw, 2rem);
  border-bottom: var(--am-border);
}
.am-sechead__title { margin-top: .75rem; }
.am-sechead__aside { color: var(--am-ink-soft); font-size: var(--am-small); max-width: 40ch; }

/* ==========================================================================
   9. SERVICES
   ========================================================================== */

.am-service {
  padding: clamp(1.5rem, 2.6vw, 2.25rem) clamp(1.35rem, 2.2vw, 2rem) clamp(2rem, 3vw, 2.75rem);
  background: var(--am-paper);
  transition: background .2s ease;
}
.am-service:hover { background: var(--am-surface); }
.am-service:hover .am-icon { color: var(--am-accent); }
.am-service__num { color: var(--am-accent); font-weight: 600; font-size: var(--am-label); letter-spacing: .12em; }
.am-srow__num.am-cardtop { color: var(--am-accent); font-weight: 700; font-size: var(--am-label); letter-spacing: .12em; }
.am-service__title { margin: 1.75rem 0 .65rem; font-size: 1.3125rem; font-weight: 700; letter-spacing: -.02em; }
.am-service__text { color: var(--am-ink-soft); font-size: .9375rem; }

/* Grouped card: the lead service plus the two it covers. */

.am-service--group { display: flex; flex-direction: column; }
.am-service--group .am-service__text { margin-bottom: 0; }

.am-service__subs {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: var(--am-border);
  display: grid;
  gap: 1.1rem;
}
.am-service__sub { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: .7rem; align-items: start; }
.am-service__subicon { color: var(--am-accent); margin-top: .18rem; }
.am-service__subtitle { font-size: .9375rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.am-service__subtext { margin: .25rem 0 0; font-size: .8125rem; line-height: 1.55; color: var(--am-ink-soft); }

@media (max-width: 900px) { .am-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .am-grid--3 > *:nth-child(3n) { border-right: var(--am-border); }
  .am-grid--3 > *:nth-child(2n) { border-right: 0; } }
@media (max-width: 620px) { .am-grid--2, .am-grid--3, .am-grid--4 { grid-template-columns: 1fr; }
  .am-grid > * { border-right: 0 !important; } }

/* ==========================================================================
   10. WORK / PROJECT ENTRIES
   ========================================================================== */

.am-work { border-bottom: var(--am-border); }

.am-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 38%);
  border-bottom: var(--am-border);
  transition: background .2s ease;
}
.am-entry:last-child { border-bottom: 0; }
.am-entry:hover { background: var(--am-surface); }

.am-entry__body {
  padding: clamp(1.75rem, 3vw, 2.75rem) var(--am-gutter) clamp(2rem, 3.5vw, 3rem);
  border-right: var(--am-border);
}

.am-entry__meta { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.15rem; }
.am-entry__index { color: var(--am-accent); font-weight: 700; font-size: var(--am-label); letter-spacing: .12em; }

.am-entry__title { margin-bottom: .85rem; }

.am-entry__list { margin: 1.35rem 0 1.5rem; display: grid; gap: .55rem; }
.am-entry__list li {
  display: grid; grid-template-columns: 1.25rem 1fr; align-items: start;
  color: var(--am-ink-soft); font-size: .9375rem;
}
.am-entry__list li::before { content: "/"; color: var(--am-accent); font-weight: 700; }

.am-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.35rem; }
.am-tag {
  border: var(--am-border);
  padding: .35em .75em;
  font-size: .75rem;
  font-weight: 500;
  color: var(--am-ink-soft);
  white-space: nowrap;
}

.am-entry__shot {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: clamp(1.15rem, 2.2vw, 1.85rem);
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 9px,
      rgba(22,22,26,.045) 9px 10px);
}

/* A website screenshot is wide. Let it keep its own shape and sit framed in
   the panel — cropping it to the height of the text column mangles it. */
.am-entry__shot img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border: var(--am-border);
  box-shadow: 0 1px 0 rgba(22, 22, 26, .06);
}

.am-entry__shot--empty { padding: clamp(1.15rem, 2.2vw, 1.85rem); }
.am-entry__shot--empty::after {
  content: attr(data-empty);
  font-size: var(--am-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--am-ink-faint);
  background: var(--am-paper);
  border: var(--am-border);
  padding: .7rem 1.1rem;
  text-align: center;
}

@media (max-width: 900px) {
  .am-entry { grid-template-columns: 1fr; }
  .am-entry__body { border-right: 0; border-bottom: var(--am-border); }
}

/* ==========================================================================
   10b. SERVICES PAGE
   ========================================================================== */

/* One service, three columns: label / pitch / what's included. */
.am-srow {
  display: grid;
  grid-template-columns: minmax(240px, 26%) minmax(0, 34%) minmax(0, 40%);
  border-bottom: var(--am-border);
  transition: background .2s ease;
}
.am-srow:hover { background: var(--am-surface); }
.am-srow:hover .am-icon { color: var(--am-accent); }

.am-srow__head {
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.35rem, 2.4vw, 2rem);
  border-right: var(--am-border);
}
.am-srow__num {
  color: var(--am-accent);
  font-size: var(--am-label);
  font-weight: 700;
  letter-spacing: .12em;
  margin-bottom: 1.5rem;
}
.am-srow__title {
  font-size: clamp(1.375rem, 2.1vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.am-srow__body {
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.35rem, 2.4vw, 2rem);
  border-right: var(--am-border);
}
.am-srow__text { color: var(--am-ink-soft); font-size: .9375rem; }

.am-srow__list { padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.35rem, 2.4vw, 2rem); }
.am-srow__list .am-entry__list li { font-size: .875rem; }

@media (max-width: 1000px) {
  .am-srow { grid-template-columns: minmax(200px, 32%) minmax(0, 68%); }
  .am-srow__body { border-right: 0; }
  .am-srow__list { grid-column: 1 / -1; border-top: var(--am-border); }
}
@media (max-width: 700px) {
  .am-srow { grid-template-columns: 1fr; }
  .am-srow__head { border-right: 0; border-bottom: var(--am-border); }
  .am-srow__body { padding-bottom: 0; }
  .am-srow__list { border-top: 0; padding-top: 1.25rem; }
}

/* Process step */
.am-step {
  padding: clamp(1.5rem, 2.6vw, 2.25rem) clamp(1.35rem, 2.2vw, 1.85rem) clamp(2rem, 3vw, 2.75rem);
  background: var(--am-paper);
  transition: background .2s ease;
}
.am-step:hover { background: var(--am-surface); }
.am-step:hover .am-icon { color: var(--am-accent); }
.am-step__num { color: var(--am-accent); font-weight: 700; font-size: var(--am-label); letter-spacing: .12em; }
.am-step__title { margin: 1.75rem 0 .65rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.am-step__text { color: var(--am-ink-soft); font-size: .9375rem; }

/* Engagement card */
.am-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.25rem;
  min-height: 15rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.35rem, 2.4vw, 2rem);
  background: var(--am-paper);
  transition: background .2s ease;
}
.am-plan:hover { background: var(--am-surface); }
.am-plan:hover .am-ghost { opacity: .16; }
.am-plan__title { margin: 1.25rem 0 .75rem; font-size: clamp(1.375rem, 2vw, 1.75rem); font-weight: 700; letter-spacing: -.025em; }
.am-plan__text { color: var(--am-ink-soft); font-size: .9375rem; max-width: 44ch; }
.am-plan__foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  padding-top: 1.25rem; border-top: var(--am-border);
}

/* Stack strip */
.am-stackstrip {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) var(--am-gutter);
  border-bottom: var(--am-border);
}
.am-tag--lg { font-size: .875rem; padding: .5em 1em; color: var(--am-ink); }

/* ==========================================================================
   10c. EXPERIENCE
   ========================================================================== */

.am-role {
  display: grid;
  grid-template-columns: minmax(220px, 28%) minmax(0, 72%);
  border-bottom: var(--am-border);
  transition: background .2s ease;
}
.am-role:hover { background: var(--am-surface); }

.am-role__meta {
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.35rem, 2.4vw, 2rem);
  border-right: var(--am-border);
}
.am-role__period { margin-bottom: 1.15rem; }
.am-role__company {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.am-role__place {
  margin-top: .5rem;
  font-size: .8125rem;
  color: var(--am-ink-soft);
}
.am-role__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }

.am-tag--now {
  border-color: var(--am-accent);
  color: var(--am-accent);
  font-weight: 600;
}

.am-role__body { padding: clamp(1.75rem, 3vw, 2.5rem) var(--am-gutter); }
.am-role__title {
  font-size: clamp(1.25rem, 2vw, 1.6875rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.12;
}
.am-role__summary { margin-top: .75rem; color: var(--am-ink-soft); max-width: 62ch; }
.am-role__body .am-entry__list { margin: 1.35rem 0 0; }
.am-role__body .am-entry__list li { font-size: .875rem; }

@media (max-width: 820px) {
  .am-role { grid-template-columns: 1fr; }
  .am-role__meta { border-right: 0; border-bottom: var(--am-border); }
}

/* Skill groups */
.am-skillset {
  padding: clamp(1.4rem, 2.4vw, 2rem) clamp(1.25rem, 2vw, 1.75rem) clamp(1.75rem, 2.8vw, 2.25rem);
  background: var(--am-paper);
  transition: background .2s ease;
}
.am-skillset:hover { background: var(--am-surface); }
.am-skillset:hover .am-icon { color: var(--am-accent); }
.am-skillset__title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.015em;
}
.am-skillset .am-tags { margin: 1.15rem 0 0; }

/* Education rows */
.am-edu {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30%) minmax(120px, 18%);
  gap: 1rem;
  align-items: baseline;
  padding: clamp(.9rem, 1.6vw, 1.15rem) var(--am-gutter);
  border-bottom: var(--am-border);
  transition: background .2s ease;
}
.am-edu:hover { background: var(--am-surface); }
.am-edu__title { font-weight: 600; letter-spacing: -.01em; }
.am-edu__provider { color: var(--am-ink-soft); font-size: .9375rem; }
.am-edu__year { text-align: right; }

@media (max-width: 700px) {
  .am-edu { grid-template-columns: 1fr auto; gap: .25rem 1rem; }
  .am-edu__title { grid-column: 1; }
  .am-edu__year { grid-column: 2; grid-row: 1; }
  .am-edu__provider { grid-column: 1 / -1; }
}

/* ==========================================================================
   11. CATEGORY CARDS
   ========================================================================== */

.am-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.15rem, 1.8vw, 1.6rem);
  min-height: 12rem;
  background: var(--am-paper);
  transition: background .2s ease;
}
.am-cat:hover { background: var(--am-surface); }
.am-cat:hover .am-ghost { opacity: .16; transform: translateY(-2px); }
.am-cat__count { color: var(--am-ink-faint); font-size: var(--am-label); font-weight: 600; letter-spacing: .14em; }
.am-cat__title { margin-top: 1rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.am-cat__text {
  margin-top: .5rem;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--am-ink-soft);
  max-width: 34ch;
}
.am-cat__go { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Two links per card: into the project page, and out to the live site. */
.am-cat__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
  min-width: 0;
}
.am-link--muted {
  color: var(--am-ink-soft);
  font-weight: 500;
  font-size: .875rem;
  border-bottom-color: var(--am-rule);
}
.am-link--muted:hover { color: var(--am-ink); border-bottom-color: currentColor; }
.am-link--muted .am-icon { opacity: .8; }

@media (max-width: 620px) {
  .am-cat__links { gap: .45rem; flex-direction: column; align-items: flex-start; }
}
.am-cat__arrow { color: var(--am-accent); transition: transform .18s ease; }
.am-cat:hover .am-cat__arrow { transform: translateX(4px); }
.am-cat--empty { background: var(--am-paper-alt); pointer-events: none; }

/* ==========================================================================
   12. CASE STUDY
   ========================================================================== */

.am-case { display: grid; grid-template-columns: minmax(240px, 22%) minmax(0, 1fr); }

.am-case__rail { border-right: var(--am-border); }
.am-case__railtop { padding: clamp(1.5rem, 2.6vw, 2.25rem) 1.5rem; border-bottom: var(--am-border); }
.am-case__name { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.am-case__role { color: var(--am-ink-soft); font-size: .875rem; margin-top: .35rem; }

.am-meta { padding: 1.15rem 1.5rem; border-bottom: var(--am-border); }
.am-meta__label { margin-bottom: .4rem; }
.am-meta__value { font-weight: 600; letter-spacing: -.01em; }

.am-case__main { min-width: 0; }
.am-case__head { padding: clamp(2rem, 4vw, 3.25rem) var(--am-gutter); border-bottom: var(--am-border); }
.am-case__kicker { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.5rem; }
.am-case__title { margin-bottom: 1.25rem; }

.am-case__section { padding: clamp(1.75rem, 3vw, 2.75rem) var(--am-gutter); border-bottom: var(--am-border); }

/* Screenshots, one per row and full width — a site screenshot needs the width
   to be readable at all, so they never sit two-up. */
.am-case__shots {
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 2rem);
  padding: clamp(1.75rem, 3vw, 2.75rem) var(--am-gutter);
  border-bottom: var(--am-border);
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 9px,
      rgba(22,22,26,.045) 9px 10px);
}
.am-shot { margin: 0; }
.am-shot img {
  width: 100%;
  height: auto;
  border: var(--am-border);
  background: var(--am-surface);
}
.am-shot__cap {
  margin-top: .6rem;
  font-size: var(--am-small);
  color: var(--am-ink-soft);
}
.am-case__section h2 { margin-bottom: 1.15rem; }
.am-case__section .am-copy h3 { margin: 1.75rem 0 .6rem; font-size: 1.15rem; font-weight: 700; letter-spacing: -.015em; color: var(--am-ink); }
.am-case__section .am-copy ul { display: grid; gap: .5rem; margin: 1rem 0; }
.am-case__section .am-copy ul li { display: grid; grid-template-columns: 1.25rem 1fr; }
.am-case__section .am-copy ul li::before { content: "/"; color: var(--am-accent); font-weight: 700; }

.am-back { display: inline-flex; align-items: center; gap: .5rem; padding: 1.15rem 1.5rem; }

@media (max-width: 900px) {
  .am-case { grid-template-columns: 1fr; }
  .am-case__rail { border-right: 0; border-bottom: var(--am-border); }
}

/* ==========================================================================
   13. FAQ
   ========================================================================== */

.am-faq__row {
  border-bottom: var(--am-border);
  transition: background .2s ease;
}
.am-faq__row:hover, .am-faq__row:active { background: var(--am-surface); }

/* The question is the control. The row opens on click, and works with no
   JavaScript at all, because it is a real details/summary pair. */
.am-faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.35rem, 2.4vw, 2rem) var(--am-gutter);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.am-faq__q::-webkit-details-marker { display: none; }
.am-faq__q::marker { content: ""; }
.am-faq__q:focus-visible { outline: 2px solid var(--am-accent); outline-offset: -3px; }

/* A plus that becomes a minus. One bar rotates; nothing else moves. */
.am-faq__icon {
  position: relative;
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: .3em;
  color: var(--am-accent);
}
.am-faq__icon::before,
.am-faq__icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
  transition: transform .22s ease;
}
.am-faq__icon::after { transform: translateY(-50%) rotate(90deg); }
.am-faq__row[open] .am-faq__icon::after { transform: translateY(-50%) rotate(0deg); }

.am-faq__a {
  padding: 0 var(--am-gutter) clamp(1.35rem, 2.4vw, 2rem);
  max-width: 70ch;
  color: var(--am-ink-soft);
  font-size: .9375rem;
}
.am-faq__row[open] .am-faq__a { animation: am-faq-in .26s ease both; }

@keyframes am-faq-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .am-faq__row[open] .am-faq__a { animation: none; }
  .am-faq__icon::before, .am-faq__icon::after { transition: none; }
}

@media (max-width: 760px) {
  .am-faq__q { font-size: 1rem; gap: 1rem; }
}

/* ==========================================================================
   14. CONTACT / CF7
   ========================================================================== */

.am-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 44%); }
.am-contact__intro { padding: clamp(2rem, 4vw, 3.25rem) var(--am-gutter); border-right: var(--am-border); }
.am-contact__form { padding: clamp(2rem, 4vw, 3.25rem) var(--am-gutter); }

@media (max-width: 900px) {
  .am-contact { grid-template-columns: 1fr; }
  .am-contact__intro { border-right: 0; border-bottom: var(--am-border); }
}

/* --- Channel strip ------------------------------------------------------- */

.am-channels { border-bottom: var(--am-border); }

.am-channel {
  display: block;
  padding: clamp(1.5rem, 2.6vw, 2.25rem) var(--am-gutter);
  color: inherit;
  text-decoration: none;
  transition: background .18s ease;
}
a.am-channel:hover { background: var(--am-surface); }
a.am-channel:hover .am-channel__value { color: var(--am-accent); }

.am-channel .am-icon { color: var(--am-accent); margin-bottom: 1rem; }
.am-channel--static .am-icon { color: var(--am-ink-faint); }

.am-channel__label { margin-bottom: .5rem; }
.am-channel__value {
  font-size: 1.0625rem; font-weight: 700;
  letter-spacing: -.015em; line-height: 1.25;
  word-break: break-word;
  transition: color .15s ease;
}
.am-channel__note { margin-top: .45rem; font-size: .875rem; color: var(--am-ink-soft); }

/* --- Pledge note --------------------------------------------------------- */

.am-contact__pledge {
  display: flex; align-items: flex-start; gap: .7rem;
  margin-top: 2rem; padding: 1rem 1.1rem;
  background: var(--am-paper-alt);
  border-left: 2px solid var(--am-accent);
  font-size: .875rem; line-height: 1.55; color: var(--am-ink-soft);
}
.am-contact__pledge .am-icon { color: var(--am-accent); flex: 0 0 auto; margin-top: .1rem; }

/* --- Fluent Forms -------------------------------------------------------
   The form plugin ships its own look. These rules put it back on the page
   design: hairline borders, square corners, uppercase labels, accent button.
   -------------------------------------------------------------------- */

.am-contact__form .ff-el-group { margin-bottom: 1.15rem; }

.am-contact__form .ff-el-input--label label {
  display: block;
  margin-bottom: .45rem;
  font-size: var(--am-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--am-ink-faint);
}
.am-contact__form .ff-el-is-required.asterisk-right label:after,
.am-contact__form .ff-el-is-required label:after { color: var(--am-accent); }

.am-contact__form .ff-el-form-control,
.am-contact__form select.ff-el-form-control,
.am-contact__form textarea.ff-el-form-control {
  width: 100%;
  font: inherit;
  color: var(--am-ink);
  background: var(--am-surface);
  border: var(--am-border);
  border-radius: 0;
  padding: .8rem .9rem;
  box-shadow: none;
  transition: border-color .15s ease;
}
.am-contact__form textarea.ff-el-form-control { min-height: 9rem; resize: vertical; }

.am-contact__form .ff-el-form-control:focus {
  outline: none;
  border-color: var(--am-ink);
  box-shadow: none;
}

.am-contact__form .ff-btn,
.am-contact__form .ff-btn-submit {
  font: inherit;
  font-size: var(--am-small);
  font-weight: 600;
  letter-spacing: -.01em;
  background: var(--am-accent);
  color: #fff;
  border: 1px solid var(--am-accent);
  border-radius: 0;
  padding: .85em 1.5em;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.am-contact__form .ff-btn:hover,
.am-contact__form .ff-btn:focus {
  background: var(--am-accent-dark);
  border-color: var(--am-accent-dark);
  color: #fff;
}

/* Help text and errors, in the page voice rather than the plugin default. */
.am-contact__form .ff-el-help-message {
  color: var(--am-ink-faint);
  font-size: var(--am-small);
  margin-top: .35rem;
}
.am-contact__form .error-text,
.am-contact__form .ff-el-is-error .text-danger {
  color: var(--am-accent);
  font-size: var(--am-small);
  margin-top: .3rem;
}
.am-contact__form .ff-el-is-error .ff-el-form-control { border-color: var(--am-accent); }

.am-contact__form .ff-message-success {
  border: var(--am-border);
  border-left: 2px solid var(--am-accent);
  background: var(--am-surface);
  color: var(--am-ink);
  padding: 1rem 1.15rem;
  border-radius: 0;
}

/* Two across, like the old layout, collapsing on narrow screens. */
.am-contact__form .ff-t-cell { padding: 0; }

/* The plugin prints its own <style> after this file, scoped to the form id,
   so matching its weight is not enough — these go one class higher. The
   primary variable is repointed too, so anything else it colours follows.  */
.am-contact__form { --fluentform-primary: var(--am-accent); }

.am-contact__form form[class*="fluent_form"] .ff-el-form-control {
  color: var(--am-ink);
  background: var(--am-surface);
  border: var(--am-border);
  border-radius: 0;
  box-shadow: none;
}
.am-contact__form form[class*="fluent_form"] .ff-el-form-control:focus {
  border-color: var(--am-ink);
  box-shadow: none;
}
.am-contact__form form[class*="fluent_form"] .ff-el-form-control::placeholder {
  color: var(--am-ink-faint);
  opacity: 1;
}

.am-contact__form form[class*="fluent_form"] .ff-btn-submit:not(.ff_btn_no_style) {
  font: inherit;
  font-size: var(--am-small);
  font-weight: 600;
  letter-spacing: -.01em;
  background: var(--am-accent);
  color: #fff;
  border: 1px solid var(--am-accent);
  border-radius: 0;
  padding: .85em 1.5em;
  box-shadow: none;
}
.am-contact__form form[class*="fluent_form"] .ff-btn-submit:not(.ff_btn_no_style):hover,
.am-contact__form form[class*="fluent_form"] .ff-btn-submit:not(.ff_btn_no_style):focus {
  background: var(--am-accent-dark);
  border-color: var(--am-accent-dark);
  color: #fff;
}


/* ==========================================================================
   15. CTA BAND + FOOTER
   ========================================================================== */

.am-cta {
  background: var(--am-accent);
  color: #fff;
  padding: clamp(2.25rem, 4.5vw, 3.5rem) var(--am-gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.am-cta__title { font-size: var(--am-display-3); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; }
.am-cta .am-btn { border-color: #fff; color: #fff; }
.am-cta .am-btn:hover { background: #fff; color: var(--am-accent); }

.am-footer { background: var(--am-band); color: var(--am-band-ink); }
.am-footer__inner {
  max-width: var(--am-shell); margin-inline: auto;
  padding: clamp(2.25rem, 4vw, 3.25rem) var(--am-gutter);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.am-footer__brand { font-size: 1.125rem; font-weight: 700; text-transform: uppercase; letter-spacing: -.02em; }
.am-footer .am-label { color: rgba(231,230,227,.55); margin-bottom: .75rem; }
.am-footer a:hover { color: var(--am-accent); }
.am-footer__list { display: grid; gap: .5rem; font-size: .9375rem; }
.am-footer__bar {
  border-top: 1px solid rgba(231,230,227,.15);
  max-width: var(--am-shell); margin-inline: auto;
  padding: 1.25rem var(--am-gutter);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .8125rem; color: rgba(231,230,227,.55);
}

/* ==========================================================================
   14b. RESULTS — before / after rows
   ========================================================================== */

.am-results { display: grid; }

.am-result {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 380px) minmax(0, 1fr);
  gap: 1rem clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(1.35rem, 2.4vw, 2rem) var(--am-gutter);
  border-bottom: var(--am-border);
  transition: background .2s ease;
}
.am-result:hover, .am-result:active { background: var(--am-surface); }

.am-result__label { color: var(--am-ink); padding-top: .3rem; }

.am-result__figures {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}
.am-result__side { min-width: 0; }
.am-result__cap { margin-bottom: .35rem; }

.am-result__before,
.am-result__after {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  text-wrap: balance;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.am-result__before { color: var(--am-ink-faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.am-result__after  { color: var(--am-accent); }

.am-result__arrow { color: var(--am-ink-faint); padding-bottom: .35rem; flex: none; }

.am-result__text { color: var(--am-ink-soft); font-size: .9375rem; }

@media (max-width: 900px) {
  .am-result { grid-template-columns: 1fr; gap: .85rem; }
  .am-result__label { padding-top: 0; }
  .am-result__figures { justify-content: flex-start; }
}

/* ==========================================================================
   15b. INDUSTRY FILTER
   ========================================================================== */

.am-filter {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.15rem var(--am-gutter);
  border-bottom: var(--am-border);
  background: var(--am-paper-alt);
}
.am-filter__label { flex: 0 0 auto; padding-top: .35rem; }

.am-filter__row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
}

.am-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--am-ink);
  background: var(--am-surface);
  border: var(--am-border);
  border-radius: 0;
  padding: .5em .9em;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;

  /* These are controls, not copy. Dragging across them used to leave the
     browser's own selection highlight sitting on the labels. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.am-filter__btn:hover,
.am-filter__btn:focus,
.am-filter__btn:active {
  background: var(--am-surface);
  border-color: var(--am-accent);
  color: var(--am-accent);
}
.am-filter__btn:hover .am-filter__n,
.am-filter__btn:focus .am-filter__n,
.am-filter__btn:active .am-filter__n { color: var(--am-accent); }
.am-filter__btn:focus-visible { outline: 2px solid var(--am-accent); outline-offset: 2px; }

.am-filter__btn.is-active {
  background: var(--am-ink);
  border-color: var(--am-ink);
  color: var(--am-paper);
}

.am-filter__n {
  font-size: .75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--am-ink-faint);
}
/* The active chip is a solid ink fill, so its count has to sit on paper —
   a fixed white was invisible once the tokens flipped for dark. */
.am-filter__btn.is-active .am-filter__n { color: var(--am-paper); opacity: .6; }

/* Active wins over hover: keep the fill, don't turn the label red on it. */
.am-filter__btn.is-active:hover,
.am-filter__btn.is-active:focus,
.am-filter__btn.is-active:active {
  background: var(--am-ink);
  border-color: var(--am-ink);
  color: var(--am-paper);
}
.am-filter__btn.is-active:hover .am-filter__n,
.am-filter__btn.is-active:focus .am-filter__n { color: var(--am-paper); }

.am-workcard.is-hidden { display: none; }
.am-filter__empty { border-bottom: var(--am-border); }

@media (max-width: 720px) {
  .am-filter { flex-direction: column; gap: .85rem; align-items: stretch; }
  .am-filter__label { padding-top: 0; }
  .am-filter__row { gap: .4rem; }
  .am-filter__btn { font-size: .8125rem; padding: .45em .75em; }
}

/* ==========================================================================
   16. PAGINATION / MISC
   ========================================================================== */

.am-pager { display: flex; gap: .5rem; padding: 1.5rem var(--am-gutter); border-bottom: var(--am-border); }
.am-pager .page-numbers {
  border: var(--am-border); padding: .5rem .85rem; font-size: var(--am-small); font-weight: 600;
}
.am-pager .page-numbers.current,
.am-pager .page-numbers:hover { background: var(--am-ink); color: var(--am-paper); border-color: var(--am-ink); }

.am-empty { padding: clamp(2.5rem, 5vw, 4rem) var(--am-gutter); color: var(--am-ink-soft); border-bottom: var(--am-border); }

.am-prose { padding: clamp(2rem, 4vw, 3.25rem) var(--am-gutter); }
.am-prose h1, .am-prose h2 { font-weight: 700; letter-spacing: -.03em; margin-bottom: .75rem; }
.am-prose h2 { font-size: var(--am-display-3); margin-top: 2rem; }
.am-prose p, .am-prose ul, .am-prose ol { margin-bottom: 1rem; color: var(--am-ink-soft); max-width: 68ch; }
.am-prose ul, .am-prose ol { padding-left: 1.25rem; }
.am-prose ul li { list-style: disc; }
.am-prose ol li { list-style: decimal; }
.am-prose a { color: var(--am-accent); border-bottom: 1px solid currentColor; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ==========================================================================
   17. RESPONSIVE PASS
   Everything below is phone/tablet correction only — the desktop rules above
   stay untouched.
   ========================================================================== */

/* ---- Tablet: four across is too tight, drop to two ---- */
@media (max-width: 980px) {
  .am-cat--empty { display: none; }
  .am-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .am-grid--4 > *:nth-child(4n) { border-right: var(--am-border); }
  .am-grid--4 > *:nth-child(2n) { border-right: 0; }
}

/* ---- Header ---- */
@media (max-width: 900px) {
  .am-header__inner { padding: .9rem var(--am-gutter); }

  .am-nav.is-open {
    gap: 0;
    padding: 0 0 1rem;
  }
  .am-nav.is-open .am-nav__link {
    width: 100%;
    padding: 1rem var(--am-gutter);
    border-bottom: var(--am-border);
    font-size: .8125rem;
  }
  .am-nav.is-open .am-btn {
    width: calc(100% - (var(--am-gutter) * 2));
    margin: 1.15rem var(--am-gutter) 0;
    justify-content: center;
    padding-block: 1em;
  }
  .am-burger { width: 42px; height: 42px; }
}

/* ---- Phone ---- */
@media (max-width: 620px) {

  :root { --am-gutter: 1.15rem; }

  .am-shell { border-inline: 0; }

  /* Single column wins over the tablet rules above. */
  .am-grid--2, .am-grid--3, .am-grid--4 { grid-template-columns: 1fr; }
  .am-grid > * { border-right: 0 !important; }

  /* Hero */
  .am-hero__main { padding-block: 2rem 2.25rem; }
  .am-hero__eyebrow { margin-bottom: 1.15rem; }
  .am-hero__lead { margin-bottom: 1.75rem; }
  .am-hero__actions { display: grid; gap: .6rem; }
  .am-hero__actions .am-btn { justify-content: center; }

  /* Numbers side by side, availability + WhatsApp on its own row underneath */
  .am-hero__rail,
  .am-rail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .am-stat {
    padding: .9rem .75rem 1rem;
    border-right: var(--am-border);
    border-bottom: var(--am-border);
  }
  .am-hero__rail .am-stat:nth-child(2n),
  .am-rail .am-stat:nth-child(2n) { border-right: 0; }
  .am-rail .am-stat { padding-inline: .75rem; }
  .am-stat__label {
    font-size: .5625rem;
    letter-spacing: .1em;
    min-height: 2.4em;
  }
  .am-num { font-size: 1.75rem; }

  .am-stat--avail {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem;
  }
  .am-stat--avail .am-stat__label { min-height: 0; }
  .am-stat--avail .am-stat__value--text { font-size: 1.125rem; }
  .am-stat--avail .am-stat__note { font-size: .75rem; }
  .am-stat__cta { flex: none; padding: .75em 1em; }

  /* Section heads */
  .am-sechead { padding-block: 2rem 1.25rem; gap: .75rem; }
  .am-sechead__aside { font-size: .8125rem; }

  /* Cards */
  .am-service, .am-step, .am-plan, .am-cat { padding: 1.4rem 1.15rem 1.75rem; }
  .am-service__title, .am-step__title { margin-top: 1.15rem; font-size: 1.125rem; }
  .am-cat { min-height: 0; gap: 1.15rem; padding: 1.25rem 1.15rem 1.4rem; }
  .am-cat__title { margin-top: .75rem; font-size: 1.1875rem; }
  .am-cat__text { font-size: .78125rem; }
  .am-cat--empty { display: none; }

  /* Work entries — the hatched placeholder is dead weight on a phone */
  .am-entry__shot { min-height: 150px; }
  .am-entry__shot--empty { display: none; }
  .am-entry__body { border-bottom: 0; }
  .am-entry__meta { flex-wrap: wrap; gap: .5rem .75rem; }

  /* Services page rows */
  .am-srow__head, .am-srow__body, .am-srow__list { padding-inline: 1.15rem; }
  .am-srow__head { padding-block: 1.4rem 1.15rem; }
  .am-srow__num { margin-bottom: .9rem; }

  /* Case study */
  .am-case__head { padding-block: 1.75rem; }
  .am-case__section { padding-block: 1.5rem; }
  .am-case__rail { display: grid; grid-template-columns: 1fr 1fr; }
  .am-back, .am-case__railtop { grid-column: 1 / -1; }
  .am-meta { border-right: var(--am-border); }
  .am-meta:nth-child(2n) { border-right: 0; }

  /* FAQ */
  .am-faq__q { padding-block: 1.15rem; }
  .am-faq__q { font-size: 1rem; }

  /* CTA + footer */
  .am-cta { padding-block: 2rem; gap: 1.25rem; }
  .am-cta__title { font-size: 1.5rem; }
  .am-cta .am-btn, .am-footer .am-btn { width: 100%; justify-content: center; }
  .am-footer__inner { gap: 1.75rem; }
  .am-footer__bar { flex-direction: column; gap: .35rem; }

  /* Forms */

  /* iOS zooms any input under 16px on focus */

  [id] { scroll-margin-top: 4.5rem; }
}

/* ---- Very small phones ---- */
@media (max-width: 380px) {
  .am-brand { font-size: .9375rem; }
  .am-tag { font-size: .6875rem; }
}

/* ---- Hover effects off on touch, so cards do not stick "hovered" ---- */
/* On touch the card highlight fires on tap and stays until you tap elsewhere,
   which is what we want here. :active gives the press instant feedback. */
.am-service:active, .am-step:active, .am-plan:active, .am-cat:active,
.am-srow:active, .am-role:active, .am-skillset:active, .am-entry:active,
.am-edu:active, .am-faq__row:active, .am-stat:active,
a.am-channel:active { background: var(--am-surface); }

@media (hover: none) {
  /* Buttons are the exception — a stuck black button reads as broken. */
  .am-btn:hover { background: transparent; color: var(--am-ink); }
  .am-btn--accent:hover { background: var(--am-accent); color: #fff; }
  .am-cta .am-btn:hover { background: transparent; color: #fff; }
}
