/* ═══════════════════════════════════════════════════════
   ASSEMBLED AI — Vanilla Milkshake Design System
   ═══════════════════════════════════════════════════════ */

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

:root {
  --vanilla:    #EDEBE2;
  --espresso:   #2D2926;
  --secondary:  #5C554F;
  --vanilla-80: rgba(237, 235, 226, 0.80);

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  --radius:     2.5rem;
  --radius-lg:  3rem;
  --radius-sm:  1.25rem;
}

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

body {
  font-family: var(--font-sans);
  background: var(--vanilla);
  color: var(--espresso);
  letter-spacing: -0.02em;
  line-height: 1.6;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* ── Noise Overlay ──────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
}

/* ── Label / Mono Utility ───────────────────────────── */
.label-mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Section Container ──────────────────────────────── */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  display: inline-block;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* ── Buttons ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--espresso);
  color: var(--vanilla);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 100px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
}

.btn-primary:hover {
  background: transparent;
  color: var(--espresso);
  border-color: var(--espresso);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--espresso);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 100px;
  border: 1.5px solid rgba(45, 41, 38, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
  border-color: var(--espresso);
}

.btn-secondary svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 2.5rem);
  max-width: 900px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
  top: 0.75rem;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.6rem 0.6rem 1.25rem;
  border-radius: 100px;
  background: transparent;
  border: 1.5px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled .navbar-inner {
  background: var(--vanilla-80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(45, 41, 38, 0.1);
  box-shadow: 0 4px 30px rgba(45, 41, 38, 0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.nav-logo {
  width: 28px;
  height: 28px;
}

.nav-brand-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.825rem;
  font-weight: 400;
  color: var(--secondary);
  transition: color 0.25s ease;
  letter-spacing: -0.01em;
}

.nav-link:hover {
  color: var(--espresso);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  background: var(--espresso);
  color: var(--vanilla);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 100px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: -0.01em;
}

.nav-cta:hover {
  background: var(--secondary);
}

.nav-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--espresso);
}

.nav-mobile-toggle .toggle-icon-close {
  display: none;
}

.nav-mobile-toggle.active .toggle-icon-open {
  display: none;
}

.nav-mobile-toggle.active .toggle-icon-close {
  display: block;
}

.nav-mobile-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile nav overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--vanilla);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-nav-link {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: italic;
  color: var(--espresso);
  transition: opacity 0.2s;
}

.mobile-nav-link:hover {
  opacity: 0.6;
}

.mobile-nav-cta {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2rem;
  background: var(--espresso);
  color: var(--vanilla);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 100px;
}

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 6rem 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.1) brightness(0.95);
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(237, 235, 226, 0.3) 0%,
    rgba(237, 235, 226, 0.6) 40%,
    rgba(237, 235, 226, 0.92) 75%,
    var(--vanilla) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.hero-label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-label .label-mono {
  opacity: 0.5;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 1.75rem;
}

.hero-title-line {
  display: block;
}

.hero-title-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--secondary);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 1;
}

.scroll-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--espresso);
  opacity: 0.3;
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--espresso);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%   { top: -100%; }
  50%  { top: 100%;  }
  100% { top: 100%;  }
}

/* ═══════════════════════════════════════════════════════
   FEATURES
   ═══════════════════════════════════════════════════════ */
.features {
  padding: 8rem 0;
}

