
:root {
  --bg: #f2ede5;
  --surface: #fffdf8;
  --surface-2: #f9f3e8;
  --ink: #18212b;
  --ink-soft: #4b596a;
  --line: #d8ccbb;
  --line-2: #c8b8a5;
  --brand: #0d4b59;
  --brand-strong: #0b3842;
  --accent: #c06d3f;
  --accent-soft: #f4e4d7;
  --ok: #236744;
  --shadow: 0 18px 45px rgba(19, 33, 46, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Work Sans", sans-serif;
  color: var(--ink);
  line-height: 1.74;
  background: #f7f5f1;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(242, 237, 229, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.read-progress {
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #de8f54, var(--brand));
  transition: width 140ms linear;
}

.header-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: 1.08rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(130deg, var(--brand), #14506c 57%, var(--accent));
  box-shadow: 0 8px 18px rgba(13, 75, 89, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.site-nav a {
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink);
  font-weight: 600;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.site-nav a:hover {
  text-decoration: none;
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.7);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.hero {
  padding: 2.2rem 0 1.2rem;
}

.hero-card {
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", serif;
  line-height: 1.15;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.hero p {
  margin: 0.5rem 0;
  color: var(--ink-soft);
  max-width: 70ch;
}

.section {
  padding: 0.8rem 0 3rem;
}

.section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: "Fraunces", serif;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
  gap: 1rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: linear-gradient(180deg, #fffdf8, #fff8ee);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 1rem 1rem 1.02rem;
  box-shadow: 0 8px 22px rgba(26, 35, 48, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: 0 16px 32px rgba(26, 35, 48, 0.12);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.meta-line {
  display: inline-flex;
  color: var(--ok);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.meta-chip {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  color: var(--ink-soft);
  background: #fff;
}

.card h3 {
  margin: 0.18rem 0 0.35rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

.card-foot {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  border-top: 1px dashed #dccfbf;
  font-size: 0.84rem;
  color: #556273;
}

.card-foot a {
  font-weight: 700;
  color: var(--brand);
}

.content-wrap {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.4rem 0 3.6rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.54));
}

.content-wrap h1 {
  margin: 0 0 0.45rem;
  line-height: 1.13;
  font-family: "Fraunces", serif;
  font-size: clamp(1.95rem, 3.3vw, 2.8rem);
}

.content-wrap h2 {
  margin-top: 2.3rem;
  margin-bottom: 0.55rem;
  font-family: "Fraunces", serif;
  line-height: 1.2;
}

.content-wrap h3 {
  margin-top: 1.4rem;
  margin-bottom: 0.3rem;
  font-family: "Fraunces", serif;
}

.content-wrap p {
  color: #2b3748;
  margin: 0.65rem 0;
}

.callout {
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-soft), #fff9f1);
  padding: 0.78rem 0.95rem;
  border-radius: 0 11px 11px 0;
}

.article-nav {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line-2);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-nav a {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-weight: 600;
}

.article-nav a:hover {
  text-decoration: none;
  border-color: var(--line-2);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fcf7ef, #f7efe3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 1rem;
  padding: 2rem 0 1rem;
}

.footer-grid h3 {
  margin: 0 0 0.4rem;
  font-family: "Fraunces", serif;
}

.footer-grid p,
.footer-grid a {
  display: block;
  margin: 0.33rem 0;
  color: var(--ink-soft);
}

.footer-bottom {
  padding: 0.55rem 0 1.35rem;
  color: #667285;
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(11px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 840px) {
  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    padding: 0.85rem 1rem;
    background: #fffdf8;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 1.6rem;
  }
  .article-nav {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
