@font-face {
  font-family: "OLMI Sans";
  src: url("/assets/fonts/olmi-sans-sc-v6.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #f5f9fd;
  --header: #f2f7fc;
  --surface: #fcfdff;
  --surface-hover: #eaf2ff;
  --band: #eaf3ff;
  --hero-base: #eff7ff;
  --heading: #0d1948;
  --text: #243758;
  --muted: #455778;
  --accent: #1744d1;
  --primary: #1a4aea;
  --primary-hover: #1439ba;
  --primary-text: #fff;
  --line: #d3dff1;
  --line-accent: #90a8ec;
  --focus: #1853eb;
  --icon-filter: invert(24%) sepia(100%) saturate(4943%) hue-rotate(228deg) brightness(92%) contrast(106%);
  --sans: "OLMI Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --gutter: clamp(18px, 4.25vw, 66px);
  --page-max: 1320px;
  --header-height: 72px;
  --radius: 16px;
  --section-space: clamp(34px, 4.5vw, 72px);
}

[data-theme="dark"] {
  color-scheme: dark;
  --page: #101a31;
  --header: #131f39;
  --surface: #172643;
  --surface-hover: #203759;
  --band: #152743;
  --hero-base: #101d37;
  --heading: #eff5ff;
  --text: #e0eaff;
  --muted: #b5c6e4;
  --accent: #a1c3ff;
  --primary: #a6c7ff;
  --primary-hover: #c6dcff;
  --primary-text: #0c224a;
  --line: #344a6b;
  --line-accent: #6685bb;
  --focus: #acd0ff;
  --icon-filter: invert(76%) sepia(28%) saturate(1088%) hue-rotate(183deg) brightness(105%);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--page); font: 400 1rem/1.7 var(--sans); }
body.dialog-open { overflow: hidden; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2, h3 { color: var(--heading); font-family: var(--serif); line-height: 1.28; }
h2 { font-size: clamp(29px, 3.6vw, 50px); }
h3 { font-size: clamp(21px, 2.53vw, 32px); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
main [id] { scroll-margin-top: calc(var(--header-height) + 14px); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page-width {
  width: min(calc(100% - var(--gutter) * 2), var(--page-max));
  margin-inline: auto;
}

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--primary-text);
  background: var(--primary);
}

.icon {
  display: inline-block;
  flex: none;
  filter: var(--icon-filter);
}

.button, .text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  min-height: 44px;
  font-size: .91rem;
  font-weight: 650;
}

.button {
  padding: 7px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
}

.button-primary {
  color: var(--primary-text);
  background: var(--primary);
  box-shadow: 0 3px 10px #143baa25;
}

.button-primary .icon { filter: brightness(0) invert(1); }
[data-theme="dark"] .button-primary .icon { filter: none; }
.button-primary:hover { background: var(--primary-hover); }

.button-secondary {
  border-color: var(--line-accent);
  color: var(--accent);
  background: var(--surface);
}

.button-secondary:hover { background: var(--surface-hover); }

.text-link { color: var(--accent); }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.accent { display: block; color: var(--accent); }
.anchor-alias { display: block; height: 0; }

.wordmark-on-dark, .theme-sun, .menu-close-icon,
[data-theme="dark"] .wordmark-on-light,
[data-theme="dark"] .theme-moon,
.menu-toggle[aria-expanded="true"] .menu-open-icon { display: none; }

[data-theme="dark"] .wordmark-on-dark, [data-theme="dark"] .theme-sun,
.menu-toggle[aria-expanded="true"] .menu-close-icon { display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--header);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 29px);
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.25vw, 18px);
  min-height: 44px;
  color: var(--heading);
}

.brand-artwork { flex: none; width: clamp(91px, 11.7vw, 152px); }
.brand-artwork img { width: 100%; height: auto; }

.brand-caption {
  padding-inline-start: clamp(9px, 1.1vw, 17px);
  border-inline-start: 1px solid var(--line-accent);
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}

.brand-caption span { margin-inline-start: 3px; }

.desktop-nav, .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.desktop-nav { gap: clamp(16px, 3.1vw, 48px); }
.desktop-nav a {
  position: relative;
  display: grid;
  min-height: 44px;
  place-items: center;
  color: var(--heading);
  font-size: clamp(13px, 1.55vw, 16px);
  font-weight: 620;
  white-space: nowrap;
}

.desktop-nav a[aria-current="page"], .desktop-nav a:hover { color: var(--accent); }
.desktop-nav a[aria-current="page"]::after {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  content: "";
}

