/* Base - all the pages use these colors now */
:root {
    --paper: #FBF8F3;
    --blue: #0A3D62;
    --ink: #17374b;
    --muted: #58676b;
    --line: #c8cdc7;
    --copper: #b67b54;
    --header-height: 82px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Spectral', Georgia, serif; line-height: 1.65; }
a { color: inherit; text-underline-offset: 5px; }
button, input { font: inherit; }
button, .button { cursor: pointer; border-radius: 0; }
button { color: inherit; }
a:focus-visible, button:focus-visible, canvas:focus-visible { outline: 2px solid var(--copper); outline-offset: 6px; }
::selection { background: #c6d8da; color: var(--blue); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
figcaption, .small-note { font-family: Arial, sans-serif; font-size: 12px; line-height: 1.65; color: var(--muted); }
figcaption { margin-top: 13px; }
p { margin: 0 0 1.2em; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.08; letter-spacing: -.045em; margin: 0 0 .5em; }
h1 { font-size: clamp(54px, 6.9vw, 104px); }
h2 { font-size: clamp(38px, 4.4vw, 64px); }
h3, h4 { font-size: 30px; }
em { font-weight: 400; }
.container { width: calc(100% - 112px); max-width: 1280px; margin: 0 auto; }
.eyebrow { font: 11px/1.5 Arial, sans-serif; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 28px; }
.intro { font-size: clamp(21px, 2vw, 26px); line-height: 1.5; }
.text-link { display: inline-block; font: 13px/1.7 Arial, sans-serif; text-decoration: none; padding-bottom: 7px; border-bottom: 1px solid currentColor; }
.text-link span { margin-left: 30px; }
.text-link:hover { color: var(--copper); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 200; background: var(--paper); padding: 12px; }
.skip-link:focus { top: 10px; }

/* The wrapper must be sticky, not just the header inside it */
#header-placeholder { position: sticky; top: 0; z-index: 100; background: var(--blue); }
header { color: var(--paper); border-bottom: 1px solid #ffffff26; }
.header-inner { min-height: var(--header-height); display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.site-title { font-size: 30px; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.title-dot { color: #d9b998; }
header nav ul { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
header nav a { font: 12px/1.6 Arial, sans-serif; text-decoration: none; padding: 10px 0; border-bottom: 1px solid transparent; }
header nav a:hover, header nav a[aria-current="page"] { border-color: #d9b998; }
.menu-toggle { display: none; background: none; border: 1px solid #ffffff60; padding: 8px 12px; font: 13px Arial, sans-serif; }

/* Home page - photos and rules instead of boxes */
.home-hero { display: grid; grid-template-columns: 1.35fr .8fr; gap: 100px; align-items: center; padding: 90px 0 105px; }
.profile-bio > p:not(.eyebrow) { max-width: 590px; }
.profile-bio > p:not(.intro):not(.eyebrow) { font-size: 18px; max-width: 475px; }
.profile-bio .text-link { margin-top: 12px; }
.profile-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.project-section { border-top: 1px solid var(--line); padding: 45px 0 110px; }
.section-heading { display: grid; grid-template-columns: 1fr 2fr; align-items: start; margin-bottom: 45px; }
.big-buttons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.big-button-card { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.project-image { overflow: hidden; background: #e7e4dd; }
.project-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .5s ease; }
.big-button-card:hover img { transform: scale(1.035); }
.big-button-card .eyebrow { margin: 23px 0 13px; }
.big-button-card h3 { display: flex; justify-content: space-between; font-size: clamp(24px, 2.5vw, 35px); }
.big-button-card h3 span { font: 24px Arial, sans-serif; }
.big-button-card p:last-child { max-width: 310px; font-size: 18px; }
.game-cover { background: #163f46; }
.game-cover img { object-fit: contain; padding: 20px; }
.blue-band { background: var(--blue); color: var(--paper); padding: 85px 0; }
.blue-band .container { display: grid; grid-template-columns: 1fr 1fr; column-gap: 100px; }
.blue-band .eyebrow { grid-column: 1/-1; }
.blue-band h2 { font-size: clamp(40px, 4.7vw, 68px); }
.band-copy { font-size: 20px; align-self: center; }
.contact-section { padding: 100px 0; }
.email-link { font-size: clamp(18px, 3vw, 34px); text-decoration: none; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.social-links { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 32px; font: 13px Arial, sans-serif; }
.social-links a { text-decoration: none; }
.social-links a:hover { text-decoration: underline; }

/* Shared project pages */
.page-intro { padding: 90px 0 75px; max-width: 850px; }
.page-intro > p { max-width: 700px; }
.story-surface { position: relative; background: var(--paper); z-index: 2; }
.project-intro { padding: 90px 0 55px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 90px; }
.project-intro > .eyebrow { grid-column: 1/-1; }
.project-intro > div { font-size: 19px; }
.spec-strip { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 60px; padding: 24px 0; }
.spec-strip div { padding-left: 25px; border-left: 1px solid var(--line); }
.spec-strip div:first-child { border-left: none; padding-left: 0; }
.spec-strip dt { font: 11px Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.spec-strip dd { margin: 10px 0 0; font-size: 35px; line-height: 1.3; }
.content-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 85px; align-items: center; padding: 65px 0; border-top: 1px solid var(--line); }
.content-row .text-box { font-size: 19px; }
.content-row h2 { font-size: clamp(36px, 4vw, 55px); }
.media-container { min-width: 0; }
.media-container img { width: 100%; max-height: 580px; object-fit: cover; }
.diagram-row img { object-fit: contain; background: white; }
.media-container video, .media-container iframe { width: 100%; aspect-ratio: 16/9; display: block; border: 0; background: #092a3a; }
.parts-list { margin: 0; font-size: 15px; }
.parts-list div { display: grid; grid-template-columns: 130px 1fr; gap: 20px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.parts-list dt { color: var(--muted); }
.parts-list dd { margin: 0; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.two-up img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.casting-gallery { padding: 60px 0 90px; border-top: 1px solid var(--line); }
.pour-video { margin-top: 50px; }
.pour-video video { width: 100%; max-height: 600px; background: #112f41; display: block; }

/* Flight hero - the story slides over the film as you scroll */
.flight-scroll { height: 125svh; min-height: 780px; background: var(--blue); }
.flight-hero { height: calc(100svh - var(--header-height)); min-height: 580px; position: sticky; top: var(--header-height); overflow: hidden; color: var(--paper); }
.flight-hero > video { position: absolute; width: 100%; height: 100%; object-fit: cover; inset: 0; transform: scale(var(--film-scale, 1)); }
.flight-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #041c32ad, #041c3215), linear-gradient(0deg, #041c32a6, transparent 45%); }
.flight-copy { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-bottom: 50px; transform: translateY(var(--film-offset, 0px)); }
.flight-copy h1 { font-size: clamp(75px, 10vw, 150px); }
.flight-copy h1 span { display: block; font-size: .34em; letter-spacing: -.03em; font-style: italic; margin-top: 15px; }
.flight-copy > p:not(.eyebrow) { font-size: 21px; }
.flight-copy .text-link { margin-top: 18px; }
.flight-bottom { position: absolute; left: 0; right: 0; bottom: 28px; display: flex; justify-content: space-between; align-items: center; gap: 25px; font: 11px Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }

/* Crystal study - a full-width blue field, not another card */
.crystal-section { height: 160svh; min-height: 1100px; background: var(--blue); color: var(--paper); }
.crystal-stage { position: sticky; top: var(--header-height); min-height: 680px; height: calc(100svh - var(--header-height)); display: flex; align-items: center; overflow: hidden; }
.crystal-layout { display: grid; grid-template-columns: .95fr 1.1fr; gap: 45px; align-items: center; }
.crystal-copy h1 { font-size: clamp(54px, 6.2vw, 92px); }
.crystal-copy .intro { font-size: 21px; max-width: 410px; }
.crystal-caption { color: #d2ddd9; font-size: 16px; max-width: 420px; min-height: 54px; }
.crystal-controls { display: flex; gap: 0; margin-top: 26px; flex-wrap: wrap; }
.crystal-controls button { padding: 11px 16px; border: 1px solid #fbf8f35c; background: none; font: 12px Arial, sans-serif; }
.crystal-controls button[aria-pressed="true"] { background: var(--paper); color: var(--blue); }
.crystal-copy .small-note { color: #c6d5d9; font-size: 11px; }
.crystal-visual { min-width: 0; }
#crystalCanvas { width: 100%; height: min(66vh, 610px); display: block; cursor: grab; touch-action: pan-y; }
#crystalCanvas:active { cursor: grabbing; }
.crystal-readout { display: flex; justify-content: space-between; gap: 15px; font: 10px monospace; text-transform: uppercase; letter-spacing: .08em; padding-top: 15px; border-top: 1px solid #fbf8f338; color: #d4c4ad; }

/* Game timeline */
.game-feature { padding-top: 50px; }
.game-feature img { width: 100%; max-height: 450px; object-fit: cover; }
.games-timeline { padding: 60px 0 90px; }
.timeline-item { display: grid; grid-template-columns: 1fr 1.15fr; gap: 0 65px; border-top: 1px solid var(--line); padding: 35px 0; }
.timeline-item h4 { grid-row: span 2; font-size: 32px; }
.game-year { display: block; font: 12px Arial, sans-serif; color: var(--muted); letter-spacing: 0; margin-top: 16px; }
.timeline-item p { font-size: 19px; }
.game-link { justify-self: start; font: 12px Arial, sans-serif; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 8px; }
.contact-page { min-height: 70vh; }
footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; font: 11px Arial, sans-serif; }
.footer-inner > a:first-child { font: 23px 'Spectral', Georgia, serif; }
.footer-inner a { text-decoration: none; }
.footer-inner p { margin: 0; }
.footer-inner small { font-size: 10px; color: var(--muted); }

/* Phone and smaller tablet */
@media (max-width: 900px) {
    :root { --header-height: 70px; }
    .container { width: calc(100% - 48px); }
    header nav ul { gap: 16px; }
    .site-title { font-size: 26px; }
    .home-hero { gap: 40px; padding: 65px 0; }
    .content-row, .project-intro { gap: 40px; }
    .blue-band .container { gap: 35px; }
    .crystal-layout { gap: 20px; }
    .crystal-stage { min-height: 650px; }
    .crystal-copy h1 { font-size: 57px; }
    .crystal-copy .intro { font-size: 18px; }
}
@media (max-width: 700px) {
    .container { width: calc(100% - 40px); }
    .menu-toggle { display: block; }
    header nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--blue); border-top: 1px solid #ffffff30; }
    header nav.menu-open { display: block; }
    header nav ul { display: block; padding: 12px 20px 24px; }
    header nav a { display: block; font-size: 16px; padding: 11px 0; }
    .home-hero, .section-heading, .project-intro, .content-row, .blue-band .container { grid-template-columns: 1fr; gap: 28px; }
    .home-hero { padding: 48px 0 65px; }
    .home-hero h1 { font-size: clamp(53px, 12vw, 82px); }
    .profile-photo img { aspect-ratio: 5/4; object-position: center 55%; }
    .section-heading { margin-bottom: 25px; gap: 0; }
    .big-buttons-grid { grid-template-columns: 1fr; gap: 35px; }
    .project-image img { aspect-ratio: 3/2; }
    .big-button-card h3 { font-size: 34px; }
    .big-button-card p:last-child { max-width: none; }
    .project-section, .contact-section { padding-bottom: 65px; }
    .blue-band { padding: 55px 0; }
    .page-intro { padding: 55px 0; }
    .project-intro { padding-top: 55px; }
    .project-intro > .eyebrow { margin-bottom: 0; }
    .content-row { padding: 40px 0; }
    .content-row .text-box { font-size: 18px; }
    .content-row .eyebrow { margin-bottom: 16px; }
    .spec-strip { grid-template-columns: 1fr 1fr; gap: 24px 0; margin-bottom: 35px; }
    .spec-strip div:nth-child(3) { padding-left: 0; border-left: 0; }
    .spec-strip dd { font-size: 30px; }
    .flight-scroll { min-height: 760px; height: 115svh; }
    .flight-hero { min-height: 610px; }
    .flight-copy { padding-bottom: 60px; }
    .flight-copy h1 { font-size: 80px; }
    .flight-bottom { font-size: 9px; gap: 15px; }
    .flight-bottom > span { max-width: 135px; line-height: 1.6; }
    .crystal-section { height: auto; min-height: 0; }
    .crystal-stage { position: relative; top: 0; height: auto; padding: 50px 0 30px; min-height: 0; }
    .crystal-layout { grid-template-columns: 1fr; }
    .crystal-copy h1 { font-size: 62px; }
    .crystal-copy .intro, .crystal-caption { max-width: none; }
    .crystal-caption { min-height: 0; }
    #crystalCanvas { height: 380px; }
    .crystal-readout { font-size: 9px; }
    .two-up { grid-template-columns: 1fr; }
    .timeline-item { grid-template-columns: 1fr; gap: 12px; }
    .timeline-item h4 { grid-row: auto; }
    .footer-inner { flex-wrap: wrap; }
    .footer-inner p { flex-basis: 60%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
    .flight-scroll, .crystal-section { height: auto; min-height: 0; }
    .flight-hero, .crystal-stage { position: relative; top: 0; }
    .flight-copy, .flight-hero > video { transform: none; }
}

/* Foundry surface - soft moving highlights like brushed metal */
.crystal-section { color: #243d47; background: #d2d5cd; }
.crystal-stage { isolation: isolate; }
.crystal-stage::before {
    content: ''; position: absolute; inset: -35%; z-index: -1; pointer-events: none;
    background: linear-gradient(115deg, #bac4bf 10%, #e8e3d8 26%, #f8f5ea 34%, #bcc9c9 46%, #d5c8b6 61%, #ece7de 75%, #aebbb7 90%);
    background-size: 220% 150%; animation: metal-shimmer 20s ease-in-out infinite alternate;
}
.crystal-stage::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: repeating-linear-gradient(100deg, #ffffff0d 0px, #ffffff0d 1px, transparent 1px, transparent 4px);
}
@keyframes metal-shimmer { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
.crystal-caption, .crystal-copy .small-note { color: #45595e; }
.crystal-controls button { border-color: #67767588; }
.crystal-controls button[aria-pressed="true"] { background: #2c454c; color: var(--paper); }
.crystal-readout { color: #435a60; border-color: #67767566; }

/* Drone comparison - the original 16:9 image boundaries are identical */
.drone-evolution { border-top: 1px solid var(--line); padding: 65px 0; }
.drone-evolution > p:not(.eyebrow) { max-width: 750px; font-size: 19px; }
.view-controls { display: flex; gap: 0; flex-wrap: wrap; margin: 30px 0 20px; }
.view-controls button { border: 1px solid var(--line); background: none; padding: 12px 22px; font: 12px Arial, sans-serif; }
.view-controls button[aria-pressed="true"] { background: var(--blue); color: var(--paper); border-color: var(--blue); }
.render-stage { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #111b24; }
.render-view { position: absolute; inset: 0; }
.render-view[hidden] { display: none; }
.render-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #111b24; }
.evolution-slider { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 28px 0 20px; font: 12px/1.6 Arial, sans-serif; }
.evolution-slider output { text-align: right; }
.evolution-slider input { grid-column: 1/-1; width: 100%; margin: 0; accent-color: var(--blue); cursor: ew-resize; min-height: 32px; }
.version-stops { display: grid; grid-template-columns: repeat(3,1fr); gap: 25px; }
.version-stops button { text-align: left; border: 0; border-top: 2px solid var(--line); background: none; padding: 18px 0; }
.version-stops button[aria-pressed="true"] { border-color: var(--blue); }
.version-stops strong { display: block; font-size: 23px; font-weight: 400; }
.version-stops span { display: block; font: 12px/1.7 Arial, sans-serif; color: var(--muted); margin-top: 9px; }
.game-gallery { padding: 60px 0; border-top: 1px solid var(--line); }
.game-shots { display: grid; grid-template-columns: repeat(2,1fr); gap: 35px; margin-top: 35px; }
.game-shots figure:first-child { grid-column: 1/-1; }
.game-shots figure:last-child { max-width: 520px; }
.game-shots img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #152a36; }
@media(max-width:700px) {
    .drone-evolution { padding: 40px 0; }
    .view-controls button { padding: 12px 15px; }
    .evolution-slider { grid-template-columns: 1fr; gap: 8px; }
    .evolution-slider output { text-align: left; }
    .version-stops { gap: 12px; }
    .version-stops strong { font-size: 17px; line-height: 1.3; }
    .version-stops span { font-size: 10px; }
    .game-shots { grid-template-columns: 1fr; }
}
@media(prefers-reduced-motion:reduce) { .crystal-stage::before { animation: none; } }


.crystal-controls { margin-bottom: 18px; }
