/* TRiNOV GAMES (games.trinov.dev) v2 — 2026-10-14
   v2: the top bar is the trinov.dev primary navigation with GAMES as one of the
   items (Sean: "games가 상단바 메뉴중 하나"), and a three-line menu button on mobile.
   Shell (fixed 74px glass bars, theme tokens, Pretendard thin, TRiNOV Gold) follows
   trinov.dev styles-theme-gold-28 / styles-public-32 and the TRiNOV WEBLOG shell.
   Content is the game-production research moved from www.lab96.net (v0.32).
   Angular design code: no rounding. */
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #151a1a;
  --bg-deep: #0e1314;
  --ink: #f0f3ef;
  --muted: #a7adaa;
  --line: rgba(240, 243, 239, 0.18);
  --glass: rgba(210, 213, 205, 0.075);
  --accent: #f5b700;
  --accent-strong: #ffca1a;
  --accent-text: #f5b700;
  --accent-text-strong: #f5b700;
  --accent-text-small: #f5b700;
  --accent-line: rgba(245, 183, 0, 0.48);
  --accent-glow: rgba(255, 188, 0, 0.42);
  --on-accent: #18150b;
  --focus-ring: #f5b700;
  --text-lead: #d8ddd8;
  --text-focus: #edf1ed;
  --text-tail: #b6beb8;
  --text-body: #b7bcb8;
  --text-secondary: #aab1ad;
  --text-tertiary: #818986;
  --nav-hover: rgba(255, 255, 255, 0.06);
  --header-glass: var(--glass);
  --header-scrolled: rgba(21, 26, 26, 0.8);
  --glass-hover: rgba(220, 225, 218, 0.11);
  --mobile-nav: rgba(22, 27, 27, 0.985);
  --glass-featured: rgba(245, 183, 0, 0.075);
  --control-hover: rgba(245, 183, 0, 0.12);
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  --corner-color: rgba(238, 242, 238, 0.82);
  --brand-filter: none;
  --module-gap: 12px;
  --footer-bar-height: 74px;
  --body-background:
    radial-gradient(circle at 12% 5%, rgba(183, 175, 163, 0.24), transparent 26%),
    radial-gradient(circle at 88% 70%, rgba(53, 102, 100, 0.2), transparent 30%),
    linear-gradient(150deg, #343531 0%, #1b2120 44%, #101617 100%);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #e3e6e3;
  --bg-deep: #d1d6d2;
  --ink: #171b19;
  --muted: #58605c;
  --line: rgba(20, 27, 23, 0.16);
  --glass: rgba(178, 186, 182, 0.3);
  --accent: #f5b700;
  --accent-strong: #ffc51a;
  --accent-text: #b98200;
  --accent-text-strong: #a97800;
  --accent-text-small: #39403c;
  --accent-line: #a97800;
  --accent-glow: rgba(245, 183, 0, 0.24);
  --on-accent: #18150b;
  --focus-ring: #171b19;
  --text-lead: #4f5652;
  --text-focus: #171b19;
  --text-tail: #5d6561;
  --text-body: #414844;
  --text-secondary: #515955;
  --text-tertiary: #6f7773;
  --nav-hover: rgba(17, 23, 20, 0.055);
  --header-glass: rgba(255, 255, 255, 0.44);
  --header-scrolled: rgba(232, 235, 232, 0.82);
  --glass-hover: rgba(200, 207, 203, 0.42);
  --mobile-nav: rgba(235, 238, 235, 0.985);
  --glass-featured: rgba(185, 130, 0, 0.1);
  --control-hover: rgba(185, 130, 0, 0.14);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 18px 55px rgba(33, 41, 36, 0.055);
  --corner-color: rgba(55, 62, 58, 0.76);
  --brand-filter: brightness(0);
  --body-background:
    radial-gradient(circle at 12% 5%, rgba(145, 139, 130, 0.14), transparent 29%),
    radial-gradient(circle at 88% 72%, rgba(101, 121, 113, 0.17), transparent 32%),
    linear-gradient(150deg, #eff0ed 0%, #e0e3e0 46%, #cdd3cf 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: none; scroll-padding-top: 118px; }
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; }
body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  background: var(--body-background);
  background-attachment: fixed;
  color: var(--ink);
  letter-spacing: 0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { color: var(--on-accent); background: var(--accent); }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.skip-link {
  position: fixed; z-index: 40; top: 12px; left: 12px; padding: 12px 16px;
  color: var(--on-accent); background: var(--accent); font-size: 12px; font-weight: 600;
  transform: translateY(-160%); transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--glass-shadow);
}
.site-header.glass { background: var(--header-glass); }

