:root {
  --bg: #020403;
  --bg-soft: #07100d;
  --cream: #f4efe2;
  --muted: rgba(244, 239, 226, 0.68);
  --line: rgba(244, 239, 226, 0.18);
  --line-strong: rgba(244, 239, 226, 0.32);
  --lime: #c9ff4a;
  --green: #55f0a7;
  --gold: #d5a642;
  --blue: #8fb6ff;
  --red: #ff7468;
  --shadow: rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(201, 255, 74, 0.12), transparent 28rem),
    radial-gradient(circle at 80% 0%, rgba(213, 166, 66, 0.14), transparent 30rem),
    linear-gradient(180deg, #020403 0%, #050807 64%, #020403 100%);
  color: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.site-shell::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(2, 4, 3, 0.62), rgba(2, 4, 3, 0.92)),
    url("visuals/towers-up.jpg") center / cover no-repeat;
  content: "";
  filter: saturate(0.72) contrast(1.1);
  opacity: 0.38;
}

.site-shell::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(244, 239, 226, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(244, 239, 226, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 16%, black, transparent 74%);
  content: "";
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 4, 3, 0.72);
  padding: 0.86rem clamp(1rem, 3vw, 2.4rem);
  backdrop-filter: blur(22px) saturate(1.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 2.9rem;
  height: 2.9rem;
  place-items: center;
  border: 1px solid rgba(201, 255, 74, 0.46);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.24), transparent 42%),
    rgba(201, 255, 74, 0.1);
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.95rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.topnav a,
.mode-toggle {
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(244, 239, 226, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.62rem 0.8rem;
  text-transform: uppercase;
}

.topnav a:hover,
.mode-toggle:hover {
  border-color: var(--line);
  background: rgba(244, 239, 226, 0.07);
  color: var(--cream);
}

.mode-toggle {
  cursor: pointer;
  background: rgba(244, 239, 226, 0.04);
}

main {
  width: min(1840px, calc(100% - clamp(1rem, 4vw, 4rem)));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: calc(100vh - 76px);
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.88fr);
  gap: clamp(1.3rem, 3vw, 3.2rem);
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: clamp(2.2rem, 6vw, 6rem) 0 1.6rem;
}

.hero-copy {
  align-self: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero h1 {
  display: grid;
  gap: 0.03em;
  margin: 0;
  max-width: 12ch;
  color: transparent;
  font-size: clamp(4rem, 8.2vw, 11rem);
  font-weight: 950;
  letter-spacing: -0.1em;
  line-height: 0.86;
  text-transform: uppercase;
}

.hero h1 span {
  background:
    linear-gradient(112deg, #ffffff 0%, rgba(244, 239, 226, 0.45) 24%, rgba(201, 255, 74, 0.82) 48%, rgba(244, 239, 226, 0.92) 100%),
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.9), transparent 15rem);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.42));
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.7px rgba(244, 239, 226, 0.42);
}

.hero-lede {
  max-width: 62rem;
  margin: 1.4rem 0 0;
  color: rgba(244, 239, 226, 0.8);
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: 650;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 920;
  letter-spacing: 0.1em;
  padding: 0.8rem 1rem;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: rgba(201, 255, 74, 0.7);
  background: var(--lime);
  color: #07100d;
}

.button-secondary {
  background: rgba(244, 239, 226, 0.06);
  color: var(--cream);
}

.photo-wall {
  position: relative;
  display: grid;
  min-height: clamp(34rem, 60vh, 50rem);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.1vw, 1rem);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: clamp(1.5rem, 3vw, 3rem);
  background:
    linear-gradient(135deg, rgba(244, 239, 226, 0.16), rgba(244, 239, 226, 0.03) 42%, rgba(201, 255, 74, 0.1)),
    rgba(2, 4, 3, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 30px 90px var(--shadow);
  padding: clamp(0.65rem, 1.25vw, 1rem);
  backdrop-filter: blur(18px) saturate(1.15);
}

.photo-wall::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(255, 255, 255, 0.17) 42.1% 42.24%, transparent 42.4% 100%),
    linear-gradient(180deg, rgba(2, 4, 3, 0.02), rgba(2, 4, 3, 0.18));
  content: "";
}

.photo-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(1rem, 2vw, 2rem);
  margin: 0;
  background: rgba(2, 4, 3, 0.52);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.photo-panel-large {
  grid-area: 1 / 1 / 5 / 5;
}

.photo-panel-market {
  z-index: 2;
  grid-area: 3 / 4 / 7 / 7;
}

.photo-panel-bank {
  z-index: 1;
  grid-area: 1 / 4 / 4 / 7;
}

.photo-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.12) brightness(0.9);
  transform: scale(1.035);
  transition: transform 900ms ease, filter 900ms ease;
}

.photo-panel:hover img {
  filter: saturate(1.05) contrast(1.15) brightness(0.98);
  transform: scale(1.075);
}

.photo-panel::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 4, 3, 0.02), rgba(2, 4, 3, 0.58));
  content: "";
}

.photo-panel figcaption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
  border: 1px solid rgba(244, 239, 226, 0.24);
  border-radius: 999px;
  background: rgba(2, 4, 3, 0.68);
  color: rgba(244, 239, 226, 0.92);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.13em;
  padding: 0.55rem 0.72rem;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  background:
    linear-gradient(90deg, rgba(2, 4, 3, 0.9), rgba(2, 4, 3, 0.62)),
    url("visuals/live-markets.jpg") center / cover no-repeat;
  background-blend-mode: normal, soft-light;
}

