/* ──────────────────────────────────────────────────────────────
   Indexworks — Theme-aware styles
   Dark default · Light mode via [data-theme="light"]
────────────────────────────────────────────────────────────── */

/* ── Dark (default) ── */
:root {
  --bg-0: #0a0a0a;
  --bg-1: #111111;
  --bg-2: #181818;
  --bg-3: #1f1f1f;
  --text-0: #f0ede8;
  --text-1: #a8a49e;
  --text-2: #5e5b57;
  --accent: #c4a882;
  --accent-light: #d9c4a5;
  --accent-dim: rgba(196, 168, 130, 0.12);
  --accent-border: rgba(196, 168, 130, 0.22);
  --border: rgba(255, 255, 255, 0.06);
  --border-mid: rgba(255, 255, 255, 0.1);
  --radius: 14px;
  --radius-sm: 8px;
  --max-w: 1100px;
  --t: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Light ── */
[data-theme="light"] {
  --bg-0: #f5f1eb;
  --bg-1: #ebe4dc;
  --bg-2: #ffffff;
  --bg-3: #faf8f5;
  --text-0: #1c1917;
  --text-1: #6b6560;
  --text-2: #aaa59f;
  --accent: #9e6e3c;
  --accent-light: #7a5228;
  --accent-dim: rgba(158, 110, 60, 0.1);
  --accent-border: rgba(158, 110, 60, 0.18);
  --border: rgba(0, 0, 0, 0.07);
  --border-mid: rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-0);
  color: var(--text-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 36px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.22s; }
.d3 { transition-delay: 0.34s; }

/* ── Logo variants ── */
.logo-light { display: none; }
[data-theme="light"] .logo-dark  { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  transition: border-color var(--t);
  border-bottom: 1px solid transparent;
}

.nav-blur {
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background var(--t), backdrop-filter var(--t);
  z-index: 0;
}
.nav.scrolled .nav-blur {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}
[data-theme="light"] .nav.scrolled .nav-blur {
  background: rgba(245, 241, 235, 0.88);
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-logo {
  height: 26px;
  width: auto;
  position: relative;
  z-index: 1;
  opacity: 0.9;
  transition: opacity var(--t);
}
.nav-logo:hover { opacity: 1; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 13.5px;
  font-weight: 450;
  color: var(--text-1);
  letter-spacing: 0.01em;
  transition: color var(--t);
}
.nav-links a:hover { color: var(--text-0); }

.nav-cta {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  padding: 7px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--accent-border);
  color: var(--text-0);
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-mid);
  border-radius: 99px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  position: relative;
  z-index: 1;
  transition: color var(--t), border-color var(--t), background var(--t);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--text-1);
  border-color: rgba(255,255,255,0.18);
}
[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(0,0,0,0.18);
}
.icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: flex; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 1;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-1);
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 100px 36px 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(196, 168, 130, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 50% 95%, rgba(196, 168, 130, 0.03) 0%, transparent 55%);
  pointer-events: none;
  transition: opacity 0.35s ease;
}
[data-theme="light"] .hero-glow {
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(158, 110, 60, 0.07) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 50% 95%, rgba(158, 110, 60, 0.04) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.hero-title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(50px, 7vw, 86px);
  font-weight: 300;
  line-height: 1.07;
  letter-spacing: -0.03em;
  color: var(--text-0);
  margin-bottom: 26px;
}
.hero-title em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-light);
}

.hero-sub {
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 300;
  color: var(--text-1);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto 44px;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #faf8f5;
  font-size: 14px;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: 99px;
  letter-spacing: 0.01em;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  box-shadow: 0 4px 24px rgba(196, 168, 130, 0.15);
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(196, 168, 130, 0.22);
}
[data-theme="light"] .btn-primary {
  color: #fff8f2;
  box-shadow: 0 4px 20px rgba(158, 110, 60, 0.2);
}
[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 28px rgba(158, 110, 60, 0.28);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 450;
  padding: 13px 22px;
  border-radius: 99px;
  border: 1px solid var(--border-mid);
  transition: color var(--t), border-color var(--t), background var(--t);
}
.btn-ghost:hover {
  color: var(--text-0);
  border-color: var(--border-mid);
  background: rgba(255,255,255,0.04);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(0,0,0,0.04);
}

