/* Koala Dijital — theme tokens */
:root {
  --kd-bg: #F6EFE4;
  --kd-bg-alt: #EDE3D0;
  --kd-surface: #FFFFFF;
  --kd-text: #241F1B;
  --kd-text-body: #4A433C;
  --kd-text-muted: #6b6259;
  --kd-text-faint: #8a8177;
  --kd-on-dark: #F6EFE4;
  --kd-accent: #C1602D;
  --kd-accent-hover: #A34B1F;
  --kd-teal: #1F4E4A;
  --kd-teal-deep: #123331;
  --kd-border: rgba(36, 31, 27, 0.08);
  --kd-border-strong: rgba(36, 31, 27, 0.15);
  --kd-input-bg: #F6EFE4;
  --kd-nav-bg: rgba(246, 239, 228, 0.55);
  --kd-nav-bg-scroll: rgba(246, 239, 228, 0.92);
  --kd-footer-bg: #1B2420;
  --kd-btn-primary-bg: #241F1B;
  --kd-btn-primary-text: #F6EFE4;
}

[data-theme="dark"] {
  --kd-bg: #141210;
  --kd-bg-alt: #1c1916;
  --kd-surface: #242019;
  --kd-text: #F6EFE4;
  --kd-text-body: #d4cbc0;
  --kd-text-muted: #a89e90;
  --kd-text-faint: #8a8177;
  --kd-on-dark: #F6EFE4;
  --kd-accent: #D4733A;
  --kd-accent-hover: #C1602D;
  --kd-teal: #163532;
  --kd-teal-deep: #0f2422;
  --kd-border: rgba(246, 239, 228, 0.08);
  --kd-border-strong: rgba(246, 239, 228, 0.14);
  --kd-input-bg: #1c1916;
  --kd-nav-bg: rgba(20, 18, 16, 0.72);
  --kd-nav-bg-scroll: rgba(20, 18, 16, 0.94);
  --kd-footer-bg: #0d100e;
  --kd-btn-primary-bg: #F6EFE4;
  --kd-btn-primary-text: #141210;
}

html { background: var(--kd-bg); color-scheme: light dark; }
body {
  margin: 0;
  background: var(--kd-bg) !important;
  color: var(--kd-text-body);
  transition: background 0.35s ease, color 0.35s ease;
}

.kd-page {
  background: var(--kd-bg);
  color: var(--kd-text-body);
}