/* ---------------- top bar (same grid as TRiNOV WEBLOG) ---------------- */
.site-header {
  width: min(1180px, calc(100% - 48px)); height: 74px; position: fixed; z-index: 10;
  top: 24px; left: 50%; transform: translateX(-50%); display: grid;
  grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 24px;
  border-radius: 0; transition: background .3s, top .3s;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .21em; }
.brand img { width: 27px; height: 27px; object-fit: contain; opacity: .9; filter: var(--brand-filter); }
.brand-i { color: var(--accent-text); }
html[data-theme="dark"] .brand-i { text-shadow: 0 0 12px rgba(245, 183, 0, 0.24); }


/* primary navigation — same item grid as trinov.dev (.site-header nav a) */
.site-header nav { height: 100%; display: flex; align-items: stretch; }
.site-header nav > a {
  min-width: 92px; display: grid; place-items: center; color: var(--muted);
  font-size: 10px; font-weight: 500; letter-spacing: .09em; white-space: nowrap;
  border-inline: 1px solid transparent; transition: color .25s, background .25s, border-color .25s;
}
.site-header nav > a:hover, .site-header nav > a.active { color: var(--ink); background: var(--nav-hover); border-color: var(--nav-hover); }
.mobile-language-switcher { display: none; }
.menu-button { display: none; padding: 0; color: var(--ink); background: none; border: 0; cursor: pointer; }
body.menu-open { overflow: hidden; }

.header-controls { justify-self: end; display: flex; align-items: center; gap: 14px; }
.language-switcher {
  display: flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: 9px; font-weight: 720; letter-spacing: .08em; line-height: 1;
}
.language-switcher a { position: relative; padding: 11px 1px 10px; transition: color .18s ease; }
.language-switcher a:hover, .language-switcher a:focus-visible,
.language-switcher a[aria-current="page"] { color: var(--ink); }
.language-switcher a[aria-current="page"]::after {
  position: absolute; right: 1px; bottom: 5px; left: 1px; height: 1px;
  background: var(--accent); content: "";
}

.theme-toggle {
  position: relative; width: 34px; height: 34px; display: grid; flex: 0 0 auto;
  place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 0;
  color: var(--muted); background: transparent; cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); background: var(--nav-hover); }
.theme-toggle svg { width: 16px; height: 16px; overflow: visible; }
.theme-icon { transform-origin: 10px 10px; transition: opacity 220ms ease, transform 260ms cubic-bezier(.2, .8, .2, 1); }
.theme-icon-sun { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: square; }
.theme-icon-moon { fill: currentColor; }
html[data-theme="dark"] .theme-icon-sun { opacity: 0; transform: rotate(-35deg) scale(.65); }
html[data-theme="dark"] .theme-icon-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="light"] .theme-icon-sun { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="light"] .theme-icon-moon { opacity: 0; transform: rotate(30deg) scale(.65); }

/* ---------------- bottom bar (same as trinov.dev / WEBLOG) ---------------- */
.site-footer {
  position: fixed; z-index: 10; right: 0; bottom: 0; left: 0;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  height: var(--footer-bar-height); min-height: 0;
  display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; align-items: center;
  gap: 30px; padding: 0 24px; border-top: 1px solid var(--line);
  color: #7f8783; font-size: 8px; font-weight: 400; letter-spacing: .1em;
}
.site-footer p { font: 400 13px "Pretendard", sans-serif; letter-spacing: 0; color: var(--text-secondary); }
.site-footer a:last-child { color: var(--text-secondary); }
.site-footer a:hover { color: var(--ink); }

