/* ==========================================================================
   Human Machine Project — shared stylesheet
   --------------------------------------------------------------------------
   One design system for every page. Sizes, spacing and colours all come
   from the tokens in :root, so changing a token updates the whole site.

   1. Fonts            6. Buttons & links      11. Cards & grids
   2. Tokens           7. Header & navigation  12. Page-specific blocks
   3. Base             8. Home hero            13. Footer
   4. Layout           9. Film player          14. Responsive
   5. Typography      10. Media & splits       15. Motion & accessibility
   ========================================================================== */

/* 1. Fonts (self-hosted, SIL Open Font License — see assets/fonts) ------- */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-wght.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-latin-italic.woff2") format("woff2");
}

/* 2. Tokens -------------------------------------------------------------- */
:root {
  /* Colour */
  --ink: #14302f;            /* headings */
  --text: #2d4644;           /* strong body text */
  --muted: #546967;          /* body copy */
  --paper: #f6f8f4;          /* page background */
  --surface: #ffffff;        /* cards */
  --tint: #ebf2ed;           /* alternate section background */
  --tint-strong: #dceae2;    /* call-to-action bands, icon wells */
  --line: #d6e2dc;           /* borders and dividers */
  --teal: #1b7771;           /* primary brand colour */
  --teal-dark: #135d58;      /* hover / pressed */
  --mint: #a8dccf;           /* accents on dark backgrounds */
  --signal: #ee9a5c;         /* logo plus and heartbeat only */
  --night: #14302f;          /* dark bands */
  --night-deep: #0f2324;     /* footer */
  --on-night: #eef5f2;
  --on-night-muted: #a9c0ba;

  /* Type families */
  --font-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;

  /* Type scale (fluid, ~1.25 ratio) */
  --fs-display: clamp(3.25rem, 2.1rem + 4.2vw, 5.5rem);   /* home title   52 → 88 */
  --fs-h1: clamp(2.5rem, 1.75rem + 2.9vw, 4.25rem);       /* page titles  40 → 68 */
  --fs-h2: clamp(2rem, 1.5rem + 1.85vw, 3.125rem);        /* sections     32 → 50 */
  --fs-h2-sm: clamp(1.625rem, 1.35rem + 1vw, 2.25rem);    /* bands/panels 26 → 36 */
  --fs-h3: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);        /* cards        20 → 24 */
  --fs-lead: clamp(1.125rem, 1.06rem + .25vw, 1.3125rem); /* intro text   18 → 21 */
  --fs-body: 1.0625rem;                                   /* 17 */
  --fs-small: .9375rem;                                   /* 15 */
  --fs-label: .875rem;                                    /* 14 */

  /* Spacing (8-point scale) */
  --s-1: .25rem;  --s-2: .5rem;  --s-3: .75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;   --s-7: 3rem;   --s-8: 4rem;  --s-9: 6rem;

  /* Layout */
  --container: 1200px;
  --narrow: 800px;
  --gutter: clamp(1.25rem, 4vw, 3rem);                 /* side margins 20 → 48 */
  --section-y: clamp(4rem, 2.6rem + 5.6vw, 7.5rem);    /* section padding 64 → 120 */
  --gap: clamp(1rem, .7rem + 1vw, 1.5rem);             /* grid gaps 16 → 24 */
  --split-gap: clamp(2.5rem, 1rem + 5vw, 5rem);        /* two-column gap 40 → 80 */
  --header-h: 76px;

  /* Shape */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(20, 48, 47, .05), 0 10px 30px rgba(20, 48, 47, .07);
  --shadow-lg: 0 2px 4px rgba(20, 48, 47, .06), 0 24px 60px rgba(20, 48, 47, .14);

  /* Icons used by links and buttons */
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --icon-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E");
  --icon-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E");
}

/* 3. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-4)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--teal); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-dark); }
p { margin: 0; }
figure { margin: 0; }
button { font: inherit; }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  padding: var(--s-3) var(--s-4); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); font-weight: 600;
}
.skip-link:focus { top: var(--s-4); }

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

/* 4. Layout -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--narrow) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }
.section--tint { background: var(--tint); }
.section--flush-top { padding-top: 0; }

.block-gap { margin-top: var(--s-8); }      /* 64px between blocks inside a section */
.block-gap-sm { margin-top: var(--s-7); }   /* 48px */
.stack > * + * { margin-top: var(--gap); }

