/* Spell Check Anywhere — editorial writing-resource theme.
   Content is ALWAYS visible with CSS alone; no JS-gated reveals. */
:root {
  --ink: #22283b;
  --indigo: #34406b;
  --indigo-dk: #262f52;
  --terracotta: #bf5a37;
  --terracotta-dk: #a24a2c;
  --cream: #f7f2e9;
  --paper: #fffdf8;
  --muted: #6f6a5d;
  --line: #e6ddcb;
  --line-soft: #efe8d9;
  --shadow: 0 18px 40px -24px rgba(34, 40, 59, 0.45);
  --shadow-sm: 0 6px 18px -12px rgba(34, 40, 59, 0.4);
  --wrap: 1160px;
  --measure: 44rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.06rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-decoration-color: rgba(52, 64, 107, 0.35); text-underline-offset: 3px; }
a:hover { color: var(--terracotta-dk); text-decoration-color: currentColor; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.4rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--indigo); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Top bar / nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 242, 233, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.site-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700; font-size: 1.32rem; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.site-title:hover { color: var(--terracotta-dk); }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: .5rem .7rem; border-radius: 8px;
  font-size: .93rem; font-weight: 500; color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(52, 64, 107, 0.08); color: var(--indigo-dk); }
.main-nav a.active { color: var(--terracotta-dk); background: rgba(191, 90, 55, 0.1); }

.nav-toggle { display: none; }
.nav-btn { display: none; }

/* ---------- Page head + hero ---------- */
.page-head { padding-top: 2.8rem; }
.page-head .head-inner { max-width: var(--wrap); }
.kicker {
  margin: 0 0 .7rem; font-size: .76rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--terracotta-dk);
}
.page-head h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700; line-height: 1.08; letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  margin: 0 0 .2rem; color: var(--ink); max-width: 20ch;
}
.no-hero .head-inner { padding-bottom: .4rem; border-bottom: 1px solid var(--line); margin-bottom: .5rem; }
.hero-figure {
  margin: 2rem auto 0; overflow: hidden; border-radius: 18px;
  box-shadow: var(--shadow); border: 1px solid var(--line-soft);
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.hero-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-figure { animation: none; } }

/* ---------- Article ---------- */
.article { max-width: var(--measure); padding-top: 2.4rem; padding-bottom: 1rem; }
.article > p, .article > ul, .article > ol, .article > form, .article > figure { margin: 0 0 1.25rem; }
.article p.lead {
  font-size: 1.24rem; line-height: 1.6; color: #33384a; font-weight: 400;
  margin-bottom: 1.6rem;
}
.article h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 1.62rem; line-height: 1.2; letter-spacing: -0.01em;
  margin: 2.4rem 0 .85rem; padding-top: .3rem; color: var(--ink); position: relative;
}
.article h2::before {
  content: ""; display: block; width: 42px; height: 3px; border-radius: 3px;
  background: var(--terracotta); margin-bottom: .9rem;
}
.article h3 { font-size: 1.18rem; font-weight: 600; margin: 1.6rem 0 .5rem; color: var(--indigo-dk); }
.article ul, .article ol { padding-left: 1.25rem; }
.article li { margin-bottom: .55rem; }
.article li::marker { color: var(--terracotta); }
.article strong { color: var(--ink); font-weight: 600; }
.article em { color: #3a3f52; }

/* ---------- Home topic cards ---------- */
.topic-section { padding: 1.5rem 1.4rem 3rem; }
.section-title {
  font-family: "Fraunces", Georgia, serif; font-weight: 700;
  font-size: 1.9rem; letter-spacing: -0.01em; margin: 1.5rem 0 1.4rem; text-align: center;
}
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.topic-card {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.4rem 1.4rem 1.2rem; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d9ccae; color: var(--ink); }
.topic-card h3 { font-family: "Fraunces", Georgia, serif; font-size: 1.24rem; font-weight: 600; margin: 0; }
.topic-card p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.55; flex: 1; }
.card-go { color: var(--terracotta-dk); font-weight: 600; font-size: .9rem; }

/* ---------- Contact form ---------- */
.contact-form {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.contact-form .field { margin-bottom: 1rem; }
.contact-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--indigo-dk); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 9px;
  background: #fffef9; font: inherit; font-size: 1rem; color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(52, 64, 107, 0.14);
}
.btn {
  display: inline-block; background: var(--terracotta); color: #fff; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; padding: .8rem 1.5rem; border-radius: 9px;
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--terracotta-dk); transform: translateY(-1px); color: #fff; }
.form-note { font-size: .85rem; color: var(--muted); margin: .9rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; background: var(--indigo-dk); color: #d9def0; }
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem;
  padding-top: 3rem; padding-bottom: 2.2rem;
}
.foot-brand .brand-mark { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.2rem; color: #fff; display: block; margin-bottom: .7rem; }
.foot-brand p { color: #b8bfd8; font-size: .95rem; line-height: 1.6; margin: 0; max-width: 34ch; }
.foot-col h3 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #9aa2c4; margin: .2rem 0 .9rem; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: .55rem; }
.foot-col a { color: #d9def0; text-decoration: none; font-size: .95rem; }
.foot-col a:hover { color: #fff; text-decoration: underline; }
.foot-base { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.3rem; padding-bottom: 1.6rem; }
.foot-base p { margin: 0; font-size: .85rem; color: #9aa2c4; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem 1.4rem; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 40px; padding: 8px; cursor: pointer; border-radius: 9px;
    border: 1px solid var(--line); background: var(--paper);
  }
  .nav-btn span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: .2s; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
  }
  .main-nav ul { flex-direction: column; padding: .5rem 1.4rem 1rem; gap: .1rem; }
  .main-nav a { padding: .7rem .6rem; border-bottom: 1px solid var(--line-soft); }
  .nav-toggle:checked ~ .main-nav { max-height: 30rem; }
  .nav-toggle:checked ~ .nav-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .topbar-inner { position: relative; }
}
@media (max-width: 520px) {
  body { font-size: 1.02rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .article p.lead { font-size: 1.14rem; }
  .site-title { font-size: 1.16rem; }
}
