/* ═══════════════════════════════════════════
   Amble — Minimal Editorial Design System
   No glows, no gradients, no shadows.
   ═══════════════════════════════════════════ */

:root {
  --bg: #0a0a0a;
  --fg: #ededed;
  --muted: #888888;
  --border: #222222;
  --accent: #ffffff;
  
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Instrument Serif', serif;
  
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  position: relative;
}
.dot-text {
  font-family: 'Playfair Display', 'Instrument Serif', serif;
  display: inline-block;
  white-space: nowrap;
  position: relative;
}

.dot-char {
  background-image: radial-gradient(circle, rgba(255,255,255,1) 0.9px, transparent 0.9px);
  background-size: 3px 3px;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.2);
  filter: blur(0.5px);
  will-change: filter, -webkit-text-fill-color;
}

.dot-text.animate .dot-char {
  animation: char-glow 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dot-text.animate .dot-char:nth-child(1) { animation-delay: 0s; }
.dot-text.animate .dot-char:nth-child(2) { animation-delay: 0.12s; }
.dot-text.animate .dot-char:nth-child(3) { animation-delay: 0.24s; }
.dot-text.animate .dot-char:nth-child(4) { animation-delay: 0.36s; }
.dot-text.animate .dot-char:nth-child(5) { animation-delay: 0.48s; }

@keyframes char-glow {
  0% {
    -webkit-text-fill-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.2);
    filter: blur(0.5px);
  }
  100% {
    -webkit-text-fill-color: rgba(255,255,255,1);
    color: rgba(255,255,255,1);
    filter: blur(0px) drop-shadow(0 0 18px rgba(255,255,255,0.6));
  }
}

#dot-amble-lit {
  position: absolute;
  inset: -40px -80px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.8s ease-in-out 0.6s;
}

.dot-text.animate #dot-amble-lit {
  opacity: 1;
}

/* Clean dot matrix background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(#262626 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Scroll-linked SVG path */
#scroll-path-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.path-node {
  animation: nodePulse 3s ease-in-out infinite;
}

.path-node:nth-child(odd) {
  animation-delay: 0.5s;
}

@keyframes nodePulse {
  0%, 100% { r: 3; stroke-opacity: 0.15; }
  50% { r: 6; stroke-opacity: 0.4; }
}

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

/* ── Typography ── */
h1, h2, h3, .logo {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
}

h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #a3a3a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 0%, #a3a3a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h3 {
  font-size: 2rem;
}

em {
  font-style: italic;
  color: var(--muted);
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
}

/* ── Nav ── */
#nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
}

.logo {
  font-size: 2rem;
}

#nav nav {
  display: flex;
  gap: var(--space-md);
}

#nav nav a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

#nav nav a:hover {
  color: var(--fg);
}

.nav-cta {
  font-size: 0.875rem;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-cta:hover {
  background: var(--fg);
  color: var(--bg);
}

@media (max-width: 768px) {
  #nav nav { display: none; }
}

/* ── Buttons ── */
.btn-main, .btn-outline, .btn-text {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 1rem 2rem;
  border-radius: 0;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-main {
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  box-shadow: 0 4px 14px 0 rgba(255, 255, 255, 0.1);
}

.btn-main:hover {
  background: transparent;
  color: var(--fg);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--fg);
}

.btn-text {
  padding: 1rem 0;
  color: var(--muted);
}

.btn-text:hover {
  color: var(--fg);
}

.full-width {
  width: 100%;
}

/* ── Hero ── */
#hero {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  min-height: 80vh;
  position: relative;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-grow: 1;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 2;
}

.hero-visual {
  flex: 1;
  height: 600px;
  position: relative;
  display: flex;
  justify-content: flex-end;
  overflow: visible;
}

#dot-canvas {
  width: 1400px;
  height: 800px;
  position: absolute;
  left: 50%;
  top: -150px;
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
  }
  .hero-visual {
    width: 100%;
    justify-content: center;
    margin-top: var(--space-lg);
  }
}

.hero-tag {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--muted);
  margin-top: var(--space-md);
  max-width: 600px;
}

