:root {
  --bg: #07090b;
  --bg-raise: #0d1114;
  --ink: #eef2f3;
  --ink-dim: #9aa6ab;
  --ink-faint: #5d686d;
  --line: rgba(238, 242, 243, 0.12);
  --line-strong: rgba(238, 242, 243, 0.28);
  --accent: #e5484d;
  --accent-deep: #b4232a;
  --danger: #f5b85a;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* soft vignette + film grain for depth */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(229, 72, 77, 0.07), transparent 60%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.65) 100%);
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header, main, .site-footer { position: relative; z-index: 2; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 9, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 15px;
}
.wordmark .thin { font-weight: 300; color: var(--ink-dim); margin-left: -4px; }
.mark {
  width: 18px; height: 18px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: relative;
}
.mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-link {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- shared ---------- */
main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  margin: 0 0 28px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(238, 242, 243, 0.02);
  color: var(--ink);
  font: 400 15px/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s, border-color 0.35s, color 0.35s;
}
.btn svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn:hover svg { transform: translateX(4px); }
.btn:focus-visible, .nav-link:focus-visible, .wordmark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 80px;
}
.hero h1 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(40px, 7.2vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero h1 em { font-size: 1.08em; letter-spacing: -0.01em; }
.lede {
  max-width: 460px;
  margin: 36px 0 44px;
  color: var(--ink-dim);
  font-size: 17px;
}
.hero .btn { align-self: flex-start; }

/* ---------- pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 0 !important;
}
.pillar {
  padding: 36px 28px 44px 0;
  border-right: 1px solid var(--line);
}
.pillar + .pillar { padding-left: 28px; }
.pillar:nth-child(3) { border-right: 0; }
.pillar .idx {
  display: block;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}
.pillar h2 {
  margin: 0;
  font-weight: 300;
  font-size: clamp(20px, 2.1vw, 26px);
  letter-spacing: -0.01em;
}
.pillars-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 7vw, 110px);
  padding-top: clamp(110px, 16vw, 200px);
  padding-bottom: clamp(90px, 12vw, 160px);
  scroll-margin-top: 40px;
}
.contact-intro h2 {
  margin: 0 0 22px;
  font-weight: 300;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.contact-intro p:last-child { color: var(--ink-dim); max-width: 360px; margin: 0; }

.form {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(13, 17, 20, 0.78), rgba(13, 17, 20, 0.55));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }

.field { display: block; margin-bottom: 26px; }
.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.3s;
}
.field:focus-within span { color: var(--accent); }

input, select, textarea {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 300 16px/1.5 var(--sans);
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 96px; }
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa6ab' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 16px;
  padding-right: 24px;
}
select option { background: var(--bg-raise); color: var(--ink); }
input:focus, select:focus, textarea:focus { border-bottom-color: var(--accent); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-bottom-color: var(--danger); }
.field.invalid span { color: var(--danger); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}
.fine { margin: 0; font-size: 13px; color: var(--ink-faint); }
.status { margin: 18px 0 0; min-height: 1.6em; font-size: 14px; color: var(--ink-dim); }
.status.error { color: var(--danger); }

.form.sent { display: flex; flex-direction: column; justify-content: center; min-height: 380px; text-align: left; }
.thanks h3 { margin: 0 0 12px; font-weight: 300; font-size: 30px; letter-spacing: -0.02em; }
.thanks p { margin: 0; color: var(--ink-dim); max-width: 380px; }

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar {
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    gap: 18px;
  }
  .pillar .idx { margin: 0; }
  .pillars-note { border-top: 0; }
}
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; }
  .form-foot .btn { justify-content: center; }
  .fine { text-align: center; }
  .wordmark .thin { display: none; }
}
