:root {
  color-scheme: light dark;
  --paper: #f6eddf;
  --paper-raised: #fff9ee;
  --paper-deep: #eadbc9;
  --ink: #32182f;
  --ink-secondary: #675564;
  --plum: #35182f;
  --plum-soft: #512548;
  --coral: #ff6849;
  --coral-readable: #b84230;
  --butter: #f6c96b;
  --lilac: #bea8dd;
  --mint: #a9d5be;
  --sky: #91c7d9;
  --line: rgba(50, 24, 47, 0.15);
  --shadow: 0 28px 80px rgba(72, 43, 51, 0.16);
  --page-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

.skip-link {
  position: fixed;
  z-index: 30;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper-raised);
  transform: translateY(-180%);
}

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

.site-header,
.site-footer,
.section-shell {
  width: min(calc(100% - 48px), var(--page-width));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
  font-size: 1.07rem;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(53, 24, 47, 0.2);
  transition: transform 240ms ease;
}

.brand:hover img {
  transform: rotate(-3deg) scale(1.035);
}

.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2.2rem);
}

.site-header nav a,
.site-footer nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 0.35rem;
  color: var(--ink-secondary);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.site-header nav a:hover,
.site-footer nav a:hover,
.text-link:hover {
  color: var(--coral-readable);
}

.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.82fr);
  gap: clamp(4rem, 9vw, 9rem);
  align-items: center;
  padding-block: clamp(4.2rem, 8vw, 7.5rem) clamp(6rem, 10vw, 9rem);
}

.eyebrow {
  margin: 0 0 1.15rem;
  color: var(--coral-readable);
  font-size: 0.76rem;
  font-weight: 790;
  letter-spacing: 0.105em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 730;
  letter-spacing: -0.046em;
  line-height: 1.03;
}

h1 {
  max-width: 700px;
  margin-bottom: 1.65rem;
  font-size: clamp(3.35rem, 6.2vw, 5.35rem);
}

h1 em {
  display: block;
  color: var(--coral-readable);
  font-family: "New York", "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 1.4rem;
  font-size: clamp(2.5rem, 4.5vw, 4.15rem);
}

h3 {
  margin-bottom: 0.72rem;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
}

.hero-intro {
  max-width: 600px;
  margin: 0 0 2rem;
  color: var(--ink-secondary);
  font-size: clamp(1.12rem, 1.65vw, 1.31rem);
  line-height: 1.58;
}

