@import url("sensor/assets/design/design-system.css");

:root {
  color-scheme: dark;
  --background: #101112;
  --ink: #f6f5f1;
  --muted: #aaaead;
  --line: #343638;
  --signal: #c21f3a;
  --page-gutter: clamp(24px, 5.55vw, 80px);
  --header-height: 88px;
  --footer-height: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100svh;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-text, "PingFang SC", "Microsoft YaHei", sans-serif);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 5px; }
.skip-link { position: absolute; z-index: 5; top: 12px; left: var(--page-gutter); padding: 12px; background: var(--ink); color: var(--background); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.wrap { width: min(calc(100% - 2 * var(--page-gutter)), 1440px); margin-inline: auto; }

.site-header { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; height: var(--header-height); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 16px; }
.brand-icon { display: grid; place-items: center; width: 56px; height: 40px; background: var(--ink); }
.brand-icon img { display: block; width: 40px; height: 28px; object-fit: contain; }
.brand-word { font-size: 17px; font-weight: 500; letter-spacing: .04em; }
.brand-word small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.3; font-weight: 400; letter-spacing: .12em; }
.header-link { display: inline-flex; gap: 24px; align-items: center; min-height: 44px; font-size: 14px; }
.header-link span { color: #ef7790; font-size: 20px; }

.hero { min-height: 640px; height: calc(100svh - var(--header-height) - var(--footer-height)); padding-block: 48px 32px; isolation: isolate; }
.hero-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; height: 100%; }
.hero-copy { position: relative; z-index: 1; grid-column: 1 / 6; align-self: center; padding-block: 16px 48px; }
.hero-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; font-size: 13px; color: var(--muted); }
.hero-kicker > span { width: 24px; height: 2px; background: var(--signal); }
h1 { margin: 0; font-family: var(--font-display, "PingFang SC", "Microsoft YaHei", sans-serif); font-size: clamp(32px, 3.2vw, 52px); font-weight: 500; line-height: 1.38; letter-spacing: -.045em; overflow-wrap: anywhere; }
h1 span { display: block; text-wrap: balance; }
h1 .mission-detail { color: #c0c2c0; font-size: clamp(16px, 1.3vw, 20px); font-weight: 400; line-height: 1.9; letter-spacing: 0; }
h1 span:nth-child(3) { margin-top: 24px; }
.open-hardware { width: min(440px, 100%); margin-top: 48px; scroll-margin-top: 24px; }
.open-hardware > p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.project-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.project-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; min-height: 80px; margin: 0; padding: 16px 20px 16px 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 16px; font-weight: 500; }
.project-link + .project-link { padding-right: 0; padding-left: 20px; border-left: 1px solid var(--line); }
.project-link small { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 400; }
.project-link svg { flex: 0 0 auto; color: var(--signal); }

.product-stage { position: relative; grid-column: 6 / -1; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; margin: 0; isolation: isolate; }
.product-visual { position: relative; min-height: 0; overflow: hidden; }
.product-visual::before, .product-visual::after { position: absolute; z-index: 1; width: 24px; height: 24px; content: ""; pointer-events: none; }
.product-visual::before { top: 12%; left: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.product-visual::after { bottom: 8%; right: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.product-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 49%; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 91%, transparent), linear-gradient(0deg, transparent, #000 14%, #000 85%, transparent); mask-composite: intersect; transition: opacity 1400ms cubic-bezier(.2, .8, .2, 1); }
.product-motor { opacity: 1; }
.product-arm { opacity: 0; object-position: 50% 50%; }
.product-stage[data-active="arm"] .product-motor { opacity: 0; }
.product-stage[data-active="arm"] .product-arm { opacity: 1; }
.product-caption { width: 100%; color: var(--muted); font-size: 13px; }
.image-picker { display: flex; gap: 32px; width: 100%; border-bottom: 1px solid var(--line); }
.image-picker button { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; margin-bottom: -1px; padding: 12px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; cursor: pointer; }
.image-picker button span { font: 12px/1 var(--font-mono, ui-monospace, monospace); color: #858b8c; }
.image-picker button:hover { color: var(--ink); }
.image-picker button[aria-pressed="true"] { border-color: var(--signal); color: var(--ink); }
.image-picker button[aria-pressed="true"] span { color: #ed617a; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: var(--footer-height); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer span:last-child { font-family: var(--font-mono, ui-monospace, monospace); }
.footer-info { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.footer-info a:hover { color: var(--ink); }

@media (min-width: 1800px) { h1 { font-size: 52px; } }
@media (max-width: 1100px) {
  :root { --page-gutter: 48px; --header-height: 80px; }
  .hero { gap: 24px; min-height: 600px; padding-block: 32px; }
  .hero-copy { grid-column: 1 / 7; }
  .product-stage { grid-column: 7 / -1; }
  h1 { font-size: clamp(30px, 3.5vw, 38px); }
  .open-hardware { margin-top: 32px; }
}
@media (max-width: 900px) {
  .hero { min-height: 800px; padding-block: 32px 24px; }
  .hero-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
  .hero-copy, .product-stage { grid-column: 1; }
  .hero-copy { display: grid; grid-template-columns: 1fr auto; gap: 0 24px; padding: 0; align-items: end; }
  .hero-kicker { grid-column: 1 / -1; margin-bottom: 16px; }
  h1 { font-size: 34px; }
  h1 .mission-detail { font-size: 17px; }
  h1 span:nth-child(3) { margin-top: 16px; }
  .open-hardware { width: 260px; margin: 0 0 2px; }
  .project-link { gap: 8px; padding-right: 12px; font-size: 14px; }
  .project-link + .project-link { padding-left: 12px; }
  .project-link svg { width: 16px; height: 16px; }
  .project-link small { font-size: 12px; }
  .product-image { inset: auto; top: 50%; left: 0; width: 100%; height: auto; transform: translateY(-50%); object-fit: contain; }
  .product-visual::before { top: 8%; }
  .image-picker { justify-content: flex-start; }
}
@media (max-width: 639px) {
  :root { --page-gutter: 24px; --header-height: 72px; --footer-height: 56px; }
  .brand { gap: 12px; }
  .brand-icon { width: 44px; height: 34px; }
  .brand-icon img { width: 33px; height: 24px; }
  .brand-word { font-size: 14px; }
  .brand-word small { font-size: 8px; letter-spacing: .1em; }
  .header-link { gap: 12px; font-size: 13px; }
  .header-link span { font-size: 17px; }
  .hero-layout { gap: 8px; }
  .hero { min-height: 680px; padding-block: 24px 16px; }
  .hero-copy { display: block; }
  .hero-kicker { display: none; }
  h1 { font-size: clamp(25px, 6.7vw, 33px); line-height: 1.4; letter-spacing: -.04em; }
  h1 .mission-detail { font-size: 15px; line-height: 1.85; }
  h1 span:nth-child(3) { margin-top: 16px; }
  .open-hardware { width: 100%; margin-top: 24px; }
  .project-link { min-height: 68px; padding-block: 12px; font-size: 14px; }
  .project-link small { margin-bottom: 4px; font-size: 12px; }
  .product-visual { min-height: 240px; }
  .product-arm { left: -30%; width: 160%; }
  .product-visual::before, .product-visual::after { width: 16px; height: 16px; }
  .product-visual::before { top: 8%; }
  .product-visual::after { bottom: 8%; }
  .image-picker { gap: 24px; }
  .image-picker button { min-height: 44px; gap: 8px; padding-block: 10px; font-size: 12px; }
  .image-picker button span { font-size: 11px; }
  .site-footer { gap: 12px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .product-image { transition: none; } }
