/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --text: #e6edf3;
  --text-dim: #7d8590;
  --text-muted: #484f58;
  --accent: #22d3ee;
  --gold: #9f842f;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --reveal-duration: 0.55s;
  --reveal-stagger: 0.12s;
  --reveal-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --reveal-offset: 8px;

  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  display: flex;
  flex-direction: column;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.85) 0%, rgba(10, 10, 10, 0.6) 70%, rgba(10, 10, 10, 0) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.9s ease 0.2s, transform 0.9s ease 0.2s;
}

.nav.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo-img {
  height: 26px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: clamp(1.25rem, 2.2vw, 2rem);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  color: #a8b0bb;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link-quiet {
  color: var(--text-dim);
}

/* ---------- Section layout ---------- */
.section {
  min-height: 90vh;
  padding: 18vh 8vw;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.section.hero {
  min-height: 100vh;
  padding-top: 26vh;
}

.section.definition {
  padding: 22vh 8vw;
}

.section-inner {
  max-width: 900px;
  width: 100%;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3rem;
  font-weight: 500;
}

.line {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-bottom: 1.6rem;
  font-weight: 300;
}

.section.hero .line {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.2;
  margin-bottom: 2rem;
  letter-spacing: -0.025em;
}

.line.accent { color: var(--accent); }
.line.dim    { color: var(--text-dim); }
.accent      { color: var(--accent); }
.dim         { color: var(--text-dim); }

/* Definition section — feels like a definition, not a paragraph */
.definition-lead {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 400;
  margin-bottom: 2.4rem;
  letter-spacing: -0.015em;
}

/* ---------- Lists ---------- */
.list {
  list-style: none;
  margin: 2rem 0 2.4rem 1.6rem;
}

.list li {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 2;
  color: var(--text-dim);
  font-weight: 300;
  letter-spacing: 0.005em;
}

/* Definition list — more declarative, more weight */
.list-definition {
  margin: 2.6rem 0 3rem 0;
  padding-left: 1.2rem;
  border-left: 1px solid rgba(125, 133, 144, 0.18);
}

.list-definition li {
  color: var(--text);
  font-weight: 400;
  line-height: 2.2;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  letter-spacing: 0.01em;
}

/* ---------- Links ---------- */
.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

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

.link-secondary {
  color: var(--text-dim);
}

.link-secondary:hover {
  color: var(--text);
  border-bottom-color: var(--text-dim);
}

/* ---------- CTA ---------- */
.section.cta {
  padding-top: 14vh;
}

.cta-headline {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 3.6rem;
}

.cta-links .line {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  margin-bottom: 1.6rem;
}

/* Button reset for inline text buttons that should look like links */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: inherit;
  line-height: inherit;
}

.nav-link-button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  color: #a8b0bb;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
}
.nav-link-button:hover { color: var(--text); }

/* ---------- Footer ---------- */
.footer {
  padding: 8vh 8vw 6vh;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 2;
  border-top: 1px solid rgba(125, 133, 144, 0.08);
  letter-spacing: 0.02em;
}

.footer .dim { color: var(--text-muted); }

/* ---------- Reveal animation ---------- */
[data-section] .line,
[data-section] .list,
[data-section] .list li,
[data-section] .eyebrow {
  opacity: 0;
  transform: translateY(var(--reveal-offset));
  transition:
    opacity var(--reveal-duration) var(--reveal-ease),
    transform var(--reveal-duration) var(--reveal-ease);
}

[data-section].is-visible .eyebrow,
[data-section].is-visible .line,
[data-section].is-visible .list,
[data-section].is-visible .list li {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger the children within a section — nth-of-type so lists/eyebrows don't throw off the count */
[data-section].is-visible .eyebrow              { transition-delay: 0s; }
[data-section].is-visible .line:nth-of-type(1)  { transition-delay: calc(var(--reveal-stagger) * 1); }
[data-section].is-visible .line:nth-of-type(2)  { transition-delay: calc(var(--reveal-stagger) * 2); }
[data-section].is-visible .line:nth-of-type(3)  { transition-delay: calc(var(--reveal-stagger) * 3); }
[data-section].is-visible .line:nth-of-type(4)  { transition-delay: calc(var(--reveal-stagger) * 4); }
[data-section].is-visible .line:nth-of-type(5)  { transition-delay: calc(var(--reveal-stagger) * 5); }
[data-section].is-visible .line:nth-of-type(6)  { transition-delay: calc(var(--reveal-stagger) * 6); }
[data-section].is-visible .line:nth-of-type(7)  { transition-delay: calc(var(--reveal-stagger) * 7); }
[data-section].is-visible .line:nth-of-type(8)  { transition-delay: calc(var(--reveal-stagger) * 8); }
[data-section].is-visible .list                 { transition-delay: calc(var(--reveal-stagger) * 3); }
[data-section].is-visible .list li:nth-child(1) { transition-delay: calc(var(--reveal-stagger) * 3); }
[data-section].is-visible .list li:nth-child(2) { transition-delay: calc(var(--reveal-stagger) * 4); }
[data-section].is-visible .list li:nth-child(3) { transition-delay: calc(var(--reveal-stagger) * 5); }
[data-section].is-visible .list li:nth-child(4) { transition-delay: calc(var(--reveal-stagger) * 6); }
[data-section].is-visible .list li:nth-child(5) { transition-delay: calc(var(--reveal-stagger) * 7); }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .nav { padding: 0 1.25rem; }
  .nav-left { gap: 1.25rem; }
  .nav-logo-img { height: 22px; }
  .nav-links { gap: 1rem; }
  .nav-link { font-size: 0.82rem; }

  .section {
    padding: 14vh 6vw;
    min-height: auto;
  }
  .section.hero { padding-top: 22vh; }
  .section.definition { padding: 16vh 6vw; }

  .line { margin-bottom: 1.2rem; }
  .list { margin-left: 0.8rem; }
  .list-definition { padding-left: 0.9rem; }
}

/* ---------- Contact modal ---------- */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.contact-modal[hidden] { display: none; }

.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 6, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlayFade 0.25s ease-out;
}

.contact-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #121214;
  border: 1px solid rgba(125, 133, 144, 0.18);
  border-radius: 10px;
  padding: 2.5rem 2.25rem 2rem;
  animation: dialogIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes overlayFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.contact-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}
.contact-close:hover { color: var(--text); }

.contact-title {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.contact-sub {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 300;
  margin-bottom: 1.75rem;
}

.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 400;
}

.field-input {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text);
  background: #0a0a0c;
  border: 1px solid rgba(125, 133, 144, 0.18);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  line-height: 1.5;
  transition: border-color 0.2s ease;
  width: 100%;
}
.field-input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
}
.field-textarea { resize: vertical; min-height: 96px; }

.contact-error {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #ff7a7a;
  margin-top: -0.25rem;
}

.contact-submit {
  margin-top: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: #0a0a0a;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.01em;
}
.contact-submit:hover:not(:disabled) { opacity: 0.9; }
.contact-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.contact-success-view { text-align: left; padding: 0.5rem 0 1rem; }

body.modal-open { overflow: hidden; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-section] .line,
  [data-section] .list,
  [data-section] .list li,
  [data-section] .eyebrow,
  .nav,
  .contact-overlay,
  .contact-dialog {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  html { scroll-behavior: auto; }
}