[data-theme="dark"] ::placeholder { color: #6b6259; }

/* Theme toggle */
.kd-theme-btn {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  background: none;
  border: 1px solid var(--kd-border-strong);
  border-radius: 100px;
  padding: 8px 12px;
  color: var(--kd-text);
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1;
  min-width: 40px;
}
.kd-theme-btn:hover {
  background: var(--kd-text);
  color: var(--kd-bg);
  border-color: var(--kd-text);
}

/* ── Dark: cream backgrounds (hex + React rgb) ── */
[data-theme="dark"] [style*="background:#F6EFE4"],
[data-theme="dark"] [style*="background: #F6EFE4"],
[data-theme="dark"] [style*="background:rgb(246, 239, 228)"],
[data-theme="dark"] [style*="background: rgb(246, 239, 228)"],
[data-theme="dark"] [style*="background:rgb(246,239,228)"],
[data-theme="dark"] [style*="background: rgb(246,239,228)"] {
  background: var(--kd-bg) !important;
}

[data-theme="dark"] [style*="background:#EDE3D0"],
[data-theme="dark"] [style*="background: #EDE3D0"],
[data-theme="dark"] [style*="background:rgb(237, 227, 208)"],
[data-theme="dark"] [style*="background: rgb(237, 227, 208)"],
[data-theme="dark"] [style*="background:rgb(237,227,208)"],
[data-theme="dark"] [style*="background: rgb(237,227,208)"] {
  background: var(--kd-bg-alt) !important;
}

[data-theme="dark"] [style*="background:#FFFFFF"],
[data-theme="dark"] [style*="background: #FFFFFF"],
[data-theme="dark"] [style*="background:#FFF"],
[data-theme="dark"] [style*="background: #FFF"],
[data-theme="dark"] [style*="background:rgb(255, 255, 255)"],
[data-theme="dark"] [style*="background: rgb(255, 255, 255)"],
[data-theme="dark"] [style*="background:rgb(255,255,255)"],
[data-theme="dark"] [style*="background: rgb(255,255,255)"] {
  background: var(--kd-surface) !important;
}

[data-theme="dark"] [style*="background:#1F4E4A"],
[data-theme="dark"] [style*="background: #1F4E4A"],
[data-theme="dark"] [style*="background:rgb(31, 78, 74)"],
[data-theme="dark"] [style*="background: rgb(31, 78, 74)"] {
  background: var(--kd-teal) !important;
}

/* Inputs — override cream bg with input token */
[data-theme="dark"] input[style*="246, 239, 228"],
[data-theme="dark"] input[style*="246,239,228"],
[data-theme="dark"] input[style*="#F6EFE4"],
[data-theme="dark"] textarea[style*="246, 239, 228"],
[data-theme="dark"] textarea[style*="246,239,228"],
[data-theme="dark"] textarea[style*="#F6EFE4"],
[data-theme="dark"] select[style*="246, 239, 228"],
[data-theme="dark"] select[style*="#F6EFE4"] {
  background: var(--kd-input-bg) !important;
  color: var(--kd-text) !important;
}

/* ── Dark: text colors ── */
[data-theme="dark"] [style*="color:#241F1B"],
[data-theme="dark"] [style*="color: #241F1B"],
[data-theme="dark"] [style*="color:rgb(36, 31, 27)"],
[data-theme="dark"] [style*="color: rgb(36, 31, 27)"] {
  color: var(--kd-text) !important;
}

[data-theme="dark"] [style*="color:#4A433C"],
[data-theme="dark"] [style*="color: #4A433C"],
[data-theme="dark"] [style*="color:rgb(74, 67, 60)"],
[data-theme="dark"] [style*="color: rgb(74, 67, 60)"] {
  color: var(--kd-text-body) !important;
}

[data-theme="dark"] [style*="color:#6b6259"],
[data-theme="dark"] [style*="color: #6b6259"],
[data-theme="dark"] [style*="color:#6B6259"],
[data-theme="dark"] [style*="color:rgb(107, 98, 89)"],
[data-theme="dark"] [style*="color: rgb(107, 98, 89)"] {
  color: var(--kd-text-muted) !important;
}

[data-theme="dark"] [style*="color:#8a8177"],
[data-theme="dark"] [style*="color: #8a8177"] {
  color: var(--kd-text-faint) !important;
}

/* Keep light text on accent/teal/dark blocks */
[data-theme="dark"] [style*="background:#C1602D"] [style*="color"],
[data-theme="dark"] [style*="background: #C1602D"] [style*="color"],
[data-theme="dark"] [style*="background:#1F4E4A"] [style*="color:#F6EFE4"],
[data-theme="dark"] [style*="background: rgb(31, 78, 74)"] [style*="color: rgb(246, 239, 228)"] {
  color: var(--kd-on-dark) !important;
}

/* ── Dark: borders ── */
[data-theme="dark"] [style*="rgba(36, 31, 27, 0.08)"],
[data-theme="dark"] [style*="rgba(36,31,27,0.08)"],
[data-theme="dark"] [style*="rgba(36, 31, 27, 0.15)"],
[data-theme="dark"] [style*="rgba(36,31,27,0.15)"],
[data-theme="dark"] [style*="rgba(36, 31, 27, 0.1)"],
[data-theme="dark"] [style*="rgba(36,31,27,0.1)"],
[data-theme="dark"] [style*="rgba(36, 31, 27, 0.2)"],
[data-theme="dark"] [style*="rgba(36,31,27,0.2)"],
[data-theme="dark"] [style*="rgba(36, 31, 27, 0.25)"],
[data-theme="dark"] [style*="rgba(36,31,27,0.25)"] {
  border-color: var(--kd-border-strong) !important;
}

/* Primary dark buttons → invert in dark mode */
[data-theme="dark"] a[style*="background:#241F1B"],
[data-theme="dark"] a[style*="background: #241F1B"],
[data-theme="dark"] a[style*="background:rgb(36, 31, 27)"],
[data-theme="dark"] button[style*="background:#241F1B"],
[data-theme="dark"] button[style*="background: #241F1B"],
[data-theme="dark"] button[style*="background:rgb(36, 31, 27)"] {
  background: var(--kd-btn-primary-bg) !important;
  color: var(--kd-btn-primary-text) !important;
}

[data-theme="dark"] footer[style*="background:#1B2420"],
[data-theme="dark"] footer[style*="background: #1B2420"] {
  background: var(--kd-footer-bg) !important;
}

/* ── Hero parallax scene ── */
.hero-scroll-section {
  position: relative;
  width: 100%;
  min-height: 220vh;
  background: #2a5578;
  z-index: 2;
}

.hero-scroll-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: min(18vh, 140px);
  background: linear-gradient(to bottom, transparent, var(--kd-bg));
  pointer-events: none;
  z-index: 90;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #2a5578;
  will-change: transform;
}

