/* ==========================================================
   Portfolio — stylesheet
   Colours live in the :root block below. Change those two
   blocks and the whole site re-themes.
   ========================================================== */

/* ---------- Theme tokens ----------
   Desert palette: terracotta, clay rose and sand gold on warm
   charcoal. Change these two blocks and the whole site re-themes.
   ---------------------------------- */
:root {
  --accent:        #e08a4f;   /* terracotta   — primary        */
  --accent-2:      #cf6e79;   /* clay rose    — gradient pair  */
  --accent-3:      #e5b953;   /* sand gold    — highlights     */
  --accent-sage:   #a3b18a;   /* desert sage  — code accent    */

  /* Text drawn ON an accent fill (buttons, active chips, tiles).
     The dark-mode terracotta is too bright to carry white text —
     white on it is only 2.6:1 — so dark-on-warm is used instead. */
  --on-accent:     #2b1806;

  /* Warm charcoal, like rock in shadow — not a blue-black. */
  --bg:            #13100d;
  --bg-soft:       #1c1712;
  --surface:       rgba(255, 236, 214, 0.035);
  --surface-hover: rgba(255, 236, 214, 0.065);
  --border:        rgba(255, 232, 206, 0.10);
  --border-strong: rgba(255, 232, 206, 0.18);

  --text:          #f6efe5;
  --text-soft:     #c3b5a4;
  --text-dim:      #8d8071;

  --shadow:        0 18px 50px -20px rgba(20, 10, 2, 0.78);
  --ring:          0 0 0 3px rgba(224, 138, 79, 0.32);

  --radius:        18px;
  --radius-sm:     11px;
  --maxw:          1180px;

  --font-body:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display:  'Sora', 'Inter', system-ui, sans-serif;
}

html[data-theme="light"] {
  /* Deeper accents in light mode — the dark-mode terracotta is too
     pale on a light background to pass as readable link text. */
  --accent:        #b1552a;
  --accent-2:      #9c4150;
  --accent-3:      #8a6518;

  /* Light-mode accents are deep enough to carry white. */
  --on-accent:     #ffffff;

  --bg:            #faf5ee;   /* warm sand paper */
  --bg-soft:       #ffffff;
  --surface:       rgba(70, 45, 25, 0.030);
  --surface-hover: rgba(70, 45, 25, 0.060);
  --border:        rgba(70, 45, 25, 0.12);
  --border-strong: rgba(70, 45, 25, 0.22);

  --text:          #241b12;
  --text-soft:     #5b4d3f;
  --text-dim:      #7d6e5e;

  --shadow:        0 18px 44px -22px rgba(80, 50, 20, 0.30);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--accent); color: var(--on-accent); padding: .7rem 1.1rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Background orbs ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* Kept deliberately faint. Warm hues advance visually — at the
   opacity that read as a subtle wash in blue, terracotta turns the
   whole page muddy. */
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(110px); opacity: .20;
  animation: float 18s ease-in-out infinite;
}
.orb-1 { width: 42vmax; height: 42vmax; top: -14vmax; left: -10vmax;  background: var(--accent); }
.orb-2 { width: 34vmax; height: 34vmax; top: 32vh;    right: -12vmax; background: var(--accent-2); animation-delay: -6s; }
.orb-3 { width: 30vmax; height: 30vmax; bottom: -12vmax; left: 28vw;  background: var(--accent-3); animation-delay: -12s; opacity: .12; }
html[data-theme="light"] .orb { opacity: .16; }
html[data-theme="light"] .orb-3 { opacity: .10; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(4vw, 5vh) scale(1.08); }
  66%      { transform: translate(-3vw, -4vh) scale(.95); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 72px;
}

.logo { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; }
/* The brand mark is artwork now, not a letter. The "P" stays in the HTML
   as a fallback if the file ever fails to load, hidden the moment CSS
   applies — the path is relative to this stylesheet, so it resolves from
   pages in subfolders too. */
/* The mark is transparent artwork, so it stands on its own — no tile,
   no glow behind it, and `contain` because it isn't square and `cover`
   would clip its points. The path is relative to this stylesheet, so it
   resolves from pages in subfolders too. */
.logo-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: url("../icons/polidra-icon.png") center / contain no-repeat;
  font-size: 0; color: transparent;
}
.logo-text { font-family: var(--font-display); letter-spacing: -.02em; }

.nav { display: flex; gap: .3rem; }
.nav-link {
  position: relative; padding: .5rem .85rem; border-radius: 10px;
  color: var(--text-soft); font-size: .92rem; font-weight: 500;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: ''; position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%);
  width: 16px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.header-actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft);
  transition: .2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-1px); }

