@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;600&family=Hepta+Slab:wght@600;700&family=Sometype+Mono:wght@500&display=swap');

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

:root {
  --kraft: #E8DFC9;
  --navy: #16233A;
  --sky: #3A78C2;
  --coral: #E86A4E;
  --slate: #5E6670;
  --sand: #F3EDDE;
  --measure: 42rem;
  --pad-section: clamp(5rem, 8vw, 7.125rem);
  --font-head: 'Hepta Slab', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --font-mono: 'Sometype Mono', monospace;
}

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { filter: brightness(1.08); }

.surface-kraft { background-color: var(--kraft); color: var(--navy); }
.surface-sand { background-color: var(--sand); color: var(--navy); }
.surface-navy { background-color: var(--navy); color: var(--sand); }
.surface-coral { background-color: var(--coral); color: var(--sand); }

.surface-kraft::selection,
.surface-sand::selection { background: var(--coral); color: var(--sand); }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(22, 35, 58, 0.12);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  gap: 1rem;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { color: var(--coral); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--coral);
}

/* Typography */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 1rem;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 700; margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; margin: 0 0 1rem; }
h3 { font-size: 1.35rem; font-weight: 600; margin: 0 0 0.75rem; }

.prose {
  max-width: var(--measure);
}

.prose p { margin: 0 0 1.35rem; }
.prose p:last-child { margin-bottom: 0; }

.dateline {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.btn-primary { background: var(--coral); color: var(--sand); }
.btn-secondary {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Paper grain */
.surface-kraft.has-grain {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* Kite string */
.kite-string-scroll {
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 60px;
  pointer-events: none;
}

.kite-string-scroll svg { width: 100%; height: 100%; }

/* Hero */
.hero {
  position: relative;
  padding-block: var(--pad-section);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.hero h1 em { font-style: normal; color: var(--coral); }

.hero-image {
  border: 1px solid var(--navy);
  box-shadow: 8px 8px 0 rgba(22, 35, 58, 0.08);
}

.hero-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Article */
.article-hero-image {
  margin: 2rem 0;
  border: 1px solid var(--navy);
}

.article-hero-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

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

.article-body .prose { margin-inline: auto; }

/* Cards */
.card-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid rgba(22, 35, 58, 0.1);
  transition: filter 0.2s ease;
}

.card:hover { filter: brightness(1.03); }

.card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.card-body { padding: 1.35rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }

.card-body .dateline { font-size: 11px; margin-bottom: 0.5rem; }

.card-body p { margin: 0 0 1rem; font-size: 0.95rem; flex: 1; }

.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: underline;
  text-decoration-color: var(--coral);
}

.featured-card {
  display: grid;
  gap: 0;
}

@media (min-width: 768px) {
  .featured-card { grid-template-columns: 1fr 1.1fr; }
}

.featured-card .card-image img { aspect-ratio: 4/3; height: 100%; }

.featured-card .card-body { padding: 2rem 2.25rem; justify-content: center; }

.featured-card .eyebrow { color: var(--coral); }

.surface-navy .eyebrow { color: var(--coral); }

/* About strip */
.about-strip {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-block: var(--pad-section);
}

@media (min-width: 640px) {
  .about-strip { grid-template-columns: 200px 1fr; }
}

.about-strip img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--navy);
}

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

.section-header { margin-bottom: 2.5rem; max-width: 36rem; }

.hairline { border: none; border-top: 1px solid rgba(22, 35, 58, 0.15); margin: 2.5rem 0; }

.surface-navy .hairline { border-color: rgba(243, 237, 222, 0.2); }

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  max-width: 32rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--navy);
  background: var(--sand);
  color: var(--navy);
}

.form-group textarea { min-height: 8rem; resize: vertical; }

.form-check { display: flex; gap: 0.6rem; align-items: flex-start; max-width: 36rem; }
.form-check input { margin-top: 0.35rem; }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Footer */
.site-footer {
  padding-block: 2.5rem 2rem;
  border-top: 1px solid rgba(22, 35, 58, 0.12);
  font-size: 0.9rem;
}

.site-footer .container { display: grid; gap: 1rem; }

.footer-disclaimer { font-size: 0.85rem; color: var(--slate); max-width: 42rem; line-height: 1.6; }

.surface-navy.site-footer .footer-disclaimer { color: rgba(243, 237, 222, 0.75); }

.footer-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.25rem;
  box-shadow: 0 -4px 24px rgba(22, 35, 58, 0.15);
}

#cookie-banner .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.cookie-customise {
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(22, 35, 58, 0.15);
}

/* Reveal */
.js .reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0.92;
    transform: translateY(16px);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Post inline images */
.post-image {
  margin: 2rem 0;
  border: 1px solid rgba(22, 35, 58, 0.2);
}

.post-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.post-image figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 0.6rem 0.75rem;
  color: var(--slate);
}

/* 404 */
.error-page { text-align: center; padding-block: calc(var(--pad-section) * 1.5); }
.error-page h1 { margin-bottom: 1rem; }

/* Journal label */
.label-main {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--coral);
  color: var(--sand);
  padding: 0.25rem 0.6rem;
  margin-bottom: 0.75rem;
}

/* More strip */
.more-strip {
  padding-block: 3rem;
  text-align: center;
  border-top: 1px solid rgba(22, 35, 58, 0.12);
}

.more-strip a { font-weight: 600; }

.contact-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr min(22rem, 38%);
  }
}

.contact-form-wrap { max-width: 36rem; }

.contact-photo {
  margin: 0;
  border: 1px solid var(--navy);
  box-shadow: 8px 8px 0 rgba(22, 35, 58, 0.08);
}

.contact-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.contact-photo figcaption {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 0.75rem 0.85rem;
  color: var(--slate);
  line-height: 1.5;
  background: var(--sand);
}

@media (max-width: 767px) {
  .contact-photo { order: -1; max-width: 20rem; }
}
