/* ──────────────────────────────────────────────
   KULI — Design System  ·  Monochrome + Maroon
   Display: Fraunces (serif)  ·  Body: Inter
   Dhivehi: Noto Sans Thaana
────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,600&family=Inter:wght@400;500;600;700&family=Noto+Sans+Thaana:wght@400;500;600;700&display=swap');

:root {
  /* ── Core palette ── */
  --ink:        #141414;   /* near-black surfaces (hero card, footer) */
  --ink-2:      #1F1F1F;
  --warm-bg:    #FFFFFF;   /* primary background */
  --section-bg: #EFEFEF;   /* alt sections */

  /* Accent — maroon (var name kept for cascade) */
  --gold:        #8C0002;
  --gold-light:  #B23336;
  --gold-deep:   #5C0001;
  --gold-bg:     rgba(140,0,2,0.10);
  --gold-border: rgba(140,0,2,0.26);

  /* Maroon (rare highlight — unified with accent) */
  --coral:       #8C0002;
  --coral-light: #B23336;
  --coral-bg:    rgba(140,0,2,0.10);

  /* Text */
  --text:       #141414;
  --muted:      #6B6B6B;
  --border:     rgba(0,0,0,0.10);
  --card-bg:    #FFFFFF;
  --white:      #FFFFFF;
  --danger:     #C0392B;
  --success:    #4F7A52;

  /* Dark surface tokens (on near-black) */
  --dark-surface:    rgba(255,255,255,0.05);
  --dark-border:     rgba(255,255,255,0.10);
  --dark-text-muted: rgba(255,255,255,0.55);
  --dark-text:       #FFFFFF;

  /* Page background (separate from --warm-bg so it stays usable as text on dark) */
  --page-bg:    var(--warm-bg);

  /* Ambient gradient animation colors (light mode) */
  --ambient-a:  rgba(140,0,2,0.08);
  --ambient-b:  rgba(140,0,2,0.045);

  /* Spacing */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  40px;
  --space-xl:  64px;
  --space-2xl: 104px;

  /* Radius */
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-pill:100px;

  /* Shadows — soft, neutral, subtle */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.05);
  --shadow-md:  0 8px 28px rgba(0,0,0,0.08);
  --shadow-lg:  0 24px 60px rgba(0,0,0,0.12);
  --shadow-gold:0 10px 30px rgba(140,0,2,0.22);

  /* Motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --trans-fast: 0.2s ease;
  --trans-med:  0.35s var(--ease);
  --trans-slow: 0.6s var(--ease);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(140,0,2,0.05) 0%, transparent 60%),
    var(--page-bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: manipulation;
}

[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(140,0,2,0.06) 0%, transparent 60%),
    var(--page-bg);
}

::selection { background: var(--gold-bg); color: var(--text); }

/* ── Dhivehi font override ── */
body.dv,
body.dv p, body.dv h1, body.dv h2, body.dv h3, body.dv h4,
body.dv button, body.dv a, body.dv span, body.dv label,
body.dv input, body.dv textarea, body.dv select {
  font-family: 'Noto Sans Thaana', sans-serif;
}
body.dv .logo-en,
body.dv .stat-num,
body.dv .card-price-num { font-family: 'Fraunces', serif; }

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

/* ── LANGUAGE SYSTEM ── */
[data-lang="dv"]             { display: none; }
body.dv [data-lang="en"]     { display: none; }
body.dv [data-lang="dv"]     { display: block; }
body.dv span[data-lang="dv"] { display: inline; }
body.dv span[data-lang="en"] { display: none; }
body.dv                      { direction: rtl; }

/* ── UTILITY ── */
.container { max-width: 1240px; margin: 0 auto; width: 100%; padding: 0 40px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 16px;
}
.eyebrow::before { content: ''; width: 20px; height: 1px; background: var(--gold); flex-shrink: 0; }
body.dv .eyebrow { flex-direction: row-reverse; }
body.dv .eyebrow::before { display: none; }
body.dv .eyebrow::after { content: ''; width: 20px; height: 1px; background: var(--gold); flex-shrink: 0; }

.big-headline {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: clamp(30px, 4vw, 52px); color: var(--ink);
  line-height: 1.1; letter-spacing: -0.015em;
}
.big-headline em { font-style: italic; color: var(--gold); }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-pill);
  transition: transform var(--trans-med), box-shadow var(--trans-med), background var(--trans-med), color var(--trans-med), border-color var(--trans-med);
  white-space: nowrap; cursor: pointer; font-family: inherit; border: none;
}
.btn-primary { background: var(--ink); color: var(--warm-bg); }
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); transform: translateY(-1px); box-shadow: var(--shadow-gold); }

.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

.btn-ghost-light { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.18); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: #fff; }

.btn-light { background: var(--warm-bg); color: var(--ink); }
.btn-light:hover { background: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 15px; }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--radius-pill);
}
.badge-dark    { background: rgba(0,0,0,0.78); color: var(--warm-bg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.badge-gold    { background: var(--gold); color: #fff; }
.badge-light   { background: rgba(255,255,255,0.92); color: var(--ink); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--muted); }

/* ── FORM ELEMENTS ── */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 14px 18px; font-size: 15px; font-family: inherit;
  color: var(--text); background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
  outline: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted); opacity: 0.6; }
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.form-error { font-size: 12px; color: var(--danger); font-weight: 500; }

/* ── MOBILE ── */
@media (max-width: 768px) { .container { padding: 0 20px; } }

/* ── ACCESSIBILITY ── */
/* Skip-to-content link */
.skip-link {
  position: fixed; top: -100px; left: 20px; z-index: 9999;
  background: var(--gold); color: var(--ink); font-weight: 700; font-size: 14px;
  padding: 12px 20px; border-radius: var(--radius-pill);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* Keyboard focus ring */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

/* Improve tap targets on mobile */
@media (max-width: 768px) {
  .btn, button, a, input, select, textarea { min-height: 44px; }
  .btn-sm { min-height: 38px; }
}

/* ── DARK MODE TOKENS ─────────────────────────────────────────────────── */
[data-theme="dark"] {
  --page-bg:    #0A0A0A;
  --section-bg: #141414;
  --card-bg:    rgba(255,255,255,0.042);
  --white:      rgba(255,255,255,0.042);
  --border:     rgba(255,255,255,0.07);
  --text:       rgba(255,255,255,0.78);
  --muted:      rgba(255,255,255,0.38);

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.22);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.32);
  --shadow-lg:  0 16px 52px rgba(0,0,0,0.42);

  --ambient-a:  rgba(140,0,2,0.10);
  --ambient-b:  rgba(90,0,1,0.06);
}

[data-theme="dark"] ::selection { background: rgba(140,0,2,0.38); color: rgba(255,255,255,0.92); }

/* ── AMBIENT ANIMATION KEYFRAMES ──────────────────────────────────────── */
@keyframes ambientDrift {
  from { transform: translate(0, 0);    opacity: 0.75; }
  to   { transform: translate(1.8%, 1.2%); opacity: 1; }
}
@keyframes ambientDrift2 {
  from { transform: translate(0, 0);      opacity: 0.80; }
  to   { transform: translate(-1.5%, -1%); opacity: 0.62; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-layer { animation: none !important; }
}