.icon-sun  { display: none; }
html[data-theme="light"] .icon-sun  { display: block; }
html[data-theme="light"] .icon-moon { display: none; }

/* justify-content is required here: .icon-btn centres via place-items,
   but justify-items is ignored on a flex container, so without this the
   bars stack from the top of the 40px box and sit above the theme icon. */
.menu-btn {
  display: none; flex-direction: column;
  justify-content: center; align-items: center; gap: 4px;
}
.menu-btn .bar {
  width: 17px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}
.menu-btn[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.scroll-progress {
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transition: width .1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 600; font-size: .94rem; letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn-primary {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px -14px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px var(--accent); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-hover); transform: translateY(-2px); }
.btn-block { width: 100%; margin-top: 1.2rem; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem); }

.hero-inner {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1.05fr .95fr; align-items: center;
}

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .38rem .85rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .8rem; font-weight: 500; color: var(--text-soft);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-3) 70%, transparent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6.2vw, 3.9rem);
  line-height: 1.08; letter-spacing: -.035em;
  margin: 1.1rem 0 .9rem;
}
.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-tagline {
  color: var(--text-soft); font-size: clamp(1rem, 2.2vw, 1.1rem);
  max-width: 46ch; margin-top: 1.1rem; margin-bottom: 1.9rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Still used by the team cards, where each person can have their own. */
.social {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft);
  transition: .22s ease;
}
.social:hover {
  color: var(--text); border-color: var(--border-strong);
  transform: translateY(-3px); background: var(--surface-hover);
}

/* ---------- Hero coverflow ---------- */
.hero-visual { display: flex; justify-content: center; min-width: 0; }
.cf { width: 100%; max-width: 460px; }

/* The stage clips: side cards are meant to recede out of frame, and
   without this their transforms would widen the page. */
.cf-stage {
  position: relative; height: 340px;
  perspective: 1400px; overflow: hidden;
}
.cf-track {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}

.cf-card {
  position: absolute; width: min(280px, 76%);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-soft);
  box-shadow: var(--shadow); text-align: left;
  transition: transform .55s cubic-bezier(.22,.61,.36,1),
              opacity .55s cubic-bezier(.22,.61,.36,1),
              filter .55s cubic-bezier(.22,.61,.36,1);
}
.cf-card:focus-visible { outline: none; box-shadow: var(--ring); }

/* Only three cards on screen — the hero column is too narrow for the
   fuller five-deep stack without everything shrinking to nothing. */
.cf-card[data-pos="0"]  { transform: none; opacity: 1; z-index: 3; }
.cf-card[data-pos="-1"] {
  transform: translateX(-105px) scale(.8) rotateY(14deg);
  opacity: .45; z-index: 2; filter: saturate(.7) brightness(.7);
}
.cf-card[data-pos="1"] {
  transform: translateX(105px) scale(.8) rotateY(-14deg);
  opacity: .45; z-index: 2; filter: saturate(.7) brightness(.7);
}
.cf-card[data-pos="hidden"] {
  transform: scale(.55); opacity: 0; z-index: 1; pointer-events: none;
}

/* Backing cards show the picture and title only. */
.cf-card:not([data-pos="0"]) .cf-tags,
.cf-card:not([data-pos="0"]) .cf-link { opacity: 0; transition: opacity .3s ease; }

.cf-thumb {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 26%, transparent),
    color-mix(in srgb, var(--accent-2) 26%, transparent));
}
.cf-thumb .thumb-letter { font-size: 2.4rem; }

.cf-body { padding: .9rem 1rem 1.05rem; }
.cf-title {
  font-family: var(--font-display); font-size: .98rem;
  letter-spacing: -.02em; line-height: 1.3;
}
.cf-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .55rem 0 .7rem; }
.cf-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; color: var(--accent);
  transition: gap .2s ease;
}
.cf-link:hover { gap: .55rem; }

.cf-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: .9rem;
}
.cf-nav {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft);
  transition: .2s ease;
}
.cf-nav:hover {
  color: var(--text); border-color: var(--border-strong);
  background: var(--surface-hover);
}

.cf-dots { display: flex; gap: .45rem; }
.cf-dot {
  width: 8px; height: 8px; padding: 0; border-radius: 50%;
  border: none; background: var(--border-strong);
  transition: transform .2s ease, background .2s ease;
}
.cf-dot.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scale(1.4);
}

/* ---------- What we do ----------
   Sits under the hero so the offer is readable without scrolling. */