.band-dark { background: var(--night); color: var(--on-night); }
.band-dark h2, .band-dark h3 { color: var(--on-night); }
.band-dark .lede, .band-dark p { color: var(--on-night-muted); }
.band-dark .eyebrow { color: var(--mint); }
.band-dark .eyebrow::before { background: var(--mint); }

/* Section heading: eyebrow + title + intro, always the same spacing */
.section-head { max-width: 760px; margin-bottom: var(--s-8); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lede { margin-inline: auto; }
.section-head .lede { margin-top: var(--s-5); }

/* 5. Typography ---------------------------------------------------------- */
h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -.035em; }
h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -.03em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.015em; }

/* The second line of every headline: same italic serif everywhere */
h1 em, h2 em, .serif {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.06em;
  letter-spacing: -.02em;
  line-height: 1.08;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  margin: 0 0 var(--s-5);
  color: var(--teal);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
}

.lede { max-width: 38em; color: var(--muted); font-size: var(--fs-lead); line-height: 1.6; }

.prose > * + * { margin-top: var(--s-4); }
.prose p { max-width: 38em; color: var(--muted); }
.prose h2 + p, .prose .eyebrow + h2 { margin-top: 0; }
.prose h2 { margin-bottom: var(--s-5); }

.note {
  padding-left: var(--s-4);
  border-left: 2px solid var(--signal);
  color: var(--muted);
  font-size: var(--fs-small);
}

/* 6. Buttons & links ----------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 1.5px solid var(--teal);
  border-radius: var(--radius-pill);
  background: var(--teal);
  color: #fff;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.button::after {
  content: "";
  width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
          mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform .2s;
}
.button:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.button:hover::after { transform: translateX(3px); }

.button--ghost { background: transparent; color: var(--teal); }
.button--ghost:hover { background: var(--teal); color: #fff; }
.button--ghost.button--down::after { -webkit-mask-image: var(--icon-down); mask-image: var(--icon-down); }
.button--ghost.button--down:hover::after { transform: translateY(2px); }

.button--light { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.button--light:hover { background: #fff; border-color: #fff; color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.actions--center { justify-content: center; }

.link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--teal);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
}
.link::after {
  content: "";
  flex: none;
  width: 15px; height: 15px;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
          mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform .2s;
}
.link:hover { color: var(--teal-dark); }
.link:hover::after { transform: translateX(3px); }
.link--down::after { -webkit-mask-image: var(--icon-down); mask-image: var(--icon-down); }
.link--down:hover::after { transform: translateY(2px); }
.link--external::after { -webkit-mask-image: var(--icon-external); mask-image: var(--icon-external); }
.link--external:hover::after { transform: translate(2px, -2px); }

.link-row { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); margin-top: var(--s-6); }

/* 7. Header & navigation ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 244, .92);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
          backdrop-filter: saturate(140%) blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}
.brand-mark::after {
  content: "+";
  position: absolute;
  top: -3px; right: -5px;
  display: grid;
  place-items: center;
  width: 17px; height: 17px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--signal);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
}
.brand-name { display: flex; flex-direction: column; gap: 2px; line-height: 1; text-transform: uppercase; }
.brand-name span { font-size: .6875rem; font-weight: 500; letter-spacing: .1em; }
.brand-name strong { font-size: .875rem; font-weight: 800; letter-spacing: .4em; }

.site-nav { display: flex; align-items: center; gap: var(--s-1); }
.site-nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--s-4);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.site-nav a:hover { background: var(--tint); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--tint-strong); color: var(--teal-dark); font-weight: 600; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: var(--s-2);
  height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
}
.menu-icon { position: relative; width: 18px; height: 12px; }
.menu-icon::before, .menu-icon::after, .menu-icon span {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .2s, opacity .2s;
}
.menu-icon::before { top: 0; }
.menu-icon span { top: 5px; }
.menu-icon::after { bottom: 0; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }

/* 8. Home hero ----------------------------------------------------------- */
.hero {
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem);
  background: var(--paper);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: var(--split-gap);
}
.hero h1 { font-size: var(--fs-display); line-height: .98; letter-spacing: -.045em; }
.hero-subtitle {
  margin-top: var(--s-4);
  color: var(--teal-dark);
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.375rem);
  font-style: italic;
  line-height: 1.15;
}
.hero .lede { margin-top: var(--s-5); }
.hero .actions { margin-top: var(--s-6); }

