@import url("./media/fonts/fonts.css");

:root {
  color-scheme: light;
  --paper: #f5f0e7;
  --sheet: #fbf8f1;
  --ink: #252620;
  --muted: #5e5b52;
  --line: #d8cfc0;
  --orange: #ff8757;
  --rust: #ad421b;
  --night: #252621;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: 1220px;
  --gutter: clamp(22px, 5.6vw, 82px);
  --header: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 22px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 16px/1.65 "Manrope", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
p, h1, h2, h3, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
::selection { background: var(--orange); color: var(--ink); }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.svg-library { display: block; position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 500 12px/1.4 var(--mono); letter-spacing: .085em; }
.accent { color: var(--rust); }
.skip { position: fixed; z-index: 10; top: 8px; left: 12px; padding: 9px 14px; transform: translateY(-150%); color: var(--ink); background: var(--orange); }
.skip:focus { transform: none; }

.masthead { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: calc(var(--header) - 1px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; justify-self: start; width: max-content; font-weight: 800; font-size: 15px; letter-spacing: .04em; white-space: nowrap; }
.wordmark-divider { color: var(--rust); margin-inline: 5px; }
.main-nav { display: flex; gap: clamp(22px, 3.5vw, 52px); font-size: 13px; font-weight: 750; }
.main-nav a { padding-block: 8px; transition: color .2s; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--rust); }
.edition { display: inline-flex; align-items: center; justify-self: end; gap: 8px; border: 1px solid var(--line); border-radius: 100px; padding: 7px 12px; white-space: nowrap; font: 500 10px/1.4 var(--mono); letter-spacing: .06em; }
.edition span, .diagram-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rust); }
.read-progress { position: absolute; bottom: -1px; left: 0; height: 2px; width: 100%; transform: scaleX(var(--reading-progress, 0)); transform-origin: left; background: var(--orange); pointer-events: none; }

