/*
  HOUSEFOX AI styles. Written phone-first: base rules are for phones, then
    @media (min-width: 700px)  tablets and up
    @media (min-width: 1024px) desktops
  Sections follow the order of index.html. Edit the rule for an element where it is; don't add
  overrides at the end.
*/

/* Fonts are served from site/fonts so the page doesn't wait on Google Fonts. */
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  /* Colours */
  --bg: #0e0e0e; /* also the theme-color in the <head> of each page */
  --bg-alt: #131313; /* every other section */
  --surface: #171717; /* cards and panels */
  --line: #2b2b2b;
  --line-strong: #4a4a45;
  --text: #f2f1ed;
  --text-2: #b4b4ae; /* paragraphs */
  --text-3: #8f8f88; /* labels; at least 4.5:1 on every dark background */
  --heading-muted: #7a7a75; /* the grey second line of headings */
  --accent: #c9a24a; /* brass, the node in the fox logo: numbers, bullets, main buttons. The logo images
                       in assets/ have it baked in (see AGENTS.md). */
  --accent-text: #c9a24a; /* accent for small text; darker in light sections for contrast */
  --accent-on-light: #9e7e35; /* darker brass, 3:1 on light backgrounds (paper, selected tab) */

  /* Type scale. Every text size on the page is one of these; change a size here, not per element. */
  --size-label: 12px; /* uppercase eyebrows and labels */
  --size-small: 14px; /* navigation, buttons, lists, metadata */
  --size-body: 16px; /* paragraphs */
  --size-lead: clamp(17px, 1.4vw, 20px); /* intro paragraphs and questions */
  --size-title: clamp(22px, 2vw, 28px); /* card, panel and step titles */
  --size-heading: clamp(34px, 4vw, 56px); /* section headings */
  --size-display: clamp(38px, 10.5vw, 52px); /* hero, manifesto and closing headlines */

  /* Layout. Every full-width block uses --inset as its side padding, so all content lines up on one
     column that is at most --max-width wide. */
  --max-width: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --inset: max(var(--gutter), (100% - var(--max-width)) / 2);
  --section-space: clamp(72px, 10vw, 128px);
  --header-height: 64px;
}
@media (min-width: 700px) {
  :root {
    --size-display: clamp(38px, 6.4vw, 88px);
  }
}
@media (min-width: 1024px) {
  :root {
    --size-display: clamp(38px, 5.2vw, 88px);
    --header-height: 80px;
  }
}

/* Light sections. Adding class "paper" to a section swaps the colour variables above, so every
   component inside it turns light without rules of its own. */
