:root {
  color-scheme: dark;
  --black: #050607;
  --ink: #090b0e;
  --surface: #111419;
  --surface-raised: #171a20;
  --line: #272c32;
  --line-strong: #464d55;
  --text: #f0f1f2;
  --text-soft: #c5c9ce;
  --muted: #9299a1;
  --dim: #6c747d;
  --platinum: #e4e6e8;
  --silver: #b7bdc4;
  --metal-gradient: linear-gradient(135deg, #ffffff 0%, #afb5bc 36%, #f4f5f6 56%, #7f8790 100%);
  --chrome-surface: linear-gradient(145deg, #242a30 0%, #0f1216 52%, #2a3036 100%);
  --chrome-border: rgba(213, 218, 223, 0.32);
}

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.09), transparent 35rem),
    linear-gradient(180deg, #090b0e 0%, var(--black) 48%, #070809 100%);
  color: var(--text);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--platinum);
  outline-offset: 4px;
}

nav {
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(184, 189, 196, 0.16);
  background: rgba(7, 8, 10, 0.88);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

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

.brand-logo {
  width: clamp(128px, 16vw, 166px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-logo::after {
  display: none;
}

.nav-links {
  gap: clamp(18px, 3vw, 32px);
}

.nav-links a {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--platinum);
}

footer {
  padding: 32px 28px;
  border-top: 1px solid rgba(184, 189, 196, 0.16);
  background: rgba(0, 0, 0, 0.18);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--dim);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--platinum);
}

/* Legal pages */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 28px 100px;
  flex: 1;
}

.legal-content h1 {
  margin-bottom: 10px;
  color: var(--platinum);
  background: transparent;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--platinum);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.legal-date {
  color: var(--dim);
  margin-bottom: 44px;
}

.legal-content h2 {
  color: var(--text);
  margin-top: 42px;
  margin-bottom: 14px;
}

.legal-content h3 {
  color: var(--text-soft);
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

.legal-content a {
  color: var(--silver);
}

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

.legal-content th,
.legal-content td {
  color: var(--muted);
  border-bottom-color: var(--line);
}

.legal-content th {
  color: var(--text-soft);
  background: rgba(205, 211, 217, 0.07);
}

.inline-contact {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--silver);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

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

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
}

.contact-dialog {
  position: relative;
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(29, 33, 38, 0.98), rgba(10, 12, 15, 0.99));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.contact-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 230, 234, 0.42), transparent);
}

.contact-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.contact-close:hover {
  border-color: var(--silver);
  color: var(--platinum);
}

.contact-kicker {
  margin-bottom: 10px;
  color: var(--silver);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-dialog h2 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.contact-modal-copy {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-email {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--platinum);
  font: 600 1rem/1.3 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-align: left;
  cursor: copy;
  transition: border-color 0.2s, background 0.2s;
}

.contact-email:hover {
  border-color: var(--silver);
  background: rgba(255, 255, 255, 0.09);
}

.contact-copy-status {
  min-height: 1.4em;
  margin-top: 12px;
  color: var(--silver);
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .brand-logo {
    width: 142px;
  }

  .footer-inner {
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .legal-content {
    padding-top: 52px;
    padding-bottom: 72px;
  }

  .contact-dialog {
    padding: 30px 22px 24px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