/* Animated "one connected you" illustration */
.hero-art {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
}
.hero-art::before {           /* soft glow, always centred on the illustration */
  content: "";
  position: absolute;
  inset: -35%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(168, 220, 207, .5), rgba(168, 220, 207, 0));
}
.hero-art svg { width: 100%; height: 100%; overflow: visible; }
.hero-art .orbit { fill: none; stroke: #2a8e83; stroke-width: 1.2; opacity: .6; }
.hero-art .orbit--dashed { stroke-dasharray: 4 7; }
.hero-art .node { fill: var(--paper); stroke: #176b66; stroke-width: 2; }
.hero-art .node--signal { fill: var(--signal); stroke: var(--signal); }
.hero-art .spin, .hero-art .heart, .hero-art .ring {
  transform-box: view-box;
  transform-origin: 260px 260px;
}
.hero-art .spin-a { animation: spin 70s linear infinite; }
.hero-art .spin-b { animation: spin 90s linear infinite reverse; }
.hero-art .spin-c { animation: spin 120s linear infinite; }
.hero-art .ring { animation: spin 40s linear infinite reverse; }
.hero-art .heart { transform-origin: 260px 250px; animation: beat 1.6s ease-in-out infinite; }
.hero-art .pulse { stroke-dasharray: 100 100; animation: trace 2.4s linear infinite; }

.art-label {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1;
}
.art-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.art-label--top    { top: 2%;    left: 50%; transform: translateX(-50%); }
.art-label--right  { top: 50%;   right: -2%; transform: translateY(-50%); }
.art-label--bottom { bottom: 2%; left: 50%; transform: translateX(-50%); }
.art-label--left   { top: 50%;   left: -2%; transform: translateY(-50%); }

@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes beat  { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.07); } 28% { transform: scale(1.02); } }
@keyframes trace { from { stroke-dashoffset: 100; } to { stroke-dashoffset: -100; } }

/* 9. Film player --------------------------------------------------------- */
.film-frame {
  max-width: 960px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--night);
  box-shadow: var(--shadow-lg);
}
.film-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #091617;
}
.film-bar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  color: var(--on-night);
}
.film-play {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1.5px solid var(--mint);
  border-radius: 50%;
  background: transparent;
  color: var(--mint);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.film-play:hover { background: var(--mint); color: var(--night); }
.film-play svg { width: 16px; height: 16px; }
.film-play .icon-pause, .film-play.is-playing .icon-play { display: none; }
.film-play.is-playing .icon-pause { display: block; }
.film-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.film-meta strong { font-size: var(--fs-body); font-weight: 600; line-height: 1.3; }
.film-meta span { color: var(--on-night-muted); font-size: var(--fs-label); line-height: 1.3; }
.film-length {
  margin-left: auto;
  padding: var(--s-1) var(--s-3);
  border: 1px solid rgba(168, 220, 207, .35);
  border-radius: var(--radius-pill);
  color: var(--mint);
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
}

/* 10. Media & splits ----------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: var(--split-gap);
}
.split--top { align-items: start; }

.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tint-strong);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-3x2  { aspect-ratio: 3 / 2; }
.ratio-4x3  { aspect-ratio: 4 / 3; }
.ratio-4x5  { aspect-ratio: 4 / 5; }
.ratio-1x1  { aspect-ratio: 1 / 1; }
.focus-top  img, img.focus-top  { object-position: 50% 15%; }
.focus-high img, img.focus-high { object-position: 50% 28%; }

.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.mosaic .media { border-radius: var(--radius-sm); }

/* 11. Cards & grids ------------------------------------------------------ */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  height: 100%;
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.card p { color: var(--muted); font-size: 1rem; }
.card .link { margin-top: auto; padding-top: var(--s-4); }
a.card { transition: border-color .2s, box-shadow .2s, transform .2s; }
a.card:hover { border-color: var(--teal); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--text); }