.offer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 2rem; border-top: 1px solid var(--border);
}
.offer-label {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.1rem;
}
.offer-list {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Four cards: auto-fit would wrap them 3 + 1 on a mid-width screen,
   leaving one stranded on its own row. Go 2 × 2 instead, and four
   across only once there's genuinely room for it. */
.offer-list[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1100px) {
  .offer-list[data-count="4"] { grid-template-columns: repeat(4, 1fr); }
}

.offer-item {
  padding: 1.35rem 1.4rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .25s cubic-bezier(.2,.7,.3,1),
              border-color .25s ease, background .25s ease;
}
.offer-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

/* A short accent rule instead of an icon — the titles are the point,
   and a per-service icon would only ever be decorative. */
.offer-item::before {
  content: ''; display: block;
  width: 30px; height: 3px; border-radius: 2px; margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.offer-title {
  font-family: var(--font-display);
  font-size: 1.05rem; letter-spacing: -.02em;
  margin-bottom: .45rem;
}
.offer-blurb {
  color: var(--text-soft); font-size: .92rem; line-height: 1.6;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.section-alt { background: color-mix(in srgb, var(--bg-soft) 60%, transparent); }

.section-head { max-width: 620px; margin-bottom: 2.6rem; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .7rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.6vw, 2.6rem);
  letter-spacing: -.03em; line-height: 1.15;
}
.section-sub { color: var(--text-soft); margin-top: .8rem; }

/* ---------- Project cards ---------- */
.project-grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s ease, box-shadow .3s ease;
  animation: fadeUp .5s both;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.card-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 26%, transparent),
    color-mix(in srgb, var(--accent-2) 26%, transparent));
  display: grid; place-items: center;
}
/* Layered over the letter tile, transparent until it actually loads —
   a slow or failed screenshot shows the tile rather than a blank box. */
.thumb-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  opacity: 0;
  transition: opacity .45s ease, transform .5s ease;
}
.thumb-img.loaded { opacity: 1; }
.card:hover .thumb-img.loaded { transform: scale(1.06); }
.thumb-letter {
  font-family: var(--font-display); font-size: 3.2rem; font-weight: 800;
  color: #fff; opacity: .9; letter-spacing: -.04em;
  text-shadow: 0 6px 24px rgba(0,0,0,.3);
}

.ribbon {
  position: absolute; top: .8rem; right: .8rem; z-index: 2;
  padding: .28rem .7rem; border-radius: 999px;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; background: rgba(28, 16, 6, .58);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px);
}

.card-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-title {
  font-family: var(--font-display); font-size: 1.14rem;
  letter-spacing: -.02em; margin-bottom: .45rem;
}
.card-desc { color: var(--text-soft); font-size: .92rem; flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.15rem; }
.tag {
  padding: .24rem .65rem; border-radius: 7px;
  font-size: .74rem; font-weight: 500;
  color: var(--text-soft); background: var(--surface-hover);
  border: 1px solid var(--border);
}

.card-links { display: flex; gap: 1.1rem; align-items: center; }
.card-link {
  display: inline-flex; align-items: center; gap: .38rem;
  font-size: .87rem; font-weight: 600; color: var(--accent);
  transition: gap .2s ease, opacity .2s ease;
}
.card-link:hover { gap: .58rem; }
.card-link.secondary { color: var(--text-soft); }
.card-link.secondary:hover { color: var(--text); }
.card-link.soon { color: var(--text-dim); font-weight: 500; cursor: default; }

.empty-state { text-align: center; color: var(--text-dim); padding: 2.5rem 0; }

/* Count badge on the "Open folder" button */
.link-count {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: .1rem;
  border-radius: 999px; font-size: .68rem; font-weight: 700;
  color: var(--on-accent); background: var(--accent);
}

/* ---------- Gallery viewer ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: clamp(.75rem, 3vw, 2rem);
}
.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 6, 2, .78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: lbFade .2s ease;
}
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-panel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: min(1100px, 100%); max-height: 100%;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft); box-shadow: var(--shadow);
  animation: lbPop .28s cubic-bezier(.2,.8,.3,1);
}
@keyframes lbPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.lightbox-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.lightbox-title { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -.02em; }
.lightbox-count { font-size: .8rem; color: var(--text-dim); }

.lightbox-stage {
  position: relative; display: flex; align-items: center;
  min-height: 0; flex: 1; background: var(--surface);
}
.lightbox-figure {
  position: relative;
  flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1rem; gap: .8rem;
}
/* An image with no bytes yet has no height, so the figure would collapse
   and the shimmer would have nothing to paint on. */
