/* Edward Boakes — see docs/PLAN.md §1 for the CSS policy.
   Everything the page NEEDS is in the widely-supported tier. Newer features
   sit behind @supports so the page is complete without them. */

/* Palette — DAW familiarity.

   The audience is producers, so the page borrows the visual language they
   already work in. This is an evocation, not a reproduction: neither Apple nor
   Image-Line publish brand hex values, and copying chrome exactly would look
   like an imitation rather than a nod.

   What is actually being referenced:
   - FL Studio: signature orange on near-black. That orange is the primary
     accent — the single loudest colour on the page.
   - Logic Pro: cool blue-grey chrome, with the warm playhead against it, and
     blue/green region colours. That supplies the neutral greys (faintly blue
     rather than neutral) and the secondary blue.

   DARK ONLY, deliberately. Studios are dark and so are the tools; a pale page
   fought the reference and looked like a generic website with orange bits.
   Committing to one look means styling it properly rather than styling two
   adequately. `color-scheme: dark` tells the browser so form controls,
   scrollbars and the URL bar match, and light-mode users get this palette
   rather than a broken half-inverted one. */

:root {
  /* Neutrals: Logic's cool grey chrome. */
  --ink: #eceef2;
  --ink-dim: #9aa1ad;
  --ground: #16181d;
  --raised: #1e2128;
  --raised-hi: #262a33;
  --edge: #2f333c;

  /* FL Studio orange: the primary accent. */
  --accent: #f28a1c;
  --accent-strong: #ff9a2e;

  /* The contact button. Bright orange with near-black text — the way a lit
     control reads in a DAW, and the only combination that clears WCAG AA at
     this saturation. Light text on this orange is 2.4:1 and fails. */
  --accent-btn: #f28a1c;
  --accent-btn-ink: #14100a;

  /* Logic's region blue: secondary, used sparingly for support. */
  --accent-alt: #4a9fe0;

  --measure: 34rem;
  --step: 1rem;
  --radius: 10px;

  color-scheme: dark;
}

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

body {
  margin: 0;
  /* Fallback first, then fluid: side padding shrinks as the viewport does, so
     a zoomed-in or very narrow view keeps room for content rather than
     spending it on margins. */
  padding: 2.5rem 1.25rem 3rem;
  padding-inline: clamp(0.75rem, 4vw, 1.25rem);
  background: var(--ground);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
}

/* --- Identity ------------------------------------------------------------ */

/* The name sits behind a transport-style accent rule, the way a DAW anchors
   its header strip. */
.intro {
  margin-bottom: 1.75rem;
  padding-left: 0.9rem;
  border-left: 4px solid var(--accent);
}

h1 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.4rem 0 0;
  color: var(--accent);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bio p {
  margin: 0 0 0.9rem;
  color: var(--ink-dim);
  max-width: 32rem;
}

/* --- Sections ------------------------------------------------------------ */

/* Section headings read like DAW track headers: a small colour chip, then a
   short uppercase label. The chip is decorative, so it is a pseudo-element and
   carries no meaning a screen reader needs. */
h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

h2::before {
  content: "";
  flex: none;
  width: 3px;
  height: 0.9em;
  border-radius: 2px;
  background: var(--accent-alt);
}

/* Contact is the site's job, so its chip is the primary accent. */
.contact h2::before {
  background: var(--accent);
}

.blurb {
  margin: 0 0 0.9rem;
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

.contact,
.strand {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--edge);
}

/* Contact is the point of the site (docs/PLAN.md §1) — it reads loudest. */
.email {
  margin: 0;
}

.email a {
  display: inline-block;
  /* An email address is one unbreakable word. At high zoom the button would
     otherwise force the whole page to scroll sideways — and this is the single
     element a visitor most needs to reach. */
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0.7rem 1.1rem;
  min-height: 44px;
  background: var(--accent-btn);
  color: var(--accent-btn-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}

.email a:hover {
  background: var(--accent-strong);
}

/* --- Link lists ---------------------------------------------------------- */

.links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.links li + li {
  margin-top: 0.5rem;
}

/* Link rows read as track lanes: a coloured strip down the leading edge, the
   way a DAW colours a track header. This is where the accent earns its keep —
   it is the largest repeated surface on the page. */
.links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Must wrap: at 200% zoom the label and handle no longer fit side by side,
     and without this the handle is pushed off-screen and the page scrolls
     horizontally (WCAG 1.4.10 Reflow). Low-vision users are exactly the people
     zooming, so this is not an edge case. */
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
  padding-left: 1.4rem;
  background: var(--raised);
  border: 1px solid var(--edge);
  border-left: 4px solid var(--accent-alt);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

/* Hovering lights the lane, like arming a track. */
.links a:hover {
  border-color: var(--edge);
  border-left-color: var(--accent);
  background: var(--raised-hi);
}

.handle {
  color: var(--ink-dim);
  font-weight: 400;
  font-size: 0.9375rem;
}

/* Platform names and handles are single unbreakable words, so at high zoom
   they overflow however much the row itself wraps. Allow them to break. */
.links .label,
.handle {
  overflow-wrap: anywhere;
  min-width: 0;
}

/* --- Page navigation (only present when JS builds it) -------------------- */

.pages ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.pages a {
  display: inline-block;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  color: var(--ink-dim);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.pages a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--ink);
}

/* --- Footer -------------------------------------------------------------- */

footer {
  max-width: var(--measure);
  margin: 3rem auto 0;
  color: var(--ink-dim);
  font-size: 0.8125rem;
}

footer p {
  margin: 0;
}

/* --- Focus --------------------------------------------------------------- */

a:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Keep the ring for keyboard users only, where the browser supports it. */
@supports selector(:focus-visible) {
  a:focus:not(:focus-visible) {
    outline: none;
  }

  a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }
}

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

/* --- Progressive enhancement --------------------------------------------- */

/* Fluid type: nice on large screens, unnecessary elsewhere. */
@supports (font-size: clamp(1rem, 1vw, 2rem)) {
  h1 {
    font-size: clamp(2.25rem, 8vw, 3rem);
  }
}

/* Logical properties, where understood. */
@supports (margin-inline: auto) {
  main,
  footer {
    margin-inline: auto;
  }

  .links a {
    padding-inline: 1rem;
  }
}

@supports (text-wrap: balance) {
  h1,
  .tagline {
    text-wrap: balance;
  }
}
