/* Fonts loaded via <link> in HTML for non-render-blocking performance */

/* ==========================================================================
   SKIP LINK (accessibility)
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.5rem;
}

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */
:root {
  /* Colors */
  --bg-base: #0d0d0d;
  --bg-surface: #141414;
  --bg-surface-glass: rgba(20, 20, 20, 0.7);
  --bg-surface-elevated: #1a1a1a;
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666666;
  
  --brand-primary: #ff6b35;
  --brand-primary-hover: #e55a2b;
  --brand-secondary: #f7c59f;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  
  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  
  /* Oaken Notes brand fonts */
  --font-oaken-display: 'Instrument Serif', Georgia, serif;
  --font-oaken-body: 'Instrument Sans', system-ui, sans-serif;
  
  /* Spacing */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2.5rem;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Noise Texture Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%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");
}

/* Ambient Glows */
.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.15) 0%, rgba(255, 107, 53, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
}

.ambient-glow.top-right { top: -200px; right: -200px; }
.ambient-glow.bottom-left { bottom: -200px; left: -200px; background: radial-gradient(circle, rgba(247, 197, 159, 0.1) 0%, rgba(247, 197, 159, 0) 70%); }

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.display-title {
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.04em;
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  max-width: 60ch;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-6) 0;
  transition: background-color var(--transition-fast), padding var(--transition-fast);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  padding: var(--space-4) 0;
  background-color: var(--bg-surface-glass);
  border-bottom: 1px solid var(--border-subtle);
}

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

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

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

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.25);
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--text-secondary);
}

/* Glass Card / Bento */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
}

.glass-card {
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.6) 0%, rgba(20, 20, 20, 0.4) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* Product Specific */
.product-hero {
  text-align: center;
  padding-top: var(--space-32);
}

.product-showcase {
  background: radial-gradient(ellipse at center, rgba(255,107,53,0.1) 0%, transparent 60%);
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  border: 1px solid var(--border-subtle);
  margin-top: var(--space-12);
  position: relative;
  overflow: hidden;
}

.product-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: linear-gradient(135deg, #333, #111);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid var(--border-strong);
}

.product-icon svg {
  width: 40px;
  height: 40px;
  fill: var(--brand-primary);
}

/* Oaken Notes Product Card */
.oaken-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto var(--space-6);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.oaken-title {
  font-family: var(--font-oaken-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.oaken-tagline {
  font-family: var(--font-oaken-body);
}

.oaken-body {
  font-family: var(--font-oaken-body);
}

.oaken-feature strong {
  font-family: var(--font-oaken-body);
}

.oaken-feature span {
  font-family: var(--font-oaken-body);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) 0 var(--space-8);
  background-color: var(--bg-base);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: var(--space-4);
  max-width: 300px;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: revealUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface-elevated);
    padding: var(--space-6);
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }

  .bento-grid {
    display: flex;
    flex-direction: column;
  }
  
  .display-title {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }
  
  .section {
    padding: var(--space-16) 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}
