@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  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: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  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;
}

:root {
  color-scheme: light;
  --bg: #E6E5E3;
  --surface: #F7F7F5;
  --elevated: #FFFFFF;
  --elevated-hover: #EFEFED;
  --border: #C7CBD0;
  --divider: #D6D9DC;
  --ink: #20242B;
  --secondary: #5F666F;
  --tertiary: #6C747D;
  --faint: #9A9DA3;
  --ruby: #A81E43;
  --ruby-hover: #8C1836;
  --ruby-on: #FDF3F0;
  --ruby-soft: #F3DCE3;
  --ruby-ink: #8C1836;
  --chip: #EEF2F5;
  --chip-border: #DCE3E8;
  --chip-ink: #4E5A64;
  --chip-hover: #E2E9EE;
  --shadow-ruby-btn: rgb(168 30 67 / 26%);
  --header-bg: #F3F2F0;
  --header-glow: rgb(32 36 43 / 12%);
  --ruby-band: #96203F;
  --ruby-band-on: #FFF5F2;
  --page-padding: clamp(1.25rem, 4vw, 3rem);
  --header-height: 5.5rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15171B;
  --surface: #1D2024;
  --elevated: #25292E;
  --elevated-hover: #2B3036;
  --border: #353A42;
  --divider: #2E3339;
  --ink: #E7E9EB;
  --secondary: #B7BDC5;
  --tertiary: #939AA4;
  --faint: #6E747B;
  --ruby: #E45C78;
  --ruby-hover: #F06B86;
  --ruby-on: #15171B;
  --ruby-soft: #3A1D28;
  --ruby-ink: #F2A9B8;
  --chip: #23272C;
  --chip-border: #353A42;
  --chip-ink: #C7CCD1;
  --chip-hover: #2B3036;
  --shadow-ruby-btn: rgb(228 92 120 / 34%);
  --header-bg: #1A1C21;
  --header-glow: rgb(0 0 0 / 42%);
  --ruby-band: #6B2A3E;
  --ruby-band-on: #F9E9EE;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #15171B;
    --surface: #1D2024;
    --elevated: #25292E;
    --elevated-hover: #2B3036;
    --border: #353A42;
    --divider: #2E3339;
    --ink: #E7E9EB;
    --secondary: #B7BDC5;
    --tertiary: #939AA4;
    --faint: #6E747B;
    --ruby: #E45C78;
    --ruby-hover: #F06B86;
    --ruby-on: #15171B;
    --ruby-soft: #3A1D28;
    --ruby-ink: #F2A9B8;
    --chip: #23272C;
    --chip-border: #353A42;
    --chip-ink: #C7CCD1;
    --chip-hover: #2B3036;
    --shadow-ruby-btn: rgb(228 92 120 / 34%);
    --header-bg: #1A1C21;
    --header-glow: rgb(0 0 0 / 42%);
    --ruby-band: #6B2A3E;
    --ruby-band-on: #F9E9EE;
  }
}

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

html {
  min-width: 0;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  text-size-adjust: 100%;
}

html.home-page {
  scroll-padding-top: 0;
  scroll-snap-type: y proximity;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.15vw, 1.0625rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 200ms ease, color 200ms ease;
}

::selection {
  background: var(--ruby-soft);
  color: var(--ruby-ink);
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.shell {
  width: min(100%, 1344px);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  min-height: 44px;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  min-height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: border-color 260ms ease;
}

.site-header::before,
.site-header::after {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  content: "";
  transition: opacity 320ms ease;
}

.site-header::before {
  top: 0;
  height: 100%;
  background: var(--header-bg);
  box-shadow: 0 0.4rem 1.25rem var(--header-glow);
}

.site-header::after {
  top: calc(100% - 1px);
  height: 3.5rem;
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--header-bg) 72%, transparent) 0%,
      color-mix(in srgb, var(--header-bg) 26%, transparent) 38%,
      transparent 82%
    ),
    linear-gradient(to bottom, var(--header-glow), transparent 72%);
}

