/* Riley Robbins Films: Insights */
:root {
  --ed-surface: #161516;
  --ed-raised: #232021;
  --ed-text: #f3eee4;
  --ed-secondary: #b9b1a5;
  --ed-muted: #a49a8e;
  --focus-gold: #d2af68;
  --ui-duration: 160ms;
  --ed-line: #413b3b;
  --ed-tile: #b3aaa0;
  --ed-rail: #652d33;
  --ed-rail-width: 36px;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ed-surface);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ed-surface);
  color: var(--ed-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: rgb(210 175 104 / 0.3); color: var(--ed-text); }

/* Ordinary controls: named colour transitions only, about 160ms. */
a, summary, .action {
  transition-property: color, background-color, border-color, text-decoration-color, opacity;
  transition-duration: var(--ui-duration);
  transition-timing-function: ease;
}

/* Visible keyboard focus: 2px gold ring, 3px offset. */
:focus-visible { outline: 2px solid var(--focus-gold); outline-offset: 3px; }
main:focus, main:focus-visible { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.icon { display: inline-block; flex: none; vertical-align: middle; }

/* Shared edges: 24px phone, 48px tablet, 64px desktop gutters; 1248px content width. */
.site-gutter { padding-inline: 24px; }
.site-max { width: 100%; max-width: 1248px; margin-inline: auto; }

.skip-link {
  position: absolute;
  top: -200px;
  left: 16px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--ed-text);
  color: var(--ed-surface);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.rail { display: none; }

/* ----------------------------------------------------------------- header */

.site-header { position: relative; border-bottom: 1px solid var(--ed-line); }
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 24px;
  min-height: 60px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ed-text);
  text-decoration: none;
}
.wm-tiles { display: inline-flex; gap: 4px; }
.wm-word { display: inline-flex; gap: 1px; }
.wm-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 13px;
  height: 20px;
  padding: 0 1px;
  border: 1px solid var(--ed-tile);
  font: 500 12px/1 var(--font-mono);
  transition: border-color var(--ui-duration) ease, color var(--ui-duration) ease;
}
.wm-tile::before { content: attr(data-c); }
.wm-tile::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgb(179 170 160 / 0.35);
}
.wordmark:hover .wm-tile { border-color: var(--focus-gold); color: var(--focus-gold); }

.nav-desktop { display: none; }
.nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ed-secondary);
  font-size: 0.875rem;
  text-decoration: none;
}
.nav-link:hover { color: var(--ed-text); }
.nav-list .nav-link[aria-current] {
  color: var(--ed-text);
  text-decoration: underline;
  text-decoration-color: var(--focus-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 10px;
}

/* Narrow screens: a native disclosure menu, no script needed. */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding-left: 8px;
  color: var(--ed-text);
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}
.menu-toggle::-webkit-details-marker { display: none; }
.menu-toggle::marker { content: ""; }
.menu-toggle:hover { color: var(--focus-gold); }
.nav-mobile .icon-close,
.nav-mobile[open] .icon-menu { display: none; }
.nav-mobile[open] .icon-close { display: inline-block; }
.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--ed-surface);
  border-top: 1px solid var(--ed-line);
  border-bottom: 1px solid var(--ed-line);
  box-shadow: 0 32px 48px rgb(0 0 0 / 0.5);
}
.menu-list { max-width: 1248px; margin: 0 auto; padding: 8px 0 24px; list-style: none; }
.menu-list li + li { border-top: 1px solid var(--ed-line); }
.menu-list .nav-link { min-height: 56px; color: var(--ed-text); font-size: 1.25rem; }
.menu-list .nav-link:hover { color: var(--focus-gold); }
.menu-list .nav-link[aria-current] { color: var(--focus-gold); }
.menu-list .nav-link[aria-current]::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 12px;
  border-radius: 50%;
  background: currentColor;
}

/* ------------------------------------------------------------ shared type */

.kicker { margin-bottom: 12px; color: var(--focus-gold); font-size: 0.875rem; line-height: 1.4; }

/* ------------------------------------------------------------------ index */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 48px;
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--ed-line);
}
.masthead-title {
  font-family: var(--font-serif);
  /* The cap keeps the one long word inside a phone's gutters when browser text is enlarged. */
  font-size: min(clamp(3.5rem, 3.6vw + 2.875rem, 5.25rem), calc((100vw - 48px) / 3.4));
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}
.masthead-deck { max-width: 18em; color: var(--ed-secondary); font-size: 1.0625rem; line-height: 1.45; }

.feature {
  position: relative;
  display: grid;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--ed-line);
}
.feature-link { display: block; color: inherit; text-decoration: none; }
/* The whole feature, portrait included, is the one link's click target. */
.feature-link::after { content: ""; position: absolute; inset: 0; }
.feature-title {
  font-family: var(--font-serif);
  font-size: clamp(2.125rem, 3vw + 1.75rem, 2.5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.033em;
  text-wrap: pretty;
}
.feature-summary { max-width: 405px; margin-top: 16px; color: var(--ed-secondary); font-size: 1.0625rem; line-height: 1.55; }
.read-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 8px;
  color: var(--ed-text);
  font-size: 1rem;
}
.read-label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color var(--ui-duration) ease;
}
.read-cue .icon { transition: color var(--ui-duration) ease; }
.feature:hover .read-label { text-decoration-color: var(--focus-gold); }
.feature:hover .read-cue .icon { color: var(--focus-gold); }
.feature-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 6%;
  background: var(--ed-raised);
}