.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--tint-strong);
  color: var(--teal);
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.step-num { color: var(--teal); font-size: var(--fs-label); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* Photo card: image on top, caption below — used by every gallery */
.photo-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.photo-card .media { border-radius: 0; }
.photo-card figcaption, .photo-card .card-body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); }
.photo-card figcaption strong { color: var(--ink); font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.photo-card figcaption span { color: var(--muted); font-size: var(--fs-small); line-height: 1.5; }
.photo-card .card-body { flex: 1; gap: var(--s-3); padding: var(--s-6); }
.photo-card .card-body p { color: var(--muted); font-size: 1rem; }
.card-label { color: var(--teal); font-size: var(--fs-label); font-weight: 600; }
.card-foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); margin-top: auto; padding-top: var(--s-3); }

.band-dark .photo-card { border-color: rgba(168, 220, 207, .18); background: rgba(255, 255, 255, .04); }
.band-dark .photo-card figcaption strong { color: var(--on-night); }

.tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 28px;
  padding: 0 var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--tint);
  color: var(--teal-dark);
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
}

/* 12. Page-specific blocks ----------------------------------------------- */

/* Inner-page hero: centred, same height rhythm on every page */
.page-hero {
  padding-block: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  background:
    radial-gradient(40rem 26rem at 50% 0%, rgba(168, 220, 207, .5), transparent 70%),
    var(--tint);
  text-align: center;
}
.page-hero .lede { margin: var(--s-5) auto 0; }
.page-hero .link-row { justify-content: center; }

/* Statement panel (centred, tinted) */
.panel {
  padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) clamp(1.5rem, 1rem + 4vw, 4.5rem);
  border-radius: var(--radius);
  background: var(--tint);
  text-align: center;
}
.panel h2 { font-size: var(--fs-h2-sm); }
.panel .lede { margin: var(--s-4) auto 0; font-size: var(--fs-body); }
.panel .link-row, .panel .actions { justify-content: center; margin-top: var(--s-6); }

/* Call-to-action band at the bottom of each page */
.cta-band { padding-block: clamp(3rem, 2rem + 3vw, 4.5rem); background: var(--tint-strong); }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); }
.cta-band .eyebrow { margin-bottom: var(--s-3); }
.cta-band-inner > div { flex: 1 1 auto; min-width: 0; }
.cta-band h2 { max-width: 26em; font-size: var(--fs-h2-sm); }

/* Closing call to action (home) */
.closing { text-align: center; background: var(--tint-strong); }
.closing .lede { margin: var(--s-5) auto var(--s-6); }
.cta-band .eyebrow, .closing .eyebrow { color: var(--teal-dark); }   /* keeps label contrast above 4.5:1 on the darker tint */
.cta-band .eyebrow::before, .closing .eyebrow::before { background: var(--teal-dark); }

/* Quote band (impact) */
.quote { text-align: center; }
.quote blockquote {
  max-width: 24em;
  margin: 0 auto;
  color: var(--on-night);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.875rem);
  font-style: italic;
  line-height: 1.25;
  letter-spacing: -.01em;
  text-wrap: balance;
}

/* Body systems list (science) */
.systems { border-top: 1px solid var(--line); }
.system {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 7.5rem;
  gap: var(--s-6);
  padding-block: var(--s-7);
  border-bottom: 1px solid var(--line);
}
.system-num { color: var(--teal); font-family: var(--font-serif); font-size: 2.5rem; font-style: italic; line-height: 1; }
.system-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.system-body p { max-width: 40em; color: var(--muted); }
.system-body .thumbs { align-self: stretch; margin-block: var(--s-3); }
.system .tag { justify-self: end; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.thumbs .media { border-radius: var(--radius-sm); }

/* Design process (projects) */
.process { margin: 0; padding: 0; list-style: none; }
.process-step { padding-top: var(--s-5); border-top: 2px solid var(--teal); }
.process-step h3 { margin: var(--s-2) 0 var(--s-2); font-size: 1.25rem; }
.process-step p { color: var(--muted); font-size: 1rem; }

/* Smart-shoe illustration panel (projects) */
.illustration { display: grid; place-items: center; background: var(--tint); }
.illustration svg { width: 78%; height: auto; }

/* Contact block (get involved) */
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  padding: clamp(2rem, 1.25rem + 3vw, 3.5rem);
  border-radius: var(--radius);
  background: var(--night);
  color: var(--on-night);
}
.contact h2 { color: var(--on-night); font-size: var(--fs-h2-sm); }
.contact p { margin-top: var(--s-3); color: var(--on-night-muted); }
.contact .eyebrow { margin-bottom: var(--s-3); color: var(--mint); }
.contact .eyebrow::before { background: var(--mint); }

