/* ============================================================
   iforge.dev waitlist — one pager
   Storm ground, iron blue accent, one dominant form
   ============================================================ */

:root {
  --bg: oklch(0.16 0.012 250);
  --bg-raise: oklch(0.2 0.014 252);
  --panel: oklch(0.235 0.016 252);
  --ink: oklch(0.94 0.008 250);
  --ink-2: oklch(0.73 0.014 252);
  --ink-3: oklch(0.54 0.016 254);
  --accent: oklch(0.75 0.12 255);
  --accent-dim: oklch(0.75 0.12 255 / 0.55);
  --accent-soft: oklch(0.75 0.12 255 / 0.1);
  --danger: oklch(0.72 0.14 25);
  --hairline: oklch(1 0 0 / 0.08);
  --hairline-2: oklch(1 0 0 / 0.16);
  --display: "Space Grotesk", "Inter", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: oklch(0.16 0.012 250);
}

img,
svg {
  display: block;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------------- Atmosphere ---------------- */
.sky {
  position: fixed;
  z-index: -4;
  inset: 0;
  background:
    radial-gradient(120% 90% at 74% 16%, oklch(0.75 0.12 255 / 0.14), transparent 55%),
    url("assets/storm-hero.jpg") 64% 26% / cover no-repeat;
  filter: saturate(0.85) contrast(1.05);
}

.storm-canvas {
  position: fixed;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grain {
  position: fixed;
  z-index: -2;
  inset: -50%;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(6) infinite;
}

@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-3%, 2%);
  }
  40% {
    transform: translate(2%, -3%);
  }
  60% {
    transform: translate(-2%, -2%);
  }
  80% {
    transform: translate(3%, 1%);
  }
}

.vignette {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 36%, transparent 38%, oklch(0.12 0.012 250 / 0.78) 100%),
    linear-gradient(180deg, oklch(0.16 0.012 250 / 0.5), transparent 18%, oklch(0.16 0.012 250 / 0.92));
}

/* ---------------- Chrome ---------------- */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  overflow: visible;
}

.brand-mark path:first-child {
  fill: currentColor;
}

.brand-mark__heat {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
}

.topbar__domain {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: border-color 200ms ease, color 200ms ease;
}

.topbar__domain:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------------- Lead ---------------- */
.lead {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  grid-template-areas:
    "pitch sheet"
    "given sheet";
  align-items: start;
  gap: 0 clamp(2rem, 5vw, 5rem);
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 4rem) var(--gutter) clamp(3rem, 6vw, 5rem);
}

.lead__pitch {
  grid-area: pitch;
}

.lead__sheet {
  grid-area: sheet;
}

.lead__given {
  grid-area: given;
  padding-top: 2.75rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.4rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: var(--accent);
}

.eyebrow span {
  color: var(--accent);
}

.lead h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.4vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.96;
  text-wrap: balance;
}

.accent {
  color: var(--accent);
}

.lead__lede {
  margin: 1.5rem 0 0;
  max-width: 46ch;
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.7;
}

.given {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.given li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.given h2 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.given p {
  margin: 0;
  max-width: 44ch;
  color: var(--ink-2);
  font-size: 0.87rem;
  line-height: 1.6;
}

.live {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.75rem 0 0;
  max-width: 44ch;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--ink-3);
}

.live__dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px oklch(0.75 0.12 255 / 0.16);
  animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* ---------------- The sheet ---------------- */
.sheet {
  padding: clamp(1.35rem, 2.6vw, 2.1rem);
  border: 1px solid var(--hairline-2);
  border-radius: 16px;
  background: oklch(0.19 0.014 252 / 0.96);
}

.sheet__head {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hairline);
}

.sheet__kind {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.sheet__head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.sheet__head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.88rem;
}

.field {
  margin-top: 1rem;
}

.field > label,
.field legend {
  display: block;
  margin-bottom: 0.45rem;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.field--group {
  padding: 0;
  border: 0;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--hairline-2);
  border-radius: 10px;
  outline: 0;
  background: oklch(0.16 0.012 250 / 0.7);
  font-size: 0.92rem;
  transition: border-color 200ms ease, background 200ms ease;
}

.field textarea {
  resize: vertical;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: oklch(0.18 0.014 252 / 0.9);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field__error {
  margin: 0.45rem 0 0;
  min-height: 0;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--danger);
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chip__box {
  width: 11px;
  height: 11px;
  flex: none;
  border: 1px solid var(--ink-3);
  border-radius: 3px;
  transition: background 180ms ease, border-color 180ms ease;
}

.chip:hover {
  border-color: var(--hairline-2);
  color: var(--ink);
}

.chip.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.chip.is-on .chip__box {
  border-color: var(--accent);
  background: var(--accent);
}

.chip input:focus-visible + .chip__box {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Select */
.select {
  position: relative;
}

.select select {
  width: 100%;
  padding: 0.75rem 2.4rem 0.75rem 0.85rem;
  border: 1px solid var(--hairline-2);
  border-radius: 10px;
  outline: 0;
  background: oklch(0.16 0.012 250 / 0.7);
  font-size: 0.92rem;
  appearance: none;
  cursor: pointer;
}

.select select:focus {
  border-color: var(--accent);
}

.select svg {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 1rem;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.6;
  pointer-events: none;
}

/* Submit */
.btn {
  width: 100%;
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.9rem 0.9rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: oklch(0.16 0.012 250);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease;
}

.btn:hover {
  background: oklch(0.8 0.11 255);
}

.btn__ico {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  flex: none;
  border-radius: 50%;
  background: oklch(0.16 0.012 250 / 0.16);
}

.btn__ico svg {
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 240ms var(--ease);
}

.btn:hover .btn__ico svg {
  transform: translateX(3px);
}

.sheet__note,
.sheet__consent {
  margin: 0.85rem 0 0;
  font-family: var(--mono);
  font-size: 0.57rem;
  letter-spacing: 0.05em;
  line-height: 1.6;
  color: var(--ink-3);
}

.sheet__consent {
  margin-top: 0.3rem;
  color: var(--ink-3);
}

/* Success */
.done {
  padding: clamp(1.35rem, 2.6vw, 2.1rem);
  border: 1px solid var(--accent-dim);
  border-radius: 16px;
  background: oklch(0.2 0.014 252 / 0.96);
}

.done__kind {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.done h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.done p {
  margin: 0;
  max-width: 44ch;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.done__alt {
  margin-top: 1rem !important;
  font-size: 0.8rem !important;
}

.done__alt a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
}

/* ---------------- Footer ---------------- */
.foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem var(--gutter);
  border-top: 1px solid var(--hairline);
  background: oklch(0.13 0.012 250);
}

.foot p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.foot a {
  color: var(--ink-2);
  transition: color 200ms ease;
}

.foot a:hover {
  color: var(--accent);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .lead {
    grid-template-columns: 1fr;
    grid-template-areas:
      "pitch"
      "sheet"
      "given";
    gap: 0;
  }

  .lead__sheet {
    margin-top: 2.5rem;
  }

  .lead__given {
    padding-top: 3rem;
  }

  .lead h1 {
    max-width: 18ch;
  }

  .given,
  .live {
    max-width: 60ch;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding-block: 0.9rem;
  }

  .brand-name {
    max-width: 9rem;
    font-size: 0.62rem;
  }

  .lead h1 {
    font-size: clamp(2.3rem, 11vw, 3.2rem);
  }

  .lead__lede {
    font-size: 0.97rem;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

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