/* ============================================================
   immogenius · marketing site · v1.0
   Shared styles — single source of truth
   ============================================================ */

:root {
  /* Stone neutrals — warm editorial */
  --stone-50:  #F9F7F2;
  --stone-100: #F2EFE6;
  --stone-200: #E6E1D4;
  --stone-300: #C9C2B0;
  --stone-400: #8E897A;
  --stone-500: #5E5A50;
  --stone-700: #2E2C27;
  --stone-900: #14130F;

  /* Forest accents */
  --forest-50:  #EDF2EF;
  --forest-100: #D5E0D9;
  --forest-500: #2F5F4D;
  --forest-700: #1B3E31;
  --forest-900: #0E2319;
  --forest-accent: #7FB39F;

  /* Functional signals */
  --amber-50:  #FDF6E3;
  --amber-100: #FCEFCF;
  --amber-500: #B8863A;
  --amber-700: #8A6325;
  --rust-50:   #F9E9E3;
  --rust-100:  #EBD9D3;
  --rust-500:  #A0472E;
  --slate-500: #49596B;

  /* Typography */
  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --container: 1280px;
  --gutter: 40px;
  --nav-h: 72px;
}

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

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

body {
  background: var(--stone-50);
  color: var(--stone-700);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: 'ss01' 1, 'cv11' 1;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* Selection */
::selection { background: var(--forest-500); color: var(--stone-50); }

/* Scrollbars (WebKit only) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--stone-100); }
::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 5px; border: 2px solid var(--stone-100); }
::-webkit-scrollbar-thumb:hover { background: var(--stone-400); }

/* Utilities */
.tabular { font-variant-numeric: tabular-nums; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============ Navigation (sticky top) ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 247, 242, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--stone-200);
  height: var(--nav-h);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--stone-900);
  font-family: var(--f-display);
  font-variation-settings: 'opsz' 36;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand-glyph { width: 24px; height: 24px; color: var(--stone-900); flex-shrink: 0; }

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

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--stone-700);
  font-weight: 500;
  border-radius: 4px;
  transition: all 150ms var(--ease-standard);
  position: relative;
}

.nav-link:hover { color: var(--stone-900); background: var(--stone-100); }

.nav-link.current { color: var(--stone-900); }
.nav-link.current::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--forest-500);
  border-radius: 50%;
}

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-trigger svg { width: 10px; height: 10px; transition: transform 180ms var(--ease-standard); }

.nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 380px;
  background: var(--stone-50);
  border: 1px solid var(--stone-200);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(20, 19, 15, 0.08), 0 2px 8px rgba(20, 19, 15, 0.04);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 200ms var(--ease-standard);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background 150ms;
  color: var(--stone-700);
}

.nav-dropdown-item:hover { background: var(--stone-100); color: var(--stone-900); }

.nav-dropdown-item-icon {
  width: 32px; height: 32px;
  background: var(--forest-50);
  color: var(--forest-500);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-dropdown-item-icon svg { width: 16px; height: 16px; }

.nav-dropdown-item-title { font-size: 13px; font-weight: 500; color: var(--stone-900); margin-bottom: 2px; }
.nav-dropdown-item-desc { font-size: 12px; color: var(--stone-500); line-height: 1.4; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  padding: 2px;
  background: var(--stone-100);
  border: 1px solid var(--stone-200);
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.lang-toggle a {
  padding: 5px 9px;
  border-radius: 2px;
  color: var(--stone-500);
  transition: all 150ms;
}

.lang-toggle a:hover { color: var(--stone-900); }
.lang-toggle a.active { background: var(--stone-900); color: var(--stone-50); }

/* Mobile nav */
.nav-mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--stone-900);
}

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

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .lang-toggle { order: 2; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all 180ms var(--ease-standard);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary { background: var(--stone-900); color: var(--stone-50); }
.btn-primary:hover { background: var(--forest-700); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(47, 95, 77, 0.25); }

.btn-forest { background: var(--forest-500); color: var(--stone-50); }
.btn-forest:hover { background: var(--forest-700); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(47, 95, 77, 0.25); }

.btn-secondary { background: transparent; color: var(--stone-900); border-color: var(--stone-300); }
.btn-secondary:hover { border-color: var(--stone-900); background: var(--stone-100); }

.btn-ghost { background: transparent; color: var(--stone-700); }
.btn-ghost:hover { color: var(--stone-900); background: var(--stone-100); }

.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-xl { padding: 16px 28px; font-size: 16px; }

/* ============ Section primitives ============ */
.sec { padding: 120px 0; position: relative; }
.sec-sm { padding: 80px 0; }
.sec-lg { padding: 160px 0; }

@media (max-width: 768px) {
  .sec { padding: 72px 0; }
  .sec-sm { padding: 48px 0; }
  .sec-lg { padding: 96px 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin-bottom: 24px;
}

.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--forest-500);
}

.eyebrow.light { color: var(--stone-400); }
.eyebrow.light::before { background: var(--forest-accent); }

/* Headings */
.h-display {
  font-family: var(--f-display);
  font-variation-settings: 'opsz' 144, 'SOFT' 40;
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 300;
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: var(--stone-900);
}

.h-display em {
  font-style: italic;
  color: var(--forest-500);
  font-variation-settings: 'opsz' 144, 'SOFT' 90;
}

.h1 {
  font-family: var(--f-display);
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--stone-900);
}

.h1 em { font-style: italic; color: var(--forest-500); font-variation-settings: 'opsz' 96, 'SOFT' 90; }

.h2 {
  font-family: var(--f-display);
  font-variation-settings: 'opsz' 72, 'SOFT' 50;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--stone-900);
}

