:root {
  --bg: #060709;
  --fg: #f4f5f7;
  --white: #ffffff;
  --ink: #0a0b0e;
  --muted: rgba(255, 255, 255, 0.5);
  --body: rgba(255, 255, 255, 0.72);
  --hairline: rgba(255, 255, 255, 0.07);
  --field-border: rgba(255, 255, 255, 0.13);
  --field-focus: rgba(255, 255, 255, 0.5);
  --field-bad: rgba(255, 140, 125, 0.7);
  --error: #ff9b8f;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --glow: 1; /* background intensity, 0.2–1.6 */

  /* blue-violet palette (default) */
  --c1: 64, 108, 255;
  --c2: 140, 84, 255;
  --c3: 255, 160, 70;
}
.light-field[data-palette="teal-violet"] { --c1: 40, 190, 210; --c2: 120, 90, 255; --c3: 255, 150, 80; }
.light-field[data-palette="mono"] { --c1: 150, 160, 190; --c2: 120, 125, 150; --c3: 200, 190, 170; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--white); }
::selection { background: rgba(120, 140, 255, 0.35); }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.32); }
select option { background: #15171d; color: var(--fg); }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 3px; }

/* ---------- Background light field ---------- */
.light-field {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  background: var(--bg);
}
.blob {
  position: absolute; border-radius: 50%;
  will-change: transform;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.blob-1 {
  width: 80vmax; height: 80vmax; top: -34vmax; left: -24vmax;
  background: radial-gradient(circle at center, rgba(var(--c1), calc(0.26 * var(--glow))) 0%, rgba(var(--c1), 0) 70%);
  animation-name: drift1; animation-duration: 40s;
}
.blob-2 {
  width: 70vmax; height: 70vmax; top: 30vh; right: -30vmax;
  background: radial-gradient(circle at center, rgba(var(--c2), calc(0.2 * var(--glow))) 0%, rgba(var(--c2), 0) 70%);
  animation-name: drift2; animation-duration: 48s;
}
.blob-3 {
  width: 54vmax; height: 54vmax; bottom: -26vmax; left: 18vw;
  background: radial-gradient(circle at center, rgba(var(--c3), calc(0.07 * var(--glow))) 0%, rgba(var(--c3), 0) 70%);
  animation-name: drift3; animation-duration: 56s;
}
@keyframes drift1 { to { transform: translate3d(10vw, 8vh, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(-10vw, -6vh, 0) scale(1.08); } }
@keyframes drift3 { to { transform: translate3d(6vw, -8vh, 0) scale(1.12); } }

/* ---------- Shared ---------- */
.glass {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1120px, calc(100vw - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 22px; border-radius: 999px;
  background: rgba(16, 18, 24, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.nav-brand { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--white); white-space: nowrap; }
.btn-pill {
  font-size: 14px; font-weight: 500; color: var(--ink); background: var(--fg);
  padding: 9px 16px; border-radius: 999px; transition: background .25s ease;
}
.btn-pill:hover { color: var(--ink); background: var(--white); }

/* ---------- Layout ---------- */
main {
  position: relative; z-index: 1;
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 0 clamp(40px, 6vw, 72px);
}
.hero-eyebrow { margin: 0 0 clamp(20px, 3vw, 32px); font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.6); }
.hero-title {
  margin: 0 0 0 -0.04em;
  font-size: clamp(72px, 16vw, 232px); font-weight: 700;
  letter-spacing: -0.06em; line-height: 0.86; color: var(--white);
}
.facts {
  margin: clamp(40px, 6vw, 72px) 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  border-radius: 24px; overflow: hidden;
}
.fact { display: flex; flex-direction: column; gap: 6px; padding: 22px 26px; border-right: 1px solid var(--hairline); }
.fact:last-child { border-right: none; }
.fact dt { font-size: 12px; font-weight: 500; color: var(--muted); }
.fact dd { margin: 0; font-size: 17px; font-weight: 500; color: var(--white); }

/* ---------- Contact ---------- */
.contact {
  padding: clamp(96px, 14vw, 180px) 0;
  scroll-margin-top: 80px;
  border-top: 1px solid var(--hairline);
}
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 48px clamp(40px, 6vw, 96px); align-items: start;
}
.contact-intro { display: flex; flex-direction: column; gap: 28px; }
.contact-intro h2 {
  margin: 0; font-size: clamp(36px, 5vw, 64px); font-weight: 700;
  letter-spacing: -0.04em; line-height: 1; color: var(--white);
}
.lede { margin: 0; max-width: 380px; font-size: 17px; font-weight: 300; line-height: 1.6; color: var(--body); text-wrap: pretty; }
.contact-details { display: flex; flex-direction: column; gap: 20px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.detail { display: flex; flex-direction: column; gap: 6px; }
.detail-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.detail-value { font-size: 17px; font-weight: 500; color: var(--white); }
.detail-regular { font-weight: 400; }

.form-card {
  padding: clamp(24px, 3.4vw, 40px); border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ---------- Form ---------- */
#contact-form { display: flex; flex-direction: column; gap: 20px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 20px 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.8); }
.req { color: rgba(255, 255, 255, 0.4); }
.opt { font-weight: 400; color: rgba(255, 255, 255, 0.4); }

.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--white);
  padding: 13px 15px; border-radius: 12px;
  border: 1px solid var(--field-border);
  background: rgba(0, 0, 0, 0.28);
  outline: none; transition: border-color .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--field-focus); }
.field [aria-invalid="true"] { border-color: var(--field-bad); }
.field textarea { line-height: 1.5; resize: vertical; min-height: 132px; }

.select-wrap { position: relative; display: block; }
.select-wrap select { width: 100%; appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.select-caret {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-size: 12px; color: rgba(255, 255, 255, 0.55);
}

.field-error { font-size: 13px; color: var(--error); }
.field-error[hidden], .form-error[hidden], .sent[hidden], #contact-form[hidden] { display: none; }
.consent-error { margin-top: -12px; }
.form-error { margin: 0; font-size: 14px; line-height: 1.5; color: var(--error); }

.consent { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.consent input { margin: 2px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--fg); cursor: pointer; }
.consent span { font-size: 14px; font-weight: 300; line-height: 1.5; color: var(--body); }

.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.req-note { font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.btn-submit {
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  padding: 14px 28px; border-radius: 999px; border: none; background: var(--fg);
  cursor: pointer; transition: background .25s ease, transform .25s ease, opacity .25s ease;
}
.btn-submit:hover { background: var(--white); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.6; cursor: progress; transform: none; }

/* ---------- Sent state ---------- */
.sent { display: flex; flex-direction: column; gap: 12px; padding: 32px 0; }
.sent-check {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); font-size: 18px; color: var(--white);
}
.sent-title { margin: 8px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--white); }
.sent-body { margin: 0; font-size: 16px; font-weight: 300; line-height: 1.6; color: var(--body); }
.btn-ghost {
  align-self: flex-start; margin-top: 12px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--white);
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; cursor: pointer;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding: 40px 0 56px; border-top: 1px solid var(--hairline);
  font-size: 12px; color: rgba(255, 255, 255, 0.45);
}
.footer-brand { flex: none; white-space: nowrap; font-size: 14px; font-weight: 600; letter-spacing: -0.02em; color: rgba(255, 255, 255, 0.8); }

/* ---------- Scroll reveal (enabled by script.js) ---------- */
.js-reveal [data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js-reveal .contact [data-reveal] { transition-duration: .9s; }
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob { animation: none; }
}
