/* ============================================================
   KONNEV — Global Monochrome System (system.css)
   Base typography, sharp architectural controls, square cursor, FAQ
   ============================================================ */

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background-color: var(--ink);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--white);
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
  font-synthesis: none;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-wrap: balance;
}

p, li, blockquote, figcaption { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
img { image-rendering: auto; }

::selection { background: var(--sel-bg); color: var(--sel-ink); }
.dark-band ::selection,
footer.knv-footer ::selection,
.knv-hero ::selection { background: var(--white); color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: var(--radius-control);
}

.page-content {
  position: relative;
  z-index: 2;
  background: var(--white);
}

/* Precision Section Header with Index Code (01 / ...) */
.knv-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.knv-sec-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.knv-sec-index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 22px;
  color: var(--text-primary);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.section-link:hover { border-bottom-color: currentColor; opacity: 0.82; }

/* Architectural Sharp Buttons (4px) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-primary:hover { background: var(--ink-2); }
.btn-primary:active { transform: scale(0.98); }

.btn-primary--invert {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
}
.btn-primary--invert:hover { background: var(--surface-1); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(9, 9, 11, 0.04);
}

.btn-ghost--dark {
  border-color: var(--border-dark-strong);
  color: var(--white);
}
.btn-ghost--dark:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

/* Konnev Original Precision Square Cursor (8px architectural square -> sharp tag) */
@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor,
  html.has-custom-cursor * { cursor: none !important; }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(9, 9, 11, 0.25);
  pointer-events: none;
  z-index: 10002;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: opacity 0.14s ease, background-color 0.16s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: layout style;
  opacity: 0;
  overflow: hidden;
}

html.navp-locked .cursor {
  background: var(--white);
  border-color: rgba(9, 9, 11, 0.35);
}
html.navp-locked[data-nav-tone="light"] .cursor {
  background: var(--ink);
  border-color: rgba(255, 255, 255, 0.85);
}

.cursor.visible { opacity: 1; }

.cursor-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.16s ease, transform 0.2s var(--ease-arch);
  white-space: nowrap;
  user-select: none;
}

.cursor.active {
  width: auto;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-control);
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.24);
  mix-blend-mode: normal;
}

.cursor.active .cursor-text { opacity: 1; transform: scale(1); }

.cursor.link-hover {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
}

/* Reveal Utility — exits compositor layer on .is-in for razor-sharp native text */
.knv-reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-arch), transform 0.65s var(--ease-arch);
}

.knv-reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Minimal FAQ Accordion */
.faq-section {
  padding-block: var(--home-space);
  padding-inline: var(--home-gutter);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.faq-heading {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text-primary);
}

.faq-list { max-width: 860px; display: flex; flex-direction: column; }
.faq-item { border-top: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 1px solid var(--border); }

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
  background: none;
  border: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--text-primary);
  cursor: pointer;
}

.faq-icon {
  flex: none;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--text-subtle);
  transition: transform 0.22s var(--ease-arch), color 0.2s ease;
}

.faq-item.is-open .faq-icon { transform: rotate(45deg); color: var(--ink); }

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s var(--ease-arch);
}
.faq-item.is-open .faq-panel { grid-template-rows: 1fr; }
.faq-panel-inner { overflow: hidden; }
.faq-answer {
  padding-bottom: 22px;
  font-size: var(--desc-size);
  line-height: 1.58;
  color: var(--text-muted);
  max-width: 64ch;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
