@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Hero photo — visible at top, fades out scrolling down */
.page-bg-photo {
  position: fixed;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.42;
  filter: saturate(0.9) brightness(0.75);
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.85) 18%,
    rgba(0, 0, 0, 0.45) 42%,
    rgba(0, 0, 0, 0.12) 62%,
    transparent 78%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.85) 18%,
    rgba(0, 0, 0, 0.45) 42%,
    rgba(0, 0, 0, 0.12) 62%,
    transparent 78%
  );
}

.page-bg-photo-fade {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(2, 4, 8, 0.35) 0%,
      rgba(2, 4, 8, 0.55) 28%,
      rgba(2, 4, 8, 0.82) 52%,
      rgba(2, 4, 8, 0.96) 68%,
      var(--bg) 82%
    ),
    linear-gradient(
      to right,
      rgba(2, 4, 8, 0.75) 0%,
      transparent 35%,
      transparent 65%,
      rgba(2, 4, 8, 0.6) 100%
    );
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(6, 182, 212, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(124, 58, 237, 0.06), transparent 45%);
}

html.auth-pending .page-shell {
  visibility: hidden;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  z-index: -1;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.hidden { display: none !important; }

.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  max-width: none;
}

.container {
  width: min(var(--max-w), 100% - 40px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(14px);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo-dot {
  color: var(--teal-light);
  letter-spacing: 0;
  text-transform: lowercase;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal-light);
}

.nav-toggle {
  display: none;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
}

.site-footer {
  margin-top: 0;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-inner a { color: var(--teal-light); }

.page-shell {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
  }

  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 12px 0; }
}
