:root {
  /* Brand Color Tokens */
  --color-primary: #5e6e57;
  --color-primary-dark: #5e6e57;
  --color-secondary: #c8a96e;
  --color-bg: #faf7f0;
  --color-surface: #f4f2e8;
  --color-accent-yellow: #f5d87a;
  --color-accent-brown: #7b4f2e;
  --color-text: #1c1c1c;
  --color-text-muted: #5c5c3a;
  --color-white: #ffffff;

  /* Fonts */
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-body: "Jost", "DM Sans", sans-serif;
  --font-label: "Cinzel", serif;

  /* Animation Durations */
  --anim-fast: 0.2s;
  --anim-base: 0.45s;
  --anim-slow: 0.8s;
  --anim-xslow: 1.4s;

  /* Animation Easings */
  --ease-luxury: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --scroll-threshold: 0.15;
  --nav-offset-mobile: 56px;
  --nav-offset-desktop: 56px;
}

/* Section layout utilities (opt-in per section/page to avoid cross-page side effects) */
.section-frame {
  scroll-margin-top: var(--nav-offset-mobile);
}

@media (min-width: 768px) {
  .section-frame {
    scroll-margin-top: var(--nav-offset-desktop);
  }
}

/* Use when a section should fill the visible viewport on desktop */
@media (min-width: 1024px) {
  .section-fit-desktop {
    min-height: calc(100svh - var(--nav-offset-desktop));
  }
}

html {
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  animation: pageFadeIn 0.6s ease forwards;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-headline {
  font-family: var(--font-display);
}

/* Page load */
@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Entrance: fade up */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Entrance: fade in only */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Entrance: scale up from slightly smaller */
@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Entrance: fade + slide from left */
@keyframes fadeLeft {
  from {
    opacity: 0;
    transform: translateX(-38px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Entrance: fade + slide from right */
@keyframes fadeRight {
  from {
    opacity: 0;
    transform: translateX(38px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Entrance: softer long fade */
@keyframes fadeSoft {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Entrance: fade from blur to crisp */
@keyframes fadeBlur {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Hero scroll indicator bounce */
@keyframes scrollBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(9px);
    opacity: 0.7;
  }
}

/* Feature strip marquee */
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Shimmer on stat numbers */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Underline expand */
@keyframes underlineExpand {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* 3D card tilt reset */
@keyframes tiltReset {
  to {
    transform: rotateX(0deg) rotateY(0deg);
  }
}

/* Floating / levitation (3D diamond) */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotateY(0deg);
  }
  33% {
    transform: translateY(-10px) rotateY(60deg);
  }
  66% {
    transform: translateY(-5px) rotateY(120deg);
  }
}

/* Soft pulse glow (diamond facets) */
@keyframes diamondGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(200, 169, 110, 0.7));
  }
  50% {
    filter: drop-shadow(0 0 32px rgba(200, 169, 110, 1));
  }
}

/* Float drift object */
@keyframes orbDrift {
  from {
    transform: translate(-5%, -5%) scale(1);
  }
  to {
    transform: translate(5%, 8%) scale(1.06);
  }
}

/* --- Utility Classes --- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity var(--anim-slow) var(--ease-luxury),
    transform var(--anim-slow) var(--ease-luxury);
}
.anim-fade-in {
  opacity: 0;
  transition: opacity var(--anim-slow) var(--ease-luxury);
}
.anim-scale-up {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity var(--anim-slow) var(--ease-luxury),
    transform var(--anim-slow) var(--ease-luxury);
}
.anim-fade-left {
  opacity: 0;
  transform: translateX(-38px);
  transition:
    opacity 1.05s var(--ease-luxury),
    transform 1.05s var(--ease-luxury);
}
.anim-fade-right {
  opacity: 0;
  transform: translateX(38px);
  transition:
    opacity 1.05s var(--ease-luxury),
    transform 1.05s var(--ease-luxury);
}
.anim-fade-soft {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 1.25s var(--ease-luxury),
    transform 1.25s var(--ease-luxury);
}
.anim-fade-blur {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  transition:
    opacity 1.1s var(--ease-luxury),
    transform 1.1s var(--ease-luxury),
    filter 1.1s var(--ease-luxury);
}

.anim-fade-up.is-visible,
.anim-fade-in.is-visible,
.anim-scale-up.is-visible,
.anim-fade-left.is-visible,
.anim-fade-right.is-visible,
.anim-fade-soft.is-visible,
.anim-fade-blur.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.stagger-children > *:nth-child(1) {
  transition-delay: 0s;
}
.stagger-children > *:nth-child(2) {
  transition-delay: 0.12s;
}
.stagger-children > *:nth-child(3) {
  transition-delay: 0.24s;
}
.stagger-children > *:nth-child(4) {
  transition-delay: 0.36s;
}
.stagger-children > *:nth-child(5) {
  transition-delay: 0.48s;
}
.stagger-children > *:nth-child(6) {
  transition-delay: 0.6s;
}

/* Cancel stagger delay on hover so ALL cards respond instantly */
.stagger-children > *:hover,
.stagger-children > *:hover * {
  transition-delay: 0s !important;
}

/* 3D Elements Support */
.scene-3d {
  perspective: 1000px;
  perspective-origin: 50% 40%;
}

.scene-3d__object {
  transform-style: preserve-3d;
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
  .scene-3d__object--float {
    animation: float 8s ease-in-out infinite;
  }
}

.hero-diamond-scene {
  position: absolute;
  right: 12%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(180px, 22vw, 360px);
  height: auto;
  pointer-events: none;
  z-index: 2;
  opacity: 0.75;
}

.hero-diamond {
  transform-style: preserve-3d;
}

.diamond-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(200, 169, 110, 0.5));
}

@media (prefers-reduced-motion: no-preference) {
  .hero-diamond {
    animation:
      float 9s ease-in-out infinite,
      diamondGlow 5s ease-in-out infinite;
  }
}

@media (max-width: 768px) {
  .hero-diamond-scene {
    right: 5%;
    bottom: 12%;
    top: auto;
    transform: none;
    width: 120px;
    opacity: 0.5;
  }
}

.card-3d {
  transform-style: preserve-3d;
  transition:
    transform 0.6s var(--ease-luxury),
    box-shadow 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card-3d__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.22) 0%,
    transparent 65%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.section-divider {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease-luxury);
}