.lightbox-figure.is-loading { min-height: 240px; }
.lightbox-figure img {
  max-width: 100%; max-height: 62vh;
  object-fit: contain; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  opacity: 0; transition: opacity .25s ease;
}
.lightbox-figure img.ready { opacity: 1; }
.lightbox-caption { font-size: .88rem; color: var(--text-soft); text-align: center; }

.lb-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--text); transition: .2s ease;
}
.lb-nav:hover { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.lb-nav[hidden] { display: none; }
.lb-prev { left: .7rem; }
.lb-next { right: .7rem; }

.lightbox-thumbs {
  display: flex; gap: .5rem; overflow-x: auto; flex-shrink: 0;
  padding: .8rem 1.1rem; border-top: 1px solid var(--border);
}
.lightbox-thumbs[hidden] { display: none; }
.lightbox-thumbs button {
  flex: 0 0 auto; width: 82px; aspect-ratio: 16 / 10;
  border-radius: 9px; overflow: hidden; padding: 0;
  border: 2px solid transparent; opacity: .55;
  transition: opacity .2s ease, border-color .2s ease;
}
.lightbox-thumbs button:hover { opacity: .85; }
.lightbox-thumbs button.active { opacity: 1; border-color: var(--accent); }
.lightbox-thumbs button.broken { display: none; }
.lightbox-thumbs img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 560px) {
  .lightbox-figure img { max-height: 48vh; }
  .lb-nav { width: 36px; height: 36px; }
  .lb-prev { left: .35rem; }
  .lb-next { right: .35rem; }
  .lightbox-thumbs button { width: 62px; }
}

/* ---------- Team ---------- */
.team-grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.member {
  padding: 1.7rem 1.6rem;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s ease, box-shadow .3s ease;
  animation: fadeUp .5s both;
}
.member:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.member-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.member-name {
  min-width: 0; font-family: var(--font-display); font-size: 1.15rem;
  letter-spacing: -.02em; line-height: 1.25;
}
.member-bio { color: var(--text-soft); font-size: .93rem; margin-bottom: 1.2rem; }

/* The tile is square, so `cover` trims whatever the photo has spare.
   A square source loses nothing; a portrait one loses ~20% of its
   height, and centring that split takes the crop out of the top of
   someone's head. Biasing upwards keeps headroom. Override per person
   with `photoPosition` in projects.js. */
.member-photo {
  width: 66px; height: 66px; flex-shrink: 0;
  border-radius: 20px;
  object-fit: cover;
  object-position: var(--photo-pos, 50% 20%);
  border: 1px solid var(--border-strong);
}

.avatar {
  width: 66px; height: 66px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 20px;
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 30px -16px var(--accent);
}
.member:nth-child(even) .avatar {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 14px 30px -16px var(--accent-2);
}

.member-socials { display: flex; gap: .5rem; }
.social-sm { width: 36px; height: 36px; border-radius: 10px; }
.social-sm svg { width: 16px; height: 16px; }

/* ---------- About ---------- */
.about-inner {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1.35fr .65fr; align-items: start;
}
.about-copy .section-title { margin-bottom: 1rem; }
.about-copy p { color: var(--text-soft); margin-bottom: 1rem; max-width: 62ch; }

.services-card {
  position: sticky; top: 100px;
  padding: 1.9rem 1.6rem;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow);
}
.services-title { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 1rem; }
.about-meta {
  display: grid; gap: .7rem; text-align: left;
  font-size: .88rem; color: var(--text-soft);
}
.about-meta li { display: flex; align-items: center; gap: .6rem; }
.about-meta a { word-break: break-all; }
.about-meta a:hover { color: var(--accent); }

/* ---------- Contact ---------- */
.contact-card {
  text-align: center; padding: clamp(2.4rem, 6vw, 4rem) clamp(1.4rem, 5vw, 3rem);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 130% at 50% 0%,
      color-mix(in srgb, var(--accent) 14%, transparent) 0%,
      transparent 62%),
    var(--surface);
  box-shadow: var(--shadow);
}
.contact-card .section-sub { max-width: 46ch; margin-inline: auto; margin-bottom: 1.9rem; }

/* ---------- Booking widget ---------- */
.scheduler { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.scheduler[hidden] { display: none; }

.scheduler-head { text-align: center; margin-bottom: 1.2rem; }
.scheduler-title {
  font-family: var(--font-display); font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  letter-spacing: -.02em;
}
.scheduler-sub { color: var(--text-soft); font-size: .93rem; margin-top: .35rem; }

/* Calendly renders on its own light background regardless of our theme,
   so the frame is what makes it look deliberate rather than pasted in. */
.scheduler-frame {
  position: relative;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  min-height: 120px;
}
.scheduler-frame iframe { display: block; border: 0; }

.scheduler-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 2rem 1rem; text-align: center;
  color: #6b7280; font-size: .9rem;
}
.scheduler-loading[hidden] { display: none; }