.lab96-lockup {
  display: inline-block; white-space: nowrap; font-style: normal; font-weight: 400;
  font-synthesis: none; letter-spacing: .015em; line-height: .9; vertical-align: -.025em;
}
.lab96-lockup sup { position: relative; top: -.58em; margin-left: .045em; font-size: .48em; line-height: 0; letter-spacing: 0; vertical-align: baseline; }
@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .lab96-lockup {
    width: 2.4em; height: .78em; overflow: hidden; background-color: currentColor;
    -webkit-mask: url("/logo/lab96-milling-lockup-v1.svg") center / contain no-repeat;
    mask: url("/logo/lab96-milling-lockup-v1.svg") center / contain no-repeat;
    text-indent: -999em; line-height: 1; vertical-align: -.07em;
  }
}

/* ---------------- layout ---------------- */
main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 calc(var(--footer-bar-height) + 72px);
}
html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ko"] h3,
html[lang="ko"] p, html[lang="ko"] li { word-break: keep-all; overflow-wrap: break-word; }

/* ---------------- shared type ---------------- */
.display-title { line-height: .94; letter-spacing: -.055em; font-weight: 240; }
.title-lead { display: block; margin-bottom: .16em; color: var(--text-lead); font-size: .68em; font-weight: 220; letter-spacing: -.035em; line-height: 1.12; }
.title-focus { display: block; text-wrap: balance; }
.title-focus strong { color: var(--text-focus); font: 720 1em/1 "Pretendard", sans-serif; letter-spacing: -.065em; }
.title-tail { display: inline-block; color: var(--text-tail); font: 280 .62em/1 "Pretendard", sans-serif; letter-spacing: -.04em; }
html[lang="en"] .title-focus strong,
html[lang="vi"] .title-focus strong { letter-spacing: -.045em; line-height: 1.04; }

.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; color: var(--muted); font-size: 10px; letter-spacing: .23em; }
.eyebrow > span:first-child { width: 28px; height: 1px; background: var(--accent); position: relative; flex: 0 0 auto; }
.eyebrow > span:first-child::after { content: ""; position: absolute; width: 4px; height: 4px; right: 0; top: -1.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent-glow); }
.eyebrow .lab96-lockup { font-size: 13px; }

.button {
  min-width: 176px; height: 53px; display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0 18px; border: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  transition: background .25s, border-color .25s, transform .25s, color .25s;
}
.button span { font-size: 16px; font-weight: 400; }
.button-primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.button-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-2px); }
.button-ghost:hover { background: var(--control-hover); border-color: var(--accent-line); transform: translateY(-2px); }

/* ---------------- hero ---------------- */
.hero {
  min-height: max(660px, calc(100dvh - var(--footer-bar-height)));
  display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 72px;
  padding: 140px 0 64px;
}
.hero-title { font-size: clamp(46px, 4.45vw, 68px); }
.hero-description { max-width: 34em; margin-top: 34px; text-wrap: pretty; color: var(--text-body); font-size: 16px; line-height: 1.85; font-weight: 350; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 42px; }