.hero-scene-pan {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.hero-layer {
  position: absolute;
  transform-origin: top left;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.hero-layer img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-layer--cover img {
  object-fit: cover;
  min-height: 100%;
}

.hero-layer--bg {
  overflow: hidden;
}

.hero-layer--bg img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-position: 50% 45%;
}

.hero-layer--bg-fit-height img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-position: left center;
}

.hero-layer--contain img {
  object-fit: contain;
}

.hero-layer--cutout img {
  mix-blend-mode: screen;
}

.hero-content-slot {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: clamp(96px, 14vh, 140px) clamp(16px, 4vw, 48px) clamp(72px, 10vh, 96px);
  text-align: center;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  opacity: 0;
}

.hero-content-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 24, 40, 0.08) 0%,
    rgba(10, 24, 40, 0.35) 42%,
    rgba(10, 24, 40, 0.78) 78%,
    rgba(10, 24, 40, 0.92) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-content-slot > * {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.hero-content-inner {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 44px);
  border-radius: 28px;
  background: rgba(12, 20, 32, 0.62);
  border: 1px solid rgba(246, 239, 228, 0.16);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.18),
    0 24px 64px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.hero-content-slot .hero-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #FFF9F2;
  margin: 0 auto 20px;
  max-width: 16ch;
  text-wrap: balance;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 4px 28px rgba(0, 0, 0, 0.55);
  animation: heroFadeUp .8s cubic-bezier(.16,1,.3,1) .2s both;
}

.hero-content-slot .hero-title em {
  font-style: italic;
  color: #FFD4A8;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 4px 24px rgba(0, 0, 0, 0.5);
}

.hero-content-slot .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: 1px solid rgba(246, 239, 228, 0.28);
  border-radius: 100px;
  margin: 0 auto 22px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  animation: heroFadeUp .8s cubic-bezier(.16,1,.3,1) .1s both;
}

.hero-eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C1602D;
  box-shadow: 0 0 0 3px rgba(193, 96, 45, 0.35);
  flex-shrink: 0;
}

.hero-content-slot .hero-eyebrow span:last-child {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 249, 242, 0.92);
}

.hero-content-slot .hero-sub {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.75;
  font-weight: 500;
  color: rgba(255, 249, 242, 0.94);
  max-width: 52ch;
  margin: 0 auto 32px;
  text-wrap: pretty;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  animation: heroFadeUp .8s cubic-bezier(.16,1,.3,1) .32s both;
}

.hero-content-slot .hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: heroFadeUp .8s cubic-bezier(.16,1,.3,1) .42s both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.hero-btn--primary {
  background: #F6EFE4;
  color: #1A1512;
  border: 2px solid #F6EFE4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

.hero-btn--primary:hover {
  background: #C1602D;
  border-color: #C1602D;
  color: #FFF9F2;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(193, 96, 45, 0.4);
}

.hero-btn--secondary {
  background: rgba(0, 0, 0, 0.22);
  color: #FFF9F2;
  border: 2px solid rgba(246, 239, 228, 0.55);
  backdrop-filter: blur(6px);
}

.hero-btn--secondary:hover {
  background: rgba(246, 239, 228, 0.14);
  border-color: #F6EFE4;
  transform: translateY(-2px);
}

.hero-btn__arrow {
  font-size: 17px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.hero-btn--primary:hover .hero-btn__arrow {
  transform: translateX(3px);
}

@media (max-width: 640px) {
  .hero-content-inner {
    padding: 24px 20px 28px;
    border-radius: 22px;
  }

  .hero-content-slot .hero-title {
    max-width: none;
    font-size: clamp(34px, 9.5vw, 44px);
    margin-bottom: 16px;
  }

  .hero-content-slot .hero-sub {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 26px;
  }

  .hero-content-slot .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-btn {
    width: 100%;
  }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.75;
  z-index: 110;
  pointer-events: none;
}

.hero-scroll-hint span {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #F6EFE4;
}

.hero-scroll-hint div {
  width: 1px;
  height: 26px;
  background: #F6EFE4;
  animation: scrollHint 1.6s ease-in-out infinite;
}

.hero-scene-caption {
  position: absolute;
  bottom: 20px;
  right: 24px;
  z-index: 110;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 239, 228, 0.72);
  pointer-events: none;
}

.hero-studio-links {
  display: none !important;
}

.hero-studio-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.88);
  border: 1px solid rgba(246, 239, 228, 0.22);
  color: #F6EFE4;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: background 0.2s, transform 0.2s;
}

.hero-studio-link--mobile {
  border-color: rgba(126, 196, 255, 0.35);
}

.hero-studio-link--mobile:hover {
  background: #2d7ec1;
}

.hero-studio-link:hover {
  background: #C1602D;
  transform: translateY(-2px);
}