.header-actions { gap: 5px; }
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.icon-button:hover { background: var(--surface-hover); }
.theme-toggle, .menu-toggle { border-color: transparent; background: transparent; }
.menu-toggle, .mobile-menu { display: none; }

.masthead {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--hero-base);
}

.masthead-art, .masthead::before { position: absolute; inset: 0; }
.masthead::before {
  z-index: -1;
  background: linear-gradient(90deg, var(--hero-base) 0%, var(--hero-base) 15%, transparent 58%);
  content: "";
}

.masthead-art { z-index: -2; }
.masthead-art picture, .masthead-art img { width: 100%; height: 100%; }
.masthead-art img { object-fit: cover; object-position: right center; }
[data-theme="dark"] .masthead-art img { filter: brightness(.6) saturate(.89); }

.masthead-copy { padding-block: 38px; }
.masthead-copy h1 {
  max-width: 9em;
  font-size: clamp(46px, 6.6vw, 96px);
  letter-spacing: -.04em;
  line-height: 1.18;
}

.masthead-copy p {
  max-width: 32ch;
  margin-block-start: 16px;
  color: var(--text);
  font-size: clamp(15px, 1.72vw, 21px);
  line-height: 1.7;
}

.home-hero { min-height: clamp(390px, 44.4vw, 740px); }
.home-hero .masthead-copy p { max-width: min(100%, 26em); text-wrap: balance; }
.hero-actions { display: flex; gap: 13px; margin-block-start: 21px; }

.products-section { padding-block-start: var(--section-space); }
.products-section > h2, .capabilities-section > h2 { margin-block-end: clamp(18px, 2.3vw, 30px); }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.55vw, 22px); }
.product-card { display: flex; min-width: 0; }

.product-link {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.product-link:hover { border-color: var(--line-accent); }
.product-link:hover .product-action { background: var(--surface-hover); }
.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--band);
}

.product-media > img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.studio-media > img { object-position: center 81%; }

.product-copy { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(17px, 2.25vw, 32px); }
.product-copy h3 { display: flex; align-items: center; min-height: 1.3em; }
.studio-title img { width: clamp(148px, 20.5vw, 246px); height: auto; }
.product-copy p {
  margin-block: 12px 18px;
  color: var(--muted);
  font-size: clamp(15px, 1.55vw, 17px);
}
.product-action { margin-block-start: auto; }