/* 13. Footer ------------------------------------------------------------- */
.site-footer { background: var(--night-deep); color: var(--on-night-muted); }
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-6);
  padding-block: var(--s-8) var(--s-6);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--s-4); }
.site-footer .brand, .site-footer .brand:hover { color: var(--on-night); }
.site-footer .brand-mark { border-color: var(--mint); color: var(--on-night); }
.site-footer .brand-mark::after { border-color: var(--night-deep); }
.footer-brand p { font-size: var(--fs-small); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2) var(--s-5); }
.footer-links a { color: var(--on-night); font-size: var(--fs-small); text-decoration: none; }
.footer-links a:hover { color: var(--mint); text-decoration: underline; }
.footer-legal {
  padding-block: var(--s-5) var(--s-6);
  border-top: 1px solid rgba(169, 192, 186, .2);
  font-size: .8125rem;
}

/* 14. Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-1);
    padding: var(--s-3) var(--gutter) var(--s-5);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 16px 30px rgba(20, 48, 47, .08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { height: 48px; padding: 0 var(--s-4); font-size: 1rem; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-inner, .split { grid-template-columns: 1fr; }
  .hero-art { max-width: 400px; }
  .split .media { max-width: 640px; }
  .split--reverse-mobile > :first-child { order: 2; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .grid-3.grid--photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3.grid--photos > :last-child:nth-child(odd) { grid-column: auto; }
  .grid--photos figcaption { padding: var(--s-4); }
  /* A project card that spans the full row sits side by side: picture left, text right */
  .grid-3:not(.grid--photos) > .photo-card:last-child:nth-child(odd) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3:not(.grid--photos) > .photo-card:last-child:nth-child(odd) .media { aspect-ratio: auto; height: 100%; min-height: 240px; }
  .cta-band-inner, .contact { flex-direction: column; align-items: flex-start; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .system { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .system .tag { grid-column: 2; grid-row: 1; justify-self: start; }
  .system-body { grid-column: 2; }
  .system-num { grid-row: 1 / span 2; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .brand-mark { width: 40px; height: 40px; font-size: .875rem; }
  .brand-name strong { font-size: .8125rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-3 > :last-child:nth-child(odd) { grid-column: auto; }
  .grid--photos .ratio-4x5 { aspect-ratio: 4 / 3; }
  .hero-art { max-width: 340px; margin-top: var(--s-4); }
  .art-label { padding: 6px var(--s-3); font-size: .8125rem; }
  .art-label--right { right: 0; }
  .art-label--left { left: 0; }
  .section-head { margin-bottom: var(--s-7); }
  .film-bar { padding: var(--s-3) var(--s-4); gap: var(--s-3); }
  .film-length { display: none; }
  .thumbs { gap: var(--s-2); }
  .system { grid-template-columns: auto 1fr; align-items: center; gap: var(--s-4); }
  .system-num { grid-column: 1; grid-row: 1; font-size: 2rem; }
  .system .tag { grid-column: 2; grid-row: 1; justify-self: end; }
  .system-body { grid-column: 1 / -1; grid-row: 2; }
  .grid-3.grid--photos { grid-template-columns: 1fr; }
  .grid-3:not(.grid--photos) > .photo-card:last-child:nth-child(odd) { display: flex; }
  .grid-3:not(.grid--photos) > .photo-card:last-child:nth-child(odd) .media { aspect-ratio: 3 / 2; height: auto; min-height: 0; }
  .actions .button { flex: 1 1 auto; }
}

/* 15. Motion & accessibility -------------------------------------------- */
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.button:focus-visible, .site-nav a:focus-visible, .menu-toggle:focus-visible, .film-play:focus-visible { outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