.site-header.is-revealed,
.not-found-page .site-header,
.legal-page .site-header {
  border-bottom-color: var(--divider);
}

.site-header.is-revealed::before,
.site-header.is-revealed::after,
.not-found-page .site-header::before,
.not-found-page .site-header::after,
.legal-page .site-header::before,
.legal-page .site-header::after {
  opacity: 1;
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-inner {
  z-index: 1;
  min-height: var(--header-height);
  position: relative;
}

.brand {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 48px;
  gap: 0.65rem;
  text-decoration: none;
  transform-origin: center;
}

/* Brand opacity on home page is driven entirely by JS scroll logic via inline styles. */
:root.has-js body[data-page="home"] .brand {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.brand-mark,
.cover-mark,
.brand-flight-mark,
.footer-mark,
.not-found-symbol {
  display: block;
  flex: none;
  background: var(--ruby);
  -webkit-mask: url("/assets/rubingua-mark.png") center / contain no-repeat;
  mask: url("/assets/rubingua-mark.png") center / contain no-repeat;
  transition: background-color 160ms ease;
}

.brand-flight-mark {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.brand-mark {
  width: 21px;
  height: 35px;
}

.brand-name,
.cover-name {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: none;
}

.brand-name {
  font-size: 1.65rem;
}

body[data-page="home"] .header-inner {
  justify-content: center;
}

body[data-page="home"] .brand-name {
  display: none;
}

.preferences {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

body[data-page="home"] .preferences {
  position: absolute;
  right: var(--page-padding);
}

:root.has-js body[data-page="home"] .site-header:not(.is-revealed) .preferences {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.45rem);
}

body[data-page="home"] .preferences {
  transition: opacity 240ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1), visibility 240ms ease;
}

.control-popover {
  position: relative;
}

.control-trigger {
  display: none;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--elevated) 55%, transparent);
}

.segmented-control button {
  position: relative;
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.segmented-control button:hover {
  background: var(--chip-hover);
  color: var(--ink);
}

.segmented-control button[aria-pressed="true"] {
  background: var(--ruby);
  color: var(--ruby-on);
}

.segmented-control button:active {
  transform: translateY(1px);
}

.theme-control button {
  min-width: 2.75rem;
  padding-inline: 0.5rem;
}

.language-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

.language-icon::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 50%;
  width: 7px;
  border-right: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
  transform: translateX(-50%);
}

.language-icon::after {
  position: absolute;
  top: 50%;
  right: 1px;
  left: 1px;
  border-top: 1.5px solid currentColor;
  content: "";
  transform: translateY(-50%);
}

.theme-trigger .theme-icon {
  display: none;
}

:root[data-theme="system"] .theme-trigger .theme-icon-system,
:root[data-theme="light"] .theme-trigger .theme-icon-light,
:root[data-theme="dark"] .theme-trigger .theme-icon-dark {
  display: block;
}

.theme-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.theme-icon-system {
  width: 17px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 2.5px;
}

.theme-icon-system::before {
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 8px;
  height: 5px;
  border-bottom: 1.8px solid currentColor;
  transform: translateX(-50%);
  content: "";
}

.theme-icon-light {
  width: 18px;
  height: 18px;
}

.theme-icon-light::before {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 8px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  content: "";
}

.theme-icon-light::after {
  position: absolute;
  top: 1px;
  left: 8px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 14px currentColor, 7px 7px currentColor, -7px 7px currentColor, 5px 2px currentColor, -5px 2px currentColor, 5px 12px currentColor, -5px 12px currentColor;
  content: "";
}

.theme-icon-dark {
  width: 12px;
  height: 17px;
  border-radius: 50%;
  box-shadow: -5px 0 0 0 currentColor;
  transform: translateX(3px);
}

