/* ==========================================================================
   Malek Webworks — core stylesheet
   Vanilla CSS. Mobile-first. Dark default, light via [data-theme="light"].
   Palette sampled directly from the brand logo.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — sampled from logo artwork */
  --brand-blue:        #00a8fc;
  --brand-cyan:        #22ccff;
  --brand-deep:        #0057d9;
  --brand-chrome:      #c8d4e4;

  /* Dark theme (default) */
  --bg:                #080c18;
  --bg-raised:         #0e1424;
  --bg-sunken:         #05080f;
  --surface:           #121a2e;
  --surface-hover:     #182340;
  --border:            #1e2942;
  --border-strong:     #2c3a5c;

  --text:              #e8eef8;
  --text-muted:        #9aa8c2;
  --text-faint:        #6b7a96;

  --accent:            var(--brand-blue);
  --accent-hover:      var(--brand-cyan);
  --accent-contrast:   #04080f;
  --accent-soft:       rgba(0, 168, 252, 0.12);
  --accent-ring:       rgba(0, 168, 252, 0.45);

  --focus:             var(--brand-cyan);

  /* Gradients */
  --grad-brand:        linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-blue) 55%, var(--brand-cyan) 100%);
  --grad-text:         linear-gradient(135deg, #ffffff 0%, var(--brand-chrome) 45%, var(--brand-cyan) 100%);
  --grad-glow:         radial-gradient(60% 60% at 50% 0%, rgba(0, 168, 252, 0.18) 0%, transparent 70%);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Fluid type scale */
  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1rem;
  --fs-md:   clamp(1.0625rem, 0.4vw + 0.95rem, 1.1875rem);
  --fs-lg:   clamp(1.25rem, 0.8vw + 1.05rem, 1.5rem);
  --fs-xl:   clamp(1.5rem, 1.4vw + 1.15rem, 2rem);
  --fs-2xl:  clamp(1.875rem, 2.4vw + 1.3rem, 2.75rem);
  --fs-3xl:  clamp(2.25rem, 4vw + 1.25rem, 4rem);

  /* Space */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 6rem;

  --section-y: clamp(3.5rem, 8vw, 7rem);
  --wrap: 1140px;
  --wrap-narrow: 760px;

  /* Shape */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 16px;  --r-xl: 24px;  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.45);
  --shadow-accent: 0 8px 28px rgba(0, 87, 217, 0.35);

  --dur: 180ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* Light theme */
:root[data-theme="light"] {
  --bg:              #ffffff;
  --bg-raised:       #f6f8fc;
  --bg-sunken:       #eef2f8;
  --surface:         #ffffff;
  --surface-hover:   #f2f6fd;
  --border:          #dce3ee;
  --border-strong:   #c2cddf;

  --text:            #0d1626;
  --text-muted:      #4a5a75;
  --text-faint:      #6e7f9b;

  --accent:          #0072d6;
  --accent-hover:    #0057d9;
  --accent-contrast: #ffffff;
  --accent-soft:     rgba(0, 114, 214, 0.09);
  --accent-ring:     rgba(0, 114, 214, 0.35);

  --focus:           #0057d9;

  --grad-text: linear-gradient(135deg, #0d1626 0%, #17406e 50%, #0072d6 100%);
  --grad-glow: radial-gradient(60% 60% at 50% 0%, rgba(0, 114, 214, 0.10) 0%, transparent 70%);

  --shadow-sm: 0 1px 2px rgba(16,32,64,.08);
  --shadow-md: 0 8px 24px rgba(16,32,64,.10);
  --shadow-lg: 0 24px 60px rgba(16,32,64,.14);
  --shadow-accent: 0 8px 28px rgba(0, 114, 214, 0.22);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-4);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
li + li { margin-top: var(--sp-2); }

strong { color: var(--text); font-weight: 650; }
small { font-size: var(--fs-xs); }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-7) 0; }

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

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

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--section-y); }
.section--raised { background: var(--bg-raised); border-block: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: var(--fs-md); margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); gap: var(--sp-7); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 650;
  border-radius: var(--r-md);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-4); color: var(--accent-contrast); }

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

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.8rem 1.5rem;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover { color: #fff; box-shadow: 0 12px 34px rgba(0, 87, 217, .45); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.btn--lg { padding: 1rem 2rem; font-size: var(--fs-base); min-height: 54px; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.btn-row--center { justify-content: center; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 650;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.arrow-link::after {
  content: "→";
  transition: transform var(--dur) var(--ease);
}
.arrow-link:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   5. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand img { width: auto; height: 34px; }
.brand-name { font-size: 1.0625rem; white-space: nowrap; }
.brand-name span { color: var(--text-muted); font-weight: 500; }

