/* =========================================================================
   Base: design tokens, page frame, background glow and shared helpers.
   Every size that changes between desktop, tablet and phone is a token
   here, so the rest of the CSS stays the same at every size.
   ========================================================================= */

:root {
  /* colours */
  --bg: #0b0b0b; /* page */
  --frame: #050505; /* dark frame around the page */
  --card: #141414;
  --line: #232323; /* card and tag outlines */
  --text: #f1f1f1;
  --body: #c4c4c4; /* paragraph text */
  --muted: #8a8a8a;
  --yt: #ff3b3b;
  --sc: #ff6a2b;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --radius: 8px;
  --shadow: 0 3px 20px rgba(0, 0, 0, 0.75);

  /* page layout */
  --frame-w: 20px; /* width of the dark frame */
  --section-gap: 120px; /* space between a card and the next section */
  --first-gap: 24px; /* space between the header and About */
  --dock-h: 96px; /* height of the social icon row */

  /* ABOUT / BOOKINGS headings: text size, space above and below the word,
     and how much of the heading box the card covers */
  --title-size: 45px;
  --title-pad-y: 40px;
  --cover: 30px;

  /* YouTube / SoundCloud logos: height, and the gap to their card. The gap
     matches the ABOUT / BOOKINGS letters (in Roboto the letters sit 15.8%
     of the text size above the bottom of their line), plus a little extra,
     so changing --cover moves the logos too. */
  --logo-h: 45px;
  --logo-gap: calc(var(--title-pad-y) + var(--title-size) * 0.158 - var(--cover));
  --logo-extra: 3px;
}

/* tablet and small laptop */
@media (min-width: 561px) and (max-width: 860px) {
  :root {
    --section-gap: 100px;
    --title-size: 34px;
    --title-pad-y: 30px;
    --cover: 23px;
    --logo-h: 34.2px;
  }
}

/* phones */
@media (max-width: 560px) {
  :root {
    --frame-w: 10px;
    --section-gap: 80px;
    --first-gap: 16px;
    --dock-h: 82px;
    --title-size: 27px;
    --title-pad-y: 24px;
    --cover: 18px;
    --logo-h: 27.4px;
  }
}

/* ---------- Page ---------- */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  border: var(--frame-w) solid var(--frame);
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: transparent; /* the colour comes from <html>, so the glow shows */
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.75;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  /* the social bar's fade is screen-wide; never scroll sideways */
  overflow-x: clip;
  /* fades in once the page has loaded (js/fade-in.js) */
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.fade-in {
  opacity: 1;
}

/* soft round glow pinned to the bottom of the screen */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 75% 60% at 50% 100%,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.035) 45%,
    transparent 100%
  );
}

a {
  color: inherit;
}

.wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

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

@media (min-width: 561px) and (max-width: 860px) {
  .wrapper {
    padding: 0 20px 90px;
  }
}

@media (max-width: 560px) {
  .wrapper {
    padding: 0 14px 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