.hero {
  min-height: 100svh;
  padding-top: 0;
  padding-bottom: 0;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.cover-frame {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding-block: clamp(5.5rem, 10vh, 7rem);
  text-align: center;
}

.eyebrow {
  width: 100%;
  margin: 0 auto;
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.cover-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 0;
  transform-origin: center;
}

.cover-mark {
  width: clamp(4.25rem, 6vw, 5.5rem);
  height: clamp(6.9rem, 9.7vw, 8.9rem);
}

.cover-name {
  margin-top: clamp(1.6rem, 3.5vh, 2.5rem);
  color: var(--ink);
  font-size: clamp(4.25rem, 7vw, 6.25rem);
}

.cover-status {
  margin: 1.15rem 0 0;
  padding-block: clamp(0.95rem, 1.7vh, 1.25rem);
  color: var(--ruby);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  font-style: italic;
  font-weight: 430;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 0 14px color-mix(in srgb, var(--ruby) 24%, transparent);
}

.cover-bottom {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: clamp(2.15rem, 4vh, 3.2rem);
}

h1,
h2 {
  font-family: "Newsreader", Georgia, serif;
}

h1 {
  max-width: 15ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 3.7vw, 3.35rem);
  font-weight: 520;
  letter-spacing: -0.025em;
  line-height: 1.03;
  text-wrap: balance;
}

.headline-accent {
  color: inherit;
  font-style: italic;
  font-weight: 480;
}

.cover-action {
  margin-top: clamp(1.65rem, 3vh, 2.25rem);
}

.cover-action .primary-link {
  min-height: 48px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
}

.primary-link {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1.65rem;
  border-radius: 13px;
  background: var(--ruby);
  box-shadow: 0 8px 22px var(--shadow-ruby-btn);
  color: var(--ruby-on);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 180ms ease, transform 120ms ease, box-shadow 180ms ease;
}

.primary-link:hover {
  background: var(--ruby-hover);
  color: var(--ruby-on);
  transform: translateY(-1px);
}

.mail-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.mail-icon::before {
  position: absolute;
  top: -1px;
  left: 2px;
  width: 10px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) skew(-7deg, -7deg);
  transform-origin: center;
}

.scroll-cue {
  position: absolute;
  bottom: clamp(1.25rem, 3vh, 2rem);
  left: 50%;
  width: 4.75rem;
  height: 2.5rem;
  opacity: 0.55;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 500ms ease;
}

:root.scroll-prompt-ready .scroll-cue {
  opacity: 1;
  animation: scroll-cue-attention 2.5s cubic-bezier(0.45, 0, 0.2, 1) 2 both;
}

.scroll-cue span {
  position: absolute;
  inset: 0;
}

.scroll-cue span::before,
.scroll-cue span::after {
  position: absolute;
  bottom: 0.65rem;
  width: 2.375rem;
  height: 3px;
  border-radius: 999px;
  background: var(--tertiary);
  content: "";
}

.scroll-cue span::before {
  right: 50%;
  transform: rotate(24deg);
  transform-origin: right center;
}

.scroll-cue span::after {
  left: 50%;
  transform: rotate(-24deg);
  transform-origin: left center;
}

@keyframes scroll-cue-attention {
  0% {
    filter: drop-shadow(0 0 0 transparent);
    transform: translate(-50%, 0);
  }

  34% {
    filter: drop-shadow(0 0 9px var(--ruby)) drop-shadow(0 0 16px var(--ruby));
    transform: translate(-50%, 0.95rem) scale(1.08);
  }

  62% {
    filter: drop-shadow(0 0 5px var(--ruby));
    transform: translate(-50%, -0.12rem) scale(1);
  }

  100% {
    filter: drop-shadow(0 0 7px var(--ruby));
    transform: translate(-50%, 0.42rem) scale(1.03);
  }
}

.below-fold {
  border-top: 1px solid var(--divider);
  background: var(--bg);
}

