/* jamesphillips.io */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2-variations"), url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader.woff2") format("woff2-variations"), url("../fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --paper: #ffffff;
  --mist: #eef3f7;
  --ink: #0c1e36;
  --text: #2a3a4d;
  --slate: #56667a;
  --line: #d5dee8;
  --ruby: #a01842;
  --focus: #a01842;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --wrap: 75rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--ruby) 55%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--ruby); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 20; font-family: var(--display); }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header:has(+ main) { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; }
.wordmark { font-family: var(--display); font-weight: 650; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.site-header ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-header nav a { font-family: var(--display); font-size: 1rem; color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--ruby); }
.site-header .nav-cta { border: 1.5px solid var(--ink); border-radius: 999px; padding: .45rem 1.1rem; }
.site-header .nav-cta:hover { background: var(--ink); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.0625rem; font-weight: 550;
  min-height: 3rem; padding: .7rem 1.5rem; border-radius: 999px;
  border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--mist); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1b3456; color: #fff; }
.text-link { font-family: var(--display); font-weight: 550; font-size: 1.0625rem; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.38fr);
  align-items: stretch;
  min-height: min(calc(100svh - 4.25rem), 52rem);
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  align-self: center;
  padding: 3.5rem clamp(1.5rem, 4vw, 4rem) 3.5rem max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.byline { display: flex; align-items: center; gap: .9rem; font-family: var(--display); font-size: 1.0625rem; line-height: 1.35; color: var(--slate); margin-bottom: 2rem; max-width: 30rem; }
.byline p { margin: 0; }
.byline img { width: 3.25rem; height: 3.25rem; border-radius: 50%; object-fit: cover; flex: none; }
.byline-name { color: var(--ink); font-weight: 600; }
.byline a { color: var(--slate); }
.hero h1 {
  font-size: clamp(3.25rem, 7.4vw, 7.25rem);
  line-height: .92;
  letter-spacing: -0.032em;
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  margin-bottom: 2rem;
}
.lede { font-size: clamp(1.1875rem, 1.5vw, 1.375rem); line-height: 1.55; max-width: 32em; color: var(--text); margin-bottom: 1rem; }
.pilot-note { font-family: var(--display); font-size: 1rem; font-weight: 550; color: var(--ink); margin-bottom: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Ruby's stage: approved still, plus one embedded frame when an approved embed is configured */
.ruby-stage { position: relative; margin: 0; overflow: hidden; background: var(--mist); min-height: 24rem; }
.ruby-stage:focus { outline: none; }
.ruby-stage:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ruby-still { margin: 0; position: absolute; inset: 0; }
.ruby-still img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 30%; }
.ruby-still figcaption {
  position: absolute; left: 1.5rem; bottom: 1.5rem;
  display: grid; gap: .1rem;
  background: rgba(255,255,255,.94);
  padding: 1rem 1.25rem 1.05rem;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(12,30,54,.14);
  font-family: var(--display);
  max-width: calc(100% - 3rem);
}
.cap-name { font-size: 1.375rem; font-weight: 650; color: var(--ink); letter-spacing: -0.01em; }
.cap-role { font-size: .9375rem; color: var(--slate); }
.cap-label { font-size: .875rem; color: var(--ink); margin-top: .45rem; font-weight: 550; }

.ruby-frame { position: absolute; inset: 0; visibility: hidden; }
.ruby-iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.ruby-stage[data-embed-state="ready"] .ruby-frame { visibility: visible; }
.ruby-stage[data-embed-state="ready"] .ruby-still { visibility: hidden; }
.ruby-stage.is-minimized .ruby-frame { visibility: hidden; }
.ruby-stage.is-minimized .ruby-still { visibility: visible; }

.ruby-stage-bar {
  position: absolute; right: 1rem; top: 1rem; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem .75rem;
  max-width: calc(100% - 2rem);
  font-family: var(--display); font-size: .9375rem;
}
.ruby-stage-bar[hidden] { display: none; }
.ruby-stage-status:empty { display: none; }
.ruby-stage-status, .ruby-fallback, .ruby-toggle {
  margin: 0; background: rgba(255,255,255,.96); color: var(--ink);
  border-radius: 999px; padding: .45rem .95rem; box-shadow: 0 6px 18px rgba(12,30,54,.12);
}
.ruby-fallback { font-weight: 600; }
.ruby-fallback[hidden], .ruby-toggle[hidden] { display: none; }
.ruby-toggle { font: inherit; font-weight: 600; border: 1.5px solid var(--ink); cursor: pointer; min-height: 2.75rem; }
.ruby-toggle:hover { background: var(--ink); color: #fff; }
/* Loaded: the parent's control sits in its own strip below the frame, never over the embed. */
.ruby-stage[data-embed-state="ready"] .ruby-frame { bottom: 3.5rem; }
.ruby-stage[data-embed-state="ready"] .ruby-stage-bar {
  top: auto; bottom: 0; left: 0; right: 0; max-width: none; height: 3.5rem;
  padding: 0 1rem; background: #fff; border-top: 1px solid var(--line);
}
.ruby-stage[data-embed-state="ready"] .ruby-toggle { box-shadow: none; min-height: 2.5rem; padding: .3rem .95rem; }
.ruby-stage[data-embed-state="ready"] .ruby-still figcaption { bottom: 5rem; }
@media (min-width: 60.0625em) {
  .ruby-stage[data-embed-state="ready"] { align-self: start; position: sticky; top: 4.25rem; height: min(calc(100svh - 4.25rem), 52rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .ruby-still img { animation: unveil 1.4s cubic-bezier(.2,.7,.1,1) both; }
  .ruby-still figcaption { animation: lift .7s .9s cubic-bezier(.2,.7,.1,1) both; }
  @keyframes unveil { from { clip-path: inset(0 0 0 100%); transform: scale(1.06); } to { clip-path: inset(0 0 0 0); transform: scale(1); } }
  @keyframes lift { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* Case study */
.case { display: grid; gap: clamp(3rem, 6vw, 4.5rem); }
.case-part > h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 1.25rem; }
.case-part > p { max-width: 38em; }
.case-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.case-split h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 1.25rem; }
.case-figure { margin: 0; }
.case-figure img { border-radius: 16px; }
.case-figure figcaption { font-family: var(--display); font-size: .9375rem; color: var(--slate); margin-top: .65rem; }
.evidence { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 3rem; }
.evidence a { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.015em; margin-bottom: .3rem; }
.evidence span { display: block; font-size: 1.0625rem; max-width: 30em; }
.case-intro { margin-bottom: 1.75rem; }

/* Bands */
.band { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.band-mist { background: var(--mist); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2.125rem, 4.2vw, 3.5rem); line-height: 1.02; letter-spacing: -0.035em; margin-bottom: 1.25rem; }
.section-head p { color: var(--text); max-width: 38em; }
.section-head p:last-child { margin-bottom: 0; }

/* Journey */
.journey { list-style: none; margin: 0 0 clamp(3rem, 6vw, 5rem); padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 2rem; counter-reset: stage; }
.stage { position: relative; padding-top: 2.25rem; }
.stage::before { content: ""; position: absolute; top: .5rem; left: 0; right: -2rem; border-top: 2px dashed #a9bccd; }
.stage:last-child::before { right: 0; }
.stage::after { content: ""; position: absolute; top: 0; left: 0; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--mist); border: 2px solid #7f93a8; }
.stage.is-now::before { border-top: 2px solid var(--ink); }
.stage.is-now::after { background: var(--ruby); border-color: var(--ruby); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ruby) 16%, transparent); }
.stage-when { display: block; font-family: var(--display); font-size: .9375rem; color: var(--slate); margin-bottom: .35rem; }
.is-now .stage-when { color: var(--ruby); font-weight: 600; }
.stage h3 { font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: .6rem; }
.stage p { font-size: 1.0625rem; line-height: 1.55; margin-bottom: .9rem; }
.stage-product { font-family: var(--display); font-size: .875rem; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .2rem .55rem; display: inline-block; }


/* Work */
.work-list { margin: 0; border-top: 1px solid var(--line); }
.work-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 1rem 3rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.work-row dt { font-family: var(--display); font-size: 1.375rem; font-weight: 600; color: var(--ink); letter-spacing: -0.015em; line-height: 1.25; }
.work-row dd { margin: 0; max-width: 38em; }

/* Team */
.team { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1.5rem 1rem; max-width: 60rem; }
.member { display: flex; flex-direction: column; font-family: var(--display); }
.member img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin-bottom: .7rem; background: #dfe7ef; }
.m-name { font-weight: 600; color: var(--ink); font-size: 1rem; }
.m-role { font-size: .8125rem; color: var(--slate); line-height: 1.35; }
.member.is-ruby img { outline: 3px solid var(--ruby); outline-offset: 3px; }
.member.is-planned img { filter: grayscale(.85); opacity: .75; }
.fine { font-size: 1rem; color: var(--slate); margin: 0; }

/* Rules */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.rule-line { font-family: var(--display); font-size: clamp(1.625rem, 2.6vw, 2.25rem); font-weight: 650; line-height: 1.08; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 1rem; }
.rule p:not(.rule-line) { font-size: 1.0625rem; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.about-photo { border-radius: 18px; width: 100%; max-width: 30rem; }
.about-copy h2 { font-size: clamp(2.125rem, 4.2vw, 3.5rem); line-height: 1.02; letter-spacing: -0.035em; margin-bottom: 1.5rem; }
.about-copy p { max-width: 36em; }

/* Contact */
.contact h2 { font-size: clamp(2.125rem, 4.2vw, 3.5rem); letter-spacing: -0.035em; line-height: 1.02; margin-bottom: 1rem; }
.contact-intro { max-width: 34em; }
.email {
  display: inline-block;
  font-family: var(--display); font-weight: 650;
  font-size: clamp(1.75rem, 6.2vw, 5.25rem);
  letter-spacing: -0.022em; line-height: 1.05;
  color: var(--ink);
  text-decoration-thickness: .06em; text-underline-offset: .12em;
  margin: 1rem 0 3rem;
  overflow-wrap: anywhere;
}
.reasons { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.reasons a { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.015em; margin-bottom: .4rem; }
.reasons span { display: block; font-size: 1.0625rem; color: var(--text); max-width: 26em; }
.contact-alt { color: var(--slate); margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; font-family: var(--display); font-size: .9375rem; color: var(--slate); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-inner ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; }
.footer-inner a { color: var(--slate); text-decoration: none; }
.footer-inner a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ruby); }

/* Legal and 404 pages */
.doc { max-width: 44rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter); }
.doc h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -0.04em; line-height: 1; margin-bottom: 1rem; }
.doc h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 2.5rem 0 .75rem; }
.doc .meta { color: var(--slate); font-family: var(--display); font-size: 1rem; margin-bottom: 2.5rem; }

