:root {
  --ink: #f4efe4;
  --muted: #c5d5d3;
  --sky: #062832;
  --sky-2: #0b3d4a;
  --cyan: #5ce1e6;
  --coral: #e07a5f;
  --cream: #f4efe4;
  --deep: #03161c;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ms: 220ms;
  --dock: 88px;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Hiragino Mincho ProN", serif;
  --sans: "Avenir Next", "Segoe UI", "Noto Sans CJK SC", sans-serif;
}

[data-theme="dawn"] {
  --ink: #14343c;
  --muted: #3d5c62;
  --sky: #e7f3f1;
  --sky-2: #d4ebe8;
  --cyan: #0e7c82;
  --coral: #c45c40;
  --cream: #14343c;
  --deep: #f7f1e6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--sky);
  isolation: isolate;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  position: relative;
  z-index: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(92, 225, 230, 0.14), transparent 60%),
    radial-gradient(800px 500px at -10% 20%, rgba(224, 122, 95, 0.12), transparent 55%),
    var(--sky);
  min-height: 100%;
  padding-bottom: calc(var(--dock) + 56px);
}

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

a {
  color: var(--cyan);
}

.skip {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-160%);
  background: var(--coral);
  color: var(--deep);
  padding: 12px 16px;
  min-height: 44px;
  z-index: 80;
  clip-path: inset(100%);
}

.skip:focus {
  transform: translateY(12px);
  clip-path: none;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--sky) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--cyan) 25%, transparent);
}

.mast-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
  min-height: 44px;
}

.sigil {
  width: 36px;
  height: 36px;
  border-radius: 50% 40% 55% 45%;
  background:
    radial-gradient(circle at 30% 30%, var(--cyan), transparent 40%),
    radial-gradient(circle at 70% 70%, var(--coral), var(--sky-2));
  box-shadow: 0 0 18px color-mix(in srgb, var(--cyan) 50%, transparent);
}

.word {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.desk {
  display: none;
}

.tools {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.tool-btn,
.btn,
.dock-a,
.locale-menu a,
.hits a {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
  background: color-mix(in srgb, var(--sky-2) 80%, transparent);
  color: var(--ink);
  font: 600 0.9rem var(--sans);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.coral {
  background: var(--coral);
  color: #1b0f0c;
  border-color: transparent;
}

.btn.ghost {
  background: var(--sky-2);
}

.locale {
  position: relative;
}

.locale-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  list-style: none;
  margin: 0;
  padding: 8px;
  min-width: 12rem;
  background: var(--deep);
  border-radius: 16px;
  z-index: 50;
}

.locale-menu a {
  width: 100%;
  justify-content: flex-start;
}

.drawer {
  display: none;
  padding: 8px 16px 20px;
}

.drawer.is-open {
  display: block;
}

.drawer ul,
.desk ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer a,
.desk a {
  color: var(--cream);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.search-panel {
  display: none;
}
.search-panel.is-open {
  display: block;
  position: sticky;
  top: 64px;
  z-index: 30;
  background: var(--deep);
  padding: 12px 16px 20px;
}

.search-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

#q {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--cyan);
  background: var(--sky);
  color: var(--ink);
  padding: 12px 16px;
  font: 1rem var(--sans);
}

.hits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hits a {
  justify-content: flex-start;
  border-radius: 18px;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.hero-copy,
.cta,
.dates {
  position: relative;
  z-index: 2;
}

.atmosphere {
  position: relative;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  height: 96px;
  margin: 8px 0 20px;
  border-radius: 48px 16px 56px 20px;
}

.atmosphere svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trail {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.shot {
  border-radius: 28px 48px 22px 40px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: rotate(-1.2deg);
}

.shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-copy h1,
.folio h1 {
  font-size: clamp(2rem, 8vw, 4.2rem);
  line-height: 1.08;
  margin: 0 0 12px;
  max-width: 18ch;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.kicker,
.caveat,
.cap,
.aside,
.crumbs {
  font-family: var(--sans);
  color: var(--muted);
}

.dates {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.dates div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-left: 3px solid var(--coral);
  background: var(--sky-2);
  border-radius: 0 20px 20px 0;
}

.dates dt {
  min-width: 0;
  flex: 1 1 auto;
}

.dates dd {
  margin: 0;
  flex: 0 0 auto;
}

.dates time {
  white-space: nowrap;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.meander {
  margin: 36px 0;
}

.meander h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.leaves {
  display: grid;
  gap: 14px;
}

.leaf {
  display: block;
  text-decoration: none;
  color: var(--cream);
  padding: 22px 22px 22px 28px;
  min-height: 72px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sky-2) 90%, var(--cyan)), var(--sky));
  border-radius: 40px 16px 48px 20px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cyan) 30%, transparent);
}

.leaf-1 {
  margin-left: 8%;
  border-radius: 16px 48px 18px 36px;
}

.leaf-2 {
  margin-right: 6%;
  background: linear-gradient(200deg, color-mix(in srgb, var(--coral) 35%, var(--sky-2)), var(--sky));
}

.leaf h3 {
  margin: 0;
  font-size: 1.35rem;
  word-break: keep-all;
}

.folio .river {
  margin: 28px 0 36px;
  padding-left: 18px;
  border-left: 2px solid color-mix(in srgb, var(--coral) 70%, transparent);
}

.folio h2 {
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  margin: 0 0 10px;
  word-break: keep-all;
}

.aside {
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--coral) 18%, transparent);
}

.sources h2 {
  font-size: 1.2rem;
}

.colophon {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px dashed color-mix(in srgb, var(--cyan) 40%, transparent);
  font-family: var(--sans);
}

.colophon a {
  margin-right: 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--deep) 92%, transparent);
  backdrop-filter: blur(12px);
}

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

.locale-menu,
.drawer,
.search-panel,
.leaf,
.tool-btn,
.btn {
  transition-property: opacity, transform, filter;
  transition-duration: var(--ms);
  transition-timing-function: var(--ease);
}

@media (max-width: 767px) {
  #search-open,
  #theme-btn,
  #bookmark-btn {
    position: absolute;
    left: -9999px;
  }

  main {
    padding-bottom: calc(var(--dock) + 24px);
  }

  .colophon {
    padding-bottom: 8px;
  }
}

@media (min-width: 768px) {
  #menu-btn,
  .dock {
    display: none;
  }

  body {
    padding-bottom: 32px;
  }

  .desk {
    display: block;
    flex: 1;
    overflow: auto;
  }

  .desk ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 10px;
  }

  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .leaves {
    grid-template-columns: 1fr;
  }

  .leaf-1 {
    width: 86%;
  }
}

@media (min-width: 1280px) {
  .hero {
    min-height: 28rem;
  }

  .trail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 40px;
    align-items: start;
  }

  .meander:nth-child(odd) {
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
