/* ═══════════════════════════════════════════════════
   KTA SHARED STYLES  ·  Light / Dark theme system
═══════════════════════════════════════════════════ */

/* ── Dark theme (default) ── */
:root,
[data-theme="dark"] {
  --bg:         #1A1714;
  --bg2:        #2C2926;
  --bg3:        #F2EEE8;   /* section alternating (kept for contrast) */
  --fg:         #E8E3DA;
  --fg-mid:     #A09890;
  --fg-sub:     rgba(232,227,218,0.55);
  --accent:     #B8956A;
  --accent-lt:  #D4B896;
  --accent-dim: rgba(184,149,106,0.18);
  --border:     rgba(184,149,106,0.18);
  --surface:    rgba(255,255,255,0.03);
  --shadow:     0 24px 60px rgba(0,0,0,0.55);

  /* Logo sources */
  --logo-src:       url('logo-white.png');
  --logo-filter:    none;

  /* Nav */
  --nav-bg:         rgba(26,23,20,0.92);
  --nav-border:     rgba(184,149,106,0.18);

  /* Section backgrounds */
  --sec-dark:   #1A1714;
  --sec-mid:    #2C2926;
  --sec-light:  #F2EEE8;
  --sec-light2: #EDE8E1;
  --sec-ink:    #1A1714;

  /* Text on light sections */
  --on-light:   #1A1714;
  --on-light2:  #4A4540;

  /* Grid line color */
  --grid-line:  rgba(184,149,106,0.18);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg:         #F5F0EA;
  --bg2:        #EDE8E0;
  --bg3:        #1A1714;
  --fg:         #1A1714;
  --fg-mid:     #4A4540;
  --fg-sub:     rgba(26,23,20,0.55);
  --accent:     #96703E;
  --accent-lt:  #B8956A;
  --accent-dim: rgba(150,112,62,0.14);
  --border:     rgba(150,112,62,0.2);
  --surface:    rgba(0,0,0,0.03);
  --shadow:     0 24px 60px rgba(0,0,0,0.12);

  --logo-src:   url('logo-dark.png');
  --logo-filter: none;

  --nav-bg:     rgba(245,240,234,0.94);
  --nav-border: rgba(150,112,62,0.2);

  --sec-dark:   #F5F0EA;
  --sec-mid:    #EDE8E0;
  --sec-light:  #1A1714;
  --sec-light2: #252018;
  --sec-ink:    #F5F0EA;

  --on-light:   #E8E3DA;
  --on-light2:  #A09880;

  --grid-line:  rgba(150,112,62,0.15);
}

/* ── Reset + smooth theme colour transitions ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  /* Single declaration — colour-only so layout/transform stay snappy */
  transition-property: background-color, border-color, color;
  transition-duration: 0.35s;
  transition-timing-function: var(--ease-out);
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* ── Custom Cursor ── */
.cursor-dot {
  position: fixed; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 10000;
  transform: translate(-50%,-50%);
  top: 0; left: 0;
  /* No color transition on cursor — keep it snappy */
  transition: width 0.25s, height 0.25s;
}
.cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1px solid var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width 0.35s, height 0.35s, border-color 0.35s;
  top: 0; left: 0;
}
.cursor-ring.hovered { width: 56px; height: 56px; border-color: var(--accent-lt); }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 24px 48px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.45s, padding 0.35s, border-color 0.35s, backdrop-filter 0.45s;
}
nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 14px 48px;
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 4px 32px rgba(0,0,0,0.1);
}

/* ── Logo image ── */
.nav-logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo img.logo-img {
  height: 36px; width: auto; display: block;
  object-fit: contain;
  transition: opacity 0.35s, filter 0.35s;
}
.nav-logo img.logo-img:hover { opacity: 0.8; }

/* ── Nav links ── */
.nav-right {
  display: flex; align-items: center; gap: 36px;
}
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--fg); text-decoration: none; opacity: 0.6;
  transition: opacity 0.25s, color 0.25s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover { opacity: 1; color: var(--accent-lt); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { opacity: 1; color: var(--accent); }

/* ── Theme Toggle Button ── */
.theme-toggle {
  width: 44px; height: 24px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative; cursor: pointer;
  flex-shrink: 0;
  transition: background 0.35s, border-color 0.35s;
  outline: none;
}
.theme-toggle:hover { background: var(--accent-dim); border-color: var(--accent); }
.theme-toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  transition: transform 0.35s var(--ease-out), background 0.35s;
  display: flex; align-items: center; justify-content: center;
}
[data-theme="light"] .theme-toggle-knob { transform: translateX(20px); }
.theme-toggle-icon {
  width: 10px; height: 10px; pointer-events: none;
}
/* Sun icon (shown in dark mode = click to go light) */
.icon-sun, .icon-moon { position: absolute; top: 3px; transition: opacity 0.3s; }
.icon-sun  { left: 4px; }
.icon-moon { right: 4px; }
[data-theme="dark"]  .icon-sun  { opacity: 0.7; }
[data-theme="dark"]  .icon-moon { opacity: 0.3; }
[data-theme="light"] .icon-sun  { opacity: 0.3; }
[data-theme="light"] .icon-moon { opacity: 0.7; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }
.reveal-d4 { transition-delay: 0.48s; }

/* ── Section label ── */
.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem; letter-spacing: 0.45em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
  display: flex; align-items: center; gap: 16px;
}
.section-label::before {
  content: ''; display: block; width: 28px; height: 1px;
  background: var(--accent); flex-shrink: 0;
}

/* ── Footer ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 56px 48px 32px;
}
[data-theme="light"] footer { background: #EDE8E0; }

.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid var(--border); margin-bottom: 28px;
}
.footer-logo-img { height: 32px; width: auto; margin-bottom: 20px; display: block; }
.footer-tagline { font-size: 0.82rem; color: var(--fg-sub); line-height: 1.7; max-width: 260px; }
.footer-col-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.82rem; color: var(--fg-sub); text-decoration: none; transition: color 0.25s; }
.footer-links a:hover { color: var(--accent-lt); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-copy {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.62rem; letter-spacing: 0.15em; color: var(--fg-sub); opacity: 0.5;
}
.footer-social { display: flex; gap: 20px; }
.footer-social a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--fg-sub); text-decoration: none; opacity: 0.5;
  transition: color 0.25s, opacity 0.25s;
}
.footer-social a:hover { color: var(--accent); opacity: 1; }

/* ── Responsive ── */
@media (max-width: 900px) {
  nav { padding: 18px 24px; }
  nav.scrolled { padding: 12px 24px; }
  .nav-links { gap: 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