.scheduler-fallback {
  text-align: center; margin-top: .9rem;
  font-size: .85rem; color: var(--text-dim);
}
.scheduler-fallback a { color: var(--accent); font-weight: 600; }
.scheduler-fallback a:hover { text-decoration: underline; }

/* ---------- Legal pages ---------- */
.backlink {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .95rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .88rem; font-weight: 500; color: var(--text-soft);
  transition: .2s ease;
}
.backlink:hover {
  color: var(--text); border-color: var(--border-strong);
  background: var(--surface-hover);
}
@media (max-width: 420px) {
  .backlink span { display: none; }      /* icon only on tiny screens */
  .backlink { padding: .5rem .6rem; }
}

.legal { max-width: 760px; }
.legal .section-title { margin-bottom: .5rem; }
.legal-meta { color: var(--text-dim); font-size: .86rem; margin-bottom: 2rem; }

.legal-lede {
  color: var(--text); font-size: 1.05rem;
  padding: 1.1rem 1.3rem; margin-bottom: 2.5rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
}

.legal h2 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  letter-spacing: -.02em;
  margin: 2.4rem 0 .8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.legal h3 {
  font-family: var(--font-display);
  font-size: 1rem; letter-spacing: -.01em;
  margin: 1.6rem 0 .5rem; color: var(--accent);
}
.legal p { color: var(--text-soft); margin-bottom: 1rem; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--text); }

.legal-list { display: grid; gap: .55rem; margin: 0 0 1.2rem; }
.legal-list li {
  position: relative; padding-left: 1.4rem;
  color: var(--text-soft);
}
.legal-list li::before {
  content: ''; position: absolute; left: .25rem; top: .62em;
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--accent-3);
}

.legal code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .88em; padding: .12em .4em;
  border-radius: 5px; border: 1px solid var(--border);
  background: var(--surface-hover); color: var(--text);
}

.legal-back {
  margin-top: 2.8rem; padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================
   SERVICE PAGES
   seo-geo.html, landing-pages.html, business-websites.html, crm-web-apps.html.
   Built from the same tokens and section rhythm as the home page,
   with a few extra blocks long-form selling needs.
   ========================================================== */

.svc-hero { padding: clamp(2.6rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.2rem); }
.svc-hero-inner { max-width: 820px; }

.svc-crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  margin-bottom: 1.4rem;
  font-size: .82rem; color: var(--text-dim);
}
.svc-crumb a { color: var(--text-soft); transition: color .2s ease; }
.svc-crumb a:hover { color: var(--accent); }
.svc-crumb [aria-current] { color: var(--text); }

