/* ============================================================
   NOAH WIRE — Design System
   Dark, minimal, confident. Inspired by poly.ai.
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Colours */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-card: #1c1c20;
  --bg-card-hover: #222228;
  --surface: #ffffff;
  --surface-muted: #f4f4f5;

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-inverse: #0a0a0a;

  --accent: #0d9488;
  --accent-light: #14b8a6;
  --accent-dark: #0f766e;
  --accent-glow: rgba(13, 148, 136, 0.15);
  --accent-subtle: rgba(13, 148, 136, 0.08);

  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(13, 148, 136, 0.3);

  --gradient-hero: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  --gradient-section: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-light) 100%);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-logo: 'Montserrat', var(--font-body);

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;
  --text-hero: clamp(2.5rem, 6vw, 5rem);
  --text-stat: clamp(2.5rem, 5vw, 4.5rem);

  /* Spacing */
  --section-padding: clamp(5rem, 10vw, 9rem);
  --content-max: 1200px;
  --content-narrow: 800px;
  --nav-height: 72px;

  /* Animation */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 0.3s;
  --duration-normal: 0.6s;
  --duration-slow: 0.9s;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
}


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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-secondary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--text-primary);
}

::selection {
  background: var(--accent);
  color: var(--text-primary);
}


/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--text-5xl)); }
h3 { font-size: clamp(1.25rem, 2vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent { color: var(--accent-light); }
.text-muted { color: var(--text-tertiary); }
.text-white { color: var(--text-primary); }

.font-serif { font-family: var(--font-display); }
.font-sans { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

.italic { font-style: italic; }
.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-body);
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
  display: block;
}

.subtitle {
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

p + p { margin-top: 1.5em; }


/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.container--narrow {
  max-width: var(--content-narrow);
}

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section--dark { background: var(--bg-primary); }
.section--darker { background: var(--bg-secondary); }
.section--tertiary { background: var(--bg-tertiary); }

.section--accent {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-accent);
  border-bottom: 1px solid var(--border-accent);
}

.section--gradient {
  background: var(--gradient-hero);
}

.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.flex {
  display: flex;
  gap: 1.5rem;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  justify-content: space-between;
  align-items: center;
}

.text-center { text-align: center; }


/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              backdrop-filter var(--duration-fast) var(--ease-out);
  background: transparent;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border);
}

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

.nav__logo {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: 0.2em;
  color: var(--text-primary);
  text-transform: uppercase;
  text-decoration: none;
}

.nav__logo:hover { color: var(--text-primary); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
  letter-spacing: 0.02em;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__cta {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--bg-primary);
  background: var(--text-primary);
  padding: 0.55rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  letter-spacing: 0.02em;
}

.nav__cta:hover {
  background: var(--accent-light);
  color: var(--bg-primary);
}

/* Mobile menu */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--duration-fast) var(--ease-out);
  border-radius: 1px;
}

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  z-index: 999;
}

.nav__mobile.open { display: flex; flex-direction: column; gap: 0; }

.nav__mobile a {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--text-primary);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  display: block;
}


/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-height) + 4rem) clamp(1.5rem, 4vw, 3rem) 4rem;
  position: relative;
  background: var(--bg-primary);
}

.hero__headline {
  font-size: var(--text-hero);
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-primary);
  max-width: 900px;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero__headline em {
  font-style: italic;
  color: var(--accent-light);
}

.hero__subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-xl));
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
}

.hero__scroll-hint svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-tertiary);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}
.btn--primary:hover {
  background: var(--accent-light);
  color: var(--bg-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn--secondary:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn--accent {
  background: var(--accent);
  color: var(--text-primary);
}
.btn--accent:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-light);
  padding: 0;
}
.btn--ghost:hover {
  color: var(--text-primary);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-fast) var(--ease-out);
}
.btn:hover svg { transform: translateX(3px); }


/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat__number {
  font-family: var(--font-body);
  font-size: var(--text-stat);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
}

.stat__number .accent {
  color: var(--accent-light);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: 1.4;
  max-width: 200px;
  margin: 0 auto;
}


/* --- Feature Row (alternating left/right) --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.feature-row--reverse .feature-row__content { order: 2; }
.feature-row--reverse .feature-row__visual { order: 1; }

.feature-row__content {
  max-width: 500px;
}

.feature-row__visual {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.feature-row__visual img {
  width: 100%;
  border-radius: 12px;
}

.feature-row__visual--phone {
  display: flex;
  justify-content: center;
}

.feature-row__visual--phone img {
  max-width: 320px;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
}


/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  transition: all var(--duration-fast) var(--ease-out);
}

.card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-light);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.card__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
}


/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}

.divider--accent {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  height: 1px;
}


/* --- Ticker / Live Badge --- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  background: var(--accent-subtle);
}

.live-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  animation: pulse 2s ease-in-out infinite;
}

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


/* --- Image treatment --- */
.img-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.img-overlay {
  position: relative;
}

.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 10, 0.6) 100%);
  pointer-events: none;
}


/* --- Quote / Testimonial --- */
.quote {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.5;
  max-width: 700px;
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--accent);
}


/* --- Inline Logo (NOAH WIRE text mark) --- */
.logo-text {
  font-family: var(--font-logo);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}


/* --- Footer --- */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer__brand {
  max-width: 300px;
}

.footer__brand-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: 1rem;
  line-height: 1.6;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}


/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}
.reveal--left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}
.reveal--right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}
.reveal--scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }
.stagger > *:nth-child(1) { --i: 0; }
.stagger > *:nth-child(2) { --i: 1; }
.stagger > *:nth-child(3) { --i: 2; }
.stagger > *:nth-child(4) { --i: 3; }
.stagger > *:nth-child(5) { --i: 4; }
.stagger > *:nth-child(6) { --i: 5; }


/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: var(--section-padding) 0;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section .subtitle {
  margin: 0 auto 2.5rem;
}


/* --- Accent Line (top of sections) --- */
.accent-line {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 2rem;
}

.accent-line--center {
  margin-left: auto;
  margin-right: auto;
}


/* --- Special: Edge Showcase --- */
.edge-showcase {
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  padding: clamp(2rem, 4vw, 4rem);
  position: relative;
  overflow: hidden;
}

.edge-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
}

.edge-showcase__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

@media (max-width: 768px) {
  .edge-showcase__grid { grid-template-columns: 1fr; }
}


/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; gap: 3rem; }
  .feature-row--reverse .feature-row__content { order: 1; }
  .feature-row--reverse .feature-row__visual { order: 2; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }

  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }

  .stats-bar {
    grid-template-columns: 1fr;
  }
  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 2rem 1.5rem;
  }
  .stat:last-child { border-bottom: none; }

  .hero {
    min-height: 90vh;
    padding-top: calc(var(--nav-height) + 3rem);
  }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .hero__ctas { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