@media (max-width: 400px) { .brand-name { display: none; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-hover); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav {
  display: none;
  position: absolute;
  left: 0; right: 0; top: 100%;
  padding: var(--sp-4) var(--sp-5) var(--sp-6);
  background: var(--bg-raised);
  border-block: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.site-nav.is-open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0 0 var(--sp-4);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.site-nav li + li { margin-top: 0; }

.site-nav a {
  display: block;
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--r-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
}
.site-nav a:hover { background: var(--surface-hover); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--accent); background: var(--surface-hover); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.header-cta { display: none; }

/* Desktop nav */
@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    margin-left: auto;
  }
  .site-nav ul { flex-direction: row; gap: var(--sp-1); margin-bottom: 0; }
  .site-nav a { padding: var(--sp-2) var(--sp-4); }
  .site-nav .nav-cta { display: none; }
  .header-actions { margin-left: var(--sp-3); }
  .header-cta { display: inline-flex; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  background: var(--grad-glow);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: var(--sp-8); }
}

.hero h1 { margin-bottom: var(--sp-5); }
.hero-lede {
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 54ch;
  margin-bottom: var(--sp-6);
}

.text-grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-art {
  display: grid;
  place-items: center;
  padding: var(--sp-5);
}

/* Spotlight reveal — hover the hero mark to see the code underneath it.
   Front layer (logo) sits on top; back layer (code window) is revealed
   through a cursor-tracked radial mask painted onto an offscreen canvas.
   Degrades to just the static logo with no JS, on touch, or with
   reduced-motion — see js/main.js. */
.spotlight-stack {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 900 / 887;
}
.spotlight-front,
.spotlight-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.spotlight-front {
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 24px 60px rgba(0, 120, 252, .28));
  pointer-events: none;
}
.spotlight-back {
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-radius: var(--r-lg);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  mask-mode: alpha;
  -webkit-mask-mode: alpha;
}
.spotlight-stack.is-active .spotlight-back { opacity: 1; }