.svc-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 1.08; letter-spacing: -.035em;
  margin: 1rem 0;
}
.svc-lede {
  color: var(--text-soft); max-width: 60ch;
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  margin-bottom: 1.9rem;
}
.svc-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Shared card look — same accent rule as the home page's offer cards. */
.svc-cards,
.svc-split,
.svc-steps,
.svc-types,
.svc-others {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.svc-card,
.svc-term,
.svc-step,
.svc-type {
  padding: 1.5rem 1.5rem 1.6rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.svc-card::before {
  content: ''; display: block;
  width: 30px; height: 3px; border-radius: 2px; margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.svc-card h3,
.svc-step h3,
.svc-type h3 {
  font-family: var(--font-display); font-size: 1.08rem;
  letter-spacing: -.02em; margin-bottom: .5rem;
}
.svc-card p,
.svc-term p,
.svc-step p,
.svc-type p { color: var(--text-soft); font-size: .94rem; }
.svc-card a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* SEO vs GEO — the term, what it stands for, what it means. */
.svc-abbr {
  display: block; font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.3rem); letter-spacing: -.03em; line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.svc-expand {
  display: block; margin: .55rem 0 .9rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim);
}

.svc-checklist {
  display: grid; gap: .85rem 2.2rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.svc-checklist li { display: flex; align-items: flex-start; gap: .7rem; }
.svc-checklist svg { flex-shrink: 0; margin-top: .22rem; color: var(--accent-3); }
.svc-checklist a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* The "what we won't promise" box. Plain on purpose — it's the most
   credible thing on the page and shouldn't look like an advert. */
.svc-note {
  margin-top: 2.4rem; padding: 1.4rem 1.6rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
}
.svc-note h3 {
  font-family: var(--font-display); font-size: 1.02rem; margin-bottom: .45rem;
}
.svc-note p { color: var(--text-soft); max-width: 70ch; }

.svc-steps { counter-reset: step; }
.svc-step { counter-increment: step; }
.svc-step::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: .75rem;
  font-family: var(--font-display); font-size: .92rem; color: var(--accent);
}

/* Landing page types. :target lights one up when a footer link
   points straight at it. */
.svc-type { transition: border-color .3s ease, box-shadow .3s ease; }
.svc-type:target { border-color: var(--accent); box-shadow: var(--shadow); }
.svc-type .svc-fit-label {
  margin: 1.1rem 0 .6rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim);
}
.svc-type ul { display: grid; gap: .45rem; }
.svc-type li {
  position: relative; padding-left: 1.1rem;
  color: var(--text-soft); font-size: .92rem;
}
.svc-type li::before {
  content: ''; position: absolute; left: 0; top: .6em;
  width: 5px; height: 5px; border-radius: 2px; background: var(--accent-3);
}

.svc-compare-wrap {
  margin-top: 1.4rem; overflow-x: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.svc-compare { width: 100%; min-width: 480px; border-collapse: collapse; }
.svc-compare th,
.svc-compare td {
  padding: .9rem 1.1rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.svc-compare tr:last-child th,
.svc-compare tr:last-child td { border-bottom: 0; }
.svc-compare thead th {
  font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-dim);
  background: var(--surface);
}
.svc-compare tbody th { color: var(--text); font-weight: 600; }
.svc-compare td { color: var(--text-soft); }

/* FAQ — native <details>, so it works with no JavaScript at all. */
.svc-faq { display: grid; gap: .7rem; max-width: 820px; }
.svc-faq details {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .2s ease;
}
.svc-faq details[open] { border-color: var(--border-strong); }
.svc-faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem; cursor: pointer; list-style: none;
  font-weight: 600;
}
.svc-faq summary::-webkit-details-marker { display: none; }
.svc-faq summary::after {
  content: '+'; flex-shrink: 0;
  font-size: 1.35rem; line-height: 1; color: var(--accent);
}
.svc-faq details[open] summary::after { content: '\2212'; }
.svc-faq-a { padding: 0 1.3rem 1.2rem; color: var(--text-soft); }
.svc-faq-a a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.svc-cta { margin-bottom: 2.4rem; }
.svc-cta .svc-actions { justify-content: center; }

.svc-others-label {
  margin-bottom: .9rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim);
}
.svc-other {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: transform .25s ease, border-color .25s ease;
}
.svc-other:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.svc-other-name { font-family: var(--font-display); font-size: 1rem; letter-spacing: -.01em; }
.svc-other-desc { display: block; margin-top: .2rem; font-size: .84rem; color: var(--text-dim); }
.svc-other svg { flex-shrink: 0; color: var(--accent); }

/* Text for screen readers only. Lets a repeated "Learn more" announce
   which service it belongs to without cluttering the visual design. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* "Learn more" on the home page's What We Build cards. The card becomes a
   column so the link can sit on the bottom edge — otherwise blurbs of
   different lengths leave the links at four different heights. */
.offer-item { display: flex; flex-direction: column; }
.offer-more {
  display: inline-flex; align-items: center; gap: .35rem;
  align-self: flex-start;
  margin-top: auto; padding-top: .9rem;
  font-size: .86rem; font-weight: 600; color: var(--accent);
  transition: gap .2s ease;
}
.offer-more:hover { gap: .55rem; }
.offer-more svg { flex-shrink: 0; }

/* ==========================================================
   PRICE LIST
   The #pricing section: a two-way switch over two panels of cards.
   Built from PRICING in content/projects.js by script.js.
   ========================================================== */

/* The switch. One pill-shaped track, the selected half filled in —
   reads as a choice between two states rather than two buttons. */
.price-switch {
  display: flex; flex-wrap: wrap; gap: .3rem;
  width: fit-content; max-width: 100%;
  margin: 0 auto 1.6rem; padding: .3rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface);
}
.price-tab {
  padding: .6rem 1.15rem;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--text-soft);
  font: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.price-tab:hover { color: var(--text); }
.price-tab[aria-selected="true"] {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
}
.price-tab:focus-visible { outline: 0; box-shadow: var(--ring); }

.price-blurb {
  max-width: 56ch; margin: 0 auto 1.9rem;
  text-align: center; color: var(--text-soft); font-size: .97rem;
}