.hero-visual {
  position: relative; min-height: 510px; padding: 22px; display: flex; flex-direction: column; overflow: hidden;
}
.corner { position: absolute; z-index: 2; width: 18px; height: 18px; border: 0 solid var(--corner-color); pointer-events: none; }
.corner-tl { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; }
.corner-tr { right: -1px; top: -1px; border-right-width: 2px; border-top-width: 2px; }
.corner-bl { left: -1px; bottom: -1px; border-left-width: 2px; border-bottom-width: 2px; }
.corner-br { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.visual-head { display: flex; justify-content: space-between; gap: 16px; color: var(--text-secondary); font-size: 8px; letter-spacing: .13em; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.index-list { margin: auto 0; padding: 26px 0; }
.index-list li + li a { border-top: 0; }
.index-list a {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 19px 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .25s ease;
}
.index-list a:hover, .index-list a:focus-visible { background: var(--nav-hover); }
.idx-no { color: var(--accent-text-small); font-size: 10px; letter-spacing: .1em; }
.idx-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-width: 0; }
.idx-title { color: var(--ink); font-size: 22px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; transition: color .2s ease; }
.idx-sub { color: var(--text-secondary); font-size: 12px; font-weight: 300; }
.idx-arrow { color: var(--accent-text); font-size: 14px; transition: transform .2s ease; }
.index-list a:hover .idx-title, .index-list a:focus-visible .idx-title { color: var(--accent-text); }
.index-list a:hover .idx-arrow, .index-list a:focus-visible .idx-arrow { transform: translate(2px, -2px); }
.visual-foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.visual-foot span { border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.visual-foot span:first-child { border-top-color: var(--accent); color: var(--ink); }
.scan-line {
  position: absolute; z-index: 1; left: 22px; right: 22px; top: 18%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent); opacity: .55;
  animation: scan 7s ease-in-out infinite;
}
@keyframes scan { 0%, 100% { top: 16%; opacity: 0; } 12% { opacity: .55; } 50% { top: 84%; opacity: .55; } 62% { opacity: 0; } }

/* ---------------- pillar strip ---------------- */
.pillar-strip {
  display: grid; grid-template-columns: minmax(170px, .7fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; align-items: center; gap: 30px;
  padding: 24px 23px;
}
.pillar-name { display: flex; align-items: baseline; gap: .3em; font: 400 26px/1.1 "Pretendard", sans-serif; letter-spacing: -.035em; }
.pillar-name span { color: var(--text-secondary); font-size: .62em; font-weight: 380; }
.pillar-name strong { color: var(--ink); font-weight: 680; }
.pillar-desc { color: var(--text-body); font-size: 13px; line-height: 1.75; }
.pillar-items li, .card-list li { color: var(--text-secondary); font-size: 11px; padding: 4px 0; }
.pillar-items li::before, .card-list li::before { content: "+"; margin-right: 8px; color: var(--accent-text); }
.text-link {
  display: inline-flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  color: var(--ink); font-size: 9px; font-weight: 600; letter-spacing: .16em; white-space: nowrap;
  transition: border-color .2s ease;
}
.text-link span { color: var(--accent-text); font-size: 13px; transition: transform .2s ease; }
.text-link:hover, .text-link:focus-visible { border-color: var(--accent-line); }
.text-link:hover span, .text-link:focus-visible span { transform: translate(2px, -2px); }

/* ---------------- sections ---------------- */
.section { padding: 150px 0 0; }
.section-heading { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: var(--module-gap); margin-bottom: 55px; }
.section-heading > div { grid-column: 1 / span 2; padding-right: 48px; }
.section-index { display: block; margin-bottom: 22px; color: var(--accent-text-small); font-size: 9px; letter-spacing: .2em; }
.section-index .lab96-lockup { font-size: 12px; }
.section-title { font-size: clamp(36px, 3.6vw, 52px); }
.section-heading > p { grid-column: 3; margin-bottom: 8px; color: var(--text-secondary); font-size: 13px; line-height: 1.8; text-align: right; text-wrap: balance; }

.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.card-top > span:first-child { color: var(--accent-text-small); }
.status-tag { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 8px; letter-spacing: .14em; }
.status-tag i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent-glow); }

/* research */
.study-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--module-gap); }
.study-card { position: relative; min-height: 400px; padding: 23px; display: flex; flex-direction: column; transition: background .35s ease, transform .35s ease; }
.study-card:hover { background: var(--glass-hover); transform: translateY(-4px); }
.study-card h3 { margin: 56px 0 8px; color: var(--ink); font: 650 27px/1.15 "Pretendard", sans-serif; letter-spacing: -.035em; }
.study-sub { margin-bottom: 18px; color: var(--accent-text); font-size: 12px; font-weight: 400; letter-spacing: .01em; }
.study-card > p:not(.study-sub) { max-width: 40em; color: var(--text-body); font-size: 13px; line-height: 1.75; }
.step-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; margin-top: auto; padding-top: 28px; }
.step-list li { padding-top: 12px; border-top: 1px solid var(--line); }
.step-list li:first-child { border-top-color: var(--accent); }
.step-list b { display: block; margin-bottom: 5px; color: var(--ink); font-size: 9px; font-weight: 600; letter-spacing: .12em; line-height: 1.35; }
.step-list b em { display: block; margin-bottom: 3px; color: var(--accent-text-small); font-style: normal; font-weight: 400; }
.step-list span { display: block; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }

