@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* TradingKobra brand tokens (Figma: Product Design v2.1) */
  --ground: #0f2a21;   /* brand-dark-emerald */
  --ink: #f6f7f7;      /* bg-surface, used as text on dark */
  --muted: #a9bab2;
  --signal: #ffd98a;   /* accent-gold */
  --plan: #2f5b49;

  --gutter: clamp(20px, 6vw, 72px);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { background: var(--ground); }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--signal); color: var(--ground); }

.page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  padding: var(--gutter);
  overflow: hidden;
}

/* Wordmark and line */
.intro { align-self: end; padding-bottom: clamp(16px, 4vh, 40px); }

.wordmark {
  margin: 0;
  font-size: clamp(2.75rem, 10.5vw, 8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.tagline {
  margin: 0.75em 0 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* The trace: noise that settles onto the plan */
.trace {
  position: relative;
  margin: 0 0 0 calc(var(--gutter) * -1);
  height: clamp(110px, 22vh, 220px);
}

.trace::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  border-top: 1px dashed var(--plan);
}

.trace svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  clip-path: inset(0 100% 0 0);
  animation: reveal 2.6s cubic-bezier(0.65, 0, 0.35, 1) 0.3s forwards;
}

.trace__point {
  position: absolute;
  top: 50%;
  right: 0;
  width: 12px;
  height: 12px;
  margin: -6px -6px 0 0;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 7px rgb(255 217 138 / 0.14);
  opacity: 0;
  transform: scale(0.4);
  animation: land 0.5s ease-out 2.8s forwards;
}

@keyframes reveal { to { clip-path: inset(0 0 0 0); } }
@keyframes land { to { opacity: 1; transform: scale(1); } }

/* Footer line */
.outro {
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: clamp(16px, 4vh, 40px);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.outro p { margin: 0; }

.outro a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--plan);
  transition: border-color 0.2s ease;
}

.outro a:hover { border-color: var(--signal); }

.outro a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
  border-radius: 2px;
}

/* 404 */
.missing { align-self: end; }
.missing .wordmark { font-size: clamp(2rem, 6vw, 3.5rem); }

@media (prefers-reduced-motion: reduce) {
  .trace svg,
  .trace__point { animation: none; clip-path: none; opacity: 1; transform: none; }
}
