/* ═══════════════════════════════════════════════════════
   BASE STYLES — The Saracen's Head Inn
   Foundation typography, colours, and global elements
   ═══════════════════════════════════════════════════════ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background-color: var(--parchment);
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ink);
  font-weight: 400;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-xl); font-weight: 500; }
h4 { font-size: var(--text-lg); font-weight: 500; }

p {
  line-height: 1.8;
  color: var(--stone);
  font-weight: 400;
}

p + p {
  margin-top: var(--space-sm);
}

/* ── Links ── */
a {
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--ale);
}

a:focus-visible {
  outline: 2px solid var(--ale);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: color var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

/* Sweep-fill hover effect */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out);
}

.btn:hover::before {
  transform: scaleX(1);
}

.btn span,
.btn svg {
  position: relative;
  z-index: 1;
}

/* ── Primary ── */
.btn-primary {
  background: var(--ink);
  color: #ffffff;
}

.btn-primary::before {
  background: var(--ale);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 26, 46, 0.2);
  color: #ffffff;
}

/* ── Secondary ── */
.btn-secondary {
  background: transparent;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.btn-secondary::before {
  background: rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Secondary on light backgrounds */
.btn-secondary.dark {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(26, 26, 46, 0.2);
}

.btn-secondary.dark::before {
  background: var(--ink);
}

.btn-secondary.dark:hover {
  color: #ffffff;
  box-shadow: inset 0 0 0 1px var(--ink),
              0 6px 20px rgba(26, 26, 46, 0.15);
}

/* ── Section Titles ── */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ale);
  margin-bottom: var(--space-sm);
  display: block;
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 400;
  margin-bottom: var(--space-sm);
  line-height: 1.15;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-style: normal;
  color: var(--stone);
  max-width: 520px;
  line-height: 1.7;
  font-weight: 400;
}

/* ── Pull Quotes ── */
.pull-quote {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
  position: relative;
  padding-left: var(--space-md);
  border-left: 2px solid var(--ale);
}

/* ── Grain Overlay Mixin ── */
.grain-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

/* ── Selection ── */
::selection {
  background: var(--ale);
  color: var(--cream);
}

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

/* ── Loading State ── */
body.loading {
  overflow: hidden;
}
