/* ==========================================================================
   Backline Operators - base.css
   Variables, reset, typography, buttons, utilities
   ========================================================================== */

:root {
  /* Colour palette - warm, appetising, understated */
  --ink:        #26231d;   /* near-black warm charcoal - headings, body */
  --ink-soft:   #5c564b;   /* softened ink - secondary text */
  --paper:      #faf7f1;   /* warm cream - page background */
  --paper-deep: #f1ebe0;   /* deeper cream - alternate sections */
  --card:       #fffdf9;   /* warm white - cards */
  --accent:     #b4502a;   /* terracotta - CTAs, highlights */
  --accent-deep:#8f3d1f;   /* terracotta hover */
  --olive:      #46543c;   /* deep olive - dark bands, footer */
  --olive-soft: #eef0e9;   /* pale olive tint */
  --line:       #e4dccd;   /* hairlines, borders */

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --radius: 14px;
  --radius-sm: 8px;
  --container: 1100px;
  --section-pad: clamp(3.5rem, 8vw, 6rem);
  --shadow: 0 1px 2px rgba(38, 35, 29, 0.05), 0 8px 24px rgba(38, 35, 29, 0.06);
}

/* --- Reset ------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px - readability first */
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* --- Typography --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.45rem); }
h4 { font-size: 1.1rem; }

p {
  max-width: 65ch; /* comfortable line length */
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-deep);
}

ul, ol {
  padding-left: 1.25rem;
}

strong {
  font-weight: 600;
}

/* Small uppercase label above headings */
.kicker {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.lede {
  font-size: 1.1875rem;
  color: var(--ink-soft);
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.9rem;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--accent-deep);
  color: #fff;
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background-color: var(--ink);
  color: var(--paper);
}

/* Ghost button on dark bands */
.btn-ghost-light {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-ghost-light:hover,
.btn-ghost-light:focus-visible {
  background-color: #fff;
  color: var(--olive);
}

/* --- Focus & accessibility ---------------------------------------------- */

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* Visually hidden but available to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Layout helpers ------------------------------------------------------ */

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding-block: var(--section-pad);
}

.section-deep {
  background-color: var(--paper-deep);
}

.section-olive {
  background-color: var(--olive);
  color: #fff;
}

.section-olive h2 {
  color: #fff;
}

.section-olive p {
  color: rgba(255, 255, 255, 0.88);
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

.center {
  text-align: center;
}

.center .section-head,
.center p {
  margin-inline: auto;
}