.paper {
  --bg: #e7e7df;
  --surface: #f3f3ee;
  --line: #cfcfc5;
  --line-strong: #a9a99f;
  --text: #171717;
  --text-2: #4f4f49;
  --text-3: #5f5f58;
  --heading-muted: #74746d;
  --accent: var(--accent-on-light);
  --accent-text: #7a6129; /* 4.5:1 on the light backgrounds */
  background: var(--bg);
  color: var(--text);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.modal-open {
  overflow: hidden;
}
img {
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
/* Links inside a sentence are underlined so they stand out from the text around them. */
p a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}
p,
h1,
h2,
h3,
ul {
  margin: 0;
}
p {
  text-wrap: pretty;
}
h1,
h2,
h3 {
  font-family: "Manrope", sans-serif;
  font-weight: 500;
}
h1 {
  font-size: var(--size-display);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
h2 {
  font-size: var(--size-heading);
  line-height: 1.12;
  letter-spacing: -0.04em;
}
h3 {
  font-size: var(--size-title);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.muted {
  color: var(--heading-muted);
}
.skip {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 16px;
  padding: 10px 14px;
  background: #fff;
  color: #000;
}
.skip:focus {
  top: 12px;
}

/* Uppercase labels share one size, weight and letter spacing. */
.eyebrow,
.section-label,
.hero-foot,
.service-top,
.positioning div > span,
.measure > span,
.steps article > span,
.team-founder,
.footer-top > a:last-child,
.footer-bottom,
.results-kicker,
.results-section-heading,
.study-client,
.timing-label,
.case-eyebrow,
.case-figure figcaption,
.case-slip span,
.case-slip small {
  font-size: var(--size-label);
  font-weight: 550;
  letter-spacing: 0.14em;
  color: var(--text-3);
}

/* Line icons from the sprite at the top of index.html. */
.icon {
  flex: none;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The brass ring from the fox logo, used as the bullet for lists. */
.node-list li::before,
.services li::before,
.metrics li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}

/* The one arrow shape, drawn from the #arrow symbol at the top of index.html. */
.arrow-icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.3em;
  flex-shrink: 0;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 0.2s;
}
.arrow-icon.down {
  rotate: 90deg;
}
.arrow-icon.up {
  rotate: -90deg;
}
.arrow-icon.back {
  rotate: 180deg;
}

/* Buttons. On phones they span the full width. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  border: 1px solid transparent;
  font-size: var(--size-small);
  font-weight: 550;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.button:hover .arrow-icon,
.header-cta:hover .arrow-icon {
  translate: 3px 0;
}
.button:disabled {
  opacity: 0.6;
  cursor: progress;
}
.primary {
  background: var(--accent);
  color: #111;
}
.primary:hover {
  background: color-mix(in srgb, var(--accent), #fff 15%);
}
.outline {
  background: transparent;
  border-color: var(--line-strong);
}
.outline:hover {
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
@media (min-width: 700px) {
  .button {
    width: auto;
    white-space: nowrap;
  }
}

/* Header: stays at the top. Transparent over the hero, solid once the page scrolls. Results pages
   have no hero, so it's solid there from the start. */
.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-height);
  padding-inline: var(--inset);
  border-bottom: 1px solid transparent;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.site-header.is-scrolled,
.site-header.menu-open,
.results-page .site-header {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  font-family: "Manrope", sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
}
.brand-fox {
  display: block;
  width: 32px;
  height: auto;
  margin-right: 9px;
}
.ai {
  align-self: flex-start;
  color: var(--accent);
  margin: 2px 0 0 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #686865;
  background: transparent;
  font-size: var(--size-small);
}
.header-cta:hover {
  background: #fff;
  color: #000;
}
.menu-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: none;
}
.menu-toggle span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s;
}
.menu-toggle span:first-child {
  transform: translateY(-4px);
}
.menu-toggle span:last-child {
  transform: translateY(4px);
}
.menu-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}
/* Below 1024px the menu is a panel that drops down under the header. */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  padding: 8px var(--inset) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.menu-open .site-nav {
  display: flex;
}
.site-nav a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--size-lead);
}
.site-nav a[aria-current] {
  color: var(--accent);
}
/* The smallest phones don't have room for the header button; the hero button is right below. */
@media (max-width: 359px) {
  .header-cta {
    display: none;
  }
}
@media (min-width: 1024px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
  }
  .brand {
    margin-right: 0;
    font-size: 22px;
  }
  .brand-fox {
    width: 40px;
    margin-right: 12px;
  }
  .ai {
    margin: 3px 0 0 5px;
    font-size: 12px;
  }
  .site-nav,
  .menu-open .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 32px;
    padding: 0;
    background: none;
    border: 0;
  }
  .site-nav a {
    padding: 10px 0;
    border: 0;
    font-size: var(--size-small);
    color: var(--text-2);
  }
  .site-nav a:hover {
    color: var(--text);
  }
  .header-cta {
    justify-self: end;
    gap: 20px;
    padding: 0 20px;
  }
  .menu-toggle {
    display: none;
  }
}
/* Six nav links only fit between the logo and the button with tighter gaps below 1200px. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .site-header,
  .site-nav,
  .menu-open .site-nav {
    gap: 18px;
  }
}

/* Hero. Phones and tablets: the animation sits in a band at the top with the copy below it.
   Desktops: the copy sits on the left and the animation on the right, and the hero stays pinned
   while the animation follows the scroll (hero-scroll.js adds .is-scrubbing). */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--header-height) var(--inset) 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #1b1b1b 0%, #161616 30%, #121212 60%, #111 100%);
}
.hero > :not(.hero-media) {
  position: relative;
}
.hero-media {
  position: relative;
  margin-inline: calc(-1 * var(--gutter));
  aspect-ratio: 16 / 10;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.hero-media img,
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%; /* the drawing sits about a quarter of the way down the portrait video */
}
.hero-media video {
  opacity: 0;
  transition: opacity 0.3s;
}
.hero-media.has-video video {
  opacity: 1;
}
.hero-content {
  padding: 8px 0 40px;
}
.hero-content > .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--text-2);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
h1 > span {
  color: #a7a7a3;
}
.hero-lead {
  max-width: 30em;
  margin-top: 20px;
  color: var(--text-2);
  font-size: var(--size-lead);
  line-height: 1.6;
}
.hero-content .button {
  margin-top: 32px;
}
.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid #ffffff21;
}
.hero-foot > span {
  max-width: 190px;
}
.hero-foot a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-align: right;
}
@media (min-width: 700px) {
  .hero-foot > span {
    max-width: none;
  }
}
@media (min-width: 1024px) {
  .hero {
    height: 100svh;
    min-height: 680px;
    padding-top: calc(var(--header-height) + clamp(56px, 12svh, 150px));
    padding-bottom: 28px;
  }
  /* The animation fills the right 60% of the page column, beside the copy. */
  .hero-media {
    position: absolute;
    inset: 0 var(--inset) 0 calc(var(--inset) + (100% - 2 * var(--inset)) * 0.4);
    margin: 0;
    aspect-ratio: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  }
  /* Show the right half of the 16:9 video, where the drawing is, at the hero's full height. */
  .hero-media img,
  .hero-media video {
    inset: 50% auto auto -100%;
    width: 200%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: fill;
    translate: 0 -50%;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
  }
  .hero-content {
    max-width: 40%;
    margin-block: 0 auto;
  }
  .hero-scroll.is-scrubbing {
    height: 260svh;
  }
  .hero-scroll.is-scrubbing .hero {
    position: sticky;
    top: 0;
    min-height: 0;
  }
}

