/* Token values are copied verbatim from apps/dashboard/src/app/globals.css. */
:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  --muted: 210 40% 96%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --border: 214.3 31.8% 91.4%;
  --profit: 142 76% 36%;
  --radius: 0.5rem;

  color-scheme: light dark;
}

/* The dashboard's `.dark` values; a static site has no JS to toggle a class. */
@media (prefers-color-scheme: dark) {
  :root {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 7%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 84% 4.9%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --border: 217.2 32.6% 17.5%;
    --profit: 142 76% 45%;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: hsl(var(--primary));
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Header and mark ──────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  justify-content: flex-start; /* logo position: flex-end puts it top right */
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: hsl(var(--foreground));
  text-decoration: none;
}

.brand .wordmark {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
}

.mark {
  display: block;
  flex-shrink: 0;
}

.mark-tile {
  fill: hsl(var(--primary));
}

.mark-glyph {
  stroke: hsl(var(--primary-foreground));
}

/* ── Main ─────────────────────────────────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 60vh;
  padding: 3rem 1.25rem;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.hero .lede {
  margin: 0;
  max-width: 32rem;
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  text-wrap: balance;
}

/* Wide tracking also pads the right of the last letter; matching left padding re-centres it. */
.tagline {
  margin: 0;
  padding-left: 0.45em;
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.45em;
  line-height: 1.8;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Consecutive tagline lines read as one block, not separate hero items. */
.tagline + .tagline {
  margin-top: -0.75rem;
}

@media (max-width: 640px) {
  .tagline {
    padding-left: 0.3em;
    font-size: 0.8125rem;
    letter-spacing: 0.3em;
    line-height: 1.6;
  }

  .tagline + .tagline {
    margin-top: -0.625rem;
  }
}

.launch-title {
  margin: 2.5rem 0 0;
  padding-left: 0.4em;
  font-size: clamp(1.5rem, 6.5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.4em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* ── Home page backdrop: glow and a rising price line ─────────────────────── */
.home {
  position: relative;
  isolation: isolate;
}

.home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 45% at 50% 35%, hsl(var(--primary) / 0.16), transparent 70%);
  pointer-events: none;
}

.home .site-header,
.home .site-footer {
  border-color: transparent;
}

.home main {
  display: flex;
}

.home .hero {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-chart {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 55%;
  pointer-events: none;
}

@media (max-width: 640px) {
  .hero-chart {
    height: 32%;
  }
}

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

.hero-area-top {
  stop-color: hsl(var(--primary));
  stop-opacity: 0.22;
}

.hero-area-bottom {
  stop-color: hsl(var(--primary));
  stop-opacity: 0;
}

.hero-chart .price {
  fill: none;
  stroke: hsl(var(--primary) / 0.55);
  stroke-width: 2;
  stroke-linejoin: round;
}

.hero-chart .average {
  fill: none;
  stroke: hsl(var(--profit) / 0.5);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}

.hero .code {
  margin: 0;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  color: hsl(var(--muted-foreground) / 0.3);
}

.hero .code + h1 {
  font-size: 1.5rem;
  letter-spacing: normal;
}

.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

/* ── Legal pages ──────────────────────────────────────────────────────────── */
.prose {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  overflow-wrap: anywhere;
}

.prose h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.prose h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1rem;
}

.prose p,
.prose ul,
.prose dl {
  margin: 0.5rem 0 1rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.375rem;
}

.prose dt {
  font-weight: 600;
}

.prose dd {
  margin: 0 0 0.75rem;
}

.meta {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid hsl(var(--border));
  border-left: 4px solid hsl(var(--primary));
  border-radius: var(--radius);
  background-color: hsl(var(--card));
}

.callout p {
  margin: 0;
}

.card {
  margin: 1rem 0;
  padding: 1.25rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background-color: hsl(var(--card));
}

.card p {
  margin: 0;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.25rem;
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: hsl(var(--foreground));
}

.site-footer p {
  margin: 0;
}
