:root {
  --color-primary: #0f172a;
  --color-primary-deep: #020617;
  --color-accent: #22c55e;
  --color-accent-soft: #86efac;
  --color-background: #020617;
  --color-surface: #0e1223;
  --color-surface-raised: #141a2c;
  --color-foreground: #f8fafc;
  --color-secondary: #cbd5e1;
  --color-muted: #94a3b8;
  --color-border: #334155;
  --color-border-soft: rgb(148 163 184 / 18%);
  --color-error: #fca5a5;
  --color-error-bg: rgb(127 29 29 / 32%);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-panel: 0 24px 80px rgb(0 0 0 / 26%);
  --font-sans: "Fira Sans", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: var(--color-foreground);
  background: var(--color-background);
  color-scheme: dark;
  font-family: var(--font-sans);
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  position: relative;
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 13%, rgb(34 197 94 / 10%), transparent 24rem),
    radial-gradient(circle at 9% 88%, rgb(30 64 175 / 12%), transparent 26rem),
    var(--color-background);
  color: var(--color-foreground);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgb(148 163 184 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(148 163 184 / 4%) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / 82%), transparent 76%);
  pointer-events: none;
}

button, input { font: inherit; }

a { color: inherit; }

button, a { touch-action: manipulation; }

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: 10px 14px;
  color: var(--color-primary-deep);
  background: var(--color-accent-soft);
  border-radius: var(--radius-sm);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus-visible { transform: translateY(0); }

.landing-shell {
  width: min(100%, 1280px);
  min-height: calc(100dvh - 80px);
  margin: 0 auto;
  padding: 28px 32px 56px;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--color-foreground);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--color-primary-deep);
  background: var(--color-accent);
  border-radius: 10px;
  box-shadow: 0 0 28px rgb(34 197 94 / 18%);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.brand-name { letter-spacing: -0.02em; }

.brand-descriptor {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-badge,
.preview-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-badge {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  background: rgb(14 18 35 / 55%);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(34 197 94 / 12%);
}

.landing-grid {
  display: grid;
  grid-template-areas:
    "hero login"
    "preview preview";
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.68fr);
  gap: 64px 84px;
  align-items: start;
  padding-top: clamp(68px, 9vw, 116px);
  animation: landing-in 420ms ease-out both;
}

.hero-copy { grid-area: hero; padding-top: 22px; }

.hero-kicker,
.eyebrow,
.preview-overline {
  margin: 0;
  color: var(--color-accent-soft);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.kicker-rule {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--color-accent);
  box-shadow: 0 0 12px rgb(34 197 94 / 60%);
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 680px;
  margin-bottom: 24px;
  color: var(--color-foreground);
  font-size: clamp(3rem, 6.5vw, 5.65rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.96;
}

.hero-lead {
  max-width: 510px;
  margin-bottom: 42px;
  color: var(--color-secondary);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.65;
}

.feature-list {
  display: grid;
  gap: 20px;
  max-width: 520px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: var(--color-accent-soft);
  border: 1px solid rgb(34 197 94 / 24%);
  border-radius: 10px;
  background: rgb(34 197 94 / 7%);
}

.feature-icon svg { width: 19px; height: 19px; }

.feature-list strong,
.feature-list small { display: block; }

.feature-list strong {
  margin: 2px 0 4px;
  color: var(--color-foreground);
  font-size: 0.9375rem;
  font-weight: 600;
}

.feature-list small {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.login-panel {
  grid-area: login;
  padding: 28px;
  border: 1px solid rgb(148 163 184 / 22%);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgb(20 26 44 / 96%), rgb(14 18 35 / 96%));
  box-shadow: var(--shadow-panel);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border-soft);
}

.panel-lock {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--color-muted);
  border: 1px solid var(--color-border-soft);
  border-radius: 9px;
}

.panel-lock svg { width: 17px; height: 17px; }

.login-intro { margin: 28px 0 26px; }

.login-intro h2 {
  margin-bottom: 10px;
  color: var(--color-foreground);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.login-intro p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.login-form { display: grid; gap: 20px; }

.field { display: grid; gap: 8px; }

label {
  color: var(--color-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  color: var(--color-foreground);
  background: rgb(2 6 23 / 68%);
  border: 1px solid #475569;
  border-radius: var(--radius-sm);
}

input::placeholder { color: var(--color-muted); }

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 11px 18px;
  color: var(--color-primary-deep);
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, transform 180ms ease-out;
}

button svg { width: 18px; height: 18px; }

button:hover { background: #4ade80; border-color: #4ade80; }

button:active { transform: translateY(1px); }

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-accent-soft);
  outline-offset: 3px;
}