/* Principles strip under the hero */
.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  padding: 28px var(--inset);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--text);
}
.principles span::before {
  content: "+";
  margin-right: 10px;
  color: var(--accent);
}
@media (min-width: 700px) {
  .principles {
    display: flex;
    justify-content: space-between;
    font-size: var(--size-body);
  }
}

/* Shared section layout */
.section {
  padding: var(--section-space) var(--inset);
  border-bottom: 1px solid var(--line);
}
.section-label {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 6vw, 64px);
}
.section-label > span:first-child,
.faq .eyebrow,
.manifesto .eyebrow,
.final-cta .eyebrow,
.policy .eyebrow {
  color: var(--accent-text);
}
.section-label > span + span {
  display: none; /* the tagline only fits from tablets up */
}
.section-heading {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-heading > p {
  max-width: 34ch;
  color: var(--text-2);
}
@media (min-width: 700px) {
  .section-label > span + span {
    display: inline;
  }
  .section-heading > .button {
    align-self: flex-start;
  }
}
@media (min-width: 1024px) {
  .section-heading {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 48px;
  }
}

/* 01 The opportunity */
.intro-grid {
  display: grid;
  gap: 32px;
}
.intro-copy {
  display: grid;
  gap: 20px;
  max-width: 460px;
  color: var(--text-2);
}
.intro-copy .large-copy {
  font-size: var(--size-lead);
  line-height: 1.5;
  color: var(--text);
}
.node-list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.node-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--size-lead);
  color: var(--text);
}
.text-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  margin-top: 8px;
  border-bottom: 1px solid var(--line-strong);
  font-size: var(--size-small);
  color: var(--text);
}
.positioning {
  display: flex;
  flex-direction: column;
  gap: 12px 64px;
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.positioning strong {
  display: block;
  color: var(--accent);
  font-family: "Manrope", sans-serif;
  font-size: var(--size-heading);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.positioning p {
  font-size: var(--size-lead);
  color: var(--text-2);
}
@media (min-width: 700px) {
  .intro-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(40px, 7vw, 96px);
  }
  .positioning {
    flex-direction: row;
    align-items: center;
  }
}

/* 02 How we help */
.services {
  display: grid;
  gap: 16px;
}
/* Each card is a column so the lists line up along the bottom whatever the paragraph length. */
.services article {
  display: flex;
  flex-direction: column;
  padding: 28px 24px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.service-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.service-top .icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
}
.services h3 {
  margin-bottom: 16px;
}
.services p {
  margin-bottom: 24px;
  color: var(--text-2);
}
.services ul {
  margin-top: auto;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: var(--size-small);
  color: var(--text-2);
}
.services li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
@media (min-width: 1024px) {
  .services {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .services article {
    padding: 32px;
  }
}

/* 03 Where AI gets to work */
.opportunity-layout {
  display: grid;
  gap: 20px;
}
/* Phones and tablets: the tabs are a row of chips that scrolls sideways, edge to edge. */
.tabs {
  display: flex;
  gap: 8px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs button {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  scroll-snap-align: start;
  scroll-margin-inline: var(--gutter);
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: var(--size-small);
  color: var(--text-2);
  white-space: nowrap;
}
.tabs .icon {
  width: 20px;
  height: 20px;
}
.tabs button[aria-selected="true"] {
  background: var(--text);
  border-color: var(--text);
  color: #111;
}
.tabs button[aria-selected="true"] .icon {
  color: var(--accent-on-light);
}
.opportunity-panel {
  padding: 28px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
}
.opportunity-panel h3 {
  margin: 20px 0 14px;
}
.opportunity-panel > p {
  max-width: 480px;
  color: var(--text-2);
}
/* Phones: the workflow steps stack, with arrows pointing down. */
.workflow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 28px 0;
  font-size: var(--size-small);
  text-align: center;
}
.workflow > span {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
}
.workflow > .arrow-icon {
  align-self: center;
  width: 22px;
  height: 22px;
  rotate: 90deg;
  color: var(--accent);
}
.workflow .flow-ai {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
  font-weight: 550;
}
.measure {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}
.metrics li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  font-size: var(--size-small);
}
@media (min-width: 700px) {
  .opportunity-panel {
    padding: 36px 40px;
  }
  .workflow {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .workflow > .arrow-icon {
    rotate: none;
  }
}
@media (min-width: 1024px) {
  .opportunity-layout {
    grid-template-columns: 0.8fr 1.3fr;
    gap: 64px;
    align-items: start;
  }
  .tabs {
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .tabs button {
    gap: 16px;
    min-height: 0;
    padding: 22px 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--size-body);
    text-align: left;
    white-space: normal;
  }
  .tabs button:hover {
    background: #191919;
  }
  .tabs button[aria-selected="true"] {
    background: var(--surface);
    border-bottom: 2px solid var(--accent);
    color: var(--text);
  }
  .tabs button[aria-selected="true"] .icon {
    color: var(--accent);
  }
}

/* 04 The engagement: the steps sit on a line with a brass node each, like the path in the hero.
   Phones: a vertical line down the left. Tablets and up: a line along the top of each row. */
.steps {
  position: relative;
  display: grid;
  gap: 36px;
  padding-left: 40px;
}
.steps::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 1px;
  background: var(--line-strong);
}
.steps article {
  position: relative;
}
.steps article::before {
  content: "";
  position: absolute;
  top: 1px;
  left: -40px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.steps article > span {
  color: var(--accent-text);
}
.steps h3 {
  margin: 14px 0 10px;
}
.steps p {
  color: var(--text-2);
}
@media (min-width: 700px) {
  .steps {
    grid-template-columns: 1fr 1fr;
    gap: 48px 0;
    padding-left: 0;
  }
  .steps::before {
    display: none;
  }
  .steps article {
    padding: 36px 32px 0 0;
    border-top: 1px solid var(--line-strong);
  }
  .steps article::before {
    top: -9px;
    left: 0;
  }
}
@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 05 The team */
.team-grid {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}
.team-card {
  display: flex;
  flex-wrap: wrap; /* on phones the bio starts a new line under the photo and name */
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.team-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, #2a2a2a, #161616);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  font-family: "Manrope", sans-serif;
  font-size: var(--size-lead);
  color: var(--text-2);
}
.team-card h3 {
  margin-bottom: 4px;
}
.team-founder {
  margin-bottom: 2px;
  text-transform: uppercase;
}
.team-role {
  font-size: var(--size-small);
  color: var(--text-2);
}
.team-bio {
  width: 100%;
  font-size: var(--size-small);
  color: var(--text-2);
}
@media (min-width: 700px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .team-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 28px;
  }
  .team-avatar {
    width: 88px;
    height: 88px;
    font-size: var(--size-title);
  }
}

/* The Housefox perspective (light section) */
.manifesto h2 {
  margin: 40px 0;
  font-size: var(--size-display);
  line-height: 1.08;
}
.manifesto-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}
.manifesto-fox {
  flex: none;
  width: 48px;
  height: auto;
}
.manifesto-bottom p {
  max-width: 440px;
  color: var(--text-2);
}
@media (min-width: 700px) {
  .manifesto h2 {
    margin: 48px 0 56px;
  }
  .manifesto-bottom {
    align-items: flex-end;
  }
  .manifesto-fox {
    width: 64px;
  }
}

