/* ============================================================
   TRUESCENT — Global Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  /* Colors */
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F4F0EB;
  --color-border: #E8E0D5;
  --color-border-subtle: #F0EBE3;

  --color-text: #1A1611;
  --color-text-muted: #6B6259;
  --color-text-light: #9E9287;

  --color-accent: #8B7355;
  --color-accent-light: #C4A882;
  --color-accent-bg: #F5EFE6;

  --color-success: #5A8A6A;
  --color-error: #B85050;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 22, 17, 0.06), 0 1px 2px rgba(26, 22, 17, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 22, 17, 0.08), 0 2px 6px rgba(26, 22, 17, 0.05);
  --shadow-lg: 0 12px 40px rgba(26, 22, 17, 0.12), 0 4px 16px rgba(26, 22, 17, 0.06);
  --shadow-xl: 0 24px 64px rgba(26, 22, 17, 0.16);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font-family: inherit;
}

/* ─── Typography ─────────────────────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.display-sm {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 500;
  line-height: 1.2;
}

.body-lg {
  font-size: 1.25rem;
  line-height: 1.6;
}

.body-md {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.body-sm {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.body-xs {
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.label-caps {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ─── Layout helpers ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.container--xs {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ─── Nav ────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
  transition: box-shadow var(--transition-normal);
}

.site-nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--space-5);
  max-width: 1140px;
  margin: 0 auto;
}

.site-nav__logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
  font-style: italic;
}

.site-nav__logo span {
  font-style: normal;
  font-weight: 300;
  color: var(--color-accent);
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.site-nav__link:hover {
  color: var(--color-text);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px var(--space-6);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all var(--transition-normal);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 115, 85, 0.3);
}

.btn--primary:hover {
  background: #7A6348;
  box-shadow: 0 6px 24px rgba(139, 115, 85, 0.4);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(139, 115, 85, 0.25);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  border-color: var(--color-accent-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 12px var(--space-4);
}

.btn--ghost:hover {
  color: var(--color-text);
  background: var(--color-surface-alt);
}

.btn--lg {
  padding: 18px var(--space-8);
  font-size: 1.0625rem;
}

.btn--sm {
  padding: 10px var(--space-4);
  font-size: 0.8125rem;
}

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

.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* ─── Tag / Pill ─────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--color-accent-bg);
  color: var(--color-accent);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ─── Divider ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-8) 0;
}

/* ─── Animation utilities ────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(32px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-32px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.5s ease both;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease both;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

.delay-5 {
  animation-delay: 0.5s;
}

/* ─── Section spacing ────────────────────────────────────── */
.section {
  padding: var(--space-20) 0;
}

.section--sm {
  padding: var(--space-12) 0;
}

.section--lg {
  padding: var(--space-24) 0;
}

/* ─── Focus visible ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

/* ─── Beta Badge ─────────────────────────────────────────── */
.beta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  user-select: none;
  pointer-events: none;
  position: relative;
  text-transform: uppercase;
}

.site-nav__logo-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.site-nav__logo-wrap .beta-pill {
  transform: translateY(-4px);
  /* Align slightly with top of logo text */
}

/* Header corner badge */
.site-nav__beta-corner {
  margin-left: auto;
  margin-right: var(--space-4);
}

/* Desktop hide labels sometimes handled by gaps */
@media (max-width: 600px) {
  .site-nav__beta-corner {
    margin-right: var(--space-2);
  }
}

/* ─── Selection ──────────────────────────────────────────── */
::selection {
  background: var(--color-accent-bg);
  color: var(--color-accent);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .section {
    padding: var(--space-12) 0;
  }

  .section--lg {
    padding: var(--space-16) 0;
  }
}