/* ==========================================================================
   AeorDB Marketing Site — style.css
   Single-page dark-mode marketing site
   ========================================================================== */

/* --------------------------------------------------------------------------
   @font-face
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Custom Properties
   -------------------------------------------------------------------------- */

:root {
  --background:    #0a0a0f;
  --surface:       #14141f;
  --border:        #1e1e2e;
  --primary:       #f97316;
  --primary-hover: #fb923c;
  --text:          #e4e4e7;
  --text-muted:    #71717a;
  --code-bg:       #0f0f1a;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

::selection {
  background: var(--primary);
  color: #fff;
}

code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

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

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 3rem);
}

.section {
  padding: clamp(4rem, 10vh, 8rem) 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-muted);
  text-align: center;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  max-width: 650px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Navigation (#nav)
   -------------------------------------------------------------------------- */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 70px;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

#nav.nav--scrolled {
  background: rgba(10, 10, 15, 0.95);
  border-bottom-color: var(--border);
}

#nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  height: 40px;
  color: currentColor;
  flex-shrink: 0;
}

.nav-logo img,
.nav-logo svg {
  height: 100%;
  width: auto;
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 0.5rem 0;
}

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

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu — slides in from right */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu a {
  display: block;
  padding: 1rem 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease;
  min-height: 44px;
}

.mobile-menu a:hover {
  color: var(--text);
}

/* Mobile menu overlay/backdrop */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Hero (#hero)
   -------------------------------------------------------------------------- */

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 70px; /* offset for fixed nav */
}

#hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-headline {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.hero-subtext {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Pain Point (#pain-point)
   -------------------------------------------------------------------------- */

#pain-point {
  text-align: center;
}

#pain-point p {
  max-width: 750px;
  margin: 0 auto 1.5rem;
  line-height: 1.8;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
}

#pain-point p:last-of-type {
  margin-bottom: 0;
}

.pain-filename,
#pain-point code {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 1.05em;
  background: var(--code-bg);
  padding: 0.2em 0.5em;
  border-radius: 4px;
}

#pain-point ul {
  list-style: none;
  max-width: 750px;
  margin: 0 auto 2rem;
  padding: 0;
}

#pain-point li {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.8;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

#pain-point li:last-child {
  border-bottom: none;
}

/* Subtle orange accent border */
#pain-point .container {
  border-top: 2px solid var(--primary);
  padding-top: clamp(3rem, 6vh, 5rem);
}

/* --------------------------------------------------------------------------
   How It Works (#how-it-works)
   -------------------------------------------------------------------------- */

.step {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
}

.step:last-child {
  margin-bottom: 0;
}

.step-number {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.step-text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Code Blocks (.code-block)
   -------------------------------------------------------------------------- */

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  overflow-x: auto;
  line-height: 1.7;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.code-block pre {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}

.code-block code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Optional label decoration */
.code-block::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.6;
}

.code-block[data-label]::before {
  content: attr(data-label);
  width: auto;
  height: auto;
  border-radius: 4px;
  background: transparent;
  opacity: 1;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Cards (.card)
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
  line-height: 1;
}

.card-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.card-text {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */

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

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

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

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-body);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  line-height: 1.2;
  min-height: 44px;
  gap: 0.5rem;
}

.button--primary {
  background: var(--primary);
  color: #fff;
}

.button--primary:hover {
  background: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
}

.button--secondary {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.button--secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Get Started (#get-started)
   -------------------------------------------------------------------------- */

#get-started {
  text-align: center;
}

#get-started .code-block {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

#get-started .links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Footer (#footer)
   -------------------------------------------------------------------------- */

#footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

#footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo {
  height: 30px;
  color: currentColor;
}

.footer-logo img,
.footer-logo svg {
  height: 100%;
  width: auto;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Scroll Animations
   -------------------------------------------------------------------------- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Responsive — Tablet (max-width: 1024px)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile (max-width: 768px)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: clamp(3rem, 8vh, 5rem) 0;
  }

  .section-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
  }

  .hero-headline {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .hero-subtext {
    font-size: 1.05rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .button {
    width: 100%;
    max-width: 320px;
  }

  /* Steps stack vertically on mobile */
  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .step-number {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  /* Ensure touch targets are at least 44px */
  .nav-link,
  .button,
  .mobile-menu a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .code-block {
    padding: 1.25rem 1rem;
    font-size: 0.82rem;
  }

  .card {
    padding: 1.5rem;
  }

  /* Footer stacks */
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   Responsive — Small (max-width: 480px)
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .hero-headline {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .code-block {
    border-radius: 6px;
    font-size: 0.78rem;
  }
}