.hero-metrics article {
  display: grid;
  min-height: 8rem;
  align-content: center;
  gap: 0.48rem;
  border-left: 1px solid var(--line);
  padding: 1rem;
}

.hero-metrics article:first-child {
  border-left: 0;
}

.hero-metrics span,
.recommendation-panel span,
.module-card span,
.chart-heading span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 930;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-metrics strong {
  color: var(--cream);
  font-size: clamp(1.5rem, 2.2vw, 2.6rem);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1;
}

.hero-metrics small {
  color: rgba(244, 239, 226, 0.62);
  font-weight: 750;
}

.section {
  border-bottom: 1px solid var(--line);
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.65fr);
  gap: clamp(1rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-heading h2,
.memo-copy h2 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 6.6rem);
  font-weight: 950;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.section-heading p,
.memo-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.25rem);
  font-weight: 650;
  line-height: 1.75;
}

.source-ribbon,
.module-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.source-chip,
.module-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  background: rgba(244, 239, 226, 0.055);
  color: rgba(244, 239, 226, 0.78);
  font-size: 0.72rem;
  font-weight: 930;
  letter-spacing: 0.12em;
  padding: 0.72rem 0.88rem;
  text-transform: uppercase;
}

.source-chip.is-active,
.module-tab.is-active {
  border-color: rgba(201, 255, 74, 0.62);
  background: rgba(201, 255, 74, 0.13);
  color: var(--lime);
}

.source-brief,
.module-card,
.recommendation-panel,
.chart-panel,
.control-panel,
.memo-box {
  border: 1px solid var(--line);
  border-radius: clamp(1.15rem, 2vw, 2rem);
  background: rgba(4, 10, 8, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(1.08);
}

.source-brief {
  display: grid;
  gap: 0.7rem;
  padding: clamp(1.1rem, 2vw, 1.6rem);
}

.source-brief p,
.module-card p,
.recommendation-panel p,
.memo-box p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.7;
}

.source-brief p:first-child {
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.source-brief h3,
.module-card h3,
.recommendation-panel h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2.15rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.model-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.8fr) minmax(260px, 0.5fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.control-panel,
.recommendation-panel,
.module-card {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.4rem);
}

.control-panel label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.62rem 1rem;
  align-items: center;
}

.control-panel label span {
  color: rgba(244, 239, 226, 0.84);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-panel output {
  color: var(--lime);
  font-weight: 950;
}

.control-panel input {
  grid-column: 1 / -1;
  accent-color: var(--lime);
}

.chart-panel {
  overflow: hidden;
  padding: 1rem;
}

.chart-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.chart-heading strong {
  color: var(--lime);
  font-size: 2rem;
  letter-spacing: -0.06em;
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 1.2rem;
  background:
    linear-gradient(180deg, rgba(143, 182, 255, 0.08), rgba(201, 255, 74, 0.04)),
    rgba(2, 4, 3, 0.48);
}

.recommendation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.recommendation-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(244, 239, 226, 0.8);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.58rem;
  text-transform: uppercase;
}

.memo-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 0.9fr);
  gap: clamp(1rem, 4vw, 4rem);
  align-items: center;
}

.memo-visual {
  overflow: hidden;
  min-height: 32rem;
  border: 1px solid var(--line);
  border-radius: clamp(1.25rem, 3vw, 2.5rem);
  box-shadow: 0 30px 90px var(--shadow);
}

.memo-visual img {
  width: 100%;
  height: 100%;
  min-height: 32rem;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.08) brightness(0.82);
}

.memo-copy {
  display: grid;
  gap: 1.25rem;
}

.memo-box {
  display: grid;
  gap: 0.8rem;
  padding: clamp(1.1rem, 2vw, 1.6rem);
}

.memo-box strong {
  color: var(--cream);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  width: min(1840px, calc(100% - clamp(1rem, 4vw, 4rem)));
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  color: rgba(244, 239, 226, 0.58);
  font-size: 0.8rem;
  font-weight: 700;
}

.site-shell[data-mode="precision"] {
  --muted: rgba(244, 239, 226, 0.78);
  --line: rgba(244, 239, 226, 0.3);
}

.site-shell[data-mode="precision"]::before,
.site-shell[data-mode="precision"] .photo-panel img,
.site-shell[data-mode="precision"] .memo-visual img {
  filter: grayscale(0.3) saturate(0.74) contrast(1.12) brightness(0.72);
}

@media (max-width: 1180px) {
  .hero,
  .section-heading,
  .model-grid,
  .memo-section {
    grid-template-columns: 1fr;
  }

  .photo-wall {
    min-height: 34rem;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-metrics article:nth-child(odd) {
    border-left: 0;
  }

  .hero-metrics article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 16vw, 5rem);
  }

  .photo-wall {
    min-height: 38rem;
    grid-template-columns: 1fr;
    grid-template-rows: 18rem 10rem 10rem;
  }

  .photo-panel-large,
  .photo-panel-market,
  .photo-panel-bank {
    grid-area: auto;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-metrics article,
  .hero-metrics article:nth-child(odd) {
    border-left: 0;
  }

  .hero-metrics article:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }

  .section-heading h2,
  .memo-copy h2 {
    max-width: 100%;
  }
}

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