:root {
  --ink: #0c0f0a;
  --panel: #151a12;
  --line: #ffffff1a;
  --text: #eef0ea;
  --muted: #a4ab9c;
  /* Brand colors from the Ammolite logo */
  --green: #419a1c;
  --green-light: #63c13a;
  --orange: #e78200;
  --orange-light: #ff9a1f;
  --iris: linear-gradient(110deg, var(--green-light), var(--green) 40%, var(--orange) 85%, var(--orange-light));
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --pad: clamp(1.25rem, 5vw, 5rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(60rem 40rem at 85% -10%, #419a1c2b, transparent 60%),
    radial-gradient(50rem 35rem at -10% 30%, #419a1c1a, transparent 60%),
    radial-gradient(40rem 30rem at 70% 100%, #e7820017, transparent 60%),
    var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.06;
  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='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 350;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}

em {
  font-style: italic;
  background: var(--iris);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

:focus-visible { outline: 2px solid var(--green-light); outline-offset: 3px; border-radius: 4px; }

/* Impersonation alert */
.alert-banner {
  position: relative;
  z-index: 60;
  padding: 0.7rem calc(var(--pad) + 2rem);
  background: #e7820026;
  border-bottom: 1px solid #e7820059;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}
.alert-banner p { margin: 0 auto; max-width: 70rem; }
.alert-banner strong { color: var(--orange-light); }
.alert-close {
  position: absolute;
  top: 50%;
  right: clamp(0.5rem, 2vw, 1.5rem);
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: 400 1.25rem/1 var(--sans);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.alert-close:hover { background: #ffffff14; color: var(--text); }
.alert-icon { font-size: 1rem; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  backdrop-filter: blur(14px);
  background: #0c0f0ab3;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; }
.brand img { display: block; width: auto; height: 2.5rem; transition: opacity 0.2s; }
.brand:hover img { opacity: 0.85; }
.thanks .brand { margin-bottom: 2rem; }

.nav nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.5vw, 2rem); }
.nav nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav nav a:hover { color: var(--text); }
.nav nav .nav-cta {
  color: var(--text);
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}
.nav nav .nav-cta:hover { border-color: var(--green); background: #419a1c26; }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 4.5rem);
  padding: clamp(4rem, 12vh, 9rem) var(--pad) 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.spiral {
  position: absolute;
  right: -8vw;
  top: 50%;
  width: min(62vw, 760px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0.85;
  pointer-events: none;
  filter: drop-shadow(0 0 30px #419a1c55);
}
.spiral svg { width: 100%; height: 100%; animation: drift 60s linear infinite; }
.spiral-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 3.2s 0.3s cubic-bezier(.6,.1,.2,1) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drift { to { transform: rotate(360deg); } }

.eyebrow {
  margin: 0 0 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-light);
}

.hero h1 {
  position: relative;
  font-size: clamp(3.2rem, 10vw, 8.5rem);
  max-width: 12ch;
}

.lede {
  position: relative;
  max-width: 34rem;
  margin: 2rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--ink);
  font: 600 0.98rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s, color 0.3s;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--iris);
  transform: translateX(-101%);
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
}
.btn:hover::before { transform: translateX(0); }
.btn:active { transform: scale(0.97); }
.btn:disabled { cursor: progress; opacity: 0.75; }

.link-arrow {
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.link-arrow::after { content: ' →'; display: inline-block; transition: transform 0.2s; }
.link-arrow:hover { border-color: var(--green-light); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow.up::after { content: ' ↑'; }
.link-arrow.up:hover::after { transform: translateY(-3px); }

.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 12rem));
  gap: 2rem;
  margin: clamp(3rem, 9vh, 6rem) 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  max-width: 44rem;
}
.stats dt { font: 350 2.4rem/1 var(--serif); }
.stats dd { margin: 0.5rem 0 0; font-size: 0.88rem; color: var(--muted); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--d) * 0.12s + 0.15s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* Sections */
section:not(.hero) {
  padding: clamp(5rem, 12vh, 9rem) var(--pad);
  scroll-margin-top: 4rem;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label span { font: italic 400 1rem/1 var(--serif); letter-spacing: 0; color: var(--green-light); }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.js .who, .js .what, .js .contact { opacity: 0; transform: translateY(30px); transition: opacity 1s, transform 1s cubic-bezier(.2,.8,.2,1); }
.js .process li:not(.in) { opacity: 0; transform: translateY(16px); }
.js .card:not(.in) { opacity: 0; transform: translateY(24px); }
.in { opacity: 1 !important; transform: none !important; }

.who-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.who h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.who-copy p { margin: 0 0 1.2rem; color: var(--muted); }
.who-copy p:first-child { color: var(--text); font-size: 1.15rem; }

.process {
  list-style: none;
  margin: clamp(3rem, 8vh, 5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: step;
}
.process li {
  position: relative;
  padding: 1.5rem 1.5rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  transition: opacity 0.7s, transform 0.7s;
}
.process li:nth-child(2) { transition-delay: 0.1s; }
.process li:nth-child(3) { transition-delay: 0.2s; }
.process li:nth-child(4) { transition-delay: 0.3s; }
.process li::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--iris);
}
.process li span { display: block; margin-bottom: 0.3rem; font: 400 1.5rem/1.2 var(--serif); color: var(--text); }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 1rem;
}
.card {
  position: relative;
  padding: 2rem 1.75rem 2.25rem;
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff08, #ffffff02);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: opacity 0.8s, transform 0.8s cubic-bezier(.2,.8,.2,1), border-color 0.3s;
}
.card:nth-child(2) { transition-delay: 0.08s; }
.card:nth-child(3) { transition-delay: 0.16s; }
.card:nth-child(4) { transition-delay: 0.24s; }
.card::before {
  content: '';
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 70%;
  background: var(--iris);
  filter: blur(60px);
  opacity: 0;
  transition: opacity 0.5s;
}
.card:hover { border-color: #ffffff33; }
.card:hover::before { opacity: 0.22; }
.card > * { position: relative; }
.card-num { font: italic 400 1rem/1 var(--serif); color: var(--green-light); padding-bottom: 3rem; }
.card h3 { font-size: 2.2rem; }
.card-kicker { margin: 0.6rem 0 0.9rem; font-weight: 600; font-size: 0.95rem; }
.card p:last-child { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.contact h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.contact-intro > p { color: var(--muted); max-width: 26rem; margin: 1.5rem 0 2.5rem; }
address {
  font-style: normal;
  padding-left: 1rem;
  border-left: 2px solid var(--orange);
}
.addr-label { display: block; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }

.form {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: 0 40px 80px -40px #000;
}
.hp { position: absolute; left: -9999px; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: 0.45rem; font-size: 0.85rem; font-weight: 500; }
.field label span { color: var(--orange-light); }
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--text);
  font: inherit;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:hover,
.field textarea:hover { border-color: #ffffff33; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px #419a1c40; }
.error { display: none; margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--orange-light); }
.field.invalid input,
.field.invalid textarea { border-color: var(--orange-light); }
.field.invalid .error { display: block; }
.btn-full { width: 100%; margin-top: 0.5rem; }
.sending .btn-label { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.form-status { margin: 1rem 0 0; font-size: 0.92rem; min-height: 1.4em; }
.form-status.ok { color: var(--green-light); }
.form-status.fail { color: var(--orange-light); }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem var(--pad);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}
.footer p { margin: 0; }

/* Thank-you page */
.thanks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  padding: var(--pad);
  max-width: 60rem;
}
.thanks h1 { font-size: clamp(2.8rem, 8vw, 6rem); }
.thanks .lede { margin: 0 0 1rem; }

/* Responsive */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .who-grid, .contact-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
}

@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .spiral { width: 120vw; right: -50vw; opacity: 0.35; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
  .stats dt { font-size: 1.8rem; }
  .cards, .process { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card-num { padding-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .who, .what, .contact, .card, .process li { opacity: 1; transform: none; }
  .spiral-path { stroke-dashoffset: 0; }
}