.section-header {
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: rgba(45, 41, 38, 0.03);
  border: 1px solid rgba(45, 41, 38, 0.08);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.feature-card:hover {
  background: rgba(45, 41, 38, 0.06);
  border-color: rgba(45, 41, 38, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(45, 41, 38, 0.08);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.card-label {
  color: var(--secondary);
  opacity: 0.6;
}

.card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(45, 41, 38, 0.06);
}

.card-icon svg {
  width: 18px;
  height: 18px;
  color: var(--espresso);
}

.card-title {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ── Card 1: Diagnostic Shuffler ────────────────────── */
.shuffler-container {
  position: relative;
  height: 120px;
  margin-top: auto;
}

.shuffler-card {
  position: absolute;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--vanilla);
  border: 1px solid rgba(45, 41, 38, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 1rem;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shuffler-card-1 { top: 0; z-index: 3; }
.shuffler-card-2 { top: 10px; z-index: 2; transform: scale(0.97); opacity: 0.7; }
.shuffler-card-3 { top: 20px; z-index: 1; transform: scale(0.94); opacity: 0.4; }

.shuffler-tag {
  padding: 0.2rem 0.5rem;
  background: rgba(45, 41, 38, 0.06);
  border-radius: 4px;
  font-size: 0.6rem;
  white-space: nowrap;
}

.shuffler-text {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ── Card 2: Telemetry Typewriter ───────────────────── */
.typewriter-container {
  margin-top: auto;
}

.typewriter-screen {
  background: var(--espresso);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  color: var(--vanilla);
}

.typewriter-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-height: 1.5rem;
}

.typewriter-prompt {
  opacity: 0.4;
  font-size: 0.75rem;
}

.typewriter-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0;
}

.typewriter-cursor {
  width: 2px;
  height: 14px;
  background: var(--vanilla);
  animation: cursorBlink 0.8s steps(1) infinite;
  flex-shrink: 0;
}

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

.typewriter-stats {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid rgba(237, 235, 226, 0.1);
  padding-top: 0.75rem;
}

.typewriter-stat {
  font-size: 0.6rem;
  opacity: 0.5;
}

.stat-value {
  color: #a3e635;
  opacity: 1;
}

/* ── Card 3: Cursor Protocol Scheduler ──────────────── */
.scheduler-container {
  margin-top: auto;
  background: var(--vanilla);
  border: 1px solid rgba(45, 41, 38, 0.1);
  border-radius: var(--radius-sm);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.scheduler-header {
  margin-bottom: 0.75rem;
  font-size: 0.65rem;
  color: var(--secondary);
}

.scheduler-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}

.scheduler-day-label {
  text-align: center;
  font-size: 0.6rem;
  color: var(--secondary);
  padding-bottom: 0.4rem;
}

.scheduler-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  border-radius: 8px;
  background: rgba(45, 41, 38, 0.03);
  color: var(--secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scheduler-day.active {
  background: var(--espresso);
  color: var(--vanilla);
  transform: scale(1.1);
}

.scheduler-cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: none;
}

/* ═══════════════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════════════ */
.about {
  padding: 8rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: start;
}

.about-text {
  font-size: 1rem;
  color: var(--secondary);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.about-text em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--espresso);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(45, 41, 38, 0.1);
}

.stat-number {
  font-family: var(--font-sans);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--secondary);
  font-size: 0.65rem;
}

/* ═══════════════════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════════════════ */
.contact {
  padding: 8rem 0;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner .section-title {
  margin-bottom: 1rem;
}

.contact-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  margin-bottom: 3rem;
  letter-spacing: 0.02em;
}

.contact-form {
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.65rem;
  color: var(--secondary);
}

.form-input {
  width: 100%;
  padding: 0.75rem 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--espresso);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(45, 41, 38, 0.15);
  outline: none;
  transition: border-color 0.3s ease;
  letter-spacing: -0.01em;
}

.form-input::placeholder {
  color: rgba(45, 41, 38, 0.3);
}

.form-input:focus {
  border-bottom-color: var(--espresso);
}

.form-textarea {
  resize: none;
  line-height: 1.6;
}

.btn-submit {
  margin-top: 0.5rem;
  width: 100%;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 0.95rem;
}

.btn-submit svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(45, 41, 38, 0.08);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.footer-logo {
  width: 24px;
  height: 24px;
}

.footer-name {
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.footer-copy {
  color: var(--secondary);
  font-size: 0.6rem;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

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

  .nav-mobile-toggle {
    display: flex;
  }

  .hero {
    padding-bottom: 4rem;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 3.5rem);
  }

  .hero-scroll-indicator {
    display: none;
  }

  .features {
    padding: 5rem 0;
  }

  .about {
    padding: 5rem 0;
  }

  .contact {
    padding: 5rem 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .stat-number {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .section-container {
    padding: 0 1.25rem;
  }

  .navbar {
    width: calc(100% - 1.5rem);
  }

  .feature-card {
    padding: 1.5rem;
    border-radius: var(--radius-sm);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    justify-content: center;
    width: 100%;
  }
}