.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--module-gap); margin-top: var(--module-gap); }
.mini-card { min-height: 210px; padding: 23px; display: flex; flex-direction: column; }
.mini-card .card-label { color: var(--accent-text-small); font-size: 9px; letter-spacing: .18em; }
.mini-card h3 { margin-top: auto; color: var(--ink); font: 620 20px/1.3 "Pretendard", sans-serif; letter-spacing: -.03em; }
.mini-card p { margin-top: 10px; color: var(--text-body); font-size: 12px; line-height: 1.7; }

/* principle */
.compare { padding: 0; }
.compare-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compare-row + .compare-row { border-top: 1px solid var(--line); }
.compare-row > * { padding: 24px 23px; font-size: 15px; line-height: 1.6; }
.compare-row > * + * { border-left: 1px solid var(--line); }
.compare-head > * { padding-top: 18px; padding-bottom: 16px; color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: .2em; }
.compare-head > * + * { color: var(--accent-text-small); }
.compare-row:not(.compare-head) > :first-child { color: var(--text-secondary); font-weight: 300; }
.compare-row:not(.compare-head) > :last-child { color: var(--ink); font-weight: 500; }

/* education */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--module-gap); }
.service-card { min-height: 340px; padding: 23px; display: flex; flex-direction: column; transition: background .35s ease, transform .35s ease; }
.service-card:hover { background: var(--glass-hover); transform: translateY(-6px); }
.service-card h3 { margin: 70px 0 13px; color: var(--ink); font: 650 26px/1.15 "Pretendard", sans-serif; letter-spacing: -.035em; }
.service-card p { color: var(--text-body); font-size: 12.5px; line-height: 1.75; }
.service-card > a { display: flex; justify-content: space-between; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); font-size: 9px; letter-spacing: .16em; }
.service-card > a span { color: var(--accent-text); font-size: 12px; transition: transform .2s ease; }
.service-card > a:hover span, .service-card > a:focus-visible span { transform: translate(2px, -2px); }

.rule-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: var(--module-gap); padding: 20px 23px; }
.rule-strip span { color: var(--accent-text-small); font-size: 9px; letter-spacing: .2em; white-space: nowrap; }
.rule-strip p { color: var(--ink); font-size: 14px; font-weight: 400; text-align: right; }

/* background */
.background-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: var(--module-gap); }
.background-panel { padding: 34px 32px; display: flex; flex-direction: column; gap: 18px; }
.background-panel p { color: var(--text-body); font-size: 15px; line-height: 1.85; text-wrap: pretty; }
.background-panel .lab96-lockup, .section-heading > p .lab96-lockup { font-size: 1.05em; }
.background-panel p:first-child { color: var(--ink); font-size: 17px; font-weight: 400; }
.tag-panel { padding: 23px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { padding: 9px 12px; border: 1px solid var(--line); color: var(--text-secondary); font-size: 9px; letter-spacing: .14em; }
.tag-panel .text-link { align-self: flex-start; }

/* contact */
.contact-panel {
  position: relative; min-height: 560px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 30px; overflow: hidden; text-align: center;
}
.contact-panel::before {
  content: ""; position: absolute; width: 460px; height: 460px; border: 1px solid var(--line); border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.014), 0 0 0 160px rgba(255, 255, 255, 0.01);
  opacity: .6; pointer-events: none;
}
.contact-panel > * { position: relative; z-index: 1; }
.contact-panel .section-index { margin-bottom: 26px; }
.contact-title { font-size: clamp(40px, 4.4vw, 62px); }
.contact-panel > p { max-width: 36em; margin: 28px 0 36px; color: var(--text-body); font-size: 13.5px; line-height: 1.8; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* 404 */
.nf-main .section { padding-top: 140px; }
.nf-block { max-width: 34em; }
.nf-block + .nf-block { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.nf-block .section-title { font-size: clamp(28px, 2.6vw, 38px); }
.nf-block p { margin: 14px 0 18px; color: var(--text-body); font-size: 13px; line-height: 1.7; }

/* reveal (only when the app script runs) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scan-line, .status i { animation: none; }
  .scan-line { display: none; }
  .study-card:hover, .service-card:hover, .button:hover { transform: none; }
}

/* ---------------- responsive ---------------- */
/* seven top-bar items fit between 901 and 1100px */
@media (max-width: 1100px) {
  .site-header nav > a { min-width: 0; padding-inline: 12px; }
}

/* mobile: three-line menu button and a drop-down panel (trinov.dev pattern) */
@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .site-header nav, .header-controls .language-switcher { display: none; }
  .header-controls { gap: 0; }
  .menu-button { display: flex; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: flex-end; gap: 6px; padding: 10px 11px; }
  .menu-button span { display: block; width: 22px; height: 1px; background: currentColor; }
  .site-header.open nav {
    position: absolute; top: 73px; right: 0; left: 0; display: flex; flex-direction: column; height: auto;
    max-height: calc(100dvh - 86px - var(--footer-bar-height)); overflow-y: auto;
    background: var(--mobile-nav); border: 1px solid var(--line);
  }
  .site-header.open nav > a { height: 55px; flex-shrink: 0; border-inline: 0; border-bottom: 1px solid var(--line); }
  .site-header.open .mobile-language-switcher { display: block; flex-shrink: 0; padding: 18px; }
  .mobile-language-switcher > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
  .mobile-language-switcher > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .mobile-language-switcher a { position: relative; display: flex; min-width: 0; height: 46px; align-items: center; justify-content: center; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 500; }
  .mobile-language-switcher a:last-child { border-right: 0; }
  .mobile-language-switcher a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .mobile-language-switcher a[aria-current="page"]::after { content: ""; position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; background: var(--accent); }
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding-top: 150px; min-height: 0; }
  .hero-visual { min-height: 470px; }
  .pillar-strip { grid-template-columns: 1fr 1fr; }
  .pillar-strip .text-link { justify-self: start; }
}