.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; min-height: clamp(530px, 43vw, 710px); background: #302e27; color: #fffbef; }
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-image { object-fit: cover; object-position: 50% 54%; filter: sepia(.48) saturate(.78) brightness(.9); }
.hero-shade { background: linear-gradient(90deg, rgba(25,25,21,.96) 0%, rgba(28,28,24,.91) 24%, rgba(31,30,24,.72) 41%, rgba(32,30,25,.25) 69%, rgba(31,30,24,.13) 100%), linear-gradient(0deg, rgba(27,25,20,.58), transparent 42%); }
.hero-grid { position: relative; display: grid; align-items: center; grid-template-columns: 1fr auto; }
.hero-copy { padding-block: 79px 85px; }
.hero-kicker { color: #f5e9d7; }
.hero-kicker span, .section-kicker span { width: 25px; height: 1px; background: currentColor; }
.hero-kicker span, .hero-kicker b { color: var(--orange); }
.hero-kicker b { font-weight: 500; }
.hero h1 { margin: 25px 0 22px; font-size: clamp(66px, 7.55vw, 119px); letter-spacing: -.083em; line-height: .99; font-weight: 800; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero-lede { max-width: 470px; color: #f0e9df; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.58; }
.button { display: inline-flex; gap: 20px; align-items: center; width: max-content; padding: 13px 17px 13px 21px; border-radius: 5px; font-size: 14px; font-weight: 800; transition: background .2s, color .2s; }
.button .icon { transition: transform .2s; }
.button:hover .icon { transform: translateY(3px); }
.primary { margin-top: 31px; background: var(--orange); color: #25241f; }
.primary:hover { background: #ffab86; }
.primary:focus-visible { outline-color: #fff7e6; }
.hero-credit { display: flex; align-items: center; align-self: end; gap: 11px; margin-bottom: 29px; padding: 11px 13px; border: 1px solid #fcf2e34d; border-radius: 5px; background: #24221bdc; color: #f3e9da; font-size: 11px; line-height: 1.55; transition: background .2s; }
.hero-credit:hover { background: #24221b; }
.hero-credit > span { display: grid; }
.hero-credit .icon { width: 17px; height: 17px; color: var(--orange); }
.hero-credit .credit-arrow { width: 14px; height: 14px; color: #f3e9da; }
.credit-label { color: #ffb391; font: 500 9px/1.4 var(--mono); letter-spacing: .08em; }

.era-strip { background: #ece4d7; border-bottom: 1px solid var(--line); }
.era-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.era-grid a { display: flex; gap: clamp(10px, 1.35vw, 20px); align-items: center; min-height: 101px; position: relative; padding: 15px 14px 15px clamp(13px, 2.4vw, 36px); border-inline-start: 1px solid var(--line); transition: background .2s; }
.era-grid a:last-child { border-inline-end: 1px solid var(--line); }
.era-grid a:hover, .era-grid a[aria-current] { background: #f8eee0; }
.era-grid a::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--rust); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.era-grid a:hover::after, .era-grid a[aria-current]::after { transform: scaleX(1); }
.era-grid a > span:last-child { display: grid; }
.era-index { display: grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border-radius: 50%; border: 1px solid #c5ae98; color: var(--rust); font: 500 10px/1 var(--mono); }
.era-grid strong { font-size: clamp(14px, 1.5vw, 21px); line-height: 1.3; font-weight: 800; letter-spacing: -.035em; white-space: nowrap; }
.era-grid small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.history, .sources { padding-block: clamp(66px, 8vw, 119px); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 7vw, 106px); align-items: end; margin-bottom: 48px; }
.section-kicker { color: var(--rust); margin-bottom: 16px; }
.section-heading h2 { font-size: clamp(41px, 5.5vw, 84px); letter-spacing: -.075em; font-weight: 800; line-height: 1.01; }
.section-heading > p { max-width: 440px; padding-bottom: 3px; color: var(--muted); font-size: clamp(15px, 1.27vw, 18px); }
.chapter { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(36px, 6.7vw, 107px); border-top: 1px solid var(--line); padding-block: clamp(34px, 4.4vw, 66px); }
.chapter:last-child { padding-bottom: 0; }
.chapter-reverse .chapter-copy { order: 2; }
.chapter-date { gap: 12px; color: var(--rust); }
.chapter-date span { display: grid; place-items: center; width: 33px; height: 31px; border-radius: 4px; background: #eadbcb; }
.chapter h3 { margin: 14px 0 17px; font-weight: 800; font-size: clamp(30px, 3.35vw, 52px); letter-spacing: -.067em; line-height: 1.08; }
.chapter-copy > p:not(.chapter-date) { color: var(--muted); font-size: clamp(15px, 1.24vw, 17px); }
.chapter-copy > p + p { margin-top: 13px; }
.chapter sup { margin-left: 3px; font: 500 10px/1 var(--mono); }
.chapter sup a { padding: 2px 4px; background: #ece0d0; color: #8e3516; border-radius: 3px; }
.chapter sup a:hover { background: var(--orange); color: var(--ink); }
.archive-frame { padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--sheet); }
.photo { position: relative; isolation: isolate; aspect-ratio: 1.65; overflow: hidden; background: #a8a08e; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.28) saturate(.82); }
.photo-gusher { background: repeating-linear-gradient(90deg, transparent 0 22px, #e9d4b220 22px 23px), repeating-linear-gradient(0deg, #35362f 0 22px, #554f41 22px 23px); }
.photo-gusher img { object-fit: contain; margin: auto; }
.archive-frame figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 7px 15px; flex-wrap: wrap; color: var(--muted); padding: 8px 2px 1px; font: 500 10px/1.55 var(--mono); }
.archive-frame figcaption a { white-space: nowrap; color: var(--rust); }
.archive-frame figcaption a:hover { text-decoration: underline; }
.archive-frame figcaption .icon { width: 13px; height: 13px; }
.photo-meta { display: inline-flex; gap: 3px 9px; flex-wrap: wrap; }
.plate-head, .plate-foot, .fuel-head, .fuel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 500 11px/1.4 var(--mono); letter-spacing: .045em; }
.milestone-plate, .fuel-plate { overflow: hidden; border-radius: 5px; }
.milestone-plate { padding: 17px 20px; background: #34352e; color: #eee3d0; }
.plate-head { padding-bottom: 10px; border-bottom: 1px solid #ffffff30; }
.plate-drawing { display: block; width: 100%; height: auto; }
.plate-foot { padding-top: 11px; border-top: 1px solid #ffffff30; }
.plate-foot b { margin-right: 5px; font-weight: 500; color: var(--orange); }
.fuel-plate { position: relative; isolation: isolate; padding: 17px 20px; background: #ed845b; color: #38291f; }
.fuel-plate::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(#62392360 .65px, transparent .65px); background-size: 5px 5px; mask-image: linear-gradient(110deg, transparent 0 30%, #000 100%); }
.fuel-head { border-bottom: 1px solid #38291f60; padding-bottom: 9px; }
.fuel-grade { display: flex; gap: 15px; align-items: baseline; justify-content: center; padding: 1% 0 5%; white-space: nowrap; font-size: clamp(26px, 4vw, 55px); font-weight: 800; line-height: 1.05; letter-spacing: -.065em; }
.fuel-grade strong { font-size: clamp(96px, 12.4vw, 183px); line-height: .96; font-weight: 800; letter-spacing: -.13em; padding-right: .13em; }
.fuel-foot { padding-top: 10px; border-top: 1px solid #38291f60; }
.fuel-foot > span:last-child { border: 1px solid #38291f; padding: 3px 7px; border-radius: 3px; }

.refining { padding-block: clamp(61px, 7.2vw, 107px); background: var(--night); color: #f8eddb; }
.refining .section-heading > p { color: #ccc2b3; }
.refining .section-kicker, .refining .accent { color: var(--orange); }
.process { display: grid; grid-template-columns: 1.03fr 1fr; min-width: 0; border: 1px solid #666155; border-radius: 6px; overflow: hidden; }
.process-visual { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; background: #33352e; border-right: 1px solid #666155; }
.process-svg { display: block; width: 100%; height: auto; flex: 1; min-height: 0; color: #e1d6c2; }
.machine { opacity: .62; transition: opacity .32s, color .32s, filter .32s; }
.machine.is-active { color: var(--orange); opacity: 1; filter: drop-shadow(0 0 5px #ff875754); }
.process-numbers { font: 500 13px var(--mono); text-anchor: middle; }
.diagram-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding: 12px 16px; border-top: 1px solid #666155; color: #d6c9b4; font: 500 10px/1.4 var(--mono); letter-spacing: .045em; }
.diagram-caption span { display: inline-flex; gap: 7px; align-items: center; }
.diagram-caption .diagram-dot { background: var(--orange); }
.diagram-caption .icon { width: 14px; height: 14px; }
.process-content { min-width: 0; display: flex; flex-direction: column; padding: clamp(18px, 2.45vw, 37px); }
.process-tabs { display: flex; gap: 5px; }
.process-tabs a, .process-tabs button { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 3px; background: transparent; color: #f8eddb; border: 1px solid #6c6558; border-radius: 4px; padding: 8px clamp(5px, 1vw, 14px); font: 750 clamp(10px, 1.1vw, 13px)/1.4 "Manrope", Arial, sans-serif; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.process-tabs small { font: 500 10px/1.3 var(--mono); color: #cfc3af; }
.process-tabs a:hover, .process-tabs button:hover { border-color: var(--orange); }
.process-tabs [aria-selected="true"] { color: #25241f; background: var(--orange); border-color: var(--orange); }
.process-tabs [aria-selected="true"] small { color: #552c1d; }
.process-panels { display: grid; }
.process.is-interactive .process-panel { grid-area: 1 / 1; visibility: hidden; pointer-events: none; }
.process.is-interactive .process-panel.is-active { visibility: visible; pointer-events: auto; animation: panel-in .3s ease-out; }
.process-panel { padding-block: clamp(23px, 2.5vw, 37px) 16px; }
.process-panel .step-label { color: var(--orange); margin-bottom: 9px; font-size: 10px; }
.process-panel h3 { color: #f8eddb; margin-bottom: 10px; font-weight: 800; font-size: clamp(22px, 2.1vw, 34px); line-height: 1.13; letter-spacing: -.05em; }
.process-panel > p:last-child { color: #d6ccbc; font-size: clamp(14px, 1.13vw, 16px); }
.process-source { margin-top: auto; align-self: flex-start; font-size: 12px; color: #ffc1a5; text-decoration: underline; text-underline-offset: 3px; }
.process-source .icon { width: 15px; height: 15px; margin-left: 3px; }
@keyframes panel-in { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sources .section-heading { margin-bottom: 33px; }
.source-list { padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.source-list li { border-bottom: 1px solid var(--line); }
.source-list li:target { background: #efe1d1; }
.source-list a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: clamp(9px, 2vw, 24px); min-height: 74px; padding: 11px 12px; transition: background .2s; }
.source-list a:hover { background: var(--sheet); }
.source-list a > span:nth-child(2) { display: grid; }
.source-num { font: 500 11px/1.4 var(--mono); color: var(--rust); }
.source-list strong { font-size: clamp(14px, 1.45vw, 19px); font-weight: 800; line-height: 1.4; }
.source-list small { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 3px; }
.source-list .icon { color: var(--rust); transition: transform .2s; }
.source-list a:hover .icon { transform: translate(2px, -2px); }

.footer { border-top: 1px solid var(--line); background: #ece4d7; }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 17px; min-height: 91px; }
.footer p { color: var(--muted); font-size: 12px; }
.to-top { justify-self: end; display: flex; align-items: center; gap: 8px; color: var(--rust); font-size: 13px; font-weight: 800; white-space: nowrap; }
.to-top:hover { text-decoration: underline; }
.to-top .icon { width: 16px; height: 16px; }

.motion .reveal.pending { opacity: 0; transform: translateY(22px); }
.motion .reveal { transition: opacity .64s ease-out, transform .64s cubic-bezier(.22,.66,.27,1); }
.motion .reveal:focus-within { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: hero-in .72s both cubic-bezier(.22,.66,.27,1); }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .17s; }
  .hero-copy > :nth-child(4) { animation-delay: .25s; }
  .hero-image { animation: hero-photo 1.35s both ease-out; }
}
@keyframes hero-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes hero-photo { from { transform: scale(1.045); } to { transform: scale(1); } }

@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: 1fr; align-content: center; }
  .hero-copy { padding-block: 74px 112px; }
  .hero-credit { position: absolute; right: 0; bottom: 0; }
}
@media (max-width: 800px) {
  :root { --header: 63px; }
  .masthead-inner { grid-template-columns: auto 1fr; }
  .main-nav { justify-self: end; }
  .edition { display: none; }
  .era-grid a { min-height: 85px; }
  .section-heading { gap: 27px; }
  .section-heading h2 { font-size: clamp(37px, 6.1vw, 56px); }
  .chapter { gap: 29px; }
  .process-content { padding: 18px; }
  .process-visual { flex: 1; }
}
@media (max-width: 620px) {
  :root { --header: 92px; }
  .masthead-inner { grid-template-columns: 1fr; justify-items: start; gap: 0; padding-top: 11px; }
  .masthead .wordmark { font-size: 14px; }
  .masthead .wordmark img { width: 29px; height: 29px; }
  .main-nav { justify-self: stretch; justify-content: space-between; gap: 12px; width: 100%; font-size: 12px; padding-top: 6px; }
  .main-nav a { padding: 5px 0 10px; }
  .hero { min-height: 540px; }
  .hero-image { object-position: 62% 50%; filter: sepia(.42) saturate(.85) brightness(.88); }
  .hero-shade { background: linear-gradient(90deg, #171713de 0%, #1e1d17ad 57%, #26241d45 100%), linear-gradient(0deg, #1d1b17ad, transparent 60%); }
  .hero-copy { padding-block: 62px 126px; }
  .hero h1 { font-size: clamp(44px, 11vw, 67px); line-height: .99; margin-block: 23px 17px; letter-spacing: -.075em; }
  .hero-lede { max-width: 345px; }
  .hero-credit { right: auto; left: 0; bottom: 0; margin-bottom: 22px; }
  .primary { margin-top: 25px; }
  .era-grid { grid-template-columns: 1fr 1fr; }
  .era-grid a { min-height: 72px; padding: 8px; }
  .era-grid a:nth-child(2n) { border-inline-end: 1px solid var(--line); }
  .era-grid a:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .era-grid strong { font-size: 16px; }
  .era-grid small { font-size: 11px; }
  .era-index { width: 26px; height: 26px; font-size: 9px; }
  .section-heading, .chapter { grid-template-columns: 1fr; }
  .section-heading { gap: 17px; margin-bottom: 31px; }
  .section-heading > p { padding-bottom: 0; }
  .section-heading h2 { font-size: clamp(38px, 8.8vw, 52px); }
  .section-kicker { margin-bottom: 13px; }
  .chapter { gap: 23px; }
  .chapter-reverse .chapter-copy { order: 0; }
  .photo { aspect-ratio: 1.52; }
  .fuel-grade strong { font-size: clamp(110px, 31vw, 154px); }
  .process { grid-template-columns: 1fr; }
  .process-visual { border-right: 0; border-bottom: 1px solid #666155; }
  .process-tabs a, .process-tabs button { font-size: clamp(10px, 3vw, 13px); padding-inline: 8px; }
  .process-content { padding: 17px 13px; }
  .footer-inner { grid-template-columns: 1fr auto; padding-block: 19px; gap: 8px; }
  .footer p { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .motion .reveal.pending { opacity: 1; transform: none; }
}
@media print {
  .masthead { position: static; }
  .read-progress, .hero .button, .era-strip, .process-tabs, .to-top { display: none; }
  .motion .reveal.pending { opacity: 1; transform: none; }
  .process.is-interactive .process-panel { visibility: visible; grid-area: auto; }
}