.store-link {
  display: inline-block;
  min-width: 180px;
  min-height: 60px;
  line-height: 0;
  text-decoration: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.store-link img {
  display: block;
  width: 180px;
  height: auto;
}

.store-link:hover {
  opacity: 0.84;
  transform: translateY(-2px);
}

.availability {
  max-width: 550px;
  margin: 0.9rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.84rem;
}

.gentle-promise {
  margin: 1.8rem 0 0;
  color: var(--ink);
  font-family: "New York", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 1.02rem;
  font-style: italic;
}

.word-stage {
  position: relative;
  min-width: 0;
  width: min(100%, 465px);
  justify-self: end;
}

.word-stage::before {
  position: absolute;
  z-index: -1;
  width: 250px;
  height: 250px;
  right: -70px;
  bottom: -55px;
  border-radius: 44% 56% 63% 37%;
  background: var(--mint);
  content: "";
  opacity: 0.5;
  transform: rotate(12deg);
}

.week-colors {
  width: min(100%, 360px);
  display: grid;
  grid-template-columns: repeat(7, minmax(44px, 1fr));
  gap: 2px;
  align-items: center;
  margin: 0 auto 1.45rem;
}

.week-colors button {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.week-colors button:focus-visible {
  outline: 3px solid var(--coral-readable);
  outline-offset: 1px;
}

.week-colors span {
  width: 100%;
  height: 8px;
  display: block;
  border-radius: 8px;
  background: #ee8b74;
  opacity: 0.52;
  transition: height 220ms ease, opacity 220ms ease, transform 220ms ease;
}

.week-colors button:nth-child(2) span {
  background: var(--mint);
}

.week-colors button:nth-child(3) span {
  background: var(--butter);
}

.week-colors button:nth-child(4) span {
  background: #b8cb83;
}

.week-colors button:nth-child(5) span {
  background: var(--sky);
}

.week-colors button:nth-child(6) span {
  background: var(--lilac);
}

.week-colors button:nth-child(7) span {
  background: #e69ab5;
}

.week-colors button[aria-pressed="true"] span {
  height: 13px;
  opacity: 1;
  animation: warm-pulse 3.4s ease-in-out infinite;
}

.card-stack {
  --card-fill: var(--butter);
  --card-accent: var(--coral);
  --stack-one: var(--lilac);
  --stack-two: #ee8b74;
  position: relative;
  padding: 15px 10px 24px;
  animation: quiet-arrival 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.card-stack[data-palette="coral"] {
  --card-fill: #ee8b74;
  --card-accent: #74243e;
  --stack-one: var(--mint);
  --stack-two: var(--butter);
}

.card-stack[data-palette="mint"] {
  --card-fill: var(--mint);
  --card-accent: #d74d38;
  --stack-one: var(--sky);
  --stack-two: #ee8b74;
}

.card-stack[data-palette="marigold"] {
  --card-fill: var(--butter);
  --card-accent: var(--coral);
  --stack-one: var(--lilac);
  --stack-two: #ee8b74;
}

.card-stack[data-palette="moss"] {
  --card-fill: #b8cb83;
  --card-accent: #b84230;
  --stack-one: var(--lilac);
  --stack-two: var(--butter);
}

.card-stack[data-palette="sky"] {
  --card-fill: var(--sky);
  --card-accent: #b84230;
  --stack-one: var(--mint);
  --stack-two: var(--lilac);
}

.card-stack[data-palette="violet"] {
  --card-fill: var(--lilac);
  --card-accent: #b84230;
  --stack-one: #ef9db8;
  --stack-two: var(--sky);
}

.card-stack[data-palette="berry"] {
  --card-fill: #e69ab5;
  --card-accent: #672344;
  --stack-one: var(--butter);
  --stack-two: var(--mint);
}

.back-card {
  position: absolute;
  inset: 28px 20px 12px;
  border: 1px solid rgba(50, 24, 47, 0.12);
  border-radius: 38px;
}

.back-card-one {
  background: var(--stack-one);
  transform: rotate(5deg) translate(17px, 8px);
  transition: background-color 430ms ease;
}

.back-card-two {
  background: var(--stack-two);
  transform: rotate(-4deg) translate(-15px, 4px);
  transition: background-color 430ms ease;
}

.word-card {
  position: relative;
  min-height: 535px;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.25rem);
  border: 1px solid rgba(50, 24, 47, 0.16);
  border-radius: 36px;
  background: var(--card-fill);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.card-topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.card-topline p,
.card-topline span {
  margin: 0;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.card-topline span {
  font-family: "New York", Georgia, serif;
  font-size: 1rem;
}

.little-sun {
  position: absolute;
  width: 110px;
  height: 110px;
  top: 74px;
  right: 40px;
  border: 2px solid rgba(50, 24, 47, 0.2);
  border-radius: 50%;
}

.little-sun::after {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 17px;
  right: 15px;
  border-radius: 50%;
  background: var(--card-accent);
  content: "";
}

.word {
  position: relative;
  z-index: 1;
  margin: 5.1rem 0 0;
  font-size: clamp(4.4rem, 8vw, 6.4rem);
  font-weight: 790;
  letter-spacing: -0.07em;
  line-height: 0.92;
}

.meaning {
  position: relative;
  z-index: 1;
  margin: 0.72rem 0 1.25rem;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.pronunciation {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 0 2.4rem;
  padding: 0.46rem 0.78rem;
  border: 1px solid rgba(50, 24, 47, 0.25);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
}

.pronunciation span {
  display: inline-block;
  margin-right: 0.28rem;
  color: var(--card-accent);
  font-size: 1.1em;
}

.example {
  position: relative;
  z-index: 1;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(50, 24, 47, 0.25);
}

.example p {
  margin: 0;
}

.example p:first-child {
  margin-bottom: 0.48rem;
  font-size: 1.07rem;
}

.example p:last-child {
  color: rgba(50, 24, 47, 0.72);
  font-size: 0.88rem;
}

.card-goodbye {
  position: absolute;
  right: 2.6rem;
  bottom: 1.8rem;
  margin: 0;
  font-family: "New York", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 0.9rem;
  font-style: italic;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.ritual {
  margin-bottom: clamp(5rem, 9vw, 8rem);
  padding: clamp(2.2rem, 6vw, 5.4rem);
  border-radius: 48px;
  background: var(--plum);
  color: #fff6e8;
  box-shadow: 0 30px 90px rgba(53, 24, 47, 0.14);
}

.ritual .eyebrow {
  color: #ff927b;
}

.ritual-main {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(390px, 1fr);
  gap: clamp(3.5rem, 8vw, 8rem);
  align-items: center;
}

.ritual-copy h2 {
  max-width: 560px;
}

.ritual-copy > p:last-child {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 246, 232, 0.75);
  font-size: 1.08rem;
}

.memory-journey {
  min-width: 0;
}

.memory-journey svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.journey-line {
  fill: none;
  stroke: rgba(255, 246, 232, 0.36);
  stroke-linecap: round;
  stroke-width: 5;
}

.journey-stop {
  fill: var(--butter);
  stroke: var(--plum);
  stroke-width: 5;
}

.journey-stop:nth-of-type(2) {
  fill: var(--lilac);
}

.journey-stop:nth-of-type(3) {
  fill: var(--mint);
}

.traveler {
  fill: var(--coral);
  stroke: #fff6e8;
  stroke-width: 3;
}

.memory-journey ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: -0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.memory-journey li {
  min-width: 0;
}

.memory-journey li:nth-child(2) {
  text-align: center;
}

.memory-journey li:nth-child(3) {
  text-align: right;
}

.memory-journey li span,
.memory-journey li strong,
.memory-journey li small {
  display: block;
}

.memory-journey li span {
  margin-bottom: 0.2rem;
  color: #ff927b;
  font-size: 0.72rem;
  font-weight: 800;
}

.memory-journey li strong {
  font-size: 1.05rem;
}

.memory-journey li small {
  margin-top: 0.2rem;
  color: rgba(255, 246, 232, 0.62);
  font-size: 0.73rem;
}

.welcome-back {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  margin-top: clamp(4rem, 8vw, 7rem);
  padding: clamp(1.7rem, 4vw, 3.2rem);
  border: 1px solid rgba(255, 246, 232, 0.22);
  border-radius: 34px;
  background: rgba(255, 246, 232, 0.08);
}

.past-week > p {
  margin: 0 0 1.25rem;
  color: rgba(255, 246, 232, 0.58);
  font-size: 0.72rem;
  font-weight: 790;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.past-week ol {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.past-week li {
  min-width: 0;
  text-align: center;
}

.past-week li span,
.past-week li i {
  display: block;
}

.past-week li span {
  margin-bottom: 0.48rem;
  color: rgba(255, 246, 232, 0.62);
  font-size: 0.68rem;
  font-weight: 760;
}

.past-week li i {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--plum);
  font-size: clamp(0.82rem, 1.8vw, 1.05rem);
  font-style: normal;
  font-weight: 850;
}

.past-week li:nth-child(2) i {
  background: var(--butter);
}

.past-week li:nth-child(4) i {
  background: var(--lilac);
}

.past-week li.rest i {
  border: 1px solid rgba(255, 246, 232, 0.32);
  background: transparent;
  color: rgba(255, 246, 232, 0.55);
}

.past-week li.now i {
  border-radius: 40%;
  background: var(--coral);
  color: var(--plum);
  font-size: 0.66rem;
  letter-spacing: -0.01em;
}

.welcome-copy h3 {
  margin-bottom: 0.8rem;
}

.welcome-copy > p:last-child {
  margin: 0;
  color: rgba(255, 246, 232, 0.72);
}

.until-tomorrow {
  margin: clamp(3.5rem, 7vw, 6rem) 0 0;
  color: var(--butter);
  font-family: "New York", "Iowan Old Style", Palatino, Georgia, serif;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  font-style: italic;
  text-align: center;
}

.site-footer {
  padding-block: 0 3.5rem;
}

.footer-main {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
}

.fine-print {
  max-width: 850px;
  margin: 1.2rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.72rem;
  line-height: 1.55;
}

/* Legal and support pages */
.subpage-main {
  min-height: calc(100vh - 300px);
}

.document-shell {
  width: min(calc(100% - 48px), 820px);
  margin-inline: auto;
  padding-block: clamp(4rem, 9vw, 8rem);
}

.document-header {
  padding-bottom: 2.7rem;
  border-bottom: 1px solid var(--line);
}

.document-header h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(2.9rem, 7vw, 5rem);
}

.document-lead {
  max-width: 680px;
  margin: 0;
  color: var(--ink-secondary);
  font-size: 1.16rem;
}

.document-meta {
  margin: 1.2rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.86rem;
}

.document-body {
  padding-top: 1.5rem;
}

.document-body section {
  padding-block: 1.7rem;
  border-bottom: 1px solid var(--line);
}

.document-body section:last-child {
  border-bottom: 0;
}

.document-body h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.035em;
}

.document-body p,
.document-body li {
  color: var(--ink-secondary);
}

.document-body ul {
  padding-left: 1.3rem;
}

.document-body li + li {
  margin-top: 0.6rem;
}

.contact-block {
  margin-top: 2rem;
  padding: 1.5rem;
  border-left: 4px solid var(--coral);
  background: var(--paper-raised);
}

.contact-block p {
  margin: 0;
}

.contact-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--coral-readable);
  border-radius: 12px;
  color: var(--coral-readable);
  font-weight: 700;
  text-decoration: none;
}

.contact-link:hover {
  background: var(--plum);
  color: #fff6e8;
}

.not-found {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
  text-align: center;
}

.not-found > div {
  width: min(calc(100% - 48px), 620px);
}

.not-found .word {
  color: var(--coral-readable);
  font-size: clamp(5rem, 18vw, 10rem);
}

@keyframes quiet-arrival {
  from {
    opacity: 0;
    transform: scale(0.985) rotate(-0.6deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes warm-pulse {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(1.12);
  }
}

@media (max-width: 900px) {
  .hero,
  .ritual-main,
  .welcome-back {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 4.5rem;
  }

  .word-stage {
    justify-self: center;
  }

  .ritual-main {
    gap: 3.5rem;
  }

  .welcome-back {
    gap: 2.8rem;
  }

  .past-week {
    max-width: 460px;
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer,
  .section-shell,
  .document-shell {
    width: min(calc(100% - 32px), var(--page-width));
  }

  .site-header {
    min-height: 76px;
  }

  .site-header nav a:first-child {
    display: none;
  }

  .site-header nav {
    gap: 1rem;
  }

  .site-header nav a {
    font-size: 0.86rem;
  }

  .brand span {
    display: none;
  }

  .hero {
    min-height: 0;
    gap: 3.5rem;
    padding-block: 3.8rem 5.6rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  h2 {
    font-size: clamp(2.25rem, 11vw, 3.35rem);
  }

  .availability {
    max-width: 330px;
  }

  .word-stage::before {
    width: 180px;
    height: 180px;
    right: -35px;
    bottom: -22px;
  }

  .card-stack {
    padding-inline: 4px;
  }

  .back-card {
    inset-inline: 14px;
    border-radius: 29px;
  }

  .word-card {
    min-height: 505px;
    padding: 1.8rem;
    border-radius: 29px;
  }

  .word {
    margin-top: 5.5rem;
  }

  .little-sun {
    width: 90px;
    height: 90px;
    right: 27px;
  }

  .card-goodbye {
    right: 1.8rem;
  }

  .ritual {
    width: min(calc(100% - 20px), var(--page-width));
    padding: 2.3rem 1.4rem 2.6rem;
    border-radius: 33px;
  }

  .memory-journey {
    margin-inline: -0.5rem;
  }

  .memory-journey ol {
    gap: 0.5rem;
    margin-top: -0.25rem;
  }

  .memory-journey li small {
    font-size: 0.64rem;
  }

  .welcome-back {
    padding: 1.45rem;
    border-radius: 25px;
  }

  .past-week ol {
    gap: 0.45rem;
  }

  .until-tomorrow {
    margin-top: 3.5rem;
  }

  .footer-main {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 1.5rem;
  }

  .site-footer .brand span {
    display: inline;
  }

  .site-footer nav {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 360px) {
  .week-colors {
    position: relative;
    left: 50%;
    width: calc(100vw - 12px);
    grid-template-columns: repeat(7, 44px);
    gap: 0;
    transform: translateX(-50%);
  }

  .back-card-one {
    transform: rotate(3deg) translate(7px, 5px);
  }

  .back-card-two {
    transform: rotate(-3deg) translate(-7px, 4px);
  }

  .word-card {
    padding-inline: 1.5rem;
  }

  .card-topline {
    gap: 0.5rem;
  }

  .card-topline p {
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    white-space: nowrap;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b111a;
    --paper-raised: #281c27;
    --paper-deep: #352434;
    --ink: #fff4e5;
    --ink-secondary: #d7c5d0;
    --plum: #3d2038;
    --plum-soft: #5b2e50;
    --coral-readable: #ff927b;
    --line: rgba(255, 244, 229, 0.15);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  }

  .word-card {
    color: #32182f;
  }

  .example p:last-child {
    color: rgba(50, 24, 47, 0.72);
  }

  .word-stage::before {
    opacity: 0.24;
  }

  .contact-link:hover {
    background: var(--coral);
    color: #281020;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: currentColor;
  }

  .word-card,
  .ritual,
  .welcome-back {
    border-width: 2px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .traveler {
    display: none;
  }
}
