/* ============================================
   SHIMMERY ALCHEMY — Design Tokens
   ============================================ */

:root {
  /* Palette: DUSK (default) */
  --ink: #1a1b4b;
  --ink-deep: #0f1033;
  --plum: #5b2c4f;
  --copper: #c97a3f;
  --amber: #e8c478;
  --gold: #d4a84b;
  --cream: #f5ede0;
  --cream-soft: #faf6ed;
  --bone: #ece3d0;
  --body: #2d2840;
  --body-soft: #5a5470;

  /* Type */
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --script: 'Pinyon Script', 'Tangerine', cursive;
  --sans: 'Inter', 'Helvetica Neue', sans-serif;

  /* Rhythm */
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-breath: cubic-bezier(0.45, 0, 0.55, 1);
}

[data-palette="dawn"] {
  --ink: #3d1f3d;
  --ink-deep: #2a142a;
  --plum: #7a4560;
  --copper: #c89560;
  --amber: #e8c8a8;
  --gold: #c9a961;
  --cream: #faf3e7;
  --cream-soft: #fdf9f0;
  --bone: #f0e4d0;
  --body: #3a2a3a;
  --body-soft: #7a6a7a;
}

[data-palette="cocoon"] {
  --ink: #2d1f18;
  --ink-deep: #1a120c;
  --plum: #6b4330;
  --copper: #b8825f;
  --amber: #d4a878;
  --gold: #b8935a;
  --cream: #f2e8d8;
  --cream-soft: #f8f0e0;
  --bone: #e8dcc4;
  --body: #3d2e22;
  --body-soft: #7a6655;
}

/* ============================================
   Base
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--body);
  background: var(--cream);
  line-height: 1.7;
  font-size: 18px;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 1.2s var(--ease-soft), color 1.2s var(--ease-soft);
}

::selection { background: var(--gold); color: var(--ink-deep); }

img { max-width: 100%; display: block; }

/* ============================================
   Type
   ============================================ */
.serif { font-family: var(--serif); }
.script { font-family: var(--script); font-weight: 400; }

.eyebrow {
  font-family: var(--serif);
  font-variant: small-caps;
  font-weight: 500;
  letter-spacing: 0.35em;
  font-size: 14px;
  text-transform: lowercase;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.display-xl { font-size: clamp(52px, 8vw, 128px); font-style: italic; font-weight: 300; }
.display-lg { font-size: clamp(40px, 5.5vw, 84px); font-weight: 300; }
.display-md { font-size: clamp(32px, 4vw, 56px); font-weight: 300; }

p.lead {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 300;
  line-height: 1.55;
  color: var(--body);
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.6s var(--ease-soft), backdrop-filter 0.6s var(--ease-soft), color 0.6s var(--ease-soft);
}
/* Over-hero state: light type on dark sky */
.nav--on-hero .nav__brand,
.nav--on-hero .nav__links a,
.nav--on-hero .nav__cta {
  color: var(--cream);
}
.nav--on-hero .nav__brand svg { color: var(--amber); }
.nav--on-hero .nav__links a:hover { color: var(--amber); }
.nav--on-hero .nav__cta {
  border-color: color-mix(in srgb, var(--amber) 70%, transparent);
  background: color-mix(in srgb, var(--ink-deep) 35%, transparent);
  backdrop-filter: blur(8px);
}
.nav--on-hero .nav__cta:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink-deep);
}
.nav--on-hero .nav__links a.active::after { background: var(--amber); }

.nav.scrolled {
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.nav.scrolled .nav__brand,
.nav.scrolled .nav__links a,
.nav.scrolled .nav__cta { color: var(--ink); }
.nav.scrolled .nav__brand svg { color: var(--gold); }
.nav.scrolled .nav__links a:hover { color: var(--copper); }
.nav__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}
.nav__brand svg { width: 26px; height: 26px; color: var(--gold); }
.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
@media (max-width: 1180px) {
  .nav__links { display: none; }
}
.nav__links a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}
.nav__links a:hover { color: var(--copper); }
.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 50%;
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
}
.nav__cta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  padding: 10px 22px;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s;
}
.nav__cta:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.5s var(--ease-soft);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, var(--amber), var(--copper));
  transform: translateY(100%);
  transition: transform 0.6s var(--ease-soft);
  z-index: -1;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--ink-deep); border-color: var(--copper); }

.btn--light {
  color: var(--cream);
  border-color: color-mix(in srgb, var(--amber) 70%, transparent);
}
.btn--light:hover { color: var(--ink-deep); }

.btn__arrow {
  display: inline-block;
  transition: transform 0.5s var(--ease-soft);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ============================================
   Breathing
   ============================================ */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes breathe-subtle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}
.breathe { animation: breathe 8s var(--ease-breath) infinite; }
.breathe-subtle { animation: breathe-subtle 10s var(--ease-breath) infinite; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-text {
  background: linear-gradient(90deg,
    var(--gold) 0%,
    var(--amber) 25%,
    var(--cream-soft) 50%,
    var(--amber) 75%,
    var(--gold) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes drift {
  0% { transform: translate(0, 100vh) scale(0); opacity: 0; }
  10% { opacity: 0.8; transform: translate(0, 90vh) scale(1); }
  90% { opacity: 0.6; }
  100% { transform: translate(var(--drift-x, 40px), -10vh) scale(0.8); opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s var(--ease-soft), transform 1.2s var(--ease-soft);
}
.rise-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   Shared: butterfly glyph divider
   ============================================ */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin: 48px auto;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: '';
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}
.divider svg { width: 24px; height: 24px; }

/* ============================================
   Particles
   ============================================ */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--amber), 0 0 12px color-mix(in srgb, var(--amber) 40%, transparent);
  animation: drift var(--dur, 18s) linear infinite;
  animation-delay: var(--delay, 0s);
  left: var(--x, 50%);
  opacity: 0;
}

/* ============================================
   Layout helpers
   ============================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-sm { max-width: 880px; margin: 0 auto; padding: 0 32px; }
.section { padding: 120px 0; }

@media (max-width: 768px) {
  body { font-size: 17px; }
  .nav { padding: 16px 20px; }
  .nav__links { display: none; }
  .section { padding: 80px 0; }
  .eyebrow { font-size: 13px; letter-spacing: 0.3em; }
  p.lead { font-size: 19px; }
}
