/* ─────────────────────────────────────────
   layout.css  —  Page-level structure
───────────────────────────────────────── */

/* ── Body ── */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);

  /* Subtle noise texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ── Scrollbar ── */
::-webkit-scrollbar        { width: 4px; }
::-webkit-scrollbar-track  { background: var(--color-bg); }
::-webkit-scrollbar-thumb  { background: var(--color-accent); border-radius: 2px; }

/* ── Custom Cursor ── */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform var(--duration-fast) var(--ease-out),
              opacity var(--duration-fast);
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s var(--ease-out), opacity 0.2s;
  opacity: 0.4;
}

.cursor--hidden, .cursor-follower--hidden { opacity: 0; }

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-10);

  background: rgba(7, 8, 13, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--color-border);

  transition: padding var(--duration-normal) var(--ease-out),
              background var(--duration-normal);
}

.navbar.scrolled {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  background: rgba(7, 8, 13, 0.95);
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  position: relative;
  transition: color var(--duration-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--color-accent);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover,
.nav-link.active { color: var(--color-accent); }

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── Section Wrapper ── */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-24) var(--space-10);
}

.section__header {
  margin-bottom: var(--space-12);
}

.section__label {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  font-weight: 500;
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.section-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 1px;
  background: var(--color-border);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-height) + var(--space-20)) var(--space-10) var(--space-20);
  position: relative;
  overflow: hidden;
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(127, 255, 178, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 255, 178, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero__glow--1 {
  top: -20%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(127,255,178,0.06) 0%, transparent 70%);
}

.hero__glow--2 {
  bottom: -10%; right: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(79,209,255,0.05) 0%, transparent 70%);
}

.hero__content {
  position: relative;
  max-width: 900px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  display: block;
}

.hero__title-em {
  font-style: italic;
  color: var(--color-accent);
  display: block;
}

.hero__role {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-md), 2.5vw, var(--text-xl));
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-6);
  height: 2em;
}

.type-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--color-accent);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero__desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  max-width: 520px;
  line-height: 1.9;
  margin-bottom: var(--space-10);
}

.hero__btns {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-16);
}

.hero__stats {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
}

.stat__label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ── Scroll hint ── */
.scroll-hint {
  position: absolute;
  bottom: var(--space-10);
  left: var(--space-10);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-hint__line {
  width: 40px;
  height: 1px;
  background: var(--color-muted);
  overflow: hidden;
  position: relative;
}

.scroll-hint__line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--color-accent);
  animation: scanline 2s infinite;
}

@keyframes scanline { to { left: 100%; } }

/* ── Footer ── */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-10);
  border-top: 1px solid var(--color-border);
}

.footer__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  display: block;
  margin-bottom: var(--space-1);
}

.footer__sub,
.footer__copy,
.footer__built {
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}