.code-window {
  width: 100%;
  max-width: 300px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #05080f;
  border: 1px solid #1e2942;
  box-shadow: var(--shadow-lg);
}
.code-window-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: #0c1220;
  border-bottom: 1px solid #1e2942;
}
.code-window-bar span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #2c3a5c;
}
.code-window-bar span:nth-child(1) { background: #e5484d; }
.code-window-bar span:nth-child(2) { background: #f5a623; }
.code-window-bar span:nth-child(3) { background: #2fbb6a; }
.code-window pre {
  margin: 0;
  padding: 14px 16px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: #cbd6e8;
  white-space: pre;
}
.tok-tag  { color: var(--brand-cyan); }
.tok-attr { color: #9ecbff; }
.tok-str  { color: #7ee6b5; }
.tok-comment { color: #5a6a85; font-style: italic; }

.spotlight-hint {
  margin-top: var(--sp-4);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
.spotlight-hint::before {
  content: "◎ ";
  color: var(--accent);
}
@media (hover: none), (pointer: coarse) {
  .spotlight-hint { display: none; }
}

.tagline-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.tagline-strip span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.tagline-strip span::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card h3 { margin-bottom: var(--sp-3); }
.card p { color: var(--text-muted); font-size: var(--fs-sm); }

.card-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
}
.card-icon svg { width: 22px; height: 22px; }

/* Link card — whole card clickable via stretched pseudo-element */
.card--link h3 a { color: inherit; text-decoration: none; }
.card--link h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card--link:hover h3 a { color: var(--accent); }

.card-list {
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.card-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-top: var(--sp-2);
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* --------------------------------------------------------------------------
   8. Work / portfolio
   -------------------------------------------------------------------------- */
.work-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.work-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-thumb--placeholder {
  background: var(--grad-brand);
  color: #fff;
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -.03em;
  opacity: .9;
}
.work-body { padding: var(--sp-5); flex: 1; display: flex; flex-direction: column; }
.work-body h3 { margin-bottom: var(--sp-2); font-size: var(--fs-md); }
.work-body p { flex: 1; }
.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.tag {
  display: inline-block;
  padding: .25rem .625rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.tag--accent { color: var(--accent); border-color: var(--accent-ring); background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   9. Steps / numbered process
   -------------------------------------------------------------------------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
  margin-top: var(--sp-6);
}
.steps > li:first-child { margin-top: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.steps h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.steps p { color: var(--text-muted); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   10. Stats
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat { text-align: center; }
.stat dt { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: .1em; font-weight: 650; }
.stat dd {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-5); }
.field { display: grid; gap: var(--sp-2); }

.field label { font-size: var(--fs-sm); font-weight: 650; }
.field .hint { font-size: var(--fs-xs); color: var(--text-faint); }
.req { color: var(--accent); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  min-height: 48px;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

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

.field input:user-invalid,
.field textarea:user-invalid { border-color: #e5484d; }

/* Honeypot — hidden from humans, visible to bots */
.hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-note { font-size: var(--fs-xs); color: var(--text-faint); }

.form-status {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.form-status--ok { border-color: var(--accent-ring); background: var(--accent-soft); color: var(--text); }

/* --------------------------------------------------------------------------
   12. Contact details
   -------------------------------------------------------------------------- */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { margin-top: var(--sp-5); }
.contact-list li:first-child { margin-top: 0; }
.contact-list dt,
.contact-list .label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 650;
  color: var(--text-faint);
  margin-bottom: var(--sp-1);
}
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   13. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  padding-block: var(--section-y);
  background: var(--bg-raised);
  border-block: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 140%;
  background: var(--grad-glow);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band p { color: var(--text-muted); font-size: var(--fs-md); max-width: 52ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-block: var(--sp-8) var(--sp-6);
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  gap: var(--sp-7);
  margin-bottom: var(--sp-7);
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }

.footer-brand img { height: 68px; width: auto; margin-bottom: var(--sp-4); }
.footer-brand p { color: var(--text-muted); max-width: 40ch; font-size: var(--fs-sm); }

.footer-col h2 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-faint);
  margin-bottom: var(--sp-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-top: var(--sp-3); }
.footer-col li:first-child { margin-top: 0; }
.footer-col a { color: var(--text-muted); text-decoration: none; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   15. Page header (inner pages)
   -------------------------------------------------------------------------- */
.page-head {
  position: relative;
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 160%;
  background: var(--grad-glow);
  pointer-events: none;
}
.page-head > * { position: relative; }
.page-head h1 { font-size: var(--fs-2xl); margin-bottom: var(--sp-4); }
.page-head p { color: var(--text-muted); font-size: var(--fs-md); max-width: 60ch; margin-bottom: 0; }

.breadcrumb { margin-bottom: var(--sp-4); font-size: var(--fs-xs); color: var(--text-faint); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--border-strong); }
.breadcrumb a { color: var(--text-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   16. Prose (about page etc.)
   -------------------------------------------------------------------------- */
.prose { font-size: var(--fs-md); }
.prose > * + * { margin-top: var(--sp-5); }
.prose h2 { margin-top: var(--sp-8); font-size: var(--fs-xl); }
.prose h3 { margin-top: var(--sp-6); }
.prose p { color: var(--text-muted); }
.prose li { color: var(--text-muted); }

.pull {
  margin: var(--sp-7) 0;
  padding: var(--sp-5) var(--sp-6);
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--fs-lg);
  line-height: 1.45;
  letter-spacing: -.01em;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   17. FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: var(--sp-3); }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  padding: var(--sp-5);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--surface-hover); }
.faq .faq-body { padding: 0 var(--sp-5) var(--sp-5); color: var(--text-muted); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   18. 404
   -------------------------------------------------------------------------- */
.error-page {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--sp-8);
}
.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 16vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--sp-4);
}

/* --------------------------------------------------------------------------
   19. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   20. Reduced motion & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::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, .site-footer, .cta-band, .btn-row, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