.hero-actions {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.hero-line {
  display: none;
}

/* ── Sections Common ── */
section {
  padding: var(--space-xl) var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── Work Grid ── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  padding-top: var(--space-lg);
}

.work-item {
  display: flex;
  flex-direction: column;
}

.work-num {
  font-family: 'Instrument Serif', serif;
  font-size: 6rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
  background-image: radial-gradient(circle, #ffffff 1.5px, transparent 1.5px);
  background-size: 5px 5px;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 1;
}

.work-item h2 {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.work-item p {
  color: var(--muted);
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.work-stat {
  padding-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--muted);
}

.work-stat strong {
  color: var(--fg);
  font-weight: 500;
}

/* ── Demo ── */
.demo-intro {
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
  max-width: 600px;
}

.demo-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-md);
  align-items: stretch;
}

.terminal {
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.terminal-bar {
  background: #111;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-size: 0.75rem;
  color: var(--muted);
}

.terminal-body {
  padding: 2rem;
  min-height: 400px;
  flex-grow: 1;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #a8a8a8;
  overflow-y: auto;
}

.terminal-body strong {
  color: #fff;
  font-weight: normal;
}

.terminal-body .success { color: #8bba7f; }
.terminal-body .info { color: #7f9fba; }

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: #fff;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

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

.demo-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.demo-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  max-height: 400px;
  padding: 0.5rem;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.demo-list::-webkit-scrollbar {
  width: 4px;
}
.demo-list::-webkit-scrollbar-track {
  background: transparent;
}
.demo-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.demo-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: all 0.2s;
}

.demo-btn:hover {
  color: var(--fg);
}

.demo-btn.active {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.02);
}

.demo-timer {
  padding: 1.5rem;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.timer-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.demo-timer strong {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--fg);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.demo-vs {
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .demo-container {
    grid-template-columns: 1fr;
  }
  .demo-list {
    max-height: 250px;
  }
  .terminal-body {
    min-height: 300px;
  }
}

/* ── Process ── */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.step {
  display: grid;
  grid-template-columns: 50px 1fr 2fr;
  gap: var(--space-md);
  align-items: baseline;
}

.step-num {
  font-family: 'Instrument Serif', serif;
  font-size: 6rem;
  line-height: 1;
  background-image: radial-gradient(circle, #ffffff 1.5px, transparent 1.5px);
  background-size: 5px 5px;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 1;
}

.step-line {
  display: none;
}

@media (max-width: 768px) {
  .step {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

/* ── Proof ── */
#proof {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

/* ── Philosophy / Manifesto ── */
.manifesto-statement {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  text-align: center;
  max-width: 1000px;
  margin: var(--space-xl) auto;
  color: var(--fg);
}

/* ── Pricing (Consultative) ── */
.pricing-consultative {
  max-width: 800px;
}

.pricing-consultative h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-sm);
}

.pricing-consultative p {
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  max-width: 600px;
}

.pricing-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-top: var(--space-lg);
}

.pricing-cta-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pricing-cta-text strong {
  font-weight: 500;
  color: var(--fg);
}

.pricing-cta-text span {
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .pricing-cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── CTA ── */
#start {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

#start h2 {
  margin-bottom: var(--space-md);
}

#start p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  font-size: 1.125rem;
}

.expanded-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 500px;
  margin: 0 auto var(--space-md);
}

.expanded-form .form-row {
  display: flex;
  gap: var(--space-sm);
}

.expanded-form input,
.expanded-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 1rem;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  border-radius: 6px;
  transition: border-color 0.3s ease;
}

.expanded-form textarea {
  resize: vertical;
}

.expanded-form input:focus,
.expanded-form textarea:focus {
  outline: none;
  border-color: var(--muted);
}

.expanded-form button {
  width: 100%;
  justify-content: center;
}

@media (max-width: 600px) {
  .expanded-form .form-row {
    flex-direction: column;
  }
}

.fine-print {
  font-size: 0.75rem !important;
}

/* ── Footer ── */
footer {
  padding: var(--space-lg) var(--space-md) var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.footer-row nav {
  display: flex;
  gap: var(--space-md);
}

.footer-row a {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-row a:hover {
  color: var(--fg);
}

.footer-bottom {
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  :root {
    --space-sm: 0.75rem;
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 1.5rem;
  }
  
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  .footer-row nav {
    flex-wrap: wrap;
  }
  #scroll-path-svg {
    display: none; /* Hide SVG path on mobile to avoid clutter */
  }
}

/* ── Micro-interactions & Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -2;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
  opacity: 0.04;
}

.terminal-scanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1), transparent);
  animation: scan 3s linear infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes scan {
  0% { transform: translateY(-20px); }
  100% { transform: translateY(600px); }
}
