/* Theme variables preserve the photographic/film entrance in both modes. */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] {
  --bg: #ffffff; --bg-soft: #f2f2f2; --panel: #ffffffb8;
  --panel-strong: #ffffffed; --text: #111111; --muted: #4c4c4c;
  --dim: #666666; --line: #00000024; --accent: #555555;
  --accent-strong: #111111; --shadow: 0 25px 65px #00000012;
}
.logo-light { display: block; }
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }
.brand { gap: .7rem; }
.brand .brand-mark { width: 51px; height: 51px; border-radius: 0; object-fit: contain; box-shadow: none; }
.brand-wordmark { position: relative; display: block; flex-shrink: 0; width: 168px; height: 72px; overflow: hidden; }
.brand-wordmark img { position: absolute; top: -12px; left: 0; width: 168px; height: auto; max-width: none; border-radius: 0; box-shadow: none; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 50%; background: #ffffff0a; color: var(--text); font-size: 1.2rem; }
main { padding-top: 9rem; }
section[id] { scroll-margin-top: 9rem; }
.platform-bumper h1 { color: #fff; }
.platform-bumper .portal-eyebrow { color: #e5e5e5; }
.platform-bumper .portal-description { color: #e5e5e5; }
.platform-bumper { background-image: none; }
.hero-device img { object-fit: contain; background: #111111; }
.chapter-photo { margin-top: 2rem; }
.history-pair { grid-column: 2; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.2rem; max-width: 640px; margin-top: 2rem; }
.history-pair figure { margin: 0; min-width: 0; }
.history-pair img { width: 100%; height: 210px; object-fit: contain; border: 1px solid var(--line); background: var(--bg-soft); border-radius: 14px; }
.history-pair figcaption { margin-top: .6rem; }
.stack-gallery img { object-fit: contain; background: var(--bg-soft); }
.stack-gallery a { color: var(--accent-strong); }
.portfolio-heading { margin-top: 2.5rem; font-size: 1.7rem; }
.droid-links { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 1.3rem 0; }
.droid-link { display: grid; grid-template-columns: 1fr auto; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.droid-link:not(.droid-link--film) > span:first-of-type { grid-column: 1; color: var(--muted); font-size: .77rem; margin-top: .25rem; }
.droid-link:not(.droid-link--film) > span:last-of-type { grid-column: 2; grid-row: 1/3; align-self: center; margin-left: .7rem; color: var(--accent-strong); }
.portfolio-note, .portfolio-note a { font-size: .85rem; }
.portfolio-note a, .source-item a, .milestones a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.milestones { padding: 4rem 0 1rem; }
.milestones h2 { font-size: clamp(2.2rem,4vw,3.8rem); max-width: 22ch; margin: 0 0 2rem; }
.milestone-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.milestone-grid article { padding: 1.5rem; background: var(--panel); }
.milestone-grid article + article { border-left: 1px solid var(--line); }
.milestone-grid article > span { font-size: .62rem; color: var(--accent-strong); text-transform: uppercase; letter-spacing: .1em; }
.milestone-grid h3 { font-size: 1.45rem; line-height: 1.2; margin: .7rem 0; }
.milestone-grid p { font-size: .85rem; }
.milestone-photo { margin: 1.5rem 0 1rem; }
.milestone-photo img { width: 100%; max-height: 450px; object-fit: cover; border-radius: 18px; }
.milestone-photo figcaption { margin-top: .7rem; }
.sources-photo { margin: 2rem 0 0; }
.sources-photo img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 18px; }
.sources-photo figcaption { margin-top: .7rem; }
.source-item p { font-size: .88rem; margin: .35rem 0 0; }
.footer-wordmark { width: min(720px,100%); margin: 0 auto 1rem; }
.footer-wordmark img { width: 100%; height: auto; }
html[data-theme="light"] .topbar { background: #ffffff; border-color: var(--line); box-shadow: 0 10px 35px #0000000d; }
html[data-theme="light"] nav a { color: #4f4f4f; }
html[data-theme="light"] nav a.active, html[data-theme="light"] nav a:hover { color: #000000; }
html[data-theme="light"] .header-platform { background: #111111; color: #fff; }
html[data-theme="light"] .menu-toggle { color: #111111; border-color: var(--line); }
html[data-theme="light"] .theme-toggle { background: #fff; color: #111111; }
html[data-theme="light"] .hero .subhead { color: #444444; }
html[data-theme="light"] .hero-note, html[data-theme="light"] .hero-note a { color: #444444; }
html[data-theme="light"] .button { background: #ffffffb3; border-color: var(--line); color: #111111; }
html[data-theme="light"] .button.primary { background: #111111; border-color: #111111; color: #fff; }
html[data-theme="light"] .platform-routes { background: #f2f2f2; }
html[data-theme="light"] .platform-routes .route-index { color: #666666; }
html[data-theme="light"] .platform-routes a > span:last-child { color: #555555; }
html[data-theme="light"] .stat-strip { background: #ffffffb8; border-color: var(--line); }
html[data-theme="light"] .hero-device { background: #f2f2f2; }
html[data-theme="light"] figure figcaption { color: #555555; }
html[data-theme="light"] .company-film { background: #ffffffb8; }
html[data-theme="light"] .film-caption > span { color: #666666; }
html[data-theme="light"] .film-caption a, html[data-theme="light"] .footer-links { color: #222222; }
html[data-theme="light"] .taxonomy-symbol { color: #333333; }
html[data-theme="light"] .quote, html[data-theme="light"] .rule { background: #f5f5f5; }
html[data-theme="light"] :focus-visible { outline-color: #111111; }
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; }
  .header-actions { margin-left: auto; }
  #section-nav { display: flex; order: 3; flex: 1 1 100%; justify-content: flex-start; border-top: 1px solid var(--line); padding-top: .5rem; }
  .js .menu-toggle { display: flex; }
  .js #section-nav:not(.is-open) { display: none; }
}
@media (max-width: 860px) {
  .history-pair { grid-column: 1; max-width: none; }
  .milestone-grid { grid-template-columns: 1fr; }
  .milestone-grid article + article { border-left: none; border-top: 1px solid var(--line); }
}
@media (max-width: 650px) {
  .header-platform { display: none; }
  .brand { gap: .5rem; }
  .brand .brand-mark { width: 41px; height: 41px; }
  .brand-wordmark { width: 132px; height: 54px; }
  .brand-wordmark img { width: 132px; top: -9.6px; }
  main { padding-top: 7.8rem; }
  .droid-links { grid-template-columns: 1fr; }
  .history-pair { gap: .7rem; }
  .history-pair img { height: 160px; }
}

.closing-photo { margin: 2rem 0 0; } .closing-photo img { width: 100%; max-height: 430px; object-fit: cover; border-radius: 18px; } .closing-photo figcaption { margin-top: .7rem; }

.brand .brand-mark { background: #080808; border-radius: 9px; }

/* Opaque header: scrolling content never shows through the strip or navbar. */
header { background: var(--bg); }
.topbar,
html[data-theme="light"] .topbar {
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Neutral light UI; photographs and company films retain their original color. */
html[data-theme="light"] {
  --glass-surface: linear-gradient(145deg, rgba(255,255,255,.92), rgba(245,245,245,.68));
  --glass-border: rgba(0,0,0,.14);
  --glass-shadow: 0 12px 30px rgba(0,0,0,.055), inset 0 1px 0 rgba(255,255,255,.95);
  accent-color: #111;
  scrollbar-color: #a0a0a0 #fff;
}
:root, html[data-theme="dark"] {
  --glass-surface: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.035));
  --glass-border: rgba(255,255,255,.19);
  --glass-shadow: 0 14px 35px rgba(0,0,0,.19), inset 0 1px 0 rgba(255,255,255,.12);
}
html[data-theme="light"] body { background: #fff; }
/* Original photographs/films keep full color; only product icons are monochrome. */
img:not(.product-icon), video { filter: none !important; }
img.product-icon, svg.product-icon { filter: grayscale(1) !important; }
html[data-theme="light"] .hero-device img { background: #f2f2f2; }
html[data-theme="light"] .progress { background: #e5e5e5; }
html[data-theme="light"] .progress > span { background: linear-gradient(90deg,#111,#777); box-shadow: 0 0 14px #0002; }
html[data-theme="light"] :focus-visible { outline-color: #111; }
html[data-theme="light"] ::selection { background: #ddd; color: #111; }
html[data-theme="light"] code { color: #222; background: #f1f1f1; border: 1px solid #dedede; }
html[data-theme="light"] .quote,
html[data-theme="light"] .pull,
html[data-theme="light"] .lead { color: var(--text); }
html[data-theme="light"] .quote { background: transparent; }
html[data-theme="light"] .hero-device::before { background: radial-gradient(circle,rgba(0,0,0,.09),transparent 65%); }
html[data-theme="light"] .halo { background: radial-gradient(circle,rgba(0,0,0,.12),rgba(0,0,0,.03) 42%,transparent 66%); }
html[data-theme="light"] .footer-brand { color: #222; }
html[data-theme="light"] .footer-brand span { color: #666; }
html[data-theme="light"] .platform-bumper { background: #111; border-color: #0003; }
html[data-theme="light"] .platform-bumper::after { background: linear-gradient(90deg,rgba(0,0,0,.88),rgba(0,0,0,.62) 48%,rgba(0,0,0,.1)),linear-gradient(0deg,rgba(0,0,0,.5),transparent 45%); }
html[data-theme="light"] .platform-bumper h1 span,
html[data-theme="light"] .platform-bumper .portal-statement { color: #fff; }
html[data-theme="light"] .platform-bumper .portal-eyebrow,
html[data-theme="light"] .platform-bumper .portal-description { color: #e5e5e5; }
html[data-theme="light"] .portal-story { color: #fff; border-color: #aaa; }
html[data-theme="light"] .portal-enter { color: #111; background: linear-gradient(135deg,#fffffff2,#ffffffb8); border-color: #fff; box-shadow: inset 0 1px 0 #fff,0 8px 25px #0002; }
html[data-theme="light"] .company-film video { background: #090909; }
html[data-theme="light"] .chapter,
html[data-theme="light"] .source-item,
html[data-theme="light"] .ref,
html[data-theme="light"] .flow-row,
html[data-theme="light"] .stat-strip,
html[data-theme="light"] .rule { border-color: var(--line); }
/* Glass is confined to interactive surfaces and cards, never the opaque navbar. */
.button, .theme-toggle, .menu-toggle, .company-film, .milestone-grid article,
.droid-link:not(.droid-link--film), .flow-row, .stat-strip {
  background: var(--glass-surface);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .button:not(.primary),
html[data-theme="light"] .company-film,
html[data-theme="light"] .stat-strip { background: var(--glass-surface); }
.button, .theme-toggle, .menu-toggle, .droid-link:not(.droid-link--film) { transition: border-color .2s, box-shadow .2s, background .2s; }
.button:hover, .theme-toggle:hover, .menu-toggle:hover, .droid-link:not(.droid-link--film):hover { border-color: var(--accent-strong); box-shadow: var(--glass-shadow),0 0 0 1px var(--line); }
html[data-theme="light"] .button.primary,
html[data-theme="light"] .header-platform { color: #fff; background: linear-gradient(145deg,#333,#111); border-color: #111; box-shadow: inset 0 1px 0 #ffffff38,0 8px 22px #0001; }
.flow-row { grid-template-columns: minmax(160px,.4fr) minmax(0,1fr); padding: 1.2rem; border: 1px solid var(--glass-border); border-radius: 16px; }
.flow-row strong > a { display: inline-flex; align-items: center; gap: .6rem; letter-spacing: .04em; }
.product-icon { display: inline-block; width: 32px; height: 32px; flex: 0 0 32px; vertical-align: middle; color: currentColor; }
/* Preserve the existing responsive breakpoints; allow the larger brand room. */
@media (max-width: 860px) { .flow-row { grid-template-columns: 1fr; gap: .65rem; } }
@media (max-width: 650px) {
  .topbar { width: calc(100vw - 1rem); padding: .75rem .5rem; gap: .5rem; }
  .header-actions { gap: .375rem; }
}
/* This solid header is the explicit exception to all glass surfaces. */
header, .topbar, html[data-theme="light"] .topbar {
  background: var(--bg) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1;
}

/* Neutral interface in both themes; authentic media and warm brand art stay original. */
:root, html[data-theme="dark"] {
  --bg: #050505; --bg-soft: #111111;
  --panel: rgba(255,255,255,.035); --panel-strong: rgba(255,255,255,.07);
  --text: #f5f5f5; --muted: #b0b0b0; --dim: #909090;
  --line: rgba(255,255,255,.12); --accent: #bdbdbd; --accent-strong: #eeeeee;
  --shadow: 0 30px 100px rgba(0,0,0,.45);
}
body { background: #050505; }
.halo { background: radial-gradient(circle at 50% 50%,rgba(255,255,255,.15),rgba(255,255,255,.035) 42%,transparent 66%); }
nav a { color: var(--muted); }
nav a.active, nav a:hover { color: var(--text); }
:focus-visible { outline-color: var(--accent-strong); }
code { color: var(--text); background: rgba(255,255,255,.065); border: 1px solid var(--line); }
.progress > span { background: linear-gradient(90deg,#aaa,#eee); box-shadow: 0 0 20px rgba(255,255,255,.25); }
.hero .subhead, .quote, .lead, .pull { color: var(--text); }
.button.primary { background: linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,255,255,.055)); border-color: rgba(255,255,255,.28); }
.header-platform { color: #111; background: linear-gradient(145deg,#fff,#dedede); border: 1px solid #fff; }
.platform-bumper { background: #111; }
.platform-bumper::after { background: linear-gradient(90deg,rgba(0,0,0,.88),rgba(0,0,0,.62) 48%,rgba(0,0,0,.1)),linear-gradient(0deg,rgba(0,0,0,.5),transparent 45%); }
.platform-bumper h1 span, .platform-bumper .portal-statement { color: #f5f5f5; }
.platform-bumper .portal-eyebrow, .platform-bumper .portal-description { color: #e5e5e5; }
.portal-enter { color: #111; background: linear-gradient(145deg,#fffffff5,#ffffffc4); border-color: #eee; box-shadow: inset 0 1px 0 #fff,0 8px 24px #0003; }
.portal-story { color: #eee; border-color: #999; }
.film-controls > span { color: #ddd; }
.film-controls button { color: #f5f5f5; background: #11111199; }
.platform-routes { background: rgba(12,12,12,.84); }
.platform-routes .route-index { color: var(--dim); }
.platform-routes a > span:last-child { color: var(--muted); }
.hero-note a, .footer-brand, .footer-links, .film-caption a { color: var(--accent-strong); }
.footer-brand span, figure figcaption, .film-caption > span { color: var(--muted); }
.hero-device, .hero-device img { background: var(--bg-soft); }
.company-film video, .youtube-stage { background: #080808; }
.youtube-stage button { background: #eee; color: #111; }
.product-icon {
  box-sizing: border-box;
  padding: 5px;
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  background: var(--glass-surface);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2),0 4px 12px rgba(0,0,0,.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.droid-link--film .product-icon { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.4); }

/* Timeline stays readable without JavaScript; reveal is an explicit observer opt-in. */
.company-timeline {
  --timeline-progress: 0;
  position: relative;
  isolation: isolate;
  list-style: none;
  padding: .25rem 0 .25rem 32px;
  margin: 1.7rem 0 2rem;
}
.company-timeline::before,
.company-timeline::after {
  content: '';
  position: absolute;
  left: 8px;
  top: .4rem;
  width: 2px;
  border-radius: 2px;
  pointer-events: none;
}
.company-timeline::before { bottom: 1.2rem; background: var(--line); }
.company-timeline::after {
  height: calc(var(--timeline-progress) * 100%);
  max-height: calc(100% - 1.6rem);
  background: linear-gradient(var(--text),var(--dim));
  transition: height .45s ease;
}
.timeline-milestone {
  position: relative;
  display: grid;
  grid-template-columns: minmax(92px, .24fr) minmax(0,1fr);
  gap: 1.2rem;
  min-width: 0;
  margin: 0 0 1rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--glass-border);
  border-radius: 17px;
  background: var(--glass-surface);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1), border-color .25s;
}
.timeline-milestone::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 1.45rem;
  width: 10px;
  height: 10px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 3px var(--line);
}
.timeline-date {
  padding-top: .12rem;
  color: var(--accent-strong);
  font: 600 .68rem/1.55 Inter,ui-sans-serif,system-ui,sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.timeline-copy { min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.timeline-copy h3, .timeline-copy h4 { margin: 0 0 .4rem; font-size: 1.25rem; line-height: 1.25; color: var(--text); }
.timeline-copy p { margin: 0; font-size: .9rem; line-height: 1.65; color: var(--muted); }
.timeline-copy a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.company-timeline.is-animated .timeline-milestone:not(.is-visible) { opacity: 0; transform: translateY(12px); }
.timeline-milestone.is-visible { border-color: var(--glass-border); }
@media (max-width: 650px) {
  .company-timeline { padding-left: 26px; }
  .company-timeline::before, .company-timeline::after { left: 6px; }
  .timeline-milestone { grid-template-columns: minmax(0,1fr); gap: .4rem; padding: 1rem; }
  .timeline-milestone::before { left: -25px; top: 1.25rem; }
  .timeline-date { font-size: .63rem; }
}
@media (prefers-reduced-motion: reduce) {
  .company-timeline::after { height: 100%; transition: none; }
  .company-timeline .timeline-milestone { opacity: 1 !important; transform: none !important; transition: none !important; }
}
