/**
 * ShadowReader - Typography
 * Gothic font definitions and text styling
 */

/* ===== Font Imports ===== */
/* Google Fonts - Gothic and Handwritten styles */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;700&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=UnifrakturMaguntia&family=Shadows+Into+Light&display=swap');

/* ===== Base Typography ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-background);
}

/* ===== Headings ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-gothic);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-xxl);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-size: var(--font-size-lg);
}

h4 {
  font-size: var(--font-size-md);
}

h5, h6 {
  font-size: var(--font-size-base);
}

/* ===== Paragraphs ===== */
p {
  margin-bottom: var(--spacing-md);
}

/* ===== Links ===== */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition-color);
}

a:hover {
  color: var(--color-accent-hover);
  text-shadow: var(--glow-candle);
}

a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== Text Utilities ===== */
.text-gothic {
  font-family: var(--font-gothic);
}

.text-handwritten {
  font-family: var(--font-handwritten);
}

.text-body {
  font-family: var(--font-body);
}

.text-xs {
  font-size: var(--font-size-xs);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-base {
  font-size: var(--font-size-base);
}

.text-md {
  font-size: var(--font-size-md);
}

.text-lg {
  font-size: var(--font-size-lg);
}

.text-xl {
  font-size: var(--font-size-xl);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Drop Cap Styling ===== */
.drop-cap::first-letter {
  font-family: var(--font-gothic);
  font-size: calc(var(--font-size-base) * 3.5);
  line-height: 0.8;
  float: left;
  margin: var(--spacing-xs) var(--spacing-sm) 0 0;
  color: var(--color-accent);
  text-shadow: var(--glow-candle);
}

/* ===== Selection Styling ===== */
::selection {
  background-color: rgba(255, 140, 66, 0.3);
  color: var(--color-parchment-light);
  text-shadow: var(--glow-ethereal);
}

::-moz-selection {
  background-color: rgba(255, 140, 66, 0.3);
  color: var(--color-parchment-light);
  text-shadow: var(--glow-ethereal);
}

/* ===== Accessibility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== Focus Visible ===== */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: var(--glow-candle);
}
