/* hyslopweb.co.uk
   Palette: Graphite + Signal Green. Neutrals from OKLCH hue 260, near-zero chroma.
   Every foreground/background pair below was computed against WCAG AA, not eyeballed.
   Light-first, with a complete dark palette behind prefers-color-scheme. */

:root {
  --bg:            #FDFDFD;
  --surface:       #F7F7F7;
  --raised:        #EEEEEE;
  --border:        #DEDEDE;
  --text:          #1F2124;   /* 15.87:1 on --bg  AAA */
  --secondary:     #5D5E61;   /*  6.37:1 on --bg  AA  */
  --muted:         #818284;
  --accent:        #007455;   /*  5.69:1 on --bg  AA  */
  --accent-hover:  #009366;
  --on-accent:     #FFFFFF;   /*  5.69:1 on --accent  AA */
  --grid:          rgba(31, 33, 36, 0.045);

  --measure: 62rem;
  --step: clamp(1.5rem, 4vw, 2.75rem);
  --rule: 1px solid var(--border);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #0B0E12;
    --surface:      #131519;
    --raised:       #1F2124;
    --border:       #303235;
    --text:         #DEDEDE;  /* 14.38:1  AAA */
    --secondary:    #A3A4A5;  /*  7.75:1  AAA */
    --muted:        #818284;
    --accent:       #00D892;  /* 10.35:1  AAA */
    --accent-hover: #37E6A8;
    --on-accent:    #0B0E12;  /* 10.35:1 on --accent  AAA */
    --grid:         rgba(222, 222, 222, 0.05);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis-weight: none;
}

/* --- structural furniture: mono, never body copy --- */
.mono, .eyebrow, .tag, .stat b, nav a, .meta {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.wrap { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; }

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

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--on-accent);
  padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* --- nav: present at every width, no display:none --- */
header.bar { border-bottom: var(--rule); background: var(--bg); }
header.bar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 3.5rem; flex-wrap: wrap;
}
header.bar a.home {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500; color: var(--text); text-decoration: none;
}
header.bar a.home:hover { color: var(--accent); }
nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
nav a {
  font-size: 0.8125rem; color: var(--secondary); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;   /* WCAG 2.2 target size */
}
nav a:hover, nav a:focus-visible { color: var(--accent); }

/* --- hero: left-aligned, flat ground, one faint grid --- */
.hero {
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: var(--rule);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 1.25rem;
  max-width: 20ch;
}
.hero .lede { font-size: clamp(1.0625rem, 2vw, 1.25rem); color: var(--secondary); max-width: 52ch; margin: 0 0 2rem; }

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.7rem 1.15rem; border-radius: 3px;
  font-size: 0.9375rem; font-weight: 500; text-decoration: none;
  border: 1px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--surface); }

/* --- sections: left-aligned headings, hairline rules, no centring --- */
section { padding: clamp(2.75rem, 7vw, 4.5rem) 0; border-bottom: var(--rule); }
section > .wrap > h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.015em; font-weight: 600;
  margin: 0 0 0.5rem; padding-bottom: 0.75rem;
  border-bottom: var(--rule);
}
section .intro { color: var(--secondary); max-width: 60ch; margin: 1.25rem 0 2rem; }

