:root {
  --letter-frame-color: #2c202e;
  --intro-name-font: var(--title);
}
:root[data-theme]:not([data-theme=terracota]) { --letter-frame-color: var(--night); }
:is(.hero-brand-name,.footer strong) { font-family: var(--title); }

.transition-options {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: .35rem .75rem;
  margin-block: 1.2rem;
}
.transition-options label { font-weight: 650; }
.transition-options output { color: var(--accent); font-variant-numeric: tabular-nums; }
.transition-options input {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 25px;
  width: 100%;
  accent-color: var(--accent);
}
#preview-transition > .transition-help { margin-top: 1rem; }
.transition-help { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.transition-options .transition-help { grid-column: 1 / -1; margin: 0 0 .65rem; }
.transition-speeds {
  margin-bottom: 1rem;
  padding: .65rem .8rem;
  background: var(--selection);
  border: 1px solid var(--rule);
  border-radius: .35rem;
}
.transition-speeds summary { cursor: pointer; font-weight: 700; }
.transition-speeds > .transition-help { margin-top: .55rem; }
.transition-speeds .transition-options { margin-block: .8rem .2rem; }
.transition-actions { display: flex; flex-wrap: wrap; gap: .55rem; }

.letter-intro {
  --cover-paper: #f6ede1;
  --cover-ink: #302436;
  --cover-accent: #973c31;
  --cover-ease: cubic-bezier(.24,.7,.16,1);
  display: grid;
  place-items: center;
  position: relative;
  min-height: 100svh;
  min-height: max(100svh,490px);
  overflow: clip;
  background: var(--cover-paper);
  color: var(--cover-ink);
}
.letter-track[data-mode=motion] {
  min-height: calc(var(--letter-stage-size,100svh) + clamp(460px,83svh,840px));
}
.letter-track[data-mode=motion] .letter-stage {
  position: sticky;
  top: 0;
  isolation: isolate;
}
.letter-track[data-mode=motion] .letter-intro {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 100svh;
  min-height: 0;
  display: grid;
  background: transparent;
  pointer-events: none;
}
.letter-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: var(--letter-paper,1);
  background: radial-gradient(ellipse at 45% 5%,#fbf4ea,transparent 66%),var(--cover-paper);
}
.letter-composition {
  z-index: 1;
  display: grid;
  justify-items: center;
  align-items: start;
  gap: clamp(.6rem,1.65vh,1.2rem);
  width: 100%;
  padding: 1rem clamp(1rem,5vw,4rem) 2.4rem;
  text-align: center;
  opacity: var(--letter-copy,1);
}
.letter-symbol {
  width: clamp(78px,8.8vw,138px);
  height: auto;
  transform: translateY(var(--letter-rise,0px));
}
#letter-title { width: 100%; max-width: none; color: var(--cover-ink); }
.letter-word {
  display: grid;
  place-items: center;
  height: clamp(6.2rem,23vw,18rem);
  font: 720 clamp(6.35rem,25vw,24rem)/.9 var(--intro-name-font);
  letter-spacing: -.085em;
  white-space: nowrap;
}
.letter-track[data-mode=motion] .letter-word span { opacity: 0; }
.letter-track:not([data-mode=motion]) .letter-intro[data-photo-ready] .letter-word span {
  background: var(--cover-image) 48% 24% / cover no-repeat;
  color: transparent;
  background-clip: text;
}
.letter-thought {
  display: grid;
  justify-items: center;
  margin: .1rem 0 0;
  color: #684b52;
  font: italic 560 clamp(1.15rem,2.25vw,1.78rem)/1.13 var(--intro-name-font);
  transform: translate( var(--letter-copy-x,0px), var(--letter-sink,0px));
}
.letter-composition form { margin: 0; transform: translateY(var(--letter-sink,0px)); pointer-events: auto; }
.letter-enter {
  position: relative;
  min-width: 108px;
  min-height: 48px;
  padding: .45rem 1.25rem;
  border: 0;
  background: transparent;
  color: var(--cover-accent);
  font: 660 .94rem/1 'DM Sans',sans-serif;
  letter-spacing: .018em;
  cursor: pointer;
  transition: letter-spacing 420ms var(--cover-ease);
}
.letter-enter::before,
.letter-enter::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: calc(50% - 31px);
  right: calc(50% - 31px);
  height: 1px;
  background: currentColor;
  transition: transform 410ms var(--cover-ease), opacity 250ms ease;
}
.letter-enter::before { transform: scaleX(.43); opacity: .55; }
.letter-enter::after { transform: scaleX(.1); opacity: 0; }
.letter-enter:is(:hover,:focus-visible) { letter-spacing: .09em; }
.letter-enter:is(:hover,:focus-visible)::before { transform: translateX(-9px) scaleX(.7); }
.letter-enter:is(:hover,:focus-visible)::after { transform: translate(12px,-4px) scaleX(.42); opacity: 1; }

