/* ============================================================
   Diligo Ltd, corporate site
   Identity: light-minimal, modern. Market-intelligence
   infrastructure. Cool near-monochrome, one electric signal
   accent, Geist + Geist Mono. Deliberately nothing like the
   warm-ledger Tilth/deck world.
   ============================================================ */

@font-face {
  font-family: "Geist";
  src: url("../fonts/GeistSans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --ink: #0d0f12;
  --ink-2: #3c434b;
  --ink-3: #4e545b;
  --line: #e6e9ec;
  --line-2: #eef1f3;
  --accent: #4f46e5;
  --accent-2: #6d64f5;
  --accent-wash: #eef0fe;
  --accent-ink: #ffffff;

  --font-sans: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  --maxw: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 9rem);
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow: 0 1px 2px rgba(13, 15, 18, 0.04),
    0 12px 32px -16px rgba(13, 15, 18, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0d;
    --surface: #101216;
    --surface-2: #0d0f12;
    --ink: #f3f4f6;
    --ink-2: #b7bec6;
    --ink-3: #a2a9b1;
    --line: #1e2228;
    --line-2: #171a1f;
    --accent: #7c74ff;
    --accent-2: #948dff;
    --accent-wash: #17172a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3),
      0 16px 40px -18px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b0d;
  --surface: #101216;
  --surface-2: #0d0f12;
  --ink: #f3f4f6;
  --ink-2: #b7bec6;
  --ink-3: #a2a9b1;
  --line: #1e2228;
  --line-2: #171a1f;
  --accent: #7c74ff;
  --accent-2: #948dff;
  --accent-wash: #17172a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -18px rgba(0, 0, 0, 0.6);
}
:root[data-theme="light"] {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --ink: #0d0f12;
  --ink-2: #3c434b;
  --ink-3: #4e545b;
  --line: #e6e9ec;
  --line-2: #eef1f3;
  --accent: #4f46e5;
  --accent-2: #6d64f5;
  --accent-wash: #eef0fe;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
::selection {
  background: var(--accent);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-y);
}
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- type ---------- */
h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}
.display {
  font-size: clamp(2.6rem, 1.5rem + 5vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  letter-spacing: -0.035em;
}
.lede {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
p {
  margin: 0;
  max-width: 62ch;
}
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55ch;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.btn .arw {
  transition: transform 0.2s var(--ease);
}
.btn:hover .arw {
  transform: translateX(3px);
}
.btn--solid {
  background: var(--ink);
  color: var(--bg);
}
.btn--solid:hover {
  background: var(--accent);
  color: #fff;
}
.btn--ghost {
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--surface);
}
.btn--ghost:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}
.link {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
}
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- header ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.masthead.scrolled {
  border-bottom-color: var(--line);
}
.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.wordmark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
}
.wordmark .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
}
.nav a {
  text-decoration: none;
  color: var(--ink-3);
  transition: color 0.18s var(--ease);
}
.nav a:hover {
  color: var(--ink);
}
@media (max-width: 720px) {
  .nav a.hide-sm {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3.5rem, 7vw, 6rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}
.hero__kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7ch;
}
.hero__kicker::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--ink-3);
}
.hero .display {
  margin-bottom: 1.6rem;
  max-width: 15ch;
}
.hero .display .soft {
  color: var(--ink-3);
}
.hero .lede {
  max-width: 44ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

/* ---------- forecast widget (the one data moment) ---------- */
.index {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.4rem 1.25rem;
  font-family: var(--font-mono);
}
.index__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.index__live {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  color: var(--accent);
}
.index__live::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  }
  70% {
    box-shadow: 0 0 0 7px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
.index__price {
  display: flex;
  align-items: baseline;
  gap: 0.5ch;
  margin: 1.05rem 0 0.15rem;
}
.index__val {
  font-family: var(--font-sans);
  font-weight: 560;
  font-size: clamp(2.6rem, 2rem + 2.4vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.35s var(--ease);
}
.index.is-loading .index__val {
  opacity: 0;
}
.index__unit {
  font-size: 0.9rem;
  color: var(--ink-3);
  transform: translateY(-0.15rem);
}
.index__band {
  font-size: 0.75rem;
  color: var(--ink-3);
}
.index__spark {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0.6rem 0 0.8rem;
  overflow: visible;
}
.index__spark path.line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease) 0.3s forwards;
}
.index__spark path.area {
  fill: url(#idxfill);
  opacity: 0;
  animation: fade 1s ease 1.3s forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fade {
  to {
    opacity: 1;
  }
}
.index__foot {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--line-2);
  padding-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.index__foot span {
  white-space: nowrap;
}

/* ---------- statement band ---------- */
.statement {
  font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.16;
  max-width: 24ch;
  color: var(--ink);
}
.statement .soft {
  color: var(--ink-3);
}

/* ---------- capabilities ---------- */
.caps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
@media (max-width: 760px) {
  .caps {
    grid-template-columns: 1fr;
  }
}
.cap {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 15rem;
  transition: background 0.2s var(--ease);
}
.cap:hover {
  background: var(--surface);
}
.cap__i {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.cap h3 {
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
  letter-spacing: -0.025em;
}
.cap p {
  color: var(--ink-2);
  font-size: 0.9875rem;
  line-height: 1.55;
  margin-top: auto;
}

/* ---------- markets ---------- */
.markets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 720px) {
  .markets {
    grid-template-columns: 1fr;
  }
}
.mkt {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 9.5rem;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.mkt:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
}
.mkt__name {
  font-size: 1.4rem;
  font-weight: 540;
  letter-spacing: -0.03em;
}
.mkt__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mkt__status {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 0.55ch;
  margin-top: auto;
  padding-top: 1rem;
}
.mkt__status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ink-3);
}
.mkt--live .mkt__status {
  color: var(--accent);
}
.mkt--live .mkt__status::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.mkt--soon .mkt__status::before {
  background: transparent;
  border: 1.5px solid var(--ink-3);
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
  color: var(--ink-3);
}
.foot__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}
.foot__lead {
  max-width: 30ch;
}
.foot__lead .wordmark {
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}
.foot__lead p {
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.foot__links {
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
}
.foot__col h4 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.9rem;
  font-weight: 500;
}
.foot__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 2;
}
.foot__col a {
  color: var(--ink-2);
  text-decoration: none;
}
.foot__col a:hover {
  color: var(--accent);
}
.foot__legal {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.9;
  color: var(--ink-3);
  max-width: 80ch;
}

/* ---------- motion ----------
   Progressive enhancement: reveals only hide when JS is present
   (html.js). No JS, or reduced motion, means content is visible. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js .reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}