/* --- stats --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1px; background: var(--border); border: var(--rule); margin: 2rem 0 0; }
.stat { background: var(--bg); padding: 1.25rem; }
.stat b { display: block; font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; }
.stat span { display: block; font-size: 0.8125rem; color: var(--secondary); margin-top: 0.25rem; }

/* --- work list: hairline separators, no cards, no shadows --- */
.work { list-style: none; margin: 0; padding: 0; }
.work > li { padding: 1.75rem 0; border-top: var(--rule); }
.work > li:first-child { border-top: none; }
.work h3 { font-size: 1.1875rem; font-weight: 600; margin: 0 0 0.35rem; }
.work h3 a { text-decoration: none; }
.work h3 a:hover { text-decoration: underline; }
.work .role { color: var(--secondary); margin: 0 0 0.75rem; }
.work p { margin: 0 0 0.85rem; max-width: 68ch; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; list-style: none; }
.tag {
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--secondary); border: var(--rule); border-radius: 2px;
  padding: 0.2rem 0.45rem; background: var(--surface);
}
.meta { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

/* --- packages --- */
.packages { display: grid; gap: 1px; background: var(--border); border: var(--rule); margin-top: 2rem; }
@media (min-width: 52rem) { .packages { grid-template-columns: repeat(3, 1fr); } }
.pkg { background: var(--bg); padding: 1.5rem; display: flex; flex-direction: column; }
.pkg h3 { font-size: 1.0625rem; font-weight: 600; margin: 0 0 0.5rem; }
.pkg .price { font-family: 'IBM Plex Mono', monospace; font-size: 1.375rem; font-weight: 500; margin: 0 0 0.25rem; }
.pkg .terms { font-size: 0.8125rem; color: var(--muted); margin: 0 0 1rem; }
.pkg p { font-size: 0.9375rem; color: var(--secondary); margin: 0 0 1rem; }
.pkg ul { margin: 0 0 1.25rem; padding-left: 1.1rem; font-size: 0.9375rem; color: var(--secondary); }
.pkg li { margin-bottom: 0.35rem; }

/* --- about: photo left, copy right, rectangular not circular --- */
.about { display: grid; gap: var(--step); align-items: start; }
@media (min-width: 46rem) { .about { grid-template-columns: 15rem 1fr; } }
.about img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
             border: var(--rule); filter: grayscale(1) contrast(1.02); }
/* height:auto is load-bearing. The img carries width/height attributes to stop layout shift,
   and CSS aspect-ratio is ignored while BOTH dimensions are definite. */
.about p { max-width: 64ch; }

/* Studio portrait is on a white ground. In dark mode knock it back so it reads as a print
   rather than a lightbox. Doing this in CSS, not in the file, so swapping the photo is safe. */
@media (prefers-color-scheme: dark) {
  .about img { filter: grayscale(1) contrast(1.04) brightness(0.78); }
}

/* --- principles --- */
.principles { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0; }
.principles li { border-top: var(--rule); padding: 1.15rem 0; display: grid; gap: 0.35rem; }
@media (min-width: 46rem) { .principles li { grid-template-columns: 14rem 1fr; gap: 1.5rem; } }
.principles b { font-family: 'IBM Plex Mono', monospace; font-size: 0.8125rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
.principles span { color: var(--secondary); max-width: 60ch; }

/* --- diagram --- */
figure { margin: 2rem 0 0; }
figure svg { width: 100%; height: auto; display: block; border: var(--rule); background: var(--surface); }
figcaption { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--muted); margin-top: 0.6rem; letter-spacing: 0.03em; }

/* --- contact --- */
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact-list li { border-top: var(--rule); padding: 1rem 0; display: flex; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.contact-list b { font-family: 'IBM Plex Mono', monospace; font-size: 0.8125rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); min-width: 8rem; }

footer { padding: 2.5rem 0 3.5rem; color: var(--muted); font-size: 0.875rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer a { color: var(--secondary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* --- diagram ---
   These live here, not in an inline <style> inside the SVG, because the site's
   Content-Security-Policy is style-src 'self' and inline styles are blocked. */
figure svg .bx   { fill: var(--bg); stroke: var(--border); stroke-width: 1; }
figure svg .bx-a { fill: var(--surface); stroke: var(--accent); stroke-width: 1; }
figure svg .lb   { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; fill: var(--text); }
figure svg .lb-s { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; fill: var(--secondary); }
figure svg .ac   { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; fill: var(--accent); }
figure svg .ar   { stroke: var(--border); stroke-width: 1; fill: none; }
figure svg marker path { fill: var(--border); }

/* replaces inline style="margin-top:auto" / "margin-top:2rem" for the same reason */
.pkg .pkg-cta   { margin-top: auto; }
.about-block    { margin-top: 2rem; }
