:root {
  --chestnut: #55443a;
  --arsenic: #4d2308;
  --morning-blue: #8a9992;
  --almond: #cfd0cd;
  --almond-dim: rgba(207,208,205,0.68);
  --orchid: #fbf1ff;
  --orchid-dim: rgba(251,241,255,0.65);
  --thistle: #e3d0ea;
  --amethyst: #9b71b2;
  --dark-purple: #3a1c36;
  --panel: #817b75;
  --panel-hover: #8d8780;
  --input-bg: #918b84;
  --input-border: rgba(251,241,255,0.25);
  --panel-border: rgba(251,241,255,0.12);
  --text-secondary: rgba(251,241,255,0.68);
  --text-muted: rgba(251,241,255,0.50);
  --placeholder: rgba(77,35,8,0.50);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

body {
  background: var(--chestnut);
  color: var(--orchid);
  font-family: var(--sans);
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
}
@media (pointer: coarse), (prefers-reduced-motion: reduce) { body { cursor: auto; } }
::selection { background: var(--thistle); color: var(--dark-purple); }

a { color: inherit; }

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0;
  min-width: 26px; height: 26px;
  border-radius: 100px;
  border: 1px solid rgba(207,208,205,0.6);
  color: var(--almond);
  pointer-events: none;
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.6rem; font-weight: 500; letter-spacing: 0.06em;
  padding: 0 4px;
  transition: min-width 0.3s cubic-bezier(0.16,1,0.3,1), height 0.3s cubic-bezier(0.16,1,0.3,1), padding 0.3s ease, background 0.3s ease;
}
.cursor::before { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--amethyst); }
.cursor.hovering { min-width: 78px; height: 32px; padding: 0 12px; background: rgba(77,35,8,0.55); backdrop-filter: blur(4px); }
.cursor.hovering::before { display: none; }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .cursor { display: none; } }

/* ---------- Preloader ---------- */
.loader { position: fixed; inset: 0; z-index: 998; background: var(--arsenic); display: flex; align-items: center; justify-content: center; }
.loader-logo { font-size: 1.3rem; font-weight: 800; letter-spacing: 0.02em; color: var(--almond); text-align: center; text-transform: uppercase; }
.loader-tag {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--morning-blue); margin-top: 12px; text-align: center;
}
.loader-bar { width: 150px; height: 1px; background: rgba(207,208,205,0.16); margin: 24px auto 0; position: relative; }
.loader-bar-fill { position: absolute; inset: 0; width: 0%; background: var(--amethyst); }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 48px; opacity: 0;
  transition: padding 0.35s cubic-bezier(0.16,1,0.3,1), background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 14px 48px;
  background: rgba(77,35,8,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(207,208,205,0.1);
}
.nav-logo { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; color: var(--orchid); text-decoration: none; }
.nav-center { display: flex; gap: 34px; }
.nav-center a {
  font-size: 0.8rem; font-weight: 500; color: var(--almond-dim); text-decoration: none;
  position: relative; padding-bottom: 3px;
}
.nav-center a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--morning-blue); transition: right 0.28s cubic-bezier(0.16,1,0.3,1);
}
.nav-center a:hover { color: var(--orchid); }
.nav-center a:hover::after { right: 0; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-signin { font-size: 0.8rem; font-weight: 500; color: var(--almond-dim); text-decoration: none; }
.nav-signin:hover { color: var(--orchid); }
.nav-cta {
  font-size: 0.78rem; font-weight: 600; color: var(--arsenic); background: var(--almond); border: none;
  padding: 11px 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.25s ease; text-decoration: none;
}
.nav-cta:hover { background: var(--thistle); }
.nav-cta svg { transition: transform 0.25s cubic-bezier(0.16,1,0.3,1); }
.nav-cta:hover svg { transform: translateX(3px); }
@media (max-width: 900px) { .nav-center { display: none; } .nav-signin { display: none; } .nav { padding: 20px 22px; } }

/* ---------- Shared buttons ---------- */
.btn-primary {
  font-size: 0.86rem; font-weight: 600; color: var(--arsenic); background: var(--almond); border: none;
  padding: 16px 26px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  transition: background 0.25s ease, transform 0.25s ease; text-decoration: none;
}
.btn-primary:hover { background: var(--thistle); transform: translateY(-1px); }
.btn-primary svg { transition: transform 0.28s cubic-bezier(0.16,1,0.3,1); }
.btn-primary:hover svg { transform: translateX(6px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-text {
  font-size: 0.86rem; font-weight: 600; color: var(--almond-dim); background: none; border: none;
  border-bottom: 1px solid rgba(207,208,205,0.28); padding-bottom: 4px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: color 0.25s ease, border-color 0.25s ease;
}
.btn-text:hover { color: var(--orchid); border-color: var(--morning-blue); }
.btn-text svg { transition: transform 0.28s ease; }
.btn-text:hover svg { transform: translateY(2px); }