.section-divider.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .section-divider polygon:nth-child(2) {
    animation: diamondGlow 4s ease-in-out infinite;
  }
}

.stat-tile {
  transform-style: preserve-3d;
  opacity: 0;
  transform: perspective(600px) rotateX(40deg) translateY(20px);
  transition:
    opacity 0.7s var(--ease-luxury),
    transform 0.7s var(--ease-luxury);
}

.stat-tile.is-visible {
  opacity: 1;
  transform: perspective(600px) rotateX(0deg) translateY(0);
}

.stat-tile:nth-child(1) {
  transition-delay: 0s;
}
.stat-tile:nth-child(2) {
  transition-delay: 0.15s;
}
.stat-tile:nth-child(3) {
  transition-delay: 0.3s;
}
.stat-tile:nth-child(4) {
  transition-delay: 0.45s;
}

@media (prefers-reduced-motion: no-preference) {
  .stat-tile:hover {
    transform: perspective(600px) rotateX(-4deg) translateY(-4px);
    box-shadow: 0 20px 48px rgba(94, 110, 87, 0.2);
    transition:
      transform 0.4s var(--ease-luxury),
      box-shadow 0.4s ease;
  }
}

.orb-3d {
  position: absolute;
  width: clamp(300px, 40vw, 600px);
  height: clamp(300px, 40vw, 600px);
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(245, 216, 122, 0.18) 0%,
    rgba(200, 169, 110, 0.12) 40%,
    rgba(94, 110, 87, 0.06) 70%,
    transparent 100%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

@keyframes subtleZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

@keyframes revealFromRight {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes subtleKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* ============================================================
   NAVBAR — shared across all pages
   Edit here to change blur, background, border, z-index
   ============================================================ */
.kc-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
  background: #f4f2e8;
  border-bottom: 1px solid rgba(200, 169, 110, 0.2);
  box-shadow: 0 1px 12px rgba(28, 28, 20, 0.06);
}

/* Offset main content so it starts below the fixed navbar */
body > main {
  padding-top: var(--nav-offset-mobile);
}

@media (min-width: 768px) {
  body > main {
    padding-top: var(--nav-offset-desktop);
  }
}

/* Desktop-only section spotlight interaction */
.interactive-section {
  position: relative;
  isolation: isolate;
}

.interactive-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: radial-gradient(
    320px circle at var(--ix, 50%) var(--iy, 50%),
    rgba(200, 169, 110, 0.14),
    transparent 68%
  );
  transition: opacity 0.35s ease;
}

.interactive-section:hover::before {
  opacity: 1;
}

.interactive-section > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .orb-3d {
    animation: orbDrift 20s ease-in-out infinite alternate;
  }
}

/* Touch devices: disable hover/mouse-driven interactivity while preserving layout */
@media (hover: none), (pointer: coarse) {
  .card-3d {
    cursor: default;
  }

  .group:hover img,
  .group:active img,
  .card-3d:hover,
  .card-3d:active {
    transform: none !important;
  }

  .card-3d__shine {
    opacity: 0 !important;
  }

  .interactive-section::before {
    display: none;
  }
}

/* ============================================================
   i18n — Language-specific font overrides + RTL layout fixes
   ============================================================ */

/* Arabic: Noto Naskh Arabic for all text */
html[lang="ar"] body,
html[lang="ar"] .font-sans,
html[lang="ar"] .font-body,
html[lang="ar"] .font-label {
  font-family: "Noto Naskh Arabic", sans-serif;
}
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] .font-headline,
html[lang="ar"] .font-serif {
  font-family: "Noto Naskh Arabic", serif;
  font-style: normal;
}