/* Cards stretch to the tallest in the row, so their edges line up and
   the buttons sit on one line — the lists underneath are never the same
   length, and ragged card bottoms read as a mistake. */
.price-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.7rem 1.5rem 1.6rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
/* The highlighted tier carries a little more weight, not a different
   shape — a scaled-up card breaks the row on narrow screens. */
.price-card.is-featured {
  border-color: var(--accent);
  background: var(--surface-hover);
  box-shadow: var(--shadow);
}
.price-flag {
  position: absolute; top: -.7rem; left: 1.5rem;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase;
}
.price-name {
  font-family: var(--font-display); font-size: 1.05rem;
  letter-spacing: -.02em; margin-bottom: .6rem;
}
/* One line, always. A range that wraps pushes that card's list down and
   throws the whole row out of step, so the type shrinks instead. */
.price-amount {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.7vw, 1.45rem);
  letter-spacing: -.03em; line-height: 1.15;
  white-space: nowrap;
}
.price-unit {
  display: block; margin-top: .25rem;
  font-family: var(--font-body);
  font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-dim);
}
.price-meta {
  margin-top: .55rem;
  font-size: .85rem; color: var(--accent-3);
}
.price-features {
  display: grid; gap: .55rem;
  margin: 1.2rem 0 1.5rem; padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-size: .92rem; color: var(--text-soft);
}
.price-features li { display: flex; align-items: flex-start; gap: .6rem; }
.price-features svg { flex-shrink: 0; margin-top: .18rem; color: var(--accent); }
/* Pinned to the bottom edge so buttons line up across uneven cards. */
.price-cta { margin-top: auto; align-self: flex-start; }

@media (max-width: 560px) {
  .price-switch { width: 100%; }
  .price-tab { flex: 1 1 100%; text-align: center; }
}

/* ==========================================================
   POLISH
   ========================================================== */

/* ---------- Skeleton shimmer ----------
   Only used where something genuinely arrives late: images. The cards
   themselves render synchronously from projects.js, so a skeleton for
   their structure would flash for zero frames and just add noise. */
.is-loading::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--text) 9%, transparent) 50%,
    transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .is-loading::before { animation: none; opacity: .5; }
}

/* Photos have no letter tile behind them, so they get a plain block
   while they load rather than a gap that shifts when they land. */
.member-photo.is-loading,
img.is-loading {
  background: var(--surface-hover);
}

/* ---------- Tooltips ----------
   Native `title` waits about a second, can't be styled, and never
   appears for keyboard users. These show instantly and on focus. */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 9px);
  translate: -50% 4px;
  z-index: 300; pointer-events: none; white-space: nowrap;
  padding: .34rem .6rem; border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft); color: var(--text);
  font-size: .74rem; font-weight: 500; letter-spacing: 0;
  box-shadow: var(--shadow);
  opacity: 0; transition: opacity .15s ease, translate .15s ease;
}
[data-tip]:hover::after,
[data-tip]:focus-visible::after { opacity: 1; translate: -50% 0; }

/* Anything in the header has no room above it. */
[data-tip][data-tip-pos="bottom"]::after {
  bottom: auto; top: calc(100% + 9px); translate: -50% -4px;
}
[data-tip][data-tip-pos="bottom"]:hover::after,
[data-tip][data-tip-pos="bottom"]:focus-visible::after { translate: -50% 0; }

/* Touch devices have no hover — the tooltip would stick after a tap. */
@media (hover: none) {
  [data-tip]::after { display: none; }
}

/* ---------- Icon sizing ----------
   Inline SVGs are flex items, so a long label beside one squashes it to
   zero width instead of wrapping. That silently ate the envelope on the
   contact button at phone widths. */
.btn svg,
.copy-btn svg,
.card-link svg,
.cf-link svg,
.backlink svg,
.services li svg,
.about-meta svg { flex-shrink: 0; }

/* ---------- Press feedback ----------
   A control that visibly reacts feels responsive even when the work
   behind it is instant. */
.icon-btn:active,
.cf-nav:active,
.lb-nav:active,
.social:active { transform: scale(.93); }
.btn:active { transform: translateY(1px) scale(.99); }
.cf-dot:active { transform: scale(1.6); }

/* ---------- Copy-to-clipboard ---------- */
.contact-actions {
  display: flex; flex-wrap: wrap; gap: .7rem;
  align-items: center; justify-content: center;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .95rem 1.3rem; border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font-size: .94rem; font-weight: 600;
  transition: .2s ease;
}
.copy-btn:hover { background: var(--surface-hover); transform: translateY(-2px); }
.copy-btn.copied { border-color: var(--accent-3); color: var(--accent-3); }
.copy-btn .copy-done { display: none; }
.copy-btn.copied .copy-idle { display: none; }
.copy-btn.copied .copy-done { display: inline-flex; align-items: center; gap: .45rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }

