/* OPC Harness shared visual system. All product pages use this same foundation. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque-latin.woff2') format('woff2-variations'),
    url('/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/public-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --surface: #ffffff;
  --wash: #efede7;
  --ink: #16151c;
  --text: #3e3d48;
  --muted: #6e6d79;
  --hair: #e2e0da;
  --hair-strong: #cbc8c0;
  --cobalt: #2455df;
  --cobalt-bright: #2456e6;
  --cobalt-hover: #1d47c4;
  --signal: #2455df;
  --font: 'Public Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --page: 1200px;
  --gutter: clamp(18px, 4vw, 48px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 68px;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.55 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(36, 85, 223, 0.16);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--cobalt);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding: 0 max(var(--gutter), calc((100% - var(--page)) / 2));
  background: rgba(247, 246, 242, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--hair);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.site-header > nav:not(.mobile-nav) {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-header > nav:not(.mobile-nav) a {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 450;
  white-space: nowrap;
  transition: color 140ms ease;
}

.site-header > nav:not(.mobile-nav) a:hover,
.site-header > nav:not(.mobile-nav) a[aria-current='page'] {
  color: var(--ink);
}

.site-header > nav:not(.mobile-nav) a[aria-current='page'] {
  font-weight: 600;
}

.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.lang-switch:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.header-cta:hover {
  border-color: var(--ink);
  background: #fcfbf9;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-toggle:hover {
  border-color: var(--ink);
}

.nav-toggle svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 8px var(--gutter) 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 14px 30px -18px rgba(22, 21, 28, 0.2);
}

.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--hair);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

.mobile-nav a:hover,
.mobile-nav a[aria-current='page'] {
  color: var(--cobalt);
}

.mobile-nav .mobile-lang-link {
  color: var(--text);
  font-size: 14px;
}

/* ---------- actions & links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--cobalt);
  background: var(--cobalt);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.button:hover {
  background: var(--cobalt-hover);
  border-color: var(--cobalt-hover);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.button-secondary:hover {
  border-color: transparent;
  background: rgba(36, 85, 223, .04);
  color: var(--cobalt);
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--hair-strong);
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.quiet-link:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}


/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 26px var(--gutter) 40px;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 14.5px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.footer-brand svg {
  width: 18px;
  height: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.footer-links a:hover {
  color: var(--ink);
}

.colophon {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.footer-note {
  flex-basis: 100%;
  margin: 0;
  font-size: 13.5px;
}


/* Shared chrome stays compact at every route. */
@media(max-width:1000px){.site-header{gap:14px}.site-header>nav:not(.mobile-nav){gap:16px}.primary-nav>a[href="https://github.com/AniChikage/opc-harness"]{display:none}}
@media(max-width:960px){.site-header>nav:not(.mobile-nav) a{font-size:13.5px}.header-tools{gap:6px}.lang-switch,.header-cta{padding-inline:10px;font-size:13px}}
@media(max-width:800px){.primary-nav>a[href="/studio/"]{display:none}}
@media(max-width:720px){.site-header{gap:10px;height:56px}.site-header>nav:not(.mobile-nav){display:none}.header-tools{margin-left:auto;gap:8px}.nav-toggle{display:inline-flex}.colophon{margin-left:0}}
@media(max-width:520px){body{font-size:15.5px}.site-header{padding-inline:14px}.brand{gap:7px;font-size:16px}.brand svg{width:18px;height:18px}.header-cta{display:none}.lang-switch,.nav-toggle{height:32px;padding-inline:10px;font-size:13px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Higher than legacy workflow nav rules; [hidden] still wins when closed. */
.site-header .mobile-nav{display:flex;margin:0;align-items:stretch;gap:0}
.site-header nav.mobile-nav a{display:flex;align-items:center;min-height:42px;font-size:15px;font-weight:500}
.site-header nav.mobile-nav a:hover{color:var(--cobalt)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.service-cta-actions{display:flex;align-items:center;justify-content:flex-end;gap:18px;flex-wrap:wrap}
@media(max-width:520px){.service-cta-actions{justify-content:flex-start}}
@media(max-width:380px){.nav-toggle span{display:none}}
:lang(ja){--font:'Public Sans',-apple-system,BlinkMacSystemFont,'Hiragino Kaku Gothic ProN','Yu Gothic','Meiryo',sans-serif}

@media(min-width:721px) and (max-width:960px){.site-header>nav:not(.mobile-nav){display:none}.header-tools{margin-left:auto}.nav-toggle{display:inline-flex}}

/* One quiet globe opens the same language panel throughout the product site. */
.language-control{position:relative;display:inline-flex;flex:none;z-index:80}
.language-toggle{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:1px solid var(--hair-strong);border-radius:50%;background:var(--surface);color:var(--text);cursor:pointer}
.language-toggle>svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
.language-toggle:hover,.language-toggle[aria-expanded=true]{color:var(--cobalt);border-color:var(--cobalt)}
.language-panel{position:absolute;top:calc(100% + 10px);right:0;z-index:100;width:196px;max-width:calc(100vw - 36px);max-height:min(360px,70dvh);overflow:auto;padding:6px;border:1px solid var(--hair);border-radius:10px;background:var(--surface);box-shadow:0 10px 30px rgba(22,21,28,.10)}
.language-panel>button{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:36px;padding:8px 10px;border:0;border-radius:5px;color:var(--text);background:transparent;font:13px/1.4 var(--font);text-align:left;cursor:pointer}
.language-panel>button:hover,.language-panel>button:focus-visible{color:var(--cobalt);background:#edf1ff;outline-offset:-2px}
.language-panel>button[aria-checked=true]{color:var(--cobalt)}
.language-panel>button>svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;visibility:hidden;flex:none}
.language-panel>button[aria-checked=true]>svg{visibility:visible}
.footer-identity .language-panel{top:auto;bottom:calc(100% + 10px);right:auto;left:0}
@media(max-width:720px){.language-toggle{width:36px;height:36px}.language-panel>button{min-height:40px}}