.story-list { margin: 0; padding: 0; list-style: none; }
.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  grid-template-areas: "section arrow" "title arrow";
  align-items: center;
  gap: 8px 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--ed-line);
  color: inherit;
  text-decoration: none;
}
.story-section { grid-area: section; color: var(--ed-muted); font-size: 0.875rem; line-height: 1.4; transition: color var(--ui-duration) ease; }
.story-title {
  grid-area: title;
  font-family: var(--font-serif);
  font-size: 1.6875rem;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: pretty;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  transition: text-decoration-color var(--ui-duration) ease;
}
.story-arrow { grid-area: arrow; justify-self: end; color: var(--ed-secondary); transition: color var(--ui-duration) ease; }
.story:hover .story-title { text-decoration-color: var(--focus-gold); }
.story:hover .story-arrow, .story:hover .story-section { color: var(--focus-gold); }

.section-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 24px 0 0;
  color: var(--ed-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  scroll-margin-top: 24px;
}
.editorial-note { max-width: 540px; }
.section-foot a {
  color: var(--ed-secondary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.section-foot a:hover { color: var(--ed-text); text-decoration-color: var(--focus-gold); }
.feed-link a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------------------------------------------------------------- article */

.article { padding-top: 16px; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ed-muted);
  font-size: 0.875rem;
}
.breadcrumb li + li::before { content: "/"; content: "/" / ""; margin: 0 10px; color: var(--ed-muted); }
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ed-secondary);
  text-decoration: underline;
  text-decoration-color: rgb(185 177 165 / 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.breadcrumb a:hover { color: var(--ed-text); text-decoration-color: var(--focus-gold); }
.article-header { padding-bottom: 28px; border-bottom: 1px solid var(--ed-line); }
.article-header .kicker { margin: 12px 0 0; }
.article-title {
  max-width: 15em;
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 2.4vw + 1.9375rem, 4rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 24px;
  margin-top: 20px;
  color: var(--ed-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.byline a {
  color: var(--ed-text);
  text-decoration: underline;
  text-decoration-color: var(--focus-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.byline a:hover { color: var(--focus-gold); }
.dateline { display: flex; flex-wrap: wrap; column-gap: 16px; color: var(--ed-muted); }
.dateline > span { white-space: nowrap; }

/* Measure: 32em of DM Sans holds about 62 to 68 characters per line. */
.article-body { max-width: 32em; margin-top: 32px; font-size: 1.125rem; }
.prose { color: var(--ed-text); font-size: 1em; line-height: 1.6; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  margin-top: 2em;
  font-family: var(--font-serif);
  font-size: 1.6em;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.prose h3 { margin-top: 1.8em; font-family: var(--font-serif); font-size: 1.3em; font-weight: 400; line-height: 1.25; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a {
  color: var(--ed-text);
  text-decoration: underline;
  text-decoration-color: var(--focus-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.prose a:hover { color: var(--focus-gold); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { padding-left: 20px; border-left: 2px solid var(--focus-gold); color: var(--ed-secondary); }
.prose hr { height: 0; border: 0; border-top: 1px solid var(--ed-line); }
.prose img { height: auto; }
.prose figcaption, .prose caption { color: var(--ed-muted); font-size: 0.875rem; line-height: 1.5; }
.prose code {
  padding: 0.1em 0.3em;
  background: var(--ed-raised);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.prose table { width: 100%; border-collapse: collapse; font-size: 0.875em; line-height: 1.45; }
.prose caption { padding-bottom: 8px; caption-side: top; text-align: left; }
.prose th, .prose td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--ed-line);
  text-align: left;
  vertical-align: top;
}
.prose th:last-child, .prose td:last-child { padding-right: 0; }
.prose th { color: var(--ed-muted); font-size: 0.875rem; font-weight: 500; border-bottom-color: var(--ed-muted); }

/* Phones: each row becomes a stacked entry. Table roles are set in the markup so the
   semantics survive the display change; the column name shows beside each value. */
@media (max-width: 559.98px) {
  .prose table, .prose thead, .prose tbody, .prose tr, .prose th, .prose td { display: block; }
  .prose table { border-top: 1px solid var(--ed-line); font-size: 1rem; }
  .prose thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .prose tr { padding: 16px 0; border-bottom: 1px solid var(--ed-line); }
  .prose td { padding: 4px 0; border: 0; }
  .prose td[data-label] { display: grid; grid-template-columns: minmax(7em, 38%) minmax(0, 1fr); gap: 12px; }
  .prose td[data-label]::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    padding-top: 0.15em;
    color: var(--ed-muted);
    font-size: 0.875rem;
    line-height: 1.45;
  }
  .prose td[data-label]:first-child { display: block; padding-bottom: 8px; font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.25; }
  .prose td[data-label]:first-child::before { content: none; }
}

.article-foot { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--ed-line); }
.action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--ed-secondary);
  color: var(--ed-text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}
.action:hover { border-color: var(--focus-gold); color: var(--focus-gold); }
.action-quiet {
  padding-inline: 0;
  border-color: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.action-quiet:hover { border-color: transparent; }

/* -------------------------------------------------------------- not found */

.notfound { max-width: 40rem; padding: 56px 0 8px; }
.notfound-title {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 2.4vw + 1.9375rem, 4rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.notfound-text { margin-top: 20px; color: var(--ed-secondary); font-size: 1.125rem; line-height: 1.6; }
.notfound-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 32px 0 0; padding: 0; list-style: none; }

/* ----------------------------------------------------------------- footer */

.site-footer { margin-top: 64px; padding: 48px 0 32px; border-top: 1px solid var(--ed-line); color: var(--ed-secondary); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.footer-name { color: var(--ed-text); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.footer-tagline { margin-top: 12px; font-size: 0.875rem; line-height: 1.6; }
.footer-label { margin-bottom: 4px; color: var(--ed-muted); font-size: 0.8125rem; }
.footer-list { margin: 0; padding: 0; list-style: none; }
/* Two columns, falling to one when enlarged text would run a link into its neighbour. */
.footer-col[aria-label] .footer-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(calc(50% - 13px), 6rem)), 1fr)); column-gap: 24px; }
.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--ed-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer-list a:hover { color: var(--ed-text); }
.footer-list .footer-email { max-width: 100%; overflow-wrap: anywhere; }
.footer-list .footer-email:hover { color: var(--focus-gold); }
.footer-legal { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgb(65 59 59 / 0.6); color: var(--ed-muted); font-size: 0.8125rem; }

/* ------------------------------------------------------------- breakpoints */

@media (min-width: 768px) {
  .site-gutter { padding-inline: 48px; }
  .masthead { padding: 56px 0 32px; }
  .masthead-deck { max-width: 340px; font-size: 1.1875rem; line-height: 1.4; }
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: 36px 0; }
  .feature-text-only { grid-template-columns: minmax(0, 1fr); }
  .feature-title { font-size: clamp(2.25rem, 4.1vw, 3.875rem); }
  .feature .kicker { margin-bottom: 20px; }
  .feature-summary { margin-top: 20px; font-size: 1.125rem; line-height: 1.52; }
  .read-cue { margin-top: 24px; }
  .feature-photo { aspect-ratio: auto; height: 320px; }
  .story {
    grid-template-columns: 136px minmax(0, 1fr) 32px;
    grid-template-areas: "section title arrow";
    gap: 24px;
    min-height: 108px;
    padding: 20px 0;
  }
  .story-title { font-size: 1.875rem; }
  .section-foot { padding: 36px 0 0; }
  .article { padding-top: 32px; }
  .article-header { padding-bottom: 36px; }
  .article-body { margin-top: 40px; font-size: 1.1875rem; }
  .notfound { padding-top: 80px; }
  .site-footer { padding-top: 56px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  body { padding-left: var(--ed-rail-width); }
  .rail { display: block; position: fixed; top: 0; bottom: 0; left: 0; width: var(--ed-rail-width); background: var(--ed-rail); }
  .skip-link { left: calc(var(--ed-rail-width) + 16px); }
  .site-gutter { padding-inline: 64px; }
  .header-row { min-height: 76px; }
  .wm-tile { min-width: 15px; height: 22px; font-size: 13px; }
  .nav-desktop { display: block; }
  .nav-mobile { display: none; }
  .masthead { padding: 64px 0 32px; }
  .feature { gap: 64px; }
  .story { grid-template-columns: 168px minmax(0, 1fr) 32px; }
  .story-title { font-size: 2.125rem; }
  .section-foot { padding-bottom: 8px; }
  .article { padding-top: 40px; }
  .article-body { margin-top: 48px; }
  .notfound { padding-top: 96px; }
  .site-footer { margin-top: 80px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
  .footer-brand { grid-column: auto; }
}

@media (min-width: 1280px) {
  .nav-list { column-gap: 32px; }
  .article-body { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

@media print {
  /* Black on white everywhere: every colour above comes from these tokens. */
  :root {
    --ed-surface: #fff;
    --ed-raised: #fff;
    --ed-text: #000;
    --ed-secondary: #000;
    --ed-muted: #000;
    --focus-gold: #000;
    color-scheme: light;
  }
  /* Without this, links can print partway through their change from the screen colours. */
  *, *::before, *::after { transition: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  .rail, .skip-link, .site-header, .site-footer, .article-foot, .feed-link { display: none !important; }
  .prose, .prose a, .article-meta, .dateline, .breadcrumb ol { color: #000; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
