:root {
  --bg: #050a06;
  --bg-soft: #09100b;
  --green: #2d7a4c;
  --green-light: #3d9a62;
  --green-bright: #4aba72;
  --green-muted: #1e5535;
  --text: #d8e2da;
  --text-muted: #6b7d70;
  --text-dim: #3e5145;
  --border-vis: rgba(45, 122, 76, 0.12);
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1200px;
  --legal-width: 860px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: auto;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

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

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

button {
  border: 0;
  background: none;
}

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

.section-eyebrow,
.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.section-title,
.legal-page__intro h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0.01em;
}

.section-body,
.legal-lead {
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.85;
  color: var(--text-muted);
}

/* Navbar */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem clamp(1.5rem, 4vw, 3rem);
  z-index: 100;
}

.home-body .navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  mix-blend-mode: difference;
}

.legal-body .navbar,
.contact-body .navbar {
  position: sticky;
  top: 0;
  background: rgba(5, 10, 6, 0.82);
  backdrop-filter: blur(18px);
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0;
}

.nav-contact {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 0.5em 1.3em;
  transition: color 0.3s ease;
  opacity: 0;
}

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

.legal-body .nav-logo,
.legal-body .nav-contact,
.contact-body .nav-logo,
.contact-body .nav-contact {
  opacity: 1;
}

/* Hero */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 0 1.5rem;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 500px;
  transform: translate(-50%, -55%);
  background: radial-gradient(ellipse at center, rgba(45, 122, 76, 0.07) 0%, rgba(45, 122, 76, 0.025) 45%, transparent 70%);
  pointer-events: none;
  animation: glow-breathe 8s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -55%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -55%) scale(1.08); }
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

.hero-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-size: clamp(4rem, 14vw, 12rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--text);
}

.hero-title .char-wrap {
  display: inline-block;
  opacity: 0;
  cursor: default;
}

.hero-subtitle {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  max-width: 460px;
  font-size: clamp(0.88rem, 1.3vw, 1.05rem);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.015em;
  color: var(--text-muted);
  opacity: 0;
}

/* Sphere */

.sphere-section {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#sphere-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  z-index: 1;
}

#sphere-canvas:active {
  cursor: grabbing;
}

.sphere-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.face-left,
.face-right {
  position: absolute;
  top: 50%;
  z-index: 20;
  pointer-events: none;
  user-select: none;
}

.face-left {
  left: calc(50% - min(40vh, 40vw));
  transform: translate(-100%, -50%);
  padding-right: clamp(0.8rem, 1.5vw, 1.5rem);
  text-align: right;
}

.face-left.active {
  opacity: 1;
  transition: 0.5s ease;
}

.face-left.inactive {
  opacity: 0;
  transition: 0.12s ease;
}

.face-theme {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--text);
}

.face-right {
  left: calc(50% + min(40vh, 40vw));
  transform: translate(0%, -50%);
  padding-left: clamp(0.8rem, 1.5vw, 1.5rem);
  max-width: clamp(160px, 18vw, 260px);
}

.face-right.active {
  opacity: 1;
  transition: 0.5s ease;
}

.face-right.inactive {
  opacity: 0;
  transition: 0.12s ease;
}

.intel-card {
  font-size: clamp(0.7rem, 0.82vw, 0.84rem);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.intel-card .ic-finding {
  padding-left: 0.8em;
  color: var(--text);
  border-left: 2px solid var(--green-muted);
}

/* Contact */

.contact-page {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3rem) clamp(4rem, 7vw, 6rem);
}

.contact-layout {
  display: grid;
  gap: 2rem;
}

.contact-header .section-title {
  text-align: center;
}

.contact-card {
  padding: clamp(1.4rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 28px;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.55rem;
}

.form-field span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border-vis);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: transparent;
  color: var(--text);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.form-field textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(216, 226, 218, 0.24);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(74, 186, 114, 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.consent-row input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  accent-color: var(--green-light);
  margin-top: 0.35rem;
}

.consent-row a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(74, 186, 114, 0.3);
  text-underline-offset: 0.18em;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 186, 114, 0.3);
  background: rgba(74, 186, 114, 0.08);
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.contact-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(74, 186, 114, 0.5);
  background: rgba(74, 186, 114, 0.14);
}

.contact-submit:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.form-status {
  min-height: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.form-status[data-tone="success"] {
  color: #8bd7a4;
}

.form-status[data-tone="error"] {
  color: #f1a5a5;
}

/* Footer */

.site-footer {
  position: relative;
  z-index: 20;
  background: transparent;
}

.home-body .site-footer {
  margin-top: -3.5rem;
  padding-top: 0;
}

.site-footer__inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 1.5rem clamp(1.5rem, 4vw, 3rem) 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-company {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-copy {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem 1.2rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.site-footer__links a {
  transition: color 0.3s ease;
}

.site-footer__links a:hover {
  color: var(--text-muted);
}

/* Legal documents */

.legal-page {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem) clamp(4rem, 7vw, 6rem);
}

.legal-page__intro {
  max-width: 48rem;
}

.legal-page__intro h1 {
  margin-top: 1rem;
}

.legal-page__intro .legal-lead {
  margin-top: 1.4rem;
}

.legal-article {
  width: min(100%, var(--legal-width));
  margin-top: 2.5rem;
  border-radius: 28px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: rgba(255, 255, 255, 0.02);
}

.legal-copy {
  color: var(--text-muted);
  line-height: 1.8;
}

.legal-copy h1,
.legal-copy h2,
.legal-copy h3 {
  color: var(--text);
  font-weight: 500;
  line-height: 1.18;
}

.legal-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
}

.legal-copy h2 {
  margin-top: 2.25rem;
  font-size: 1.3rem;
}

.legal-copy h3 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.legal-copy p,
.legal-copy ul,
.legal-copy ol {
  margin-top: 1rem;
}

.legal-copy ul,
.legal-copy ol {
  padding-left: 1.25rem;
}

.legal-copy li + li {
  margin-top: 0.55rem;
}

.legal-copy strong {
  color: var(--text);
}

.legal-copy a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(74, 186, 114, 0.3);
  text-underline-offset: 0.18em;
}

.legal-copy hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--border-vis);
}

.legal-copy em {
  color: rgba(216, 226, 218, 0.82);
}

/* Responsive */

@media (max-width: 960px) {
  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .hero-glow {
    width: 500px;
    height: 350px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .face-left,
  .face-right {
    left: 50% !important;
    transform: translateX(-50%) !important;
    text-align: center;
    padding: 0 !important;
    max-width: 80vw !important;
  }

  .face-left {
    top: clamp(4.5rem, 10vh, 6rem);
  }

  .face-right {
    top: auto;
    bottom: clamp(1.5rem, 5vh, 3rem);
  }

  .face-theme {
    font-size: 1.3rem;
  }

  .intel-card {
    font-size: 0.75rem;
    text-align: center;
  }

  .intel-card .ic-finding {
    padding-left: 0;
    border-left: none;
  }
}

@media (max-width: 560px) {
  .navbar {
    padding: 1.2rem 1rem;
  }

  .contact-page,
  .legal-page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .contact-card,
  .legal-article {
    border-radius: 22px;
  }
}
