/* =============================================================
   tyreil.com — portfolio design system
   Restrained, evidence-first, accessible by construction.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Palette — light (warm paper) */
  --bg:          #fbfaf7;
  --surface:     #ffffff;
  --surface-2:   #f4f2ec;
  --text:        #17191d;
  --text-strong: #0b0c0e;
  --muted:       #565b66;
  --border:      #e6e2d9;
  --border-strong:#d3cdc0;
  --accent:      #ffb703;   /* amber highlight / brand */
  --accent-ink:  #cc8a00;   /* deeper amber — hover/pressed */
  --accent-soft: #fff3d6;   /* pale amber wash (background) */
  --accent-onsoft:#7a5200;  /* dark amber text on the wash */
  --link:        #7a5200;   /* readable link text on light bg */
  --link-hover:  #573a00;
  --live:        #0f6d4d;   /* "live site" green */
  --live-soft:   #e2f2ea;
  --focus:       #1e4b8f;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Charter, Georgia, "Times New Roman", serif;

  /* Fluid type scale */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1.02rem, 0.98rem + 0.20vw, 1.15rem);
  --step-1:  clamp(1.20rem, 1.10rem + 0.45vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.28rem + 0.80vw, 1.95rem);
  --step-3:  clamp(1.80rem, 1.50rem + 1.40vw, 2.75rem);
  --step-4:  clamp(2.20rem, 1.70rem + 2.40vw, 3.85rem);
  --step-5:  clamp(2.60rem, 1.90rem + 3.40vw, 4.75rem);

  /* Spacing */
  --sp-1: 0.35rem;
  --sp-2: 0.6rem;
  --sp-3: 1rem;
  --sp-4: 1.6rem;
  --sp-5: 2.5rem;
  --sp-6: 4rem;
  --sp-7: 6rem;

  /* Layout */
  --maxw: 1120px;
  --maxw-prose: 68ch;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,18,22,.04), 0 6px 24px rgba(16,18,22,.06);
  --shadow-lift: 0 2px 6px rgba(16,18,22,.06), 0 14px 40px rgba(16,18,22,.10);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #101216;
    --surface:     #171a20;
    --surface-2:   #1e222a;
    --text:        #e9e8e3;
    --text-strong: #ffffff;
    --muted:       #a2a8b4;
    --border:      #2a2f39;
    --border-strong:#3a404c;
    --accent:      #ffc233;   /* amber, slightly lighter for dark bg */
    --accent-ink:  #ffd166;   /* lighter for hover on dark */
    --accent-soft: #3a2c08;   /* deep amber wash (background) */
    --accent-onsoft:#ffd98a;  /* light amber text on the wash */
    --link:        #ffc85c;   /* readable link text on dark bg */
    --link-hover:  #ffd98a;
    --live:        #55c79b;
    --live-soft:   #13291f;
    --focus:       #7ea6e6;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.4);
    --shadow-lift: 0 2px 6px rgba(0,0,0,.35), 0 14px 40px rgba(0,0,0,.5);
  }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
figure video { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--border); background: #000; color: #fff; }

h1, h2, h3, h4 {
  color: var(--text-strong);
  line-height: 1.12;
  font-weight: 680;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
strong { color: var(--text-strong); font-weight: 660; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }

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

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #241a00;
  padding: .7rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; color:#241a00; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.prose { max-width: var(--maxw-prose); }
.section { padding-block: clamp(3rem, 7vw, var(--sp-7)); }
.section--tight { padding-block: clamp(2rem, 5vw, var(--sp-6)); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }
.center { text-align: center; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 680;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 66px;
}
.brand {
  font-weight: 720; font-size: 1.08rem; letter-spacing: -.02em;
  color: var(--text-strong); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--text-strong); }
.brand .brand-dot { color: var(--accent); }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: .5rem .7rem;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  align-items: center; gap: .5rem;
}
.nav-toggle svg { width: 18px; height: 18px; }

.nav-menu { display: flex; align-items: center; gap: .35rem; }
.nav-menu a:not(.btn) {
  color: var(--text); text-decoration: none; font-weight: 550;
  font-size: .97rem; padding: .5rem .7rem; border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-menu a:not(.btn):hover { background: var(--surface-2); color: var(--text-strong); }
.nav-menu a[aria-current="page"]:not(.btn) { color: var(--accent); font-weight: 680; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 640; font-size: .97rem;
  padding: .7rem 1.15rem; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #241a00; }
.btn--primary:hover { background: var(--accent-ink); color: #241a00; }
.btn--ghost { background: transparent; color: var(--text-strong); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text-strong); }
.btn--sm { padding: .5rem .9rem; font-size: .9rem; }
.nav .btn { margin-left: .4rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 7rem) clamp(2.5rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: var(--step-3); letter-spacing: -.03em; margin-bottom: .55em; }
.hero .subhead { font-size: var(--step-1); color: var(--muted); max-width: 42ch; }
.hero .meta-line {
  margin-top: 1.6rem; font-size: var(--step--1); color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center;
}
.hero .meta-line .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--live); display: inline-block; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.portrait {
  aspect-ratio: 1 / 1; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-2), var(--accent-soft));
  border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: var(--shadow);
}
.portrait span { color: var(--muted); font-size: var(--step--1); padding: 1rem; text-align: center; }