@media (max-width: 900px) {
  :root { --footer-bar-height: 72px; }
  .site-footer { grid-template-columns: 1fr auto; gap: 18px; }
  .section { padding-top: 110px; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 36px; }
  .section-heading > div { grid-column: 1; padding-right: 0; }
  .section-heading > p { grid-column: 1; text-align: left; }
  .study-grid, .mini-grid, .service-grid, .background-grid { grid-template-columns: 1fr; }
  .study-card { min-height: 0; }
  .study-card h3 { margin-top: 40px; }
  .step-list { padding-top: 26px; }
  .mini-card { min-height: 0; }
  .mini-card h3 { margin-top: 34px; }
  .service-card { min-height: 0; }
  .service-card h3 { margin-top: 44px; }
  .service-card > a { margin-top: 26px; }
  .pillar-strip { grid-template-columns: 1fr; gap: 18px; }
  .rule-strip { flex-direction: column; align-items: flex-start; gap: 10px; }
  .rule-strip p { text-align: left; }
}

@media (max-width: 600px) {
  :root { --footer-bar-height: 64px; }
  .site-header { width: calc(100% - 28px); top: 14px; padding: 0 24px; }
  .theme-toggle { width: 36px; height: 36px; }
  main { width: calc(100% - 28px); }
  .site-footer { width: calc(100% - 28px); grid-template-columns: 1fr auto; gap: 12px; padding: 0 16px; }
  .hero { padding-top: 124px; gap: 44px; }
  .hero-title { font-size: 42px; }
  .title-lead { font-size: .72em; margin-bottom: .18em; }
  .hero-description { font-size: 14px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .hero-visual { min-height: 0; padding: 18px; }
  .index-list { padding: 22px 0; }
  .index-list a { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; padding: 16px 4px; }
  .idx-title { font-size: 18px; }
  .idx-sub { font-size: 11px; }
  .visual-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .section-title { font-size: 34px; }
  .contact-title { font-size: 36px; }
  .study-card h3 { font-size: 23px; }
  .step-list { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-row > * { padding: 18px 16px; font-size: 13.5px; }
  .background-panel { padding: 26px 22px; }
  .background-panel p:first-child { font-size: 16px; }
  .contact-panel { min-height: 0; padding: 64px 20px; }
  .contact-panel::before { width: 320px; height: 320px; }
}

