/* HYPTO Revenue — base styles: reset, typography, layout primitives, motion */

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

html {
  font-family: var(--hy-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hy-header-h) + 16px);
  background: var(--hy-neutral-950);
}

body {
  margin: 0;
  background: var(--hy-bg);
  color: var(--hy-text);
  font-size: var(--hy-size-body);
  line-height: 1.6;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* Room for the fixed mobile bar */
@media (max-width: 720px) {
  body.has-mobile-bar { padding-bottom: calc(var(--hy-mobile-bar-h) + env(safe-area-inset-bottom, 0px)); }
}

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

h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }

h1, h2, h3, h4, p, li, dt, dd, strong { overflow-wrap: break-word; }
h1, h2, h3, .mini-card strong, .card h3, .step h3, .tl-item h3, .kpi-value { hyphens: auto; -webkit-hyphens: auto; }
h1, .title-1 { font-size: var(--hy-size-title-1); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h2, .title-2 { font-size: var(--hy-size-title-2); line-height: 1.2; font-weight: 700; letter-spacing: -0.005em; text-wrap: balance; }
h3, .title-3 { font-size: var(--hy-size-title-3); line-height: 1.3; font-weight: 600; }
p, .body { font-size: var(--hy-size-body); line-height: 1.6; }
small, .small { font-size: var(--hy-size-small); line-height: 1.5; }
strong, b { font-weight: 600; }

.label {
  font-size: var(--hy-size-label);
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hy-accent-text);
}
.text-2 { color: var(--hy-text-2); }
.text-muted { color: var(--hy-text-muted); }
.lead { font-size: calc(var(--hy-size-body) + 2px); color: var(--hy-text-2); }
@media (max-width: 720px) { .lead { font-size: var(--hy-size-body); } }

/* One emerald key word per screen (Night only; on Light the accent-text token keeps it readable) */
.kw { color: var(--hy-accent-text); }

a {
  color: var(--hy-accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--hy-focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--hy-emerald-500); color: var(--hy-neutral-950); }

hr { border: 0; border-top: 1px solid var(--hy-border); margin: 0; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

.visually-hidden, .sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute; left: 16px; top: -100px;
  z-index: 1000;
  background: var(--hy-emerald-500); color: var(--hy-neutral-950);
  padding: 12px 16px; border-radius: var(--hy-radius-control);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--hy-container);
  margin-inline: auto;
  padding-inline: var(--hy-gutter);
}
@media (min-width: 721px) { .container { padding-inline: var(--hy-space-6); } }
.container-narrow { max-width: 820px; }

.section {
  position: relative;
  padding-block: var(--hy-section-y);
  background: var(--hy-bg);
  color: var(--hy-text);
  isolation: isolate;
}
.section-tight { padding-block: var(--hy-space-8); }
@media (max-width: 720px) { .section-tight { padding-block: var(--hy-space-7); } }

.section-head { max-width: 720px; margin-bottom: var(--hy-space-7); }
.section-head .label { margin-bottom: var(--hy-space-3); display: block; }
.section-head h2 + p, .section-head h1 + p { margin-top: var(--hy-space-4); }
.section-head.center { margin-inline: auto; text-align: center; }
@media (max-width: 720px) { .section-head { margin-bottom: var(--hy-space-6); } }

.stack > * + * { margin-top: var(--hy-space-4); }
.stack-lg > * + * { margin-top: var(--hy-space-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--hy-space-3); align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--hy-space-3); flex-wrap: wrap; }

.grid { display: grid; gap: var(--hy-space-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; gap: var(--hy-space-7); align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split > .visual-first { order: -1; }

@media (max-width: 1000px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
  .split, .split-5-7, .split-7-5 { grid-template-columns: minmax(0, 1fr); gap: var(--hy-space-6); }
  .split > .visual-first { order: 0; }
  .split > .visual-first-mobile { order: -1; }
}

/* Night-only effects. On a Light section these are inert. */
.halo::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--hy-halo);
  pointer-events: none;
  z-index: -1;
}
[data-theme="light"].halo::before { display: none; }

.glow-soft::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(45% 34% at 85% 78%, rgba(52, 209, 126, .14), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
[data-theme="light"].glow-soft::after { display: none; }

/* Reveal on scroll: starts visible (never opacity 0 waiting), just a gentle rise. */
.reveal {
  opacity: 1;
  transform: translateY(0);
}
.js .reveal:not(.in-view) {
  opacity: .001;
  transform: translateY(14px);
}
.js .reveal {
  transition: opacity var(--hy-dur) var(--hy-ease), transform var(--hy-dur) var(--hy-ease);
}
.js .reveal.in-view { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 60ms; }
.reveal.delay-2 { transition-delay: 120ms; }
.reveal.delay-3 { transition-delay: 180ms; }
.reveal.delay-4 { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .js .reveal:not(.in-view) { opacity: 1; transform: none; }
}

/* Placeholder marker for content still to be supplied: discreet, never bright orange. */
.todo {
  display: inline-block;
  padding: 2px 8px;
  border: 1px dashed var(--hy-control-border);
  border-radius: var(--hy-radius-badge);
  color: var(--hy-text-muted);
  font-size: var(--hy-size-small);
  font-weight: 500;
  vertical-align: baseline;
}

/* Utility */
.mt-2 { margin-top: var(--hy-space-2); } .mt-3 { margin-top: var(--hy-space-3); } .mt-4 { margin-top: var(--hy-space-4); }
.mt-5 { margin-top: var(--hy-space-5); } .mt-6 { margin-top: var(--hy-space-6); } .mt-7 { margin-top: var(--hy-space-7); } .mt-8 { margin-top: var(--hy-space-8); }
.mb-3 { margin-bottom: var(--hy-space-3); } .mb-4 { margin-bottom: var(--hy-space-4); } .mb-5 { margin-bottom: var(--hy-space-5); } .mb-6 { margin-bottom: var(--hy-space-6); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hide-mobile { display: initial; }
.show-mobile { display: none; }
@media (max-width: 720px) { .hide-mobile { display: none !important; } .show-mobile { display: initial; } }