/* ---------- Logo strip ---------- */
.logos { display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; align-items: center; }
.logos li {
  list-style: none; font-weight: 640; color: var(--muted);
  letter-spacing: -.01em; font-size: 1.05rem;
}
.logo-row { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; padding: 0; margin: 1.2rem 0 0; }

/* ---------- Cards / project grid ---------- */
.grid { display: grid; gap: clamp(1.2rem, 3vw, 2rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.card:focus-within { box-shadow: var(--shadow-lift); }
.card-media {
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 12px, transparent 12px, transparent 24px), var(--accent-soft);
  border-bottom: 1px solid var(--border);
  display: grid; place-items: center; text-align: center; overflow: hidden;
}
.card-media span { font-size: var(--step--1); color: var(--muted); padding: 1rem; }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.card-body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card-kicker { font-size: var(--step--1); color: var(--muted); font-weight: 560; }
.card h3 { font-size: var(--step-1); margin: 0; letter-spacing: -.02em; }
.card h3 a { color: var(--text-strong); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--accent); }
.card { position: relative; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }
.card .tags { margin-top: auto; }

/* ---------- Badges & tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-onsoft);
  width: max-content;
}
.badge--live { background: var(--live-soft); color: var(--live); }
.badge--live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.tags li, .tag {
  list-style: none; font-size: .8rem; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .28rem .6rem; border-radius: 999px; white-space: nowrap;
}

/* ---------- Filter chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.chip {
  font: inherit; font-size: .9rem; font-weight: 560;
  padding: .5rem .95rem; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
}
.chip[aria-pressed="true"] { background: var(--accent); color: #241a00; border-color: var(--accent); }
.chip:hover { border-color: var(--accent); }

/* ---------- "How I work" blocks ---------- */
.method-list { display: grid; gap: 1.4rem; grid-template-columns: repeat(3, 1fr); }
.method {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: .6rem;
}
.method h3 { font-size: var(--step-1); }
.method .num { font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--link); }
.method p { color: var(--muted); margin: 0; }
.method a { font-weight: 600; font-size: .95rem; margin-top: auto; }

/* ---------- Shipped / stat list ---------- */
.shipped { display: grid; gap: 0; border-top: 1px solid var(--border); }
.shipped li {
  list-style: none; padding: 1.2rem 0; border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: minmax(0, 16rem) 1fr; gap: .5rem 2rem;
}
.shipped li strong { color: var(--text-strong); }
.shipped li span { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.stat .big { font-size: var(--step-3); font-weight: 720; color: var(--text-strong); letter-spacing: -.02em; line-height: 1; }
.stat .lbl { color: var(--muted); font-size: .92rem; margin-top: .5rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.4rem);
  box-shadow: var(--shadow);
}
.cta-band h2 { font-size: var(--step-3); max-width: 22ch; }

/* ---------- Case study article ---------- */
.article-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.article-head .kicker { color: var(--muted); font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-bottom: 1rem; }
.article-head h1 { font-size: var(--step-4); max-width: 20ch; }
.article-body { }
.article-body h2 {
  font-size: var(--step-2); margin-top: 2.6em; margin-bottom: .6em;
  padding-top: 1.4em; 
}
.article-body h2:first-of-type { margin-top: 1em; }
.article-body h3 { font-size: var(--step-1); margin-top: 1.8em; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.article-body li { margin-bottom: .5em; }
.article-body ul li::marker { color: var(--accent); }

.pullquote {
  font-family: var(--font-serif); font-size: var(--step-2); line-height: 1.35;
  color: var(--text-strong); font-style: italic;
  border-left: 3px solid var(--accent); padding: .2em 0 .2em 1.1rem;
  margin: 1.8em 0; max-width: 30ch;
}

blockquote.callout {
  background: var(--accent-soft); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem; margin: 1.8em 0; color: var(--text);
}
blockquote.callout p:last-child { margin-bottom: 0; }

.next-project {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.6rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--text-strong);
  margin-top: 2rem; font-weight: 620;
}
.next-project:hover { border-color: var(--accent); color: var(--text-strong); }
.next-project .np-label { font-size: var(--step--1); color: var(--muted); font-weight: 500; display: block; }
.next-project .arrow { color: var(--accent); font-size: 1.3rem; }

/* ---------- Figure placeholders ---------- */
figure { margin: 2rem 0; }
.figure-ph {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2);
  display: grid; place-items: center; padding: clamp(1.4rem, 4vw, 3rem);
  text-align: center; min-height: 180px;
}
.figure-ph[data-ratio="wide"] { aspect-ratio: 2 / 1; }
.figure-ph[data-ratio="16-10"] { aspect-ratio: 16 / 10; }
.figure-ph .ph-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6rem;
}
.figure-ph .ph-desc { color: var(--muted); font-size: .95rem; max-width: 48ch; }
figcaption { color: var(--muted); font-size: var(--step--1); margin-top: .7rem; line-height: 1.5; }