/* 06 Questions */
.faq {
  display: grid;
  gap: 32px;
}
.faq h2 {
  margin-top: 24px;
}
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list details:first-child {
  border-top: 1px solid var(--line);
}
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  list-style: none;
  cursor: pointer;
  font-size: var(--size-lead);
}
summary::-webkit-details-marker {
  display: none;
}
summary span {
  flex: none;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  transition: rotate 0.2s;
}
details[open] summary span {
  rotate: 45deg;
}
details p {
  padding: 0 32px 24px 0;
  line-height: 1.75;
  color: var(--text-2);
}
@media (min-width: 1024px) {
  .faq {
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
  }
}

/* Closing call to action, with the resolved path from the hero animation as its picture. */
.final-cta {
  position: relative;
  background: radial-gradient(ellipse at 85% 30%, #1f1a14, #141414 60%);
}
.cta-path {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin-bottom: 36px;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.5;
}
.cta-path circle {
  fill: var(--accent);
  stroke: none;
  filter: drop-shadow(0 0 8px var(--accent));
}
.cta-path rect {
  fill: #2c2c2a;
  stroke: none;
}
.final-cta .serif {
  color: var(--accent);
}
.final-cta h2 {
  margin: 32px 0;
  font-size: var(--size-display);
  line-height: 1.02;
}
.serif {
  font-family: Georgia, serif;
  font-weight: 400;
  font-style: italic;
}
.final-cta > div {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.final-cta p {
  color: var(--text-2);
}
@media (min-width: 1024px) {
  .cta-path {
    position: absolute;
    top: calc(var(--section-space) + 24px);
    right: var(--inset);
    width: 420px;
    margin: 0;
  }
}
@media (min-width: 700px) {
  .final-cta > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

/* Footer */
footer {
  padding: 40px var(--inset) 16px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  padding-bottom: 24px;
}
.footer-top p {
  font-size: var(--size-small);
  color: var(--text-3);
}
.footer-top > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-left: auto;
  color: var(--text);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

/* Contact form. Full screen on phones, a centred panel from tablets up. */
dialog {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 56px 20px 32px;
  background: var(--surface);
  color: var(--text);
  border: 0;
}
dialog::backdrop {
  background: #000c;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
dialog h2 {
  margin: 20px 0 12px;
  font-size: var(--size-title);
  letter-spacing: -0.02em;
}
dialog > p {
  color: var(--text-2);
}
.close-dialog {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  font-size: 30px;
  line-height: 1;
}
form {
  margin-top: 24px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  font-size: var(--size-small);
}
.form-row {
  display: grid;
  gap: 0 16px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  background: #222;
  border: 1px solid #484848;
  border-radius: 0;
  font-size: var(--size-body);
}
textarea {
  resize: vertical;
}
.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-note {
  margin: 8px 0 20px;
  font-size: var(--size-small);
  color: var(--text-3);
}
#form-status {
  margin-top: 15px;
  font-size: var(--size-small);
  color: var(--text-2);
}
@media (min-width: 700px) {
  dialog {
    width: min(610px, 100% - 32px);
    height: auto;
    max-height: 90svh;
    margin: auto;
    padding: 44px;
    border: 1px solid #555;
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Privacy page (privacy.html): the logo, one column of text, then the footer. */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-height);
  padding-inline: var(--inset);
  border-bottom: 1px solid var(--line);
}
.page-header > a:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--size-small);
  color: var(--text-2);
}
.policy {
  padding: clamp(48px, 8vw, 96px) var(--inset) var(--section-space);
  color: var(--text-2);
}
.policy > * {
  max-width: 680px;
}
.policy > * + * {
  margin-top: 12px;
}
.policy h1 {
  margin: 20px 0 24px;
  font-size: var(--size-heading);
  color: var(--text);
}
.policy h2 {
  margin: 48px 0 0;
  font-size: var(--size-title);
  letter-spacing: -0.02em;
  color: var(--text);
}
.policy-lead {
  font-size: var(--size-lead);
  color: var(--text);
}
.policy ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}
.policy li::marker {
  color: var(--accent);
}
.policy strong {
  font-weight: 600;
  color: var(--text);
}

