:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --fg: #16201d;
  --muted: #5f6b67;
  --line: #e3ddd2;
  --accent: #0f5c4d;
  --accent-fg: #ffffff;
  --accent-soft: #e3efe9;
  --radius: 12px;
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412;
    --surface: #151d1a;
    --fg: #eef2f0;
    --muted: #9aa8a3;
    --line: #26322e;
    --accent: #3fb598;
    --accent-fg: #07120f;
    --accent-soft: #15302a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.25rem, 7vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; margin-bottom: 6px; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.narrow { max-width: 38rem; margin-top: 8px; }
.hint { color: var(--muted); font-size: 0.875rem; margin-top: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; flex-shrink: 0; }
@media (max-width: 480px) { .brand-sub { display: none; } }
.mark {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: var(--accent-fg); font-weight: 800;
}
.brand-name { font-weight: 700; letter-spacing: -0.01em; }
.brand-sub { color: var(--muted); }
.nav { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.925rem; white-space: nowrap; }
.nav a:hover { color: var(--fg); }

/* hero */
.hero { padding-top: 72px; padding-bottom: 0; }
.eyebrow { color: var(--accent); font-weight: 650; font-size: 0.875rem; margin-bottom: 14px; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 40rem; margin-top: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 40px 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 520px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.stats div { background: var(--surface); padding: 14px 16px; }
.stats dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.block { width: 100%; margin-top: 18px; }
.btn.small { padding: 7px 14px; font-size: 0.875rem; }

/* viewer + order */
.viewer-order { display: grid; gap: 24px; padding-bottom: 56px; }
@media (min-width: 900px) { .viewer-order { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.viewer-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, color-mix(in srgb, var(--accent) 7%, transparent) 14px 15px),
    linear-gradient(135deg, var(--accent-soft), var(--surface));
  display: grid; place-items: center;
}
.viewer-frame video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0b0f0d; }
.viewer-toggle {
  position: absolute; right: 10px; bottom: 10px; padding: 5px 12px; border-radius: 999px;
  border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.preview-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pv-task { color: var(--muted); font-size: 0.925rem; margin-top: 12px; min-height: 2.8em; }
.readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.readouts div { background: var(--bg); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.readouts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.readouts dd { margin: 2px 0 0; font-weight: 600; font-size: 0.9rem; overflow-wrap: anywhere; }

.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.order h2 { font-size: 1.25rem; margin-bottom: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-size: 0.8rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0; margin-bottom: 8px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { accent-color: var(--accent); }
.choice .price { margin-left: auto; color: var(--muted); font-size: 0.875rem; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 0.925rem; }
input[type="email"], input[type="search"], textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit;
}
.total { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.total-label { display: block; font-size: 0.8rem; color: var(--muted); }
.total-rate { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.total-unit { color: var(--muted); }
.total-sum { color: var(--muted); font-size: 0.925rem; text-align: right; }

/* sections */
section.wrap { padding-top: 56px; padding-bottom: 56px; }
.band { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 20px; }
.grid3 { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 760px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.grid3 article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid3 p { color: var(--muted); }

/* catalog */
.filters { display: grid; gap: 12px; margin-bottom: 14px; }
.filter-row { display: grid; gap: 10px; }
@media (min-width: 760px) { .filter-row { grid-template-columns: 1.2fr 0.8fr 1.6fr; } }
.count { font-size: 0.9rem; margin-bottom: 12px; }
.card .where { color: var(--fg); font-weight: 500; margin-top: 2px; }
.card .meta { font-size: 0.8rem; margin-top: 10px; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 0.875rem; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card .tags { display: flex; gap: 6px; margin-bottom: 10px; }
.tag { font-size: 0.72rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tag.plain { background: var(--bg); color: var(--muted); }
.card p { color: var(--muted); font-size: 0.925rem; margin-top: 6px; }
.empty { color: var(--muted); }

/* table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
tr.sel td { background: var(--accent-soft); font-weight: 700; }
tr.group th { text-align: left; background: var(--bg); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

table.spec { min-width: 0; }
table.spec th, table.spec td { text-align: left; white-space: normal; vertical-align: top; }
table.spec th { width: 32%; font-weight: 600; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 560px) { table.spec th, table.spec td { display: block; width: auto; } table.spec th { border-bottom: 0; padding-bottom: 0; } }

.mail-fallback { margin-top: 16px; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; font-size: 0.925rem; color: var(--muted); }
.mail-fallback .addr { margin: 6px 0 12px; font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.fallback-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* samples */
.sample-form { max-width: 34rem; }
textarea { resize: vertical; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.foot a { color: var(--fg); }

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