/* ---------- Image gallery + lightbox ---------- */
.gallery { list-style: none; padding: 0; margin: 1rem 0 2rem; display: grid; gap: 1rem; }
.gallery--2col { grid-template-columns: repeat(2, 1fr); }
.gallery-item {
  display: block; width: 100%; padding: 0; margin: 0; cursor: zoom-in;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; font: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.gallery-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
@media (max-width: 560px) { .gallery--2col { grid-template-columns: 1fr; } }

.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem);
  background: rgba(8, 9, 11, .84); backdrop-filter: blur(4px);
}
.lightbox-dialog { max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: .8rem; }
.lightbox-img {
  max-width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-lift);
}
.lightbox-caption { color: #ecebe6; text-align: center; font-size: var(--step--1); margin: 0; }
.lightbox-close {
  position: fixed; top: 1rem; right: 1rem;
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--surface); color: var(--text-strong); border: 1px solid var(--border-strong);
  font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox-close:hover { background: var(--surface-2); }
.lightbox-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--surface); color: var(--text-strong); border: 1px solid var(--border-strong);
  font-size: 1.7rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox-nav:hover { background: var(--surface-2); }
.lightbox-nav[hidden] { display: none; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-count { color: #b9bdc6; text-align: center; font-size: var(--step--1); margin: 0; }

/* ---------- Accordion (details/summary) ---------- */
.accordion {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin: 1.5rem 0;
}
.accordion + .accordion { margin-top: 1rem; }
.accordion > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: .6rem;
  padding: 1rem 1.3rem; font-weight: 640; color: var(--text-strong);
  border-radius: var(--radius);
}
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary:hover { background: var(--surface-2); }
.accordion > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.accordion > summary::after {
  content: ""; width: 9px; height: 9px; flex: none; margin-left: auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease;
}
.accordion[open] > summary::after { transform: rotate(-135deg); }
.accordion[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.summary-meta { color: var(--muted); font-weight: 500; font-size: var(--step--1); }
.accordion-body { padding: 0 1.3rem 1.3rem; }
.accordion-body > :first-child { margin-top: .9rem; }
.accordion-body > :last-child { margin-bottom: 0; }

/* ---------- Resume ---------- */
.resume-role { margin-bottom: 2rem; }
.resume-role h3 { font-size: var(--step-1); margin-bottom: .2rem; }
.resume-role .role-meta { color: var(--muted); font-size: .95rem; margin-bottom: .8rem; }
.resume-role h4 { font-size: 1rem; color: var(--text-strong); margin: 1.1em 0 .3em; letter-spacing: 0; }
.avail-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem 1.5rem; margin: 1.4rem 0;
}
.avail-block p { margin: 0 0 .4rem; }

.skill-group { margin-bottom: 1.2rem; }
.skill-group h4 { font-size: .95rem; color: var(--text-strong); margin: 0 0 .3rem; }
.skill-group p { color: var(--muted); margin: 0; }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-details dt { font-weight: 680; color: var(--text-strong); margin-top: 1.1rem; }
.contact-details dd { margin: .2rem 0 0; color: var(--muted); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 620; margin-bottom: .4rem; color: var(--text-strong); }
.field .req { color: var(--accent); font-weight: 700; }
.field .hint { font-size: var(--step--1); color: var(--muted); margin: 0 0 .4rem; }
.field input, .field textarea {
  width: 100%; font: inherit; padding: .75rem .9rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.form-note { font-size: var(--step--1); color: var(--muted); }
.form-success {
  background: var(--live-soft); border: 1px solid var(--live);
  color: var(--text-strong); padding: 1rem 1.2rem; border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
}

/* ---------- Page header (interior) ---------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem); }
.page-head h1 { font-size: var(--step-4); }
.page-head .intro { font-size: var(--step-1); color: var(--muted); max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: var(--sp-6); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-block: clamp(2.5rem, 5vw, 4rem); }
.site-footer h2 { font-size: 1.05rem; margin-bottom: .3rem; }
.footer-tag { color: var(--muted); max-width: 34ch; font-size: .97rem; }
.footer-col h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .8rem; font-weight: 700; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-col a { color: var(--text); text-decoration: none; font-size: .97rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 1.3rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: var(--muted); font-size: var(--step--1); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .portrait { max-width: 340px; order: -1; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .method-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: .8rem clamp(1.1rem, 4vw, 2rem) 1.2rem;
    box-shadow: var(--shadow);
  }
  .nav-menu[hidden] { display: none; }
  .nav-menu a { padding: .8rem .5rem; font-size: 1.05rem; }
  .nav .btn { margin-left: 0; margin-top: .5rem; }
  .nav { position: relative; }

  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .shipped li { grid-template-columns: 1fr; gap: .2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .next-project { flex-direction: row; }
}

/* Show menu on desktop regardless of hidden attr toggling */
@media (min-width: 681px) {
  .nav-menu[hidden] { display: flex; }
}
