@charset "UTF-8";
/* Local-only enhancement layer. Load AFTER styles.css. No remote font requests. */
@font-face {
  font-family: "Long Cang Local";
  src: url("assets/fonts/LongCang-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --art-title: Georgia, "Long Cang Local", "STKaiti", "KaiTi", serif;
  --meadow-deep: #425b3a;
  --meadow-light: #eef0e4;
  --flower-cream: #f5e8bc;
  --warm-white: #fffdf7;
  --gentle-ease: cubic-bezier(.22, .68, .2, 1);
}

/* The handwritten face is reserved for headings, never reading text or controls. */
.hero h1,
.section-heading h2,
.anniversary-heading h2,
.closing > p,
.footer-brand,
.brand > span:last-child {
  font-family: var(--art-title);
  font-weight: 400;
  font-synthesis: none;
}
.brand > span:last-child { font-size: 27px; letter-spacing: 2px; }
.brand small { font-family: var(--sans); font-size: 8px; letter-spacing: 2.1px; }
.hero h1 { font-size: clamp(40px, 4.7vw, 63px); line-height: 1.37; letter-spacing: 1px; }
.section-heading h2,
.anniversary-heading h2 { font-size: clamp(28px, 2.8vw, 36px); line-height: 1.45; }
.closing > p { font-size: clamp(29px, 3.2vw, 41px); letter-spacing: 3px; }
.footer-brand { font-size: 21px; }
.hero-description { line-height: 1.95; }
.eyebrow, .micro-label, .orbit-word, .hero-photo-number,
.closing > span:not(.closing-flower):not(.closing-heart) { font-family: Georgia, var(--sans); }

/* Quiet meadow details, entirely CSS: decorative layers never intercept clicks. */
.hero, .hero-copy, .closing, .memories, #anniversary { position: relative; }
.hero::before {
  content: "";
  position: absolute;
  width: 106px;
  height: 96px;
  top: 25px;
  left: -33px;
  background: radial-gradient(circle at 20% 25%, #b7c29d 0 2px, transparent 2.5px),
    radial-gradient(circle at 74% 68%, #d7c28d 0 2px, transparent 2.5px),
    radial-gradient(circle at 45% 85%, #b7c29d 0 1px, transparent 1.5px);
  pointer-events: none;
  opacity: .55;
}
.hero-copy::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 39px;
  bottom: 0;
  right: 16px;
  border: 1px solid #a3b088;
  border-radius: 90% 0 90% 0;
  transform: rotate(28deg);
  box-shadow: 11px 7px 0 -4px var(--paper), 12px 7px 0 -3px #b8c19e;
  opacity: .5;
  pointer-events: none;
}
.title-accent svg { opacity: .8; bottom: -10px; }
.hero-spark, .closing-flower, .closing-heart, .brand-mark { pointer-events: none; }
.hero-spark { color: #93a177; }
.hero-photo-frame { box-shadow: 0 20px 42px -24px #45573966, 0 3px 8px #4557390c; }
.photo-sticker { box-shadow: 0 7px 20px #4557390d; }
.closing::after {
  content: "✧";
  position: absolute;
  right: 11%;
  top: 33%;
  font: 26px Georgia, serif;
  color: #a5b38d;
  transform: rotate(12deg);
  pointer-events: none;
}

/* Hover is restrained and never required for access to controls or captions. */
.primary-button, .secondary-button, .text-button, .view-switch button,
.year-filters button, .hero-controls button, .back-top {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 220ms var(--gentle-ease);
}
.primary-button { position: relative; isolation: isolate; }
.primary-button > span { display: inline-block; transition: transform 220ms var(--gentle-ease); }
.primary-button:active, .secondary-button:active, .hero-controls button:active { transform: translateY(1px); }
button:disabled { opacity: .52; }
:where(a, button):focus-visible { outline: 3px solid #84986b; outline-offset: 5px; }
@media (hover: hover) and (pointer: fine) {
  .primary-button:hover { background: var(--meadow-deep); box-shadow: 0 7px 18px #536a4724; transform: translateY(-2px); }
  .primary-button:hover > span { transform: translate(2px, -2px); }
  .secondary-button:hover { background: #e7ebdb; border-color: #a6b18f; transform: translateY(-2px); }
  .view-switch button:not([aria-pressed="true"]):hover,
  .year-filters button:not([aria-pressed="true"]):hover { background: #e7ebdb; color: var(--meadow-deep); }
  .text-button:hover, .back-top:hover { color: var(--meadow-deep); }
  .photo-card:hover { box-shadow: 0 13px 27px -18px #40513766; }
  .hero-controls button:hover:not(:disabled) { background: #e7ecdc; border-color: #a5b290; transform: translateY(-2px); }
}

/* Hero controls stay outside the photograph's click target. */
.hero-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  position: relative;
  z-index: 2;
  margin: 19px 0 0;
  min-height: 40px;
}
.hero-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid #d5dcc8;
  border-radius: 50%;
  background: var(--warm-white);
  color: var(--green);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.3;
}
.hero-controls #hero-toggle { border-radius: 999px; padding-inline: 14px; font-size: 11px; }
#hero-slide-count {
  min-width: 45px;
  margin-inline: 3px 7px;
  color: var(--muted);
  font: 12px Georgia, var(--sans);
  letter-spacing: 1px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.hero-art:has(.hero-controls) .hero-photo-number { bottom: 56px; }
#hero-photo a { display: block; }
#hero-photo img { backface-visibility: hidden; }
/* Incoming photo settles while the previous decoded layer gently fades away. */
#hero-photo { position: relative; }
#hero-photo > a { position: absolute; inset: 0; }
#hero-photo > .hero-outgoing { z-index: 2; pointer-events: none; animation: hero-leave 650ms ease both !important; }
@keyframes hero-leave { from { opacity: 1; } to { opacity: 0; transform: scale(1.025); } }
.hero-art:has(.hero-controls) .photo-sticker { bottom: 90px; }
.puzzle-invitation { margin-block: 55px 45px; display: flex; align-items: center; gap: 28px; padding: 32px; background: #e9eddf; border: 1px solid #d6dec9; border-radius: 15px; }
.puzzle-invitation h2 { font-family: var(--art-title); font-size: 33px; }
.puzzle-invitation p:not(.eyebrow) { font-size: 11px; color: var(--muted); }
.puzzle-invitation .eyebrow { margin-bottom: 8px; }
.puzzle-invitation .primary-button { margin-left: auto; flex-shrink: 0; }
.puzzle-mini { flex-shrink: 0; display: grid; grid-template-columns: repeat(2, 37px); gap: 4px; transform: rotate(-8deg); }
.puzzle-mini span { height: 37px; display: grid; place-items: center; border-radius: 5px; background: #b1bf96; color: #fffdf7; font-family: var(--art-title); font-size: 25px; }
.puzzle-mini span:last-child { background: #dbe2cd; border: 1px dashed #b1bf96; }
.random-again { margin-bottom: 8px; }
@media(max-width: 850px) { .site-header { flex-wrap: wrap; height: auto; padding-block: 22px 17px; gap: 15px; } .site-header nav { margin-left: auto; gap: 19px; } .header-note { display: none; } .puzzle-invitation { flex-wrap: wrap; padding: 24px; } }
@media(max-width: 500px) { .site-header nav { width: 100%; justify-content: space-between; font-size: 11px; gap: 8px; } .puzzle-invitation { gap: 15px; } .puzzle-invitation h2 { font-size: 28px; } .puzzle-invitation .primary-button { margin-left: 0; } .puzzle-mini { grid-template-columns: repeat(2, 30px); } .puzzle-mini span { height: 30px; } }

#hero-photo.hero-changing img,
#hero-photo .hero-changing img,
#hero-photo.hero-changing > a { animation: hero-settle 480ms var(--gentle-ease) both; }
@keyframes hero-settle {
  from { opacity: .82; filter: saturate(.88); transform: scale(1.018); }
  to { opacity: 1; filter: saturate(1); transform: scale(1); }
}

/* Position only: JS updates --scroll-progress with a clamped fraction (0..1). */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  width: 100%;
  z-index: 80;
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, #7c9366, #b4bf8e);
  pointer-events: none;
}
.scroll-cue {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px auto 28px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
}
.scroll-cue::after {
  content: "↓";
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #d5dcc8;
  border-radius: 50%;
  font: 16px Georgia, serif;
  color: var(--green);
  pointer-events: none;
}

/* Anniversary: each year is a little page in the same cream-and-meadow album. */
#anniversary { padding-block: 54px 12px; scroll-margin-top: 28px; }
.anniversary-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 25px;
}
.anniversary-heading h2 { margin: 0 0 8px; }
.anniversary-heading .eyebrow { margin-bottom: 12px; }
.anniversary-heading p:not(.eyebrow) { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.anniversary-date-pill {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 15px;
  background: #e9eddf;
  border: 1px solid #d5dcc8;
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.anniversary-years {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  align-items: start;
}
.year-memory {
  position: relative;
  min-width: 0;
  padding: 19px;
  border: 1px solid #dce1d1;
  border-radius: 13px;
  background: #fbfaf4;
  box-shadow: 0 7px 21px -18px #536a474d;
}
.year-memory-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.year-number { color: var(--green); font: 31px/1.1 Georgia, serif; letter-spacing: -1px; font-variant-numeric: lining-nums; }
.match-badge { display: inline-block; border-radius: 999px; padding: 4px 9px; background: #edf0e3; color: #667b50; font-size: 10px; line-height: 1.5; }
.year-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.year-photos > :only-child { grid-column: 1 / -1; }
.year-photos .photo-link { display: block; position: relative; min-width: 0; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 7px; background: #e9eddf; }
.year-photos .photo-link img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 400ms var(--gentle-ease); }
.year-memory-foot { margin-top: 12px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.year-memory-foot p { margin: 0; }
.anniversary-empty { border: 1px dashed #cbd4bd; border-radius: 10px; padding: 28px 20px; text-align: center; color: #737e68; background: #f1f2e9; font-size: 12px; line-height: 1.9; }
.anniversary-empty p { margin: 0; }
.anniversary-info { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
@media (hover: hover) and (pointer: fine) {
  .year-photos .photo-link:hover img { transform: scale(1.035); }
}

/* Progressive enhancement: absent JS or motion-ready, all content is visible. */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  html.motion-ready .reveal {
    transition: opacity 580ms ease, transform 580ms var(--gentle-ease);
    transition-delay: var(--reveal-delay, 0ms);
  }
  html.motion-ready .reveal:not(.is-visible) { opacity: 0; transform: translateY(13px); }
  html.motion-ready .reveal.is-visible { opacity: 1; transform: none; }
  .photo-card.reveal:nth-child(4n + 2), .year-memory.reveal:nth-child(3n + 2) { --reveal-delay: 55ms; }
  .photo-card.reveal:nth-child(4n + 3), .year-memory.reveal:nth-child(3n + 3) { --reveal-delay: 110ms; }
  .photo-card.reveal:nth-child(4n + 4) { --reveal-delay: 155ms; }
  .photo-grid.switching .photo-card,
  .photo-grid .photo-card.switching { animation: memory-settle 420ms var(--gentle-ease) backwards; }
  .photo-grid.switching .photo-card:nth-child(4n + 2) { animation-delay: 35ms; }
  .photo-grid.switching .photo-card:nth-child(4n + 3) { animation-delay: 70ms; }
  .photo-grid.switching .photo-card:nth-child(4n + 4) { animation-delay: 105ms; }
  @keyframes memory-settle {
    from { opacity: .86; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 1050px) {
  .hero h1 { font-size: clamp(35px, 4.9vw, 49px); }
  .hero-copy::after { right: 2px; bottom: -10px; }
  .orbit-word { right: 6px; }
  .anniversary-years { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .year-memory { padding: 16px; }
}
@media (max-width: 700px) {
  .brand > span:last-child { font-size: 22px; letter-spacing: 1px; }
  .brand small { font-size: 6px; letter-spacing: 1.4px; }
  .hero h1 { font-size: clamp(37px, 9vw, 53px); line-height: 1.32; letter-spacing: 0; }
  .hero::before { top: 10px; left: -10px; width: 65px; }
  .hero-copy::after { display: none; }
  .hero-controls { margin-top: 15px; gap: 6px; justify-content: center; }
  .hero-controls button { min-width: 40px; min-height: 40px; }
  .hero-art:has(.hero-controls) .hero-photo-number { bottom: 54px; }
  .section-heading h2, .anniversary-heading h2 { font-size: clamp(26px, 6.4vw, 33px); }
  .scroll-cue { margin-bottom: 20px; font-size: 9px; }
  #anniversary { padding-top: 38px; }
  .anniversary-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 19px; }
  .anniversary-heading .eyebrow { justify-content: flex-start; }
  .anniversary-heading p:not(.eyebrow) { font-size: 11px; }
  .anniversary-date-pill { min-height: 33px; font-size: 11px; padding: 5px 12px; }
  .anniversary-years { gap: 12px; }
  .year-memory { padding: 12px; border-radius: 10px; }
  .year-memory-head { gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
  .year-number { font-size: 27px; }
  .match-badge { font-size: 9px; padding: 3px 7px; }
  .year-photos { grid-template-columns: 1fr; gap: 7px; }
  .year-memory-foot { font-size: 9px; }
  .anniversary-info { font-size: 10px; }
  .closing::after { right: 4%; font-size: 21px; }
  .footer-brand { font-size: 19px; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 35px; }
  .brand > span:last-child { font-size: 20px; }
  .hero-art { width: 91%; }
  .anniversary-years { grid-template-columns: 1fr; }
  .year-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.motion-ready .reveal,
  html.motion-ready .reveal:not(.is-visible),
  .reveal, .switching, .hero-changing { opacity: 1 !important; transform: none !important; filter: none !important; }
}
