/* =========================================================
   Happy Caribbean — happycaribbean.do
   Centered single-column layout, sans, sage palette,
   slide-out menu from the right.
   ========================================================= */

/* ---------- Inter Variable (one upright, one italic) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/InterVariable.woff2') format('woff2-variations'),
       url('/assets/fonts/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/InterVariable-Italic.woff2') format('woff2-variations'),
       url('/assets/fonts/InterVariable-Italic.woff2') format('woff2');
}

/* ---------- Tokens (coastal sage) ---------- */
:root {
  --paper:        #e3e7d3;
  --paper-deep:   #d3d9be;
  --ink:          #1c2620;
  --graphite:     #5e6a5a;
  --graphite-soft:#8a9583;
  --rule:         #b6bea2;
  --accent:       #a85942;

  --col:          640px;
  --gutter:       28px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  font-feature-settings: "ss01" 1, "cv11" 1, "kern" 1, "calt" 1;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.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;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- The page (centered narrow column, book-like) ---------- */
.page {
  max-width: var(--col);
  margin: 0 auto;
  padding: 96px var(--gutter) 96px;
}

/* ---------- Site title (centered top of column) ---------- */
.site-title {
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: 80px;
}
.site-title a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .2s ease, border-color .2s ease;
}
.site-title a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Menu trigger (top-right, fixed) ---------- */
.menu-trigger {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 60;
  background: transparent;
  border: 0;
  padding: 8px 12px;
  margin: -8px -12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: color .2s ease;
}
.menu-trigger:hover { color: var(--accent); }
.menu-trigger[aria-expanded="true"] .menu-trigger-label::after {
  content: " ✕";
}
.menu-trigger[aria-expanded="false"] .menu-trigger-label::after {
  content: "";
}

/* ---------- Menu drawer (slides from right) ---------- */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 38, 32, 0);
  pointer-events: none;
  transition: background .35s ease;
  z-index: 40;
}
.menu-backdrop.is-active {
  background: rgba(28, 38, 32, 0.20);
  pointer-events: auto;
}

.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 86vw);
  height: 100%;
  background: var(--paper-deep);
  padding: 88px 36px 36px;
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(0.65, 0, 0.25, 1);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: -1px 0 0 var(--rule);
}
.menu-drawer.is-open { transform: translateX(0); }

.menu-drawer a {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  align-self: flex-start;
  transition: color .2s ease, border-color .2s ease;
}
.menu-drawer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.menu-drawer a.is-current { color: var(--accent); border-bottom-color: var(--accent); }

.menu-drawer .meta {
  margin-top: auto;
  font-size: 13px;
  color: var(--graphite);
  font-style: italic;
  line-height: 1.5;
}
.menu-drawer .meta a {
  font-size: inherit;
  font-weight: inherit;
  border-bottom: 1px solid var(--rule);
  align-self: flex-start;
  display: inline;
  padding-bottom: 0;
}

/* When menu is open, lock body scroll. */
body.menu-open { overflow: hidden; }

/* ---------- Index ---------- */
.index-lede {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 80px;
  text-wrap: balance;
  letter-spacing: -0.005em;
}
.index-lede em { font-style: italic; }

.article-list { list-style: none; }
.article-row {
  display: block;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.article-list:last-child .article-row:last-child { border-bottom: 1px solid var(--rule); }

.year-heading {
  margin-top: 48px;
  margin-bottom: 0;
  padding-top: 8px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.year-heading:first-of-type { margin-top: 0; }
.article-row .cat {
  display: block;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 6px;
  font-weight: 500;
}
.article-row .title {
  display: block;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.article-row .title em { font-style: italic; }
.article-row .title a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color .2s ease;
}
.article-row:hover .title a,
.article-row a:hover .title { color: var(--accent); }
.article-row .date {
  display: block;
  font-size: 13px;
  color: var(--graphite);
  margin-top: 6px;
  letter-spacing: 0;
}

/* The whole row is one anchor — make it cover the click area cleanly. */
a.article-row { display: block; }
a.article-row .title { color: var(--ink); }
a.article-row:hover .title { color: var(--accent); }

/* ---------- Article page ---------- */
.article-back {
  margin-bottom: 56px;
  font-size: 13px;
  color: var(--graphite);
}
.article-back a {
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.article-back a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.article-header { margin-bottom: 48px; }
.article-header .meta {
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 16px;
  font-weight: 500;
}
.article-header .meta .sep { margin: 0 8px; color: var(--graphite-soft); }
.article-header h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.article-body {
  font-size: 17px;
  line-height: 1.7;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.article-body p { margin-bottom: 1.1em; }
.article-body p:last-child { margin-bottom: 0; }

.article-body em, .article-body i { font-style: italic; }
.article-body strong, .article-body b { font-weight: 600; }
.article-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s ease, color .2s ease;
}
.article-body a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.article-body blockquote {
  margin: 28px 0;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
  font-style: italic;
  color: var(--graphite);
}

.article-body h2, .article-body h3 {
  font-weight: 600;
  margin: 1.6em 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.article-body h2 { font-size: 22px; }
.article-body h3 { font-size: 18px; }

.article-body ul, .article-body ol { margin: 0 0 1.1em 1.4em; }
.article-body li { margin-bottom: 0.4em; }

.article-body figure { margin: 1.6em 0; }
.article-body figcaption {
  font-size: 13px;
  color: var(--graphite);
  margin-top: 8px;
  line-height: 1.4;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}

.article-footnote {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--graphite);
}
.article-footnote a {
  border-bottom: 1px solid var(--rule);
  transition: color .2s ease, border-color .2s ease;
}
.article-footnote a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Contact ---------- */
.contact h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin-bottom: 36px;
}
.contact p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 1.1em;
}
.contact p:first-of-type {
  font-size: 20px;
  line-height: 1.45;
  margin-bottom: 1.2em;
  letter-spacing: -0.005em;
}
.contact a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s ease, color .2s ease;
}
.contact a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Site footer (bottom of column) ---------- */
.site-footer {
  margin-top: 96px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--graphite);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .page { padding: 72px 22px 60px; }
  .menu-trigger { top: 18px; right: 22px; font-size: 13px; }

  .site-title { margin-bottom: 56px; }
  .index-lede { font-size: 19px; margin-bottom: 56px; }

  .article-row .title { font-size: 18px; }

  .article-header { margin-bottom: 32px; }
  .article-body { font-size: 16px; line-height: 1.65; }
  .article-body figure { margin: 1.2em 0; }
}