/* Hebrew: Noto Naskh Arabic covers Hebrew glyphs well; use it as fallback */
html[lang="he"] body,
html[lang="he"] .font-sans,
html[lang="he"] .font-body,
html[lang="he"] .font-label {
  font-family: "Noto Naskh Arabic", sans-serif;
}
html[lang="he"] h1,
html[lang="he"] h2,
html[lang="he"] h3,
html[lang="he"] h4,
html[lang="he"] h5,
html[lang="he"] h6,
html[lang="he"] .font-headline,
html[lang="he"] .font-serif {
  font-family: "Noto Naskh Arabic", serif;
  font-style: normal;
}

/* Gujarati: Noto Sans Gujarati */
html[lang="gu"] body,
html[lang="gu"] .font-sans,
html[lang="gu"] .font-body,
html[lang="gu"] .font-label {
  font-family: "Noto Sans Gujarati", sans-serif;
}
html[lang="gu"] h1,
html[lang="gu"] h2,
html[lang="gu"] h3,
html[lang="gu"] h4,
html[lang="gu"] h5,
html[lang="gu"] h6,
html[lang="gu"] .font-headline,
html[lang="gu"] .font-serif {
  font-family: "Noto Sans Gujarati", serif;
  font-style: normal;
}
/* Gujarati does not use italic — disable decorative italics */
html[lang="gu"] .italic,
html[lang="gu"] em {
  font-style: normal;
}

/* Hindi: Noto Sans Devanagari */
html[lang="hi"] body,
html[lang="hi"] .font-sans,
html[lang="hi"] .font-body,
html[lang="hi"] .font-label {
  font-family: "Noto Sans Devanagari", sans-serif;
}
html[lang="hi"] h1,
html[lang="hi"] h2,
html[lang="hi"] h3,
html[lang="hi"] h4,
html[lang="hi"] h5,
html[lang="hi"] h6,
html[lang="hi"] .font-headline,
html[lang="hi"] .font-serif {
  font-family: "Noto Sans Devanagari", serif;
  font-style: normal;
}
/* Hindi does not use italic — disable decorative italics */
html[lang="hi"] .italic,
html[lang="hi"] em {
  font-style: normal;
}

/* Traditional Chinese: Noto CJK fonts */
html[lang="zh-TW"] h1,
html[lang="zh-TW"] h2,
html[lang="zh-TW"] h3,
html[lang="zh-TW"] h4,
html[lang="zh-TW"] h5,
html[lang="zh-TW"] h6,
html[lang="zh-TW"] .font-headline,
html[lang="zh-TW"] .font-serif {
  font-family: "Noto Serif TC", "Cormorant Garamond", serif;
}
html[lang="zh-TW"] body,
html[lang="zh-TW"] .font-sans,
html[lang="zh-TW"] .font-body,
html[lang="zh-TW"] .font-label {
  font-family: "Noto Sans TC", "Jost", sans-serif;
}

/* RTL: remove all decorative letter-spacing (looks broken with Arabic cursive script) */
[dir="rtl"] [class*="tracking-"] {
  letter-spacing: 0 !important;
}

/* RTL: italic → normal (Arabic has no typographic italic) */
[dir="rtl"] .italic,
[dir="rtl"] em {
  font-style: normal;
}

/* RTL: mobile close button moves to the left */
[dir="rtl"] #close-menu {
  right: auto;
  left: 1.5rem;
}

/* RTL: language dropdown opens to the left instead of right */
[dir="rtl"] #kc-lang-menu {
  right: auto !important;
  left: 0;
}

/* RTL: mirror the hero diamond scene */
[dir="rtl"] .hero-diamond-scene {
  right: auto;
  left: 12%;
}
@media (max-width: 768px) {
  [dir="rtl"] .hero-diamond-scene {
    left: 5%;
    right: auto;
  }
}

/* RTL: right-align the translated hero headline */
[dir="rtl"] .hero-headline-translated {
  text-align: right;
}

/* RTL: reverse the marquee scroll direction */
[dir="rtl"] .marquee-track {
  animation-direction: reverse !important;
}

/* RTL: flip fade-in slide directions so elements enter from the correct side */
[dir="rtl"] .anim-fade-left  { transform: translateX(38px); }
[dir="rtl"] .anim-fade-right { transform: translateX(-38px); }

/*
 * NOTE: contact.html, privacy.html, and terms.html do NOT include the
 * RTL/CJK/Gujarati <link> tags that index/about/work/diamonds carry.
 * As a result, RTL and non-Latin scripts fall back to system fonts on
 * those pages. Add the font links to those pages if full glyph support
 * is ever needed there.
 */

/* Hero headline translated — allow text to wrap instead of overflow */
.hero-headline-translated {
  line-height: 1.25 !important;
  font-size: clamp(16px, 2.2vw, 38px) !important;
  animation: fadeUp 0.6s var(--ease-luxury) 1.4s both;
}

/* Mobile language switcher — active state */
.kc-lang-mobile-opt.is-active {
  background-color: var(--color-primary, #5e6e57);
  color: #ffffff;
  border-color: var(--color-primary, #5e6e57);
}

#passion-quote {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 2rem;
  font-style: italic;
}