.field-help {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.form-alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  color: var(--color-error);
  background: var(--color-error-bg);
  border: 1px solid rgb(252 165 165 / 28%);
  border-left: 3px solid var(--color-error);
  border-radius: var(--radius-sm);
  line-height: 1.45;
}

.login-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 22px 0 0;
  padding-top: 18px;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border-soft);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.01em;
  line-height: 1.55;
}

.note-marker {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin-top: 5px;
  background: #fbbf24;
  border-radius: 50%;
}

.market-preview {
  position: relative;
  grid-area: preview;
  width: min(100%, 940px);
  margin: 0 auto;
  padding: 26px 28px 20px;
  overflow: hidden;
  border: 1px solid rgb(148 163 184 / 22%);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgb(20 26 44 / 94%), rgb(10 14 28 / 96%));
  box-shadow: 0 24px 80px rgb(0 0 0 / 20%);
}

.market-preview::before {
  position: absolute;
  top: -150px;
  right: -100px;
  width: 360px;
  height: 280px;
  background: radial-gradient(circle, rgb(34 197 94 / 10%), transparent 68%);
  content: "";
  pointer-events: none;
}

.preview-topline,
.preview-price-row,
.preview-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.preview-topline { position: relative; z-index: 1; }

.preview-overline { margin-bottom: 8px; color: var(--color-muted); font-size: 0.625rem; }

.preview-topline h2 {
  margin-bottom: 0;
  color: var(--color-foreground);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.preview-topline h2 span {
  color: var(--color-muted);
  font-size: 0.6875rem;
  font-weight: 400;
}

.preview-status { color: var(--color-accent-soft); }

.preview-price-row {
  align-items: flex-end;
  margin-top: 28px;
}

.preview-label,
.preview-metric span {
  display: block;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-price {
  display: block;
  margin-top: 5px;
  color: var(--color-foreground);
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
}

.preview-change {
  padding: 7px 9px;
  color: var(--color-accent-soft);
  background: rgb(34 197 94 / 10%);
  border: 1px solid rgb(34 197 94 / 24%);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.chart-wrap { margin: 24px 0 20px; }

.preview-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 140px;
}

.chart-grid { fill: none; stroke: rgb(148 163 184 / 12%); stroke-width: 1; }

.chart-area { fill: url(#chart-fill); }

.chart-fill-start { stop-color: #22c55e; stop-opacity: 0.2; }

.chart-fill-end { stop-color: #22c55e; stop-opacity: 0; }

.chart-line {
  fill: none;
  stroke: var(--color-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point { fill: var(--color-accent); stroke: #d1fae5; stroke-width: 3; }

.preview-metrics {
  justify-content: flex-start;
  border-top: 1px solid var(--color-border-soft);
  padding-top: 16px;
}

.preview-metric {
  min-width: 120px;
  padding-right: 24px;
  border-right: 1px solid var(--color-border-soft);
}

.preview-metric:last-child { border-right: 0; }

.preview-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--color-secondary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
}

figcaption {
  margin-top: 18px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: min(calc(100% - 64px), 1216px);
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--color-border-soft);
}

.inquiry-contact,
.footer-meta {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.inquiry-contact { overflow-wrap: anywhere; }

.inquiry-contact a {
  color: var(--color-accent-soft);
  font-weight: 600;
}

.footer-meta {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-meta span { margin: 0 7px; color: var(--color-accent); }

@keyframes landing-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .landing-grid {
    grid-template-areas:
      "hero login"
      "preview preview";
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
    gap: 52px 40px;
  }

  h1 { font-size: clamp(2.85rem, 6vw, 4.4rem); }
}

@media (max-width: 760px) {
  .landing-shell { padding: 20px 20px 40px; }

  .landing-header { align-items: flex-start; }

  .brand-descriptor { display: none; }

  .landing-grid {
    grid-template-areas:
      "hero"
      "login"
      "preview";
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-top: 64px;
  }

  .hero-copy { padding-top: 0; }

  .hero-lead { margin-bottom: 32px; }

  .login-panel { padding: 24px; }

  .market-preview { padding: 22px 20px 18px; }

  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100% - 40px);
    padding-bottom: 22px;
  }
}

@media (max-width: 420px) {
  .workspace-badge { padding-inline: 10px; font-size: 0.625rem; }

  h1 { font-size: clamp(2.65rem, 13vw, 3.4rem); }

  .hero-kicker { margin-bottom: 20px; }

  .feature-list { gap: 18px; }

  .login-panel { padding: 22px 20px; }

  .preview-price-row { align-items: flex-start; flex-direction: column; gap: 14px; }

  .preview-metrics { gap: 12px; }

  .preview-metric { min-width: 0; padding-right: 12px; }

  .preview-metric strong { font-size: 0.75rem; }
}

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