/* ==========================================
   IdeaFactory — Main Stylesheet
   ========================================== */

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

:root {
  /* Colors */
  --bg:              #0f3d4f;
  --bg-card:         #1a4d5e;
  --bg-dark:         #0d3140;
  --bg-subtle:       #2a5a6a;
  --text:            #f5f7f9;
  --text-secondary:  #a0b0b8;
  --text-muted:      #7a8a94;
  --accent:          #d4a574;
  --accent-light:    #e8b88a;
  --accent-dim:      rgba(212, 165, 116, 0.12);
  --accent-border:   rgba(212, 165, 116, 0.22);
  --border:          #2a5a6a;
  --border-subtle:   #1f4550;

  /* Layout */
  --max-width:   1100px;
  --nav-height:  68px;
  --section-py:  96px;

  /* Radius */
  --radius:    12px;
  --radius-sm:  8px;
  --radius-lg: 18px;

  /* Transitions */
  --t: 0.18s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
strong { color: var(--text); font-weight: 600; }

/* ---- Container ---- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all var(--t);
  border: 1.5px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #09090b;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: #52525b;
  transform: translateY(-1px);
}

/* ==========================================
   Navigation
   ========================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background-color: rgba(30, 58, 138, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-subtle);
}

:root[data-theme="teal"] .nav.scrolled {
  background-color: rgba(15, 61, 79, 0.88);
}

:root[data-theme="green"] .nav.scrolled {
  background-color: rgba(26, 58, 46, 0.88);
}

:root[data-theme="charcoal"] .nav.scrolled {
  background-color: rgba(31, 41, 55, 0.88);
}

:root[data-theme="navy"] .nav.scrolled {
  background-color: rgba(30, 58, 138, 0.88);
}

:root[data-theme="amber"] .nav.scrolled {
  background-color: rgba(9, 9, 11, 0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #09090b;
  font-size: 12px;
  font-weight: 900;
  border-radius: 7px;
  letter-spacing: 0;
  flex-shrink: 0;
}

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

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

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--t), background-color var(--t);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--text);
  background-color: var(--bg-subtle);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Theme Toggle */
.theme-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t);
  color: var(--text-secondary);
  font-size: 18px;
  padding: 0;
}
.theme-toggle:hover {
  background-color: var(--bg-subtle);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Theme Dropdown Menu */
.theme-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 200px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t), visibility var(--t), transform var(--t);
  z-index: 50;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.theme-menu-wrapper[data-open="true"] .theme-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  display: block;
  width: 100%;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--t);
  border-bottom: 1px solid var(--border-subtle);
}
.theme-option:last-child {
  border-bottom: none;
}
.theme-option:hover {
  background-color: var(--bg-subtle);
  color: var(--accent);
  padding-left: 20px;
}
.theme-option.active {
  background-color: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding-left: 13px;
  color: var(--accent);
}

/* ==========================================
   Theme Definitions
   ========================================== */

/* Deep Teal & Warm Gold Theme */
:root[data-theme="teal"] {
  --theme-name: "teal";
  --bg:              #0f3d4f;
  --bg-card:         #1a4d5e;
  --bg-dark:         #0d3140;
  --bg-subtle:       #2a5a6a;
  --text:            #f5f7f9;
  --text-secondary:  #a0b0b8;
  --text-muted:      #7a8a94;
  --accent:          #d4a574;
  --accent-light:    #e8b88a;
  --accent-dim:      rgba(212, 165, 116, 0.12);
  --accent-border:   rgba(212, 165, 116, 0.22);
  --border:          #2a5a6a;
  --border-subtle:   #1f4550;
}

/* Forest Green & Copper Theme */
:root[data-theme="green"] {
  --theme-name: "green";
  --bg:              #1a3a2e;
  --bg-card:         #244a3d;
  --bg-dark:         #162d27;
  --bg-subtle:       #2f5249;
  --text:            #f5f7f9;
  --text-secondary:  #a0b8b0;
  --text-muted:      #7a9890;
  --accent:          #c67c4e;
  --accent-light:    #d9905f;
  --accent-dim:      rgba(198, 124, 78, 0.12);
  --accent-border:   rgba(198, 124, 78, 0.22);
  --border:          #2f5249;
  --border-subtle:   #245039;
}

/* Charcoal & Emerald Theme */
:root[data-theme="charcoal"] {
  --theme-name: "charcoal";
  --bg:              #1f2937;
  --bg-card:         #293548;
  --bg-dark:         #1a2332;
  --bg-subtle:       #3a4b5f;
  --text:            #f3f4f6;
  --text-secondary:  #9ca3af;
  --text-muted:      #6b7280;
  --accent:          #06b6d4;
  --accent-light:    #22d3ee;
  --accent-dim:      rgba(6, 182, 212, 0.12);
  --accent-border:   rgba(6, 182, 212, 0.22);
  --border:          #3a4b5f;
  --border-subtle:   #2d3e50;
}

