/* story.css — About/Story page
   Project rules: sharp edges only, no gradients, hex codes only in this :root block. */

:root {
  --alt: #F5F5F5;
  --ink: #111111;
  --deep-red: #400000;
  --focus-on-dark: #FFFFFF;
  --display-font: 'Archivo Black', 'Arial Black', sans-serif;
  --hero-scrim: rgba(0, 0, 0, 0.4);
  --overline-on-dark: rgba(255, 255, 255, 0.85);
  --hairline: #E6E6E6;
  --story-text: #45454B;        /* founder story body: readable on white (~9:1) */
  --story-lead: #1F1F23;        /* founder story first paragraph */
  --name-band: rgba(17, 17, 17, 0.72); /* solid band under the name on the phone portrait */
  --on-dark-text: rgba(255, 255, 255, 0.78);   /* body text on the black values band */
  --on-dark-line: rgba(255, 255, 255, 0.22);   /* hairlines on black */
  --on-dark-number: rgba(255, 255, 255, 0.45); /* outlined 01 / 02 on black */
}

* {
  border-radius: 0;
}

:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.story-hero :focus-visible {
  outline-color: var(--focus-on-dark);
}

main > section {
  font-family: var(--body-font-family);
  font-weight: 300;
}

.overline {
  display: block;
  margin: 0 0 1rem;
  font-family: var(--body-font-family);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.story-hero .overline {
  color: var(--overline-on-dark);
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head h2,
.founder h2,
.story-cta h2,
.values-band h2 {
  font-family: var(--display-font);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}

/* ---------- Hero ---------- */

.story-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--dark-color);
}

.story-hero__media {
  position: absolute;
  inset: 0;
}

.story-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 0%;
  display: block;
}

.story-hero__scrim {
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
}

.story-hero__text {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: clamp(140px, 22vh, 240px);
  padding-bottom: clamp(4rem, 12vh, 8rem);
  color: var(--focus-on-dark);
}

.story-hero h1 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  line-height: 1.04;
  margin: 0;
  max-width: 14ch;
  color: var(--white-color);
}

.story-hero__sub {
  margin: 1.5rem 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--white-color);
}

/* ---------- Founder (magazine spread) ----------
   Desktop: tall portrait on the left stays in view (sticky) while the story
   scrolls beside it; name at the top of the story column; first paragraph a
   step larger; one line pulled out big between the paragraphs; the brand
   sign-off as a bold closing line. Phone: see the 575px block below. */

.founder {
  padding: clamp(5rem, 11vw, 8rem) 0;
  background: var(--white-color);
  /* clip, not hidden: hidden would make this a scroll container and stop
     the sticky portrait from following the page */
  overflow: clip;
}

.founder__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "portrait head"
    "portrait copy";
  grid-template-rows: auto 1fr;
  column-gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}

.founder__portrait {
  grid-area: portrait;
  position: sticky;
  top: 110px; /* clear of the fixed navbar */
  margin: 0;
}

.founder__portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--alt);
}

.founder__meta {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 0.9rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--body-font-family);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.founder__meta-item {
  color: var(--story-text);
}

.founder__meta-item:first-child {
  color: var(--ink);
}

.founder__head {
  grid-area: head;
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--hairline);
}

.founder__head .overline {
  display: block;
}

.founder h2 {
  margin: 0.6rem 0 0;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}

/* Only on the phone (the portrait caption carries it on desktop) */
.founder__head-meta {
  display: none;
}

.founder__copy {
  grid-area: copy;
  max-width: 60ch;
}

.founder__copy .founder__p {
  margin: 0 0 1.4rem;
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--story-text);
  /* justified on every width; hyphenation (html lang="en") keeps the
     word spacing even on narrow phone columns */
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.founder__copy .founder__p--lead {
  font-size: clamp(1.12rem, 1.5vw, 1.28rem);
  line-height: 1.7;
  color: var(--story-lead);
}

/* Pull quote: big display type on a maroon rule, between the paragraphs */
.founder__copy .founder__pull {
  margin: clamp(2.25rem, 4.5vw, 3.25rem) 0;
  padding-left: clamp(1rem, 2vw, 1.5rem);
  border-left: 3px solid var(--deep-red);
  max-width: 16ch;
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Sign-off: the brand line as a bold closing statement */
.founder__signoff {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  border: 0;
}

.founder__signoff::before {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  margin-bottom: 1.25rem;
  background: var(--deep-red);
}

.founder__signoff p {
  margin: 0;
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
}

.founder__signoff p span {
  display: block;
}

.founder__copy .founder__sig {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--story-text);
}

/* ---------- Process ---------- */

.process {
  padding: clamp(4.5rem, 10vw, 7rem) 0;
  background: var(--alt);
}

.process__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.step img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.process__hint {
  display: none;
}

.step__n {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--display-font);
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  line-height: 1;
  color: var(--primary-color);
}

.step h3 {
  margin: 0.6rem 0 0;
  font-family: var(--display-font);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--ink);
}

.step p {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
  text-align: justify;
  hyphens: auto;
}

/* ---------- What We Stand For ---------- */