/* Responsive */
@media (max-width: 75em) {
  .team { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 60em) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 2.25rem var(--gutter) 2.5rem; }
  .ruby-stage { aspect-ratio: 16 / 11; min-height: 0; max-height: 62svh; width: 100%; }
  .ruby-still figcaption { left: 1rem; bottom: 1rem; padding: .8rem 1rem; }
  .ruby-stage[data-embed-state="ready"]:not(.is-minimized) { aspect-ratio: auto; max-height: none; height: min(calc(100dvh - 4.25rem), 46rem); min-height: 30rem; }
  .ruby-stage.is-minimized { aspect-ratio: auto; height: 3.5rem; min-height: 0; }
  .ruby-stage.is-minimized .ruby-still { visibility: hidden; }
  .case-split, .evidence { grid-template-columns: 1fr; }
  .byline { margin-bottom: 1.25rem; }
  .journey { grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; }
  .stage:nth-child(2)::before { right: 0; }
  .about { grid-template-columns: 1fr; }
  .rules, .reasons { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 1fr; gap: .5rem; padding: 1.6rem 0; }
  .team { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 40em) {
  body { font-size: 1.125rem; }
  .nav-extra { display: none; }
  .hero h1 { font-size: clamp(2.5rem, 11.6vw, 3.5rem); margin-bottom: 1.25rem; }
  .byline { font-size: .9688rem; margin-bottom: 1.25rem; }
  .byline img { width: 2.75rem; height: 2.75rem; }
  .ruby-stage { aspect-ratio: 4 / 3; max-height: 52svh; }
  .ruby-still img { object-position: 52% 18%; }
  .ruby-still figcaption { left: .75rem; bottom: .75rem; right: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .6rem; padding: .5rem .85rem; border-radius: 14px; }
  .cap-name { font-size: 1.0625rem; }
  .cap-role { display: none; }
  .cap-label { margin-top: 0; font-size: .8125rem; }
  .ruby-stage[data-embed-state="ready"]:not(.is-minimized) { min-height: 26rem; }
  .ruby-stage-bar { right: .75rem; top: .75rem; max-width: calc(100% - 1.5rem); }
  .ruby-stage[data-embed-state="ready"] .ruby-stage-bar { padding: 0 .75rem; }
  .journey { grid-template-columns: 1fr; }
  .stage::before { right: auto; left: .5rem; top: 1.1rem; bottom: -2.5rem; border-top: 0; border-left: 2px dashed #a9bccd; }
  .stage.is-now::before { border-top: 0; border-left: 2px solid var(--ink); }
  .stage:last-child::before { display: none; }
  .stage { padding: 0 0 0 2.25rem; }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Project descriptions and the live Bulletin preview */
.hero .lede { margin-bottom: 1.75rem; }
.bulletin-layout { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.project-status { font: 600 .9rem/1.4 var(--display); color: var(--ruby); margin-bottom: .65rem; }
.bulletin .project-status { color: #14655d; }
.bulletin h2 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); letter-spacing: -.04em; line-height: 1.04; margin-bottom: 1.15rem; }
.bulletin .actions { align-items: center; column-gap: 1.25rem; }
.bulletin-preview { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.bulletin-preview img { width: 100%; }
.roadmap-title { font-size: 1.6rem; margin-top: 2.5rem; }
@media (max-width: 60em) { .bulletin-layout { grid-template-columns: 1fr; } }