/* Navy & Terracotta Theme (default) */
:root,
:root[data-theme="navy"] {
  --theme-name: "navy";
  --bg:              #1e3a8a;
  --bg-card:         #2a4ba8;
  --bg-dark:         #1a2f6b;
  --bg-subtle:       #3f5bc8;
  --text:            #f5f7f9;
  --text-secondary:  #a0b8d4;
  --text-muted:      #7a94ac;
  --accent:          #d97706;
  --accent-light:    #ea8d1a;
  --accent-dim:      rgba(217, 119, 6, 0.12);
  --accent-border:   rgba(217, 119, 6, 0.22);
  --border:          #3f5bc8;
  --border-subtle:   #2d449a;
}

/* Dark Amber Theme */
:root[data-theme="amber"] {
  --theme-name: "amber";
  --bg:              #09090b;
  --bg-card:         #141417;
  --bg-dark:         #0d0d10;
  --bg-subtle:       #1c1c20;
  --text:            #fafafa;
  --text-secondary:  #a1a1aa;
  --text-muted:      #71717a;
  --accent:          #f59e0b;
  --accent-light:    #fbbf24;
  --accent-dim:      rgba(245, 158, 11, 0.12);
  --accent-border:   rgba(245, 158, 11, 0.22);
  --border:          #27272a;
  --border-subtle:   #1f1f22;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh; /* fallback */
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 50% -5%, rgba(245, 158, 11, 0.07), transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 75%, rgba(245, 158, 11, 0.035), transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 740px;
  padding-block: 88px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.hero-title {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text);
}

.hero-subtitle {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 44px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================
   Tagline Bar
   ========================================== */
.tagline-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  background: var(--bg-dark);
}

.tagline {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ==========================================
   Sections — Shared
   ========================================== */
.section { padding-block: var(--section-py); }

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

.section-header { margin-bottom: 64px; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 18px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.75;
}

/* ==========================================
   About Section
   ========================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.82;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); }

.about-highlight {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.highlight-quote {
  font-size: 18px;
  font-style: italic;
  color: var(--text);
  line-height: 1.72;
  border: none;
  margin-bottom: 24px;
  font-weight: 400;
  position: relative;
}

.highlight-quote::before {
  content: '"';
  font-size: 72px;
  color: var(--accent);
  line-height: 0.8;
  display: block;
  margin-bottom: 12px;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: normal;
  font-weight: 400;
}

.highlight-attribution {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================
   Process Section
   ========================================== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.process-step {
  display: flex;
  gap: 20px;
  padding: 40px;
  background: var(--bg-dark);
  transition: background-color var(--t);
}
.process-step:hover { background: var(--bg-subtle); }

.process-number {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding-top: 5px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.process-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}

.process-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ==========================================
   Products Section
   ========================================== */
.products-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 88px 32px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.products-empty-icon {
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0.4;
}

.products-empty h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.products-empty p {
  font-size: 15px;
  color: var(--text-muted);
}

/* Product cards — used when products exist */
.products-grid.has-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--t), transform var(--t);
}
.product-card:hover {
  border-color: #3f3f46;
  transform: translateY(-2px);
}

.product-card-tagline {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.product-card-logo {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

.product-card-name {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.018em;
}

.product-card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.72;
  flex: 1;
}

.product-card-media {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  max-width: 260px;
  margin-inline: auto;
}

.product-card-video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 9 / 16;
  background: #000;
}

.product-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.product-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--t);
  margin-top: 4px;
}
.product-card-link:hover { gap: 10px; }

/* ==========================================
   Footer
   ========================================== */
.footer {
  border-top: 1px solid var(--border);
  padding-top: 60px;
  padding-bottom: 44px;
  background: var(--bg-dark);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 300px;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t);
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.75;
}

.footer-copy { white-space: nowrap; flex-shrink: 0; }

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 900px) {
  :root { --section-py: 72px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-highlight { position: static; }

  .process-steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --section-py: 56px; }

  .products-grid.has-products {
    grid-template-columns: 1fr;
  }

  .product-card {
    padding: 24px;
  }

  .product-card-video {
    max-height: 60svh;
    object-fit: contain;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 2px;
  }
  .nav-links.open { display: flex; }

  .nav-link { padding: 13px 16px; width: 100%; }

  .nav-toggle { display: flex; }

  .hero-content { padding-block: 52px; }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn { width: 100%; justify-content: center; }

  .section-header { margin-bottom: 40px; }

  .about-highlight { padding: 28px; }
  .highlight-quote { font-size: 16px; }

  .process-step { padding: 28px; }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================
   Logo Image Styling
   ========================================== */
.nav-logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* ==========================================
   Hero Layout with Visual
   ========================================== */
.hero-container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  order: -1;
}

.hero-logo {
  width: 100%;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

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

.hero-content {
  max-width: 100%;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .hero-visual {
    order: 0;
    width: min(450px, 80vw);
    margin-inline: auto;
  }
  
  .hero-logo {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-container {
    gap: 32px;
  }
  
  .hero-visual {
    width: min(360px, 80vw);
  }
  
  .hero-logo {
    width: 100%;
    max-width: 100%;
  }
  
  .hero-content {
    padding-block: 48px;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  
  .hero-logo {
    animation: none;
  }
}