.letter-photo {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.letter-photo { opacity: var(--letter-photo,1); }
[data-letter-cutout][hidden] { display: none; }
.letter-window-image {
  filter: sepia(var(--letter-warmth,0)) saturate(var(--letter-saturation,1)) brightness(var(--letter-exposure,1));
}
.letter-frame-gradient stop { stop-color: white; }
.letter-cloth-base { fill: var(--letter-frame-color); }
.letter-cloth-texture { mix-blend-mode: soft-light; }
[data-letter-curtain] { isolation: isolate; }
#letter-cloth-folds stop { stop-color: color-mix(in srgb, var(--letter-frame-color) 95%, var(--paper)); }
#letter-cloth-folds .cloth-shadow { stop-color: var(--letter-frame-color); }
#letter-cloth-folds .cloth-light { stop-color: color-mix(in srgb, var(--letter-frame-color) 88%, var(--paper)); }
#letter-glow stop:last-child { stop-color: color-mix(in srgb, #f9dda9 65%, var(--paper)); }
.letter-cloth-rest { fill: url(#letter-shade-side); }
.letter-track:not([data-mode=motion]) :is(.letter-photo,.letter-opening-rule,.letter-scroll-hint) { display: none; }
.letter-opening-rule {
  position: absolute;
  inset: clamp(1.55rem,5vh,3.25rem) clamp(1.25rem,6vw,6rem) auto;
  height: 1px;
  background: #9d6b60;
  opacity: var(--letter-opening-rule,.36);
  pointer-events: none;
}
.letter-scroll-hint {
  position: absolute;
  z-index: 3;
  bottom: max(1.1rem,env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: .45rem;
  margin: 0;
  color: #704c50;
  font: 600 .72rem/1.26 'DM Sans',sans-serif;
  white-space: nowrap;
  opacity: var(--letter-hint,1);
}
.letter-scroll-hint i {
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  rotate: 45deg;
  animation: letter-arrow 1650ms ease-in-out infinite;
}
@keyframes letter-arrow {
  0%,100% { translate: 0 -2px; opacity: .55; }
  55% { translate: 0 3px; opacity: 1; }
}
.letter-intro[data-opening] .letter-photo { animation: letter-art-in 940ms var(--cover-ease) both; }
.letter-intro[data-opening] .letter-opening-rule { animation: letter-rule-in 980ms var(--cover-ease) both; }
.letter-intro[data-opening] .letter-symbol { animation: letter-accent-in 620ms var(--cover-ease) both; }
.letter-intro[data-opening] .letter-thought span { animation: letter-accent-in 650ms 190ms var(--cover-ease) both; }
.letter-intro[data-opening] .letter-thought span + span { animation-delay: 255ms; }
.letter-intro[data-opening] form { animation: letter-accent-in 560ms 335ms var(--cover-ease) both; }
.letter-intro[data-opening] .letter-scroll-hint { animation: letter-accent-in 520ms 460ms var(--cover-ease) both; }
@keyframes letter-art-in { from { opacity: 0; transform: translateY(9px) scale(.976); } }
@keyframes letter-rule-in { from { opacity: 0; transform: scaleX(.04); } }
@keyframes letter-accent-in { from { opacity: 0; transform: translateY(13px); } }

html.letter-journey .site-header { opacity: var(--letter-navigation,0); }
html.letter-journey .site-header[inert] { pointer-events: none; }
html.letter-journey:not([data-letter-site]) #page-rail { visibility: hidden; }
.letter-track[data-mode=motion] .hero.hero-editorial { isolation: auto; }
.letter-track[data-mode=motion] .hero-editorial .hero-copy {
  z-index: 3;
}
.letter-track[data-mode=motion] :is(.hero-editorial .hero-line>*,.hero-editorial .hero-lead,.hero-editorial .actions) {
  animation: none;
}
.letter-track[data-mode=motion] .hero-editorial :is(.hero-brand,.eyebrow) {
  opacity: var(--letter-brand,0);
  translate: var(--letter-brand-x,20px) var(--letter-brand-y,0px);
}
.letter-track[data-mode=motion] .hero-editorial .hero-line>* {
  opacity: var(--letter-hero,0);
  translate: var(--letter-hero-x,30px) var(--letter-hero-y,11px);
}
.letter-track[data-mode=motion] .hero-editorial .hero-line:nth-child(2)>* {
  opacity: var(--letter-italic,0);
  translate: var(--letter-italic-x,39px) var(--letter-italic-y,0px);
}
.letter-track[data-mode=motion] .hero-editorial :is(.hero-lead,.actions) {
  opacity: var(--letter-details,0);
  translate: 0 var(--letter-details-y,15px);
}
.letter-track[data-mode=motion] .hero-editorial[inert] .hero-copy { pointer-events: none; }

@media (max-width: 560px) {
  .letter-track[data-mode=motion] { min-height: calc(var(--letter-stage-size,100svh) + clamp(410px,73svh,690px)); }
  .letter-word { font-size: clamp(6.05rem,27vw,11rem); }
  .letter-composition { padding-bottom: 3.1rem; }
}
@media (max-width: 800px) {
  .letter-cloth-rest { fill: url(#letter-shade-bottom); }
}
@media (max-height: 600px) {
  .letter-word { height: clamp(5.35rem,24vh,9rem); }
  .letter-symbol { width: 68px; }
  .letter-composition { gap: .45rem; }
  .letter-scroll-hint { bottom: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .letter-intro *, .letter-intro *::before, .letter-intro *::after { animation: none !important; transition: none !important; }
}
.site-header { margin-block-end: calc(-1 * var(--header-height)); }
.hero.hero-editorial {
  --edition-top: calc(var(--header-height) + 1.15rem);
  --edition-side: clamp(1.1rem,4.15vw,4.75rem);
  --edition-bottom: clamp(1.15rem,3vh,2rem);
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0,1fr);
  align-items: center;
  padding-block-start: var(--header-height);
  background: var(--letter-frame-color);
  color: #fff7eb;
}
.hero-editorial .hero-photo { position: absolute; inset: var(--edition-top) var(--edition-side) var(--edition-bottom); z-index: 0; min-height: 0; }
.hero-editorial .hero-photo img {
  object-position: var(--portrait-position,46% 19%);
  transform: none;
  filter: none;
}
@media (min-width: 801px) {
  .hero-editorial .hero-photo img { object-position: var(--portrait-position,58% 19%); }
}
.hero-editorial .hero-photo-scroll { opacity: 1; clip-path: none; transform: none; }
.hero-editorial::after {
  content: '';
  position: absolute;
  inset: var(--edition-top) var(--edition-side) var(--edition-bottom);
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg,
    color-mix(in srgb,var(--letter-frame-color) 96%,transparent) 0%,
    color-mix(in srgb,var(--letter-frame-color) 92%,transparent) 26%,
    color-mix(in srgb,var(--letter-frame-color) 74%,transparent) 39%,
    color-mix(in srgb,var(--letter-frame-color) 39%,transparent) 51%,
    transparent 64%);
  box-shadow: inset 0 0 0 1px #f7e1ca42;
}
.hero-editorial .hero-copy {
  position: relative;
  z-index: 2;
  width: min(100%,680px);
  padding: clamp(2rem,5.2vh,4.75rem) calc(var(--edition-side) + clamp(1.3rem,3vw,3.5rem));
  transform: none;
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: clamp(1.05rem,3.5vh,2.95rem);
}
.hero-brand-symbol { width: clamp(88px,8vw,123px); flex: none; }
.hero-brand p { font-weight: 700; font-size: 1rem; line-height: 1.24; }
.hero-brand p span { display: block; margin-top: .15rem; color: #edcabf; font-size: .86rem; font-weight: 500; }
.hero-editorial .eyebrow { color: #efbda9; }
.hero-editorial h1 {
  margin-block: .48rem .7rem;
  color: #fff6e6;
  font-family: var(--intro-name-font);
  font-size: clamp(4.25rem,8.6vw,9.2rem);
  font-weight: 600;
  line-height: .85;
  letter-spacing: -.079em;
}
.hero-editorial h1 em { color: #f6beb0; font-family: inherit; font-weight: 540; }
.hero-editorial h1:focus { outline: none; }
.hero-editorial .hero-lead { max-width: 36ch; color: #fff3e8; font-size: clamp(1rem,1.35vw,1.18rem); }
.hero-editorial .actions .button {
  background: #fff4e4;
  color: #532c31;
  border: 1px solid transparent;
}
.hero-editorial .actions .button:hover { background: #f8cbbb; }

@media (max-width: 800px) {
  .hero.hero-editorial { --edition-top: calc(var(--header-height) + .65rem); --edition-side: .75rem; --edition-bottom: .75rem; min-height: max(100svh,42rem); align-items: end; }
  .hero-editorial::after {
    background: linear-gradient(0deg,
      var(--letter-frame-color) 5%,
      color-mix(in srgb,var(--letter-frame-color) 95%,transparent) 31%,
      color-mix(in srgb,var(--letter-frame-color) 73%,transparent) 49%,
      color-mix(in srgb,var(--letter-frame-color) 14.5%,transparent) 75%,
      transparent 86%);
  }
  .hero-editorial .hero-copy { width: 100%; padding: min(36svh,19rem) clamp(1.5rem,5.5vw,3rem) clamp(1.8rem,5vh,3.8rem); }
  .hero-editorial h1 { font-size: clamp(3.7rem,15.3vw,6.8rem); }
  .hero-brand { margin-bottom: .9rem; gap: .55rem; }
  .hero-brand-symbol { width: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  .letter-intro *, .letter-intro *::before, .letter-intro *::after { animation: none !important; transition: none !important; }
}
