/* Khutulun — site stylesheet */

/* ---------- Fonts (self-hosted) ---------- */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(../fonts/cormorant-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/cormorant-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/sourcesans-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/sourcesans-italic.woff2) format('woff2');
}

/* ---------- Palette ---------- */
/* PALETTE-START */
:root {
  --bg: #0b1a24;
  --bg-raised: #132633;
  --ink: #e4ecf0;
  --ink-muted: #93a9b6;
  --accent: #8ec7c9;
  --rule: #1f3a4a;
}
/* PALETTE-END */

/* ---------- Tokens ---------- */

:root {
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.375rem, 7vw, 3rem);

  --measure: 42rem;
  --measure-wide: 66rem;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.wrap--wide { max-width: var(--measure-wide); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-2); margin-top: 2.5em; margin-bottom: 0.5em; }
h3 { font-size: var(--step-1); margin-top: 2em; margin-bottom: 0.5em; }

h1 + h2 {
  margin-top: 0.35em;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-muted);
}

p { margin-block: 0 1.1em; }

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

ul, ol { padding-inline-start: 1.4em; margin-block: 0 1.1em; }
li { margin-block: 0.3em; }
li > p { margin-bottom: 0.3em; }

blockquote {
  margin: 1.6em 0;
  padding-inline-start: 1.1em;
  border-inline-start: 2px solid var(--accent);
  color: var(--ink-muted);
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin-block: 3rem;
}

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

figure { margin: 2rem 0; }
figure img { width: 100%; border-radius: 3px; }

::selection { background: var(--accent); color: var(--bg); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Header / nav ---------- */

.site-header { padding-block: 1.75rem 0; }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
}

.site-title {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0;
}
.site-title a { color: var(--ink); text-decoration: none; }

.site-nav { margin-inline-start: auto; }
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
}
.site-nav a { color: var(--ink-muted); text-decoration: none; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* ---------- Page scaffold ---------- */

main { padding-block: 2.5rem 4rem; }

.banner { margin: 2rem 0 2.5rem; }
.banner img {
  border-radius: 3px;
  width: 100%;
}

.page-header { margin-bottom: 2.25rem; }
.lede { margin-bottom: 2rem; }

.post-meta {
  font-size: var(--step--1);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-top: 0.6em;
}

.status h2 { font-size: var(--step-1); margin-top: 1.6em; }
.status > :first-child { margin-top: 0; }
.status ul:last-child { margin-bottom: 0; }

/* ---------- Two-column sections ---------- */

.columns {
  display: grid;
  gap: 1rem 3.5rem;
}

@media (min-width: 48rem) {
  .columns { grid-template-columns: 1fr 1fr; }
}

.columns > * > :first-child { margin-top: 0; }
.columns > * > :last-child { margin-bottom: 0; }

/* ---------- Reviews ---------- */

.reviews-title { margin-top: 0; }

.reviews {
  list-style: none;
  padding: 0;
  margin: 0;
}
.reviews > li { margin: 0 0 1.75rem; }
.reviews blockquote {
  margin: 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-inline-start: 2px solid var(--accent);
  color: var(--ink-muted);
  break-inside: avoid;
}
.reviews blockquote > :first-child { margin-top: 0; }
.reviews blockquote > :last-child { margin-bottom: 0; }
.reviews em { color: var(--ink); font-style: italic; }

@media (min-width: 48rem) {
  .reviews {
    column-count: 2;
    column-gap: 3.5rem;
  }
  .reviews > li { break-inside: avoid; }
}

/* ---------- Blog index ---------- */

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  margin: 0;
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
}
.post-list li:first-child { border-top: none; padding-top: 0; }

.post-card { display: grid; gap: 1rem 1.5rem; }
.post-card .thumb img {
  border-radius: 3px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}
.post-card h2 { margin: 0; font-size: var(--step-1); }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card .excerpt { margin: 0.5em 0 0; color: var(--ink-muted); }

@media (min-width: 40rem) {
  .post-card { grid-template-columns: 11rem 1fr; align-items: start; }
  .post-card .thumb { margin-top: 0.3rem; }
}

/* ---------- Post footer nav ---------- */

.post-nav {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
}

/* ---------- Contact email callout ---------- */

.email-callout {
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem 1.4rem;
  margin-block: 2rem;
  text-align: center;
}
.email-callout .label {
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5em;
}
.email-callout a {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-block: 2.25rem 3rem;
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-muted);
}
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer p { margin-block: 0 1em; }
.site-footer p:last-child { margin-bottom: 0; }

.footer-blurb {
  color: var(--ink);
  max-width: 34em;
}
.footer-elsewhere .label {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 48rem) {
  .site-footer .wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 3.5rem;
  }
  .footer-blurb { grid-column: 1 / -1; }
}
