:root {
  --bg: #f3eee6;
  --paper: #faf7f1;
  --ink: #143044;
  --muted: #4b5d6b;
  --sea: #1c6a86;
  --sea-deep: #0f3d52;
  --foam: #d5e7ef;
  --line: #ddd4c6;
  --sand: #e8dfd1;
  --sans: "Outfit", "Outfit Fallback", "Segoe UI", sans-serif;
  --radius: 16px;
  --wrap: 72rem;
  --measure: 40rem;
  color-scheme: light;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Outfit Fallback";
  src: local("Liberation Sans"), local("Noto Sans"), local("Arial");
  size-adjust: 105%;
  ascent-override: 95%;
  descent-override: 22%;
  line-gap-override: 0%;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  margin: 0 0 0.65rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
}

h1 { font-size: clamp(2.15rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.15rem); }
h3 { font-size: 1.15rem; }

a { color: var(--sea); }
a:hover { color: var(--sea-deep); }

:focus-visible {
  outline: 3px solid var(--sea);
  outline-offset: 3px;
}

.band.sea :focus-visible,
footer :focus-visible,
.topbar :focus-visible {
  outline-color: #fff;
}

::selection { background: #c5dce8; color: var(--ink); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--sea);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 30;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { top: 1rem; }

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  background: var(--sea-deep);
  color: #e8f3f7;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.45rem 1rem;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 238, 230, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1.2rem;
  padding: 0.55rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea-deep);
  text-decoration: none;
}

.logo:hover { color: var(--sea); }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

nav a:hover,
nav a[aria-current="page"] { color: var(--ink); }

.hero { padding: 2rem 0 0.4rem; }

.hero-copy { max-width: 40rem; margin-bottom: 1.5rem; }

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 1.3rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
  border-radius: 6px;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-solid { background: var(--sea); color: #fff; }
.btn-solid:hover { background: var(--sea-deep); color: #fff; }

.btn-line {
  background: transparent;
  color: var(--sea-deep);
  box-shadow: inset 0 0 0 1.5px var(--sea);
}

.btn-line:hover { background: var(--foam); color: var(--sea-deep); }

.hero-photo picture { display: block; }

.hero-photo img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: 50% 40%;
}

.chapters-wrap { position: relative; z-index: 1; }

.chapters {
  display: grid;
  gap: 0.85rem;
  margin: -0.5rem 0 0;
}

.chapter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 3px solid var(--sea);
  padding: 1.1rem 1.15rem 1.2rem;
  text-decoration: none;
  color: inherit;
}

.chapter:hover { border-top-color: var(--sea-deep); }

.chapter span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 0.3rem;
}

.chapter p.chapter-title {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.chapter p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.band { padding: 2.6rem 0; }
.band.paper { background: var(--paper); border-block: 1px solid var(--line); }

.band.sea {
  background: var(--sea-deep);
  color: #f3f8fa;
}

.band.sea a { color: #b8dcea; }
.band.sea a:hover { color: #fff; }
.band.sea .muted { color: #c5d6de; }

.pair {
  display: grid;
  gap: 1.4rem 2rem;
  align-items: center;
}

.pair picture { display: block; min-width: 0; }

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

.pair img.wide { aspect-ratio: 16 / 9; }

.pair.reverse picture { order: 2; }

.gifts { padding: 2.7rem 0 3rem; }
.gifts-head { margin-bottom: 1.5rem; max-width: 38rem; }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover { border-color: var(--sea); }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 0.12em; }

.card picture { display: block; }

.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0;
}

.card .pad { padding: 0.95rem 1rem 1.15rem; }
.card p.card-title {
  margin: 0 0 0.3rem;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.card .pad > p:not(.card-title) { color: var(--muted); font-size: 0.93rem; margin: 0 0 0.45rem; }
.more { font-weight: 600; font-size: 0.88rem; color: var(--sea); }

.cta {
  margin-top: 1.5rem;
  background: var(--foam);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  align-items: center;
  justify-content: space-between;
}

.cta p { margin: 0; max-width: 40rem; }

.page { padding: 1.6rem 0 3.2rem; }
.page h1 { max-width: 18em; }
.page .lede { max-width: var(--measure); }

.prose h2 { margin-top: 2rem; }
.prose p,
.prose li,
.prose blockquote { max-width: var(--measure); }

.prose a { text-underline-offset: 0.16em; }

.prose figure { margin: 1.3rem 0 1.5rem; max-width: 40rem; }
.prose figure picture { display: block; }
.prose figure img { width: 100%; }

.prose figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: var(--measure);
}

blockquote {
  margin: 1.15rem 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--sea);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.15rem;
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  font-size: 0.95rem;
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--muted);
}

.crumbs a { text-decoration: none; font-weight: 560; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 0.14em; }
.crumbs [aria-current="page"] { color: var(--ink); }

.related { margin-top: 2.2rem; }
.related ul {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.related a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

footer {
  background: var(--sea-deep);
  color: #d7e6ee;
  padding: 2.1rem 0 1.5rem;
}

footer a { color: #9fd0e2; }
footer a:hover { color: #fff; }

.foot {
  display: grid;
  gap: 1.2rem;
}

.foot-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.5rem;
}

.foot nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.foot nav a { min-height: 40px; }

.tiny {
  opacity: 0.8;
  font-size: 0.88rem;
  margin-top: 1.2rem;
}

@media (min-width: 700px) {
  .chapters { grid-template-columns: 1fr 1fr; }
  .pair,
  .foot { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 2.4rem; }
}

@media (min-width: 1000px) {
  .chapters {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin-top: -2.2rem;
  }
  .grid { grid-template-columns: 1fr 1fr 1fr; }
  .hero { padding-top: 2.6rem; }
  .band { padding: 3.2rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