/* Results pages (results/): a list of case studies, then a page for each one. They use the home
   page's header, footer and buttons, and their buttons link to its contact form at /#contact. */
.results-wrap,
.results-contact,
.case-top,
.case-work,
.case-year,
.case-end {
  padding-inline: var(--inset);
}
.results-kicker,
.results-section-heading,
.study-client,
.timing-label,
.case-eyebrow,
.case-figure figcaption,
.case-slip span,
.case-slip small {
  text-transform: uppercase;
}
.results-period,
.study-after,
.study-client span,
.study-link .arrow-icon,
.case-top h1 span,
.case-metrics div:last-child strong,
.study-feature h3 a:hover,
.study-link:hover,
.case-back:hover {
  color: var(--accent);
}

/* The list of case studies (results/index.html) */
.results-intro {
  display: grid;
  align-items: end;
  gap: 20px;
  padding-block: calc(var(--header-height) + clamp(36px, 5vw, 78px)) clamp(30px, 4vw, 56px);
}
.results-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-2);
}
.results-deck {
  max-width: 33ch;
  font-size: var(--size-lead);
  color: var(--text-2);
}
.results-collection {
  padding-bottom: clamp(48px, 6vw, 88px);
  border-top: 1px solid var(--line-strong);
}
.results-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 19px 0;
}
.results-section-heading h2 {
  font: inherit;
  letter-spacing: inherit;
  color: var(--text);
  white-space: nowrap;
}
.results-section-heading > span {
  text-align: right;
}
.study-feature {
  display: grid;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.study-image {
  grid-row: 1; /* the photo sits above the text at every width */
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.study-image img {
  display: block;
  width: 100%;
  height: auto;
}
.study-info {
  min-width: 0;
  padding: clamp(24px, 3.4vw, 56px);
}
.study-client {
  color: var(--text-2);
}
.study-client span {
  padding: 0 4px;
}
.study-feature h3 {
  max-width: 17ch;
  margin-top: 16px;
  font-size: var(--size-heading);
  line-height: 1.09;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.study-summary {
  max-width: 47ch;
  margin-top: 16px;
  color: var(--text-2);
}
.study-timing {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(16px, 2.5vw, 36px);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.study-number {
  font-family: "Manrope", sans-serif;
  font-size: var(--size-heading);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.065em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.study-number small {
  font-size: 0.47em;
  letter-spacing: -0.04em;
}
.timing-label {
  display: block;
  margin-top: 6px;
  color: var(--text-2);
}
.timing-arrow {
  margin-top: 0.2em;
  font-size: var(--size-title);
  color: var(--text-3);
}
.study-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  margin-top: 16px;
  font-size: var(--size-small);
  font-weight: 650;
}
@media (min-width: 700px) {
  .results-intro {
    grid-template-columns: 1fr minmax(260px, 0.64fr);
  }
  .results-deck {
    justify-self: end;
    margin-bottom: 4px;
  }
  .study-info {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    column-gap: clamp(30px, 6vw, 90px);
  }
  .study-client,
  .study-feature h3,
  .study-summary,
  .study-link {
    grid-column: 1;
  }
  .study-link {
    justify-self: start;
  }
  .study-timing {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: center;
    margin: 0;
  }
}

/* One case study (results/NAME/index.html) */
.case-top {
  padding-top: calc(var(--header-height) + 30px);
  padding-bottom: clamp(56px, 7vw, 100px);
}
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: clamp(28px, 5vw, 64px);
  font-size: var(--size-small);
  color: var(--text-2);
}
.case-eyebrow {
  margin-bottom: 16px;
  color: var(--accent-text);
}
.case-top h1 {
  max-width: 22ch;
}
.case-lead,
.case-work-copy p:not(.case-eyebrow) {
  max-width: 62ch;
  margin-top: 24px;
  font-size: var(--size-lead);
  color: var(--text-2);
}
.case-work {
  display: grid;
  align-items: center;
  gap: clamp(30px, 6vw, 96px);
  padding-block: clamp(52px, 7vw, 100px);
}
.case-work-copy h2 {
  max-width: 16ch;
}
/* A panel a shade darker than the light section around it. */
.case-figure {
  margin: 0;
  padding: clamp(22px, 3vw, 48px);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg), var(--text) 5%);
}
.case-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.case-figure figcaption small {
  font-size: var(--size-label);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
}
.case-slip {
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.case-slip span {
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
}
.case-slip strong {
  display: block;
  margin-block: 9px;
  font-family: "Manrope", sans-serif;
  font-size: var(--size-lead);
  font-weight: 550;
  line-height: 1.35;
}
.case-slip small {
  display: block;
  letter-spacing: 0.06em;
}
.case-join {
  display: block;
  margin: 8px auto;
  font-size: var(--size-title);
  color: var(--accent);
}
.case-print {
  border-left: 3px solid var(--accent);
}
.case-year {
  padding-block: clamp(50px, 7vw, 104px);
}
.case-metrics {
  display: grid;
  gap: 24px;
  margin-block: 34px;
  padding-block: 25px;
  border-block: 1px solid var(--line);
}
.case-metrics strong,
.case-metrics span {
  display: block;
}
.case-metrics strong {
  font-family: "Manrope", sans-serif;
  font-size: var(--size-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.055em;
}
.case-metrics span {
  color: var(--text-2);
}
.case-note {
  max-width: 62ch;
  font-size: var(--size-small);
  color: var(--text-2);
}
@media (min-width: 700px) {
  .case-work {
    grid-template-columns: 1.04fr 0.96fr;
  }
  .case-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* The closing band on both Results pages: a question and the contact button. */
.results-contact,
.case-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: clamp(40px, 5.5vw, 80px);
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}
.case-end h2 {
  max-width: 17ch;
}

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