.capabilities-section { padding-block: var(--section-space); }
.capability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.capability-item { display: block; padding: 0 clamp(14px, 2.25vw, 32px); }
.capability-item:first-child { padding-inline-start: 0; }
.capability-item:last-child { padding-inline-end: 0; }
.capability-item + .capability-item { border-inline-start: 1px solid var(--line); }
.capability-item img { width: 42px; height: 43px; margin-block-end: 10px; }
.capability-item h3 { font-size: clamp(20px, 2.3vw, 30px); }
.capability-item p { margin-block-start: 9px; color: var(--muted); }
.capability-item:hover h3 { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.about-strip { min-height: clamp(230px, 23vw, 330px); }
.about-strip .masthead-copy p { margin-block: 10px 13px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  margin-block-start: 23px;
  padding-block: 11px;
  border-block: 1px solid var(--line);
}

.contact-grid a {
  display: flex;
  align-items: center;
  gap: clamp(11px, 1.75vw, 24px);
  min-height: 58px;
  padding: 6px clamp(12px, 2vw, 25px);
  color: var(--heading);
  font-size: .9rem;
}

.contact-grid a + a { border-inline-start: 1px solid var(--line); }
.contact-grid strong { display: block; color: var(--accent); font-size: clamp(14px, 1.6vw, 19px); font-weight: 600; }
.contact-grid a:hover strong { text-decoration: underline; text-underline-offset: 4px; }

.site-footer { padding-block-end: 10px; }
.footer-links, .legal-footer { display: flex; flex-wrap: wrap; align-items: center; }
.footer-links { justify-content: center; gap: 0 24px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.footer-links a, .footer-links button {
  display: grid;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: .9rem;
  font-weight: 650;
}

.legal-footer { justify-content: space-between; gap: 0 16px; min-height: 46px; color: var(--muted); font-size: .79rem; }
.legal-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links :is(a, button):hover, .legal-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-dialog {
  width: min(calc(100% - 32px), 560px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: clamp(17px, 4vw, 28px);
  border: 1px solid var(--line-accent);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 20px 80px #10193640;
}

.site-dialog::backdrop { background: #08152c88; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 14px; }
.dialog-heading h2 { font-size: 30px; }
#site-search {
  width: 100%;
  min-height: 48px;
  padding: 7px 13px;
  border: 1px solid var(--line-accent);
  border-radius: 10px;
  color: var(--text);
  background: var(--page);
}
#site-search::placeholder { color: var(--muted); opacity: .9; }
.search-count { margin-block-start: 9px; color: var(--muted); font-size: .875rem; }
.search-results { padding: 0; list-style: none; }
.search-results li { border-block-end: 1px solid var(--line); }
.search-results a { display: flex; align-items: center; min-height: 44px; color: var(--accent); }
.search-results a:hover { text-decoration: underline; text-underline-offset: 4px; }
.search-empty, .news-entry p { margin-block-start: 10px; color: var(--muted); }
.news-entry time { display: inline-block; margin-block-end: 10px; color: var(--muted); font-size: .9rem; }
.news-entry .text-link { margin-block-start: 6px; }

@media (min-width: 2100px) {
  .home-hero { min-height: max(740px, 33.4vw); }
}

@media (max-width: 960px) {
  .desktop-nav { gap: 22px; }
  .brand-caption { font-size: 12px; }
}

@media (max-width: 860px) {
  :root { --header-height: 64px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .brand { width: fit-content; }
  .desktop-nav { display: none; }
  .menu-toggle { display: grid; }
  .mobile-menu {
    position: absolute;
    top: 100%;
    right: var(--gutter);
    display: grid;
    max-height: calc(100dvh - var(--header-height) - 12px);
    width: min(300px, calc(100% - var(--gutter) * 2));
    overflow: auto;
    padding: 6px 13px;
    border: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    background: var(--surface);
    box-shadow: 0 12px 31px #07183622;
  }
  .mobile-menu a { display: flex; align-items: center; min-height: 48px; padding-inline: 7px; }
  .mobile-menu a + a { border-top: 1px solid var(--line); }
  .mobile-menu a[aria-current="page"], .mobile-menu a:hover { color: var(--accent); }
  .home-hero { grid-template-rows: auto auto; min-height: 0; }
  .home-hero .masthead-copy { grid-row: 1; padding-block: 32px 14px; }
  .home-hero .masthead-art { position: relative; grid-row: 2; width: 100%; aspect-ratio: 1.72; }
  .home-hero::before { display: none; }
  .home-hero .masthead-art picture, .home-hero .masthead-art > img { display: block; mask-image: linear-gradient(180deg, transparent, #000 13%); }
  .masthead-copy h1 { font-size: clamp(42px, 8.4vw, 68px); }
  .masthead-copy p { margin-block-start: 11px; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .capability-item { border-top: 1px solid var(--line); padding: 15px 0 0; }
  .capability-item + .capability-item { border-inline-start: 0; }
  .capability-item p { font-size: .94rem; }
  .product-copy { padding: 15px; }
}

@media (max-width: 700px) {
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-card { max-width: 550px; width: 100%; margin-inline: auto; }
  .product-copy { padding: 19px; }
  .studio-title img { width: clamp(170px, 57vw, 236px); }
  .about-strip { min-height: 0; }
  .about-strip .masthead-art { position: relative; grid-row: 2; width: 100%; aspect-ratio: 2.2; }
  .about-strip .masthead-art img { object-position: 75% center; mask-image: linear-gradient(180deg, transparent, #000 19%); }
  .about-strip .masthead-copy { grid-row: 1; padding-block: 28px 0; }
  .about-strip::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; padding-block: 0; }
  .contact-grid a { min-height: 64px; padding-inline: 4px; }
  .contact-grid a + a { border-inline-start: 0; border-top: 1px solid var(--line); }
  .legal-footer { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .brand-caption span { display: block; margin-inline-start: 0; }
  .header-actions { gap: 1px; }
  .masthead-copy h1 { font-size: clamp(39px, 10.5vw, 50px); }
  .masthead-copy p { font-size: 15px; }
  .hero-actions { margin-block-start: 16px; }
  .footer-links { gap: 0 15px; justify-content: flex-start; }
}

@media (max-width: 359px) {
  .brand-caption { display: none; }
  .hero-actions { gap: 8px; }
  .hero-actions .button { padding-inline: 13px; }
  .product-copy { padding: 16px; }
  .capability-grid { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