.reading-section {
  display: grid;
  min-height: 100svh;
  align-content: center;
  padding-block: calc(var(--header-height) + clamp(3rem, 6vw, 5rem)) clamp(3.5rem, 7vw, 5.5rem);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.section-intro {
  width: min(100%, 820px);
  margin: 0 auto clamp(2.75rem, 5vw, 4rem);
  text-align: center;
}

.section-intro-copy {
  margin: 1.6rem 0 0;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  font-weight: 430;
  letter-spacing: -0.02em;
  line-height: 1.32;
  text-wrap: balance;
}

.description-emphasis {
  color: inherit;
  font-style: italic;
  font-weight: 680;
}

.reading-moment {
  width: min(100%, 680px);
  margin: 0 auto;
  text-align: left;
}

.reading-card {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgb(40 44 50 / 6%);
}

:root[data-theme="dark"] .reading-card {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%), 0 4px 16px rgb(0 0 0 / 45%);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .reading-card {
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%), 0 4px 16px rgb(0 0 0 / 45%);
  }
}

.reading-card::before {
  position: absolute;
  top: 0;
  left: clamp(1.5rem, 4vw, 2.4rem);
  width: clamp(4rem, 18%, 6.5rem);
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: var(--ruby);
  content: "";
}

.reading-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.reading-card-top h2 {
  margin: 0;
  color: var(--secondary);
  font-size: 1.05rem;
  font-weight: 520;
  letter-spacing: -0.015em;
}

