/* ========================================
   EPI SHARED — single source of truth for
   design tokens, utilities, and button
   styles used across all shell pages.
   ======================================== */

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

/* Collapsible sections (book-detail, course-detail, about-story) use max-height:0 + overflow:hidden
   to hide content, but their section padding persists and creates blank space. Remove it. */
.collapsible-section:not(.revealed) { padding-top: 0 !important; padding-bottom: 0 !important; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* ── Design tokens ── */
:root {
  --bg-primary: #0b1121;
  --bg-secondary: #0f1729;
  --bg-card: #131d33;
  --bg-card-hover: #172240;
  --bg-elevated: #182541;
  --bg-light: #f5ede0;

  --border-subtle: rgba(200,180,130,0.12);
  --border-medium: rgba(200,180,130,0.2);
  --border-accent: rgba(200,162,78,0.4);
  --border-highlight: #c8a24e;

  --text-primary: #e8e4dc;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-accent: #c8a24e;
  --text-bright: #f5f0e6;

  --accent-gold: #c8a24e;
  --accent-gold-hover: #dab65e;
  --accent-gold-dark: #a88a3e;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs:   clamp(0.75rem,   0.7rem  + 0.25vw, 0.8125rem);
  --text-sm:   clamp(0.8125rem, 0.78rem + 0.2vw,  0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem  + 0.2vw,  1rem);
  --text-lg:   clamp(1.0625rem, 1rem    + 0.4vw,  1.25rem);
  --text-xl:   clamp(1.25rem,   1.1rem  + 0.75vw, 1.75rem);
  --text-2xl:  clamp(1.75rem,   1.3rem  + 1.5vw,  2.5rem);
  --text-3xl:  clamp(2.25rem,   1.5rem  + 2.5vw,  3.25rem);

  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1120px;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --shadow-card:      0 4px 24px rgba(0,0,0,0.3);
  --shadow-elevated:  0 8px 40px rgba(0,0,0,0.4);
  --shadow-glow-gold: 0 0 30px rgba(200,162,78,0.15);

  --ease-out:         cubic-bezier(0.16,1,0.3,1);
  --transition-fast:  180ms cubic-bezier(0.16,1,0.3,1);
  --transition-med:   300ms cubic-bezier(0.16,1,0.3,1);

  /* Standard spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  0.875rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  2.5rem;
  --space-2xl: 3.5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ── Section label ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-accent);
  margin-bottom: var(--space-md);
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent-gold);
}
.section-label--centered { justify-content: center; }
.section-label--centered::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent-gold);
}

/* ── Utility ── */
.accent { color: var(--text-accent); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }

/* ── Gold pill CTA (primary) ── */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  min-height: 52px;
  background: linear-gradient(135deg, #f2d472 0%, #d4a94d 48%, #c49538 100%);
  color: #0b1121;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  width: auto;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(212,168,76,0.35);
}
.cta-button:hover { filter: brightness(1.07); box-shadow: 0 6px 32px rgba(212,168,76,0.55); }
.cta-button svg { flex-shrink: 0; align-self: center; vertical-align: middle; }
.cta-button br { display: none; }

/* ── Outline CTA (secondary) ── */
.cta-button--secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  min-height: 52px;
  background: transparent;
  border: 1.5px solid var(--border-accent);
  color: var(--text-accent);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.02em;
  width: auto;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.cta-button--secondary:hover { background: rgba(200,162,78,0.1); border-color: var(--accent-gold); color: var(--accent-gold-hover); }
.cta-button--secondary svg { flex-shrink: 0; align-self: center; vertical-align: middle; }
.cta-button--secondary br { display: none; }

/* ── Hero entrance animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
