/* HippoInv Labs Shared OKLCH Tokens & Visual-First Layout Styles */
:root {
  color-scheme: light;

  --bg-page: oklch(0.978 0.004 250);
  --bg-surface: oklch(0.995 0.002 250);
  --bg-subtle: oklch(0.946 0.007 250);
  --bg-inset: oklch(0.922 0.009 250);

  --ink-primary: oklch(0.185 0.015 255);
  --ink-secondary: oklch(0.39 0.016 255);
  --ink-muted: oklch(0.45 0.015 255);
  --ink-on-accent: oklch(0.99 0.002 250);

  --accent: oklch(0.45 0.175 258);
  --accent-hover: oklch(0.39 0.175 258);
  --accent-tint: oklch(0.942 0.028 258);

  --ok: oklch(0.40 0.14 152);
  --ok-bg: oklch(0.945 0.036 152);
  --warn: oklch(0.44 0.135 68);
  --warn-bg: oklch(0.955 0.042 78);
  --danger: oklch(0.46 0.18 24);
  --danger-bg: oklch(0.95 0.036 24);

  --line-subtle: oklch(0.885 0.008 250);
  --line-strong: oklch(0.76 0.012 250);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-heading: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;

  --measure: 64ch;
  --max-width: 1160px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.mono {
  font-family: var(--font-mono);
}

/* Single-Line Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--line-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-primary);
  font-weight: 700;
  font-size: 1.0625rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background-color: var(--ink-primary);
  color: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}

.top-nav a {
  color: var(--ink-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease-out);
}

.top-nav a:hover {
  color: var(--ink-primary);
  text-decoration: none;
}

.nav-cta {
  font-family: var(--font-mono);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--ink-primary);
}

/* Visual Hero (Centered Monumental Type + Wide Living Stage, zero 50/50 split) */
.hero-stage-section {
  padding-top: 38px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-subtle);
}

.hero-center {
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-sub {
  margin: 0 auto 24px;
  font-size: var(--text-body);
  color: var(--ink-secondary);
  max-width: 54ch;
}

.media-frame {
  background-color: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 32px oklch(0.2 0.015 250 / 0.06);
}

.media-frame img {
  width: 100%;
  height: auto;
}

/* Sections */
.section-block {
  padding-top: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-subtle);
}

.section-block:last-of-type {
  border-bottom: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  font-size: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* Product Visual Showcase */
.product-showcase {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.showcase-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 24px;
  background-color: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
}

.showcase-meta h3 {
  margin: 0 0 4px;
  font-size: var(--text-heading);
  font-weight: 700;
}

.showcase-domain {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.showcase-copy {
  margin: 0 0 18px;
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  max-width: 44ch;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.metric-cell {
  background-color: var(--bg-page);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.metric-val {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--ink-primary);
}

.metric-lbl {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}

.btn:hover {
  background-color: var(--bg-subtle);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--ink-on-accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Visual Research Gallery */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.research-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: inherit;
  transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}

.research-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.research-thumb {
  aspect-ratio: 15 / 8;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--line-subtle);
  overflow: hidden;
}

.research-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.research-date {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.research-title {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.35;
}

/* Visual Trust Strip */
.trust-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.trust-item {
  padding-top: 14px;
  border-top: 2px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-item h3 {
  margin: 0;
  font-size: var(--text-body);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-item p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

/* Article Pages */
.article-wrap {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  padding-top: 32px;
  padding-bottom: 64px;
}

.article-wrap > * {
  min-width: 0;
}

.code-block {
  margin-top: 24px;
  padding: 18px 20px;
  max-width: 100%;
  background-color: var(--bg-inset);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow-x: auto;
}

.article-back {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 16px;
}

.article-h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 1.35rem + 1.4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.article-lead {
  margin: 0 0 24px;
  font-size: var(--text-body);
  color: var(--ink-secondary);
  max-width: var(--measure);
}

.key-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.kp-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.kp-box h2 {
  margin: 0 0 6px;
  font-size: var(--text-body);
  font-weight: 700;
}

.kp-box p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

.site-footer {
  border-top: 1px solid var(--line-subtle);
  padding-top: 24px;
  padding-bottom: 36px;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

/* Visual-First AEO & Citation Modules */
.answer-box {
  background-color: var(--accent-tint);
  border: 1px solid oklch(0.84 0.06 258);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.answer-head {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.answer-box p {
  margin: 0;
  font-size: var(--text-body);
  color: var(--ink-primary);
  line-height: 1.5;
}

.cite-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 24px;
}

.cite-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  background-color: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: 999px;
  color: var(--ink-secondary);
}

code,
pre,
.mono {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

.spec-table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  text-align: left;
}

.spec-table th,
.spec-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: top;
}

.spec-table thead th {
  background-color: var(--bg-subtle);
  font-weight: 700;
  color: var(--ink-primary);
}

.spec-table tbody tr:last-child td {
  border-bottom: 0;
}

.faq-block {
  margin-top: 32px;
}

.faq-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-width: 0;
  max-width: 100%;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 10px 0 0;
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}

.quick-links-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.quick-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-card h3 {
  margin: 0;
  font-size: var(--text-body);
}

.quick-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: var(--text-sm);
}

@media (max-width: 960px) {
  .showcase-row,
  .research-grid,
  .trust-visual-grid,
  .key-points,
  .quick-links-bar {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .container {
    padding-inline: 16px;
  }

  .header-inner {
    flex-wrap: wrap;
    padding-block: 10px;
    gap: 10px;
  }

  .top-nav {
    width: 100%;
    flex-wrap: wrap;
    white-space: normal;
    gap: 8px 14px;
  }
}