.reading-language {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 30px;
  padding-inline: 0.75rem;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.reading-line {
  margin: 0;
  color: var(--ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 460;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.reading-highlight {
  position: relative;
  color: var(--ruby);
  white-space: nowrap;
}

.reading-highlight::after {
  position: absolute;
  right: 0;
  bottom: 0.08em;
  left: 0;
  height: 0.08em;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 850ms cubic-bezier(0.22, 1, 0.36, 1) 320ms;
}

:root.reveal-ready .reading-highlight::after {
  transform: scaleX(0);
}

.reading-entry {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--divider);
}

.reading-word,
.reading-pronunciation,
.reading-translations {
  margin: 0;
}

.reading-word {
  color: var(--ruby);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1;
}

.reading-pronunciation {
  margin-top: 0.55rem;
  color: var(--secondary);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.reading-translations {
  padding-bottom: 0.15rem;
  color: var(--secondary);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.reading-moment figcaption {
  max-width: 56ch;
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  padding-top: clamp(1.25rem, 2.5vw, 1.6rem);
  border-top: 1px solid var(--divider);
  color: var(--secondary);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.6;
  text-wrap: pretty;
}

:root.reveal-ready .reading-moment .reading-entry,
:root.reveal-ready .reading-moment figcaption {
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 650ms ease, transform 750ms cubic-bezier(0.22, 1, 0.36, 1);
}

:root.reveal-ready .reading-moment figcaption {
  transition-delay: 180ms;
}

:root.reveal-ready .reading-moment.is-visible .reading-highlight::after {
  transform: scaleX(1);
}

:root.reveal-ready .reading-moment.is-visible .reading-entry,
:root.reveal-ready .reading-moment.is-visible figcaption {
  opacity: 1;
  transform: none;
}

.values {
  display: grid;
  min-height: 72svh;
  align-content: center;
  padding-block: calc(var(--header-height) + clamp(2.5rem, 5vw, 4rem)) clamp(3.5rem, 6vw, 5rem);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.value-list {
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.value-band {
  width: 100%;
  background: var(--ruby-band);
  color: var(--ruby-band-on);
}

.value-item {
  display: grid;
  min-width: 0;
  justify-items: center;
  padding: clamp(1.25rem, 2.5vw, 1.8rem) clamp(1.25rem, 4vw, 3rem);
  text-align: center;
}

.value-item + .value-item {
  border-left: 1px solid color-mix(in srgb, var(--ruby-band-on) 26%, transparent);
}

.value-number {
  margin-bottom: 0.75rem;
  color: var(--ruby-band-on);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.value-item h2 {
  max-width: 12ch;
  margin: 0;
  color: var(--ruby-band-on);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

.values-story {
  width: min(100%, 960px);
  margin: clamp(2.5rem, 4vw, 3.5rem) auto 0;
  color: var(--secondary);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.3;
  text-align: center;
  text-wrap: pretty;
}

.values-story strong {
  color: var(--ink);
  font-weight: 650;
}

:root.reveal-ready .reveal-item {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 700ms ease, transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
}

:root.reveal-ready .reveal-item.is-visible {
  opacity: 1;
  transform: none;
}

:root.reveal-ready .value-item:nth-child(2).is-visible {
  transition-delay: 90ms;
}

:root.reveal-ready .value-item:nth-child(3).is-visible {
  transition-delay: 180ms;
}

.contact {
  display: grid;
  min-height: 68svh;
  grid-template-rows: 1fr auto;
  border-top: 1px solid var(--divider);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding-block: clamp(4.5rem, 8vw, 6.5rem) clamp(3.5rem, 6vw, 5rem);
  text-align: center;
}

.contact h2 {
  max-width: 16ch;
  margin: 0 auto;
  font-size: clamp(2.4rem, 4.4vw, 3.7rem);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: balance;
}

.contact p {
  margin: 1.35rem 0 0;
  color: var(--secondary);
  font-size: 1rem;
}

.contact-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 2.35rem;
  color: var(--ruby);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease;
  overflow-wrap: anywhere;
}

.contact-link:hover {
  color: var(--ruby-hover);
}

.site-footer {
  padding-block: 1.35rem;
  border-top: 1px solid var(--divider);
  background: var(--bg);
  color: var(--secondary);
  font-size: 0.875rem;
}

.footer-inner {
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand,
.footer-meta {
  display: flex;
  align-items: center;
}

.footer-brand {
  gap: 0.55rem;
  color: var(--ink);
}

.footer-mark {
  width: 14px;
  height: 23px;
}

.footer-wordmark {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  text-transform: none;
}

.footer-meta {
  gap: 0.75rem;
}

.footer-meta p {
  margin: 0;
}

.footer-meta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: inherit;
  text-underline-offset: 0.2em;
  transition: color 160ms ease;
}

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

.footer-meta > * + * {
  padding-left: 0.75rem;
  border-left: 1px solid var(--divider);
}

.legal-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.legal-main {
  width: min(100%, 60rem);
  flex: 1;
  padding-top: calc(var(--header-height) + clamp(2rem, 4vw, 3.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.legal-copy[hidden] {
  display: none;
}

.legal-heading {
  padding-bottom: 0;
}

.legal-updated {
  margin: 0;
  color: var(--secondary);
  font-size: 0.8125rem;
  font-weight: 500;
}

.legal-heading h1 {
  margin: 0;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.legal-updated {
  margin-top: 0.65rem;
}

.legal-intro {
  max-width: 72ch;
  margin: 1.5rem 0 0;
  color: var(--secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-copy > section {
  padding-top: 1.75rem;
}

.legal-copy h2,
.legal-copy h3 {
  color: var(--ink);
}

.legal-copy h2 {
  margin: 0 0 0.9rem;
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.legal-copy h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.legal-copy p {
  max-width: 72ch;
  margin: 0;
  color: var(--secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-copy p + p {
  margin-top: 1rem;
}

.legal-copy a {
  color: var(--ruby);
  font-weight: 600;
  overflow-wrap: anywhere;
  text-underline-offset: 0.2em;
}

.legal-copy a:hover {
  color: var(--ruby-hover);
}

.legal-copy code {
  padding: 0.12em 0.35em;
  border: 1px solid var(--chip-border);
  border-radius: 0.35rem;
  background: var(--chip);
  color: var(--chip-ink);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.legal-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--ruby);
  font-weight: 700;
  text-decoration: none;
}

.legal-back:hover {
  color: var(--ruby-hover);
}

.not-found-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.not-found-main {
  display: grid;
  min-height: calc(100svh - var(--header-height));
  flex: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4rem;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: clamp(4rem, 10vw, 8rem);
}

.error-code {
  margin: 0 0 1.5rem;
  color: var(--ruby);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.not-found-copy h1 {
  max-width: 11ch;
  font-size: clamp(2.75rem, 7vw, 5rem);
}

.not-found-copy > p:not(.error-code) {
  margin: 1.25rem 0 0;
  color: var(--secondary);
}

.not-found-copy .primary-link {
  margin-top: 2rem;
}

.not-found-mark {
  width: clamp(8rem, 18vw, 13rem);
}

.not-found-symbol {
  width: 100%;
  aspect-ratio: 327 / 529;
}

@media (max-width: 760px) {
  :root {
    --page-padding: 1.25rem;
    --header-height: 4.75rem;
  }

  .header-inner {
    min-height: var(--header-height);
  }

  body[data-page="home"] .brand {
    position: absolute;
    left: calc(50% - 10.5px);
  }

  body[data-page="home"] .preferences {
    position: static;
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 2.25rem;
    margin: 0;
  }

  .not-found-page .header-inner {
    justify-content: center;
  }

  .legal-page .header-inner {
    justify-content: center;
  }

  .not-found-page .brand,
  .legal-page .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .not-found-page .brand-name,
  .legal-page .brand-name {
    display: none;
  }

  .not-found-page .preferences,
  .legal-page .preferences {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 2.25rem;
    margin: 0;
  }

  .control-popover {
    display: flex;
  }

  .control-trigger {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--elevated) 55%, transparent);
    color: var(--secondary);
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .control-trigger:hover {
    background: var(--chip-hover);
    color: var(--ink);
  }

  .control-trigger[aria-expanded="true"] {
    background: var(--ruby);
    color: var(--ruby-on);
    transform: translateY(1px);
  }

  .control-popover .segmented-control {
    position: absolute;
    top: calc(100% + 0.65rem);
    z-index: 5;
    width: max-content;
    visibility: hidden;
    border-radius: 13px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgb(0 0 0 / 18%);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.45rem) scale(0.98);
    transform-origin: top;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), visibility 180ms ease;
  }

  .locale-popover .segmented-control {
    left: 0;
    transform-origin: top left;
  }

  .theme-popover .segmented-control {
    right: 0;
    transform-origin: top right;
  }

  .control-popover.is-open .segmented-control {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .segmented-control button {
    min-width: 2.75rem;
    padding-inline: 0.4rem;
  }

  .theme-control button {
    min-width: 2.75rem;
  }

  .cover-frame {
    min-height: 100svh;
    padding-block: 5.25rem;
  }

  .eyebrow {
    max-width: 34ch;
    margin-inline: auto;
    font-size: 0.72rem;
    text-align: center;
  }

  .cover-lockup {
    margin-top: 0;
  }

  .cover-mark {
    width: clamp(3.8rem, 17vw, 4.8rem);
    height: clamp(6.15rem, 27.5vw, 7.75rem);
  }

  .cover-name {
    margin-top: 1.75rem;
    font-size: clamp(3.55rem, 15vw, 4.55rem);
  }

  .cover-status {
    margin-top: 0.9rem;
    font-size: clamp(1.6rem, 7vw, 2.1rem);
  }

  .cover-bottom {
    margin-top: 2.15rem;
  }

  h1 {
    max-width: 13ch;
    font-size: clamp(2.1rem, 9vw, 2.75rem);
  }

  .cover-action {
    width: min(100%, 17.5rem);
    margin-top: 1.8rem;
  }

  .primary-link {
    width: 100%;
    min-height: 56px;
    font-size: 1rem;
  }

  .cover-action .primary-link {
    min-height: 50px;
    font-size: 0.92rem;
  }

  .reading-section {
    padding-block: calc(var(--header-height) + 2.5rem) 3.25rem;
  }

  .section-intro {
    margin-bottom: 2.5rem;
  }

  .section-intro-copy {
    margin-top: 1.35rem;
    font-size: clamp(1.3rem, 5.8vw, 1.65rem);
    line-height: 1.4;
  }

  .reading-line {
    font-size: clamp(1.85rem, 8.5vw, 2.45rem);
    line-height: 1.12;
  }

  .reading-card {
    padding: 1.4rem;
    border-radius: 20px;
  }

  .reading-card::before {
    left: 1.4rem;
  }

  .reading-card-top {
    align-items: flex-start;
    margin-bottom: 2rem;
  }

  .reading-card-top h2 {
    max-width: 12ch;
    font-size: 0.98rem;
  }

  .reading-language {
    min-height: 28px;
    padding-inline: 0.6rem;
    font-size: 0.64rem;
  }

  .reading-entry {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.8rem;
  }

  .reading-word {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }

  .reading-translations {
    padding-bottom: 0;
    font-size: 0.78rem;
  }

  .reading-moment figcaption {
    margin-top: 1.8rem;
    font-size: 0.94rem;
  }

  .values {
    min-height: 68svh;
    padding-block: calc(var(--header-height) + 2rem) 3.25rem;
  }

  .value-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-inline: 0.5rem;
  }

  .value-item {
    align-content: start;
    padding: 1.35rem 0.35rem 1.5rem;
  }

  .value-item + .value-item {
    border-top: 0;
    border-left: 1px solid color-mix(in srgb, var(--ruby-band-on) 26%, transparent);
  }

  .value-number {
    margin-bottom: 0.7rem;
    font-size: 0.65rem;
  }

  .value-item h2 {
    max-width: 10ch;
    font-size: clamp(0.92rem, 4.1vw, 1.08rem);
    line-height: 1.12;
  }

  .values-story {
    margin-top: 2.5rem;
    padding-inline: var(--page-padding);
    font-size: clamp(1.1rem, 4.7vw, 1.3rem);
    line-height: 1.42;
  }

  .contact {
    min-height: 64svh;
  }

  .contact-inner {
    padding-block: 4.5rem 3.5rem;
  }

  .not-found-main {
    grid-template-columns: 1fr;
    padding-top: calc(var(--header-height) + 3rem);
  }

  .not-found-mark {
    display: none;
  }

  .footer-inner {
    align-items: center;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }

  .footer-meta {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
  }

  .footer-meta > * + * {
    padding-left: 0.6rem;
  }

  .legal-main {
    padding-top: calc(var(--header-height) + 3rem);
  }

}

@media (max-width: 390px) {
  :root {
    --page-padding: 1rem;
  }

  body[data-page="home"] .header-inner {
    padding-inline: 0.5rem;
  }

  body[data-page="home"] .preferences {
    gap: 2rem;
  }

  .not-found-page .header-inner {
    padding-inline: 0.5rem;
  }

  .legal-page .header-inner {
    padding-inline: 0.5rem;
  }

  .not-found-page .preferences,
  .legal-page .preferences {
    gap: 2rem;
  }

  .segmented-control {
    padding: 2px;
  }

  .segmented-control button {
    min-width: 2.75rem;
    min-height: 44px;
    padding-inline: 0.3rem;
    font-size: 0.78rem;
  }

  .theme-control button {
    min-width: 2.75rem;
  }

  .cover-frame {
    padding-block: 5rem;
  }

  .cover-name {
    font-size: 3.35rem;
  }

  h1 {
    font-size: 2.1rem;
  }
}

@media (max-width: 760px) and (max-height: 700px) {
  .cover-frame {
    padding-block: 4.5rem;
  }

  .cover-mark {
    width: 3.3rem;
    height: 5.35rem;
  }

  .cover-name {
    margin-top: 1.1rem;
    font-size: 3.15rem;
  }

  .cover-status {
    padding-block: 0.8rem;
    font-size: 1.65rem;
  }

  .cover-bottom {
    margin-top: 1.4rem;
  }

  h1 {
    font-size: 1.95rem;
  }

  .cover-action {
    margin-top: 1.2rem;
  }

  .primary-link {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .scroll-cue {
    animation: none;
  }

  :root.reveal-ready .reveal-item {
    opacity: 1;
    transform: none;
  }
}