.values-band {
  padding: clamp(5rem, 12vw, 8.5rem) 0;
  background: var(--ink);
}

.values-band__head {
  max-width: 46rem;
}

.values-band .overline {
  color: var(--overline-on-dark);
}

.values-band h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--white-color);
  text-wrap: balance;
}

/* Two numbered points side by side, separated by a hairline */
.values-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 6vw, 5rem);
  margin: clamp(3rem, 7vw, 4.5rem) 0 0;
  padding: 0;
}

.values-list__item {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--on-dark-line);
}

/* Big outlined number */
.values-list__n {
  display: block;
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--on-dark-number);
}

.values-list__title {
  margin: 1.25rem 0 0;
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--white-color);
}

.values-list__text {
  margin: 1rem 0 0;
  max-width: 44ch;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--on-dark-text);
}

/* The promise, as a closing line under Barry's eye */
.values-list__quote {
  margin: 1.5rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--white-color);
  max-width: 22ch;
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.2;
  color: var(--white-color);
}

/* ---------- Next step (CTA) ---------- */

.story-cta {
  padding: clamp(4rem, 9vw, 6.5rem) 0;
  background: var(--alt);
  border-top: 1px solid var(--hairline);
}

.story-cta__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  flex-wrap: wrap;
}

.story-cta__copy {
  max-width: 44rem;
}

.story-cta h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-wrap: balance;
}

.story-cta p {
  margin: 1rem 0 0;
  max-width: 48ch;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--p-color);
}

.story-cta__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.story-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  background: var(--deep-red);
  border: 1px solid var(--deep-red);
  color: var(--white-color);
  font-family: var(--body-font-family);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.story-cta__btn:hover,
.story-cta__btn:focus-visible {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white-color);
}

.story-cta__link {
  font-family: var(--body-font-family);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.story-cta__link:hover,
.story-cta__link:focus-visible {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ---------- Reveal (only when JS is on) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  /* Founder: one narrow column, phone-style (name on the portrait) */
  .founder__grid {
    max-width: 560px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "portrait"
      "copy";
    grid-template-rows: auto auto;
  }

  .founder__portrait {
    position: relative;
    top: auto;
    margin-bottom: 2.25rem;
  }

  /* the caption strip moves into the name band */
  .founder__meta {
    display: none;
  }

  /* Name band across the bottom of the portrait (solid, no gradient) */
  .founder__head {
    grid-area: portrait;
    align-self: end;
    z-index: 2;
    margin: 0 0 2.25rem;
    padding: 1.1rem 1.25rem 1.2rem;
    border: 0;
    background: var(--name-band);
  }

  .founder__head .overline {
    color: var(--overline-on-dark);
  }

  .founder h2 {
    margin-top: 0.35rem;
    font-size: clamp(2.1rem, 9vw, 3rem);
    color: var(--white-color);
  }

  .founder__head-meta {
    display: block;
    margin: 0.55rem 0 0;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--overline-on-dark);
  }

  .founder__copy {
    max-width: none;
  }

  .values-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575px) {
  .values-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .process__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* ---------- Phone optimisation (whole page) ----------
     Shorter hero so the story starts on the first screen, phone-sized
     section spacing, the four steps as one swipeable row, and full-width
     52px tap targets in the closing call to action. */
  .story-hero {
    min-height: 72vh;
    min-height: 72svh;
  }

  .story-hero__text {
    padding-top: 120px;
    padding-bottom: 2.75rem;
  }

  .founder {
    padding: 3rem 0 3.5rem;
  }

  .process {
    padding: 3.5rem 0 3rem;
  }

  .values-band {
    padding: 3.75rem 0;
  }

  .story-cta {
    padding: 3rem 0 3.5rem;
  }

  .section-head {
    margin-bottom: 1.5rem;
  }

  .process__hint {
    display: block;
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--story-text);
  }

  /* How it's made: swipe row, next card peeking in from the right.
     The row runs to the screen edges; the first card lines up with the
     page text. */
  .process__grid {
    display: flex;
    gap: 14px;
    margin: 0 calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    padding: 0 calc(var(--bs-gutter-x, 1.5rem) * 0.5) 0.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .process__grid::-webkit-scrollbar {
    display: none;
  }

  .step {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .step__n {
    margin-top: 1rem;
    font-size: 1.6rem;
  }

  /* Closing call to action: two full-width, thumb-sized buttons */
  .story-cta__inner {
    gap: 1.75rem;
  }

  .story-cta__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .story-cta__btn,
  .story-cta__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 1rem;
    text-align: center;
  }

  .story-cta__link {
    border: 1px solid var(--ink);
  }

  /* Founder: tighter on small phones */
  .founder__copy .founder__p {
    font-size: 1rem;
    line-height: 1.8;
  }

  .founder__copy .founder__pull {
    font-size: clamp(1.6rem, 8vw, 2rem);
  }

  /* "BUILT FOR THE CULTURE." is ~14.6em wide: size it to the column so each
     of the two lines stays on one line down to 320px */
  .founder__signoff p {
    font-size: min(calc((100vw - 2.5rem) / 15), 2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