.h2 em { font-style: italic; color: var(--forest-500); font-variation-settings: 'opsz' 72, 'SOFT' 90; }

.h3 {
  font-family: var(--f-display);
  font-variation-settings: 'opsz' 48;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--stone-900);
}

.h4 {
  font-family: var(--f-display);
  font-variation-settings: 'opsz' 36;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--stone-900);
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--stone-500);
  line-height: 1.6;
  max-width: 58ch;
}

/* AI glyph utility */
.ai-glyph {
  font-family: var(--f-display);
  color: var(--forest-500);
  font-weight: 400;
}

.ai-glyph::before { content: '⌬'; }

/* ============ Hero common ============ */
.hero {
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) { .hero { padding: 48px 0 64px; } }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 80px;
  align-items: center;
}

@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }

.hero-content { max-width: 640px; }

.hero-title { margin-bottom: 28px; }

.hero-lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--stone-500);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 52ch;
}

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

.hero-signals {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--stone-200);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--stone-500);
  letter-spacing: 0.03em;
}

.hero-signal {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-signal svg { width: 14px; height: 14px; color: var(--forest-500); }

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 8px;
  overflow: hidden;
  background: var(--stone-100);
  border: 1px solid var(--stone-200);
}

/* ============ Cards ============ */
.card {
  background: var(--stone-50);
  border: 1px solid var(--stone-200);
  border-radius: 10px;
  padding: 36px;
  transition: all 250ms var(--ease-standard);
}

.card:hover { border-color: var(--stone-300); box-shadow: 0 8px 24px rgba(20, 19, 15, 0.04); }

.card-dark {
  background: var(--stone-900);
  color: var(--stone-100);
  border-color: var(--stone-900);
}

.card-dark .h3, .card-dark .h4, .card-dark .h2 { color: var(--stone-50); }
.card-dark .lead { color: var(--stone-300); }

.card-forest {
  background: var(--forest-700);
  color: var(--stone-50);
  border-color: var(--forest-700);
}

.card-forest .h3, .card-forest .h4 { color: var(--stone-50); }

/* ============ AI blocks ============ */
.ai-block {
  background: linear-gradient(135deg, rgba(47, 95, 77, 0.04), rgba(47, 95, 77, 0.01));
  border-left: 2px solid var(--forest-500);
  padding: 24px 28px;
  border-radius: 0 8px 8px 0;
}

.ai-block-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest-700);
  margin-bottom: 14px;
}

.ai-block-label::before { content: '⌬'; font-size: 13px; }

.ai-block-body {
  font-family: var(--f-display);
  font-variation-settings: 'opsz' 18, 'SOFT' 40;
  font-size: 17px;
  color: var(--stone-900);
  line-height: 1.6;
  letter-spacing: -0.005em;
}

.ai-block-body em {
  font-style: italic;
  color: var(--forest-700);
  font-weight: 500;
  font-variation-settings: 'opsz' 18, 'SOFT' 80;
}

/* ============ Feature grids ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.feature-card {
  padding: 32px;
  background: var(--stone-100);
  border: 1px solid var(--stone-200);
  border-radius: 10px;
  transition: all 250ms var(--ease-standard);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}

.feature-card:hover {
  border-color: var(--forest-500);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(20, 19, 15, 0.06);
}

.feature-card-num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--stone-400);
  letter-spacing: 0.1em;
}

.feature-card .h3 { line-height: 1.1; }

.feature-card-body {
  color: var(--stone-500);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.feature-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--forest-500);
  font-size: 13px;
  font-weight: 500;
  transition: gap 180ms var(--ease-standard);
}

.feature-card-link:hover { gap: 10px; }
.feature-card-link svg { width: 12px; height: 12px; }

/* ============ Pill ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--stone-100);
  border: 1px solid var(--stone-200);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--stone-700);
  font-family: var(--f-mono);
  letter-spacing: 0.03em;
}

.pill-forest {
  background: var(--forest-50);
  border-color: var(--forest-100);
  color: var(--forest-700);
}

.pill-amber {
  background: var(--amber-50);
  border-color: var(--amber-100);
  color: var(--amber-700);
}

/* ============ Footer ============ */
.footer {
  background: var(--stone-900);
  color: var(--stone-300);
  padding: 96px 0 48px;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(242, 239, 230, 0.1);
}

@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 40px; }
}

.footer-brand-block { max-width: 320px; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--stone-50);
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 20px;
}

.footer-brand-glyph { width: 24px; height: 24px; color: var(--stone-50); }

.footer-desc {
  font-size: 14px;
  color: var(--stone-400);
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-badge {
  padding: 4px 10px;
  background: rgba(242, 239, 230, 0.06);
  border: 1px solid rgba(242, 239, 230, 0.1);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--stone-400);
}

.footer-col-title {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-50);
  font-weight: 600;
  margin-bottom: 18px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-link {
  color: var(--stone-400);
  font-size: 13px;
  transition: color 150ms;
}

.footer-link:hover { color: var(--forest-accent); }

.footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--stone-500);
  letter-spacing: 0.03em;
}

.footer-bottom-links { display: flex; gap: 24px; }

/* ============ Helpers ============ */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-xs { margin-bottom: 8px; }
.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 24px; }
.mb-lg { margin-bottom: 40px; }
.mb-xl { margin-bottom: 64px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 12px; }
.gap-md { gap: 24px; }
.gap-lg { gap: 40px; }

.max-w-2xl { max-width: 720px; }
.max-w-3xl { max-width: 900px; }
.max-w-4xl { max-width: 1100px; }

/* Visibility */
@media (max-width: 768px) {
  .hide-sm { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