/* ─────────────────────────────────────────
   SERVICES
───────────────────────────────────────── */
.section { padding: 56px 0; border-top: 1px solid var(--border-mid); }
.section-alt { background: var(--bg-1); }

.centered { text-align: center; }
.centered .section-lead { margin-left: auto; margin-right: auto; }

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-0);
  margin-bottom: 14px;
}
.section-title em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-light);
}

.section-lead {
  font-size: 16.5px;
  font-weight: 300;
  color: var(--text-1);
  line-height: 1.75;
  max-width: 520px;
}

.services-header { margin-bottom: 52px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), background var(--t);
}
[data-theme="light"] .service-card {
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(196,168,130,0.07), transparent 60%);
  opacity: 0;
  transition: opacity var(--t);
}
[data-theme="light"] .service-card::before {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(158,110,60,0.06), transparent 60%);
}
.service-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-3);
  transform: translateY(-2px);
}
[data-theme="light"] .service-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.service-card:hover::before { opacity: 1; }
.service-card.featured { border-color: var(--accent-border); }

.service-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 24px;
}

.service-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  opacity: 0.75;
  margin-bottom: 20px;
}

.service-name {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-0);
  margin-bottom: 12px;
  line-height: 1.2;
}

.service-desc {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.7;
  font-weight: 300;
}

/* ─────────────────────────────────────────
   CONTACT
───────────────────────────────────────── */
/* ─────────────────────────────────────────
   WORK
───────────────────────────────────────── */
.work-header { margin-bottom: 40px; }

.work-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
[data-theme="light"] .work-card {
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.08);
}

.work-preview {
  background: var(--bg-0);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
}
[data-theme="light"] .work-preview {
  background: var(--bg-1);
}

.work-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.work-info {
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.work-type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.work-name {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--text-0);
  margin-bottom: 18px;
  line-height: 1.1;
}
.work-desc {
  font-size: 15px;
  color: var(--text-1);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 32px;
}
.work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  border-bottom: 1px solid var(--border-mid);
  padding-bottom: 3px;
  width: fit-content;
  transition: color var(--t), border-color var(--t);
  letter-spacing: 0.01em;
}
.work-link:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}

/* ─────────────────────────────────────────
   CONTACT
───────────────────────────────────────── */
.contact-section {
  padding: 90px 0 110px;
  position: relative;
  overflow: hidden;
}
.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 70% at 50% 100%, rgba(196,168,130,0.04), transparent 65%);
  pointer-events: none;
}
[data-theme="light"] .contact-section::before {
  background: radial-gradient(ellipse 55% 70% at 50% 100%, rgba(158,110,60,0.05), transparent 65%);
}

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

.contact-inner .section-lead {
  max-width: 100%;
  margin: 0 auto 52px;
}

.contact-email-wrap { margin-bottom: 20px; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 400;
  color: var(--accent-light);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--accent-border);
  padding-bottom: 6px;
  transition: color var(--t), border-color var(--t);
  font-style: italic;
}
.contact-email:hover {
  color: var(--text-0);
  border-color: var(--accent);
}
.contact-email svg { opacity: 0.5; flex-shrink: 0; }

.contact-note {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

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

.footer-logo { height: 18px; width: auto; opacity: 0.4; }

.footer-copy { font-size: 12px; color: var(--text-2); font-weight: 300; }

.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 12px; color: var(--text-2); transition: color var(--t); }
.footer-links a:hover { color: var(--text-1); }

/* ─────────────────────────────────────────
   MOBILE NAV
───────────────────────────────────────── */
@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 66px;
    left: 0; right: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 36px 28px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  [data-theme="light"] .nav-links {
    background: rgba(245,241,235,0.98);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; gap: 14px; }
  .work-card { grid-template-columns: 1fr; }
  .work-preview { border-right: none; border-bottom: 1px solid var(--border); }
  .work-info { padding: 36px 32px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { padding: 100px 20px 60px; }
  .section { padding: 44px 0; }
  .nav { padding: 0 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}