/* Top row: brand on the left, the Services column on the right. */
.footer-top {
  display: grid; gap: 2rem 3rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  padding-block: 2.6rem 2.2rem;
}
.footer-brand .logo { display: inline-flex; }
.footer-blurb {
  margin-top: .85rem; max-width: 34ch;
  font-size: .88rem; color: var(--text-dim);
}

.footer-heading {
  margin-bottom: .95rem;
  font-size: .74rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.footer-list { display: grid; gap: .6rem; }
.footer-list a {
  font-size: .92rem; color: var(--text-soft);
  transition: color .2s ease;
}
.footer-list a:hover { color: var(--accent); }
.footer-list a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* Sub-types sit under their parent, stepped in along a thin rule. */
.footer-sub {
  display: grid; gap: .45rem;
  margin-top: .5rem; padding-left: .85rem;
  border-left: 1px solid var(--border);
}
.footer-sub a { font-size: .85rem; color: var(--text-dim); }

/* Bottom bar: copyright, legal links, back to top. */
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  padding-block: 1.4rem;
  border-top: 1px solid var(--border);
  font-size: .86rem; color: var(--text-dim);
}
.to-top { display: inline-flex; align-items: center; gap: .4rem; transition: color .2s ease; }
.to-top:hover { color: var(--accent); }

.footer-link {
  margin-left: .6rem; padding-left: .7rem;
  border-left: 1px solid var(--border);
  transition: color .2s ease;
}
.footer-link:hover { color: var(--accent); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* Tablet / small laptop */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-tagline { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  /* The visual used to sit above the headline here. Now that it's a
     project carousel, that would put the work before the message —
     the opposite of what the page is meant to lead with. */
  .cf { max-width: 420px; }
  .about-inner { grid-template-columns: 1fr; }
  .services-card { position: static; max-width: 420px; margin-inline: auto; }
  .about-copy p { margin-inline: auto; }
  .section-head { margin-inline: auto; text-align: center; }
  /* Let it fit two across on tablets. Forcing one column was fine with
     two people; with three it became a long scroll. */
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    max-width: 720px; margin-inline: auto;
  }
}

/* Mobile nav */
@media (max-width: 760px) {
  .menu-btn { display: flex; }

  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; gap: .2rem;
    padding: 1rem clamp(1.1rem, 4vw, 2.5rem) 1.6rem;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-125%);
    transition: transform .35s cubic-bezier(.2,.8,.3,1);
    box-shadow: var(--shadow);
  }
  .nav.open { transform: translateY(0); }
  /* Extra left padding makes room for the active bar, which sits in
     the gutter. With both at 1rem the bar landed on the first letter. */
  .nav-link { padding: .85rem 1rem .85rem 1.55rem; font-size: 1rem; border-radius: 12px; }
  .nav-link.active::after {
    left: .5rem; transform: none; bottom: 50%;
    width: 3px; height: 18px; translate: 0 50%;
  }
}

/* Phones */
@media (max-width: 560px) {
  html { scroll-padding-top: 84px; }
  .project-grid { grid-template-columns: 1fr; gap: 1.1rem; }
  /* Needs the attribute selector too, or [data-count="4"] outranks it
     and phones get two cramped columns. */
  .offer-list,
  .offer-list[data-count] { grid-template-columns: 1fr; gap: .8rem; }
  .team-grid { grid-template-columns: 1fr; max-width: 420px; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .logo-text { display: none; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-top { grid-template-columns: 1fr; gap: 1.8rem; padding-block: 2.2rem 1.8rem; }
  /* Tighter stage and closer neighbours so the front card keeps its size. */
  .cf-stage { height: 320px; }
  .cf-card { width: min(250px, 74%); }
  .cf-card[data-pos="-1"] { transform: translateX(-88px) scale(.78) rotateY(12deg); }
  .cf-card[data-pos="1"]  { transform: translateX(88px) scale(.78) rotateY(-12deg); }
}

/* Very small phones */
@media (max-width: 360px) {
  .avatar { width: 70px; height: 70px; font-size: 1.7rem; }
}

/* Large screens */
@media (min-width: 1600px) {
  :root { --maxw: 1320px; }
}

/* Motion / print */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .bg-orbs, .hero-visual, .to-top, .filters { display: none !important; }
  body { background: #fff; color: #000; }
}
