@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: 'Caveat';
  src: url('/fonts/caveat-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #0F3557;
  --ocean: #2E6F95;
  --aqua: #74C7C5;
  --sand: #F4E7D3;
  --gold: #F5B971;
  --coral: #E9826E;
  --ink-muted: #294e67;
  font-family: Inter, system-ui, sans-serif;
  color: var(--navy);
  background: var(--sand);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
*[hidden] { display: none !important; }
html { width: 100%; max-width: 100%; min-width: 320px; overflow-x: clip; scroll-behavior: smooth; }
body { width: 100%; max-width: 100%; min-width: 320px; min-height: 100vh; margin: 0; overflow-x: clip; background: var(--sand); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--ocean); text-decoration: underline; text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

.skip-link { position: absolute; z-index: 20; left: 12px; top: 10px; padding: 10px 14px; transform: translateY(-160%); color: var(--sand); background: var(--navy); border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 86px; padding: 15px clamp(18px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--sand); border-bottom: 1px solid #d8c7af; position: relative; z-index: 5; }
.brand { display: inline-flex; flex: 0 0 auto; flex-direction: column; color: var(--navy); text-decoration: none; }
.brand-name { font: 500 35px/0.85 'Cormorant Garamond', Georgia, serif; }
.brand-caption { margin-top: 7px; font-size: 8px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.screen-nav { display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; }
.nav-button { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 10px; color: var(--navy); background: transparent; border: 1px solid transparent; border-radius: 8px; white-space: nowrap; font-size: 11px; font-weight: 600; }
.nav-index { color: var(--ocean); font-size: 9px; letter-spacing: 0.05em; }
.nav-button:hover { background: #0f35570a; }
.nav-button.active { color: var(--sand); background: var(--navy); }
.nav-button.active .nav-index { color: var(--gold); }
.private-mark { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; color: var(--navy); font-size: 10px; }
.private-mark span { color: var(--ocean); font-size: 16px; }

#content { min-height: calc(100vh - 142px); }
.view { animation: reveal 500ms ease both; }
.hero { width: 100vw; min-height: min(730px, calc(100vh - 142px)); position: relative; display: grid; place-items: center; overflow: hidden; padding: 76px 24px 122px; color: var(--sand); text-align: center; isolation: isolate; background: linear-gradient(180deg, #0b2d4f 0%, #24567b 52%, #d58f73 84%, #f4c487 100%); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.3; background: radial-gradient(ellipse at 50% 80%, #f5b97199 0, transparent 32%), radial-gradient(ellipse at 16% 18%, #74c7c544 0, transparent 28%); }
.hero-content { width: min(100%, 720px); position: relative; z-index: 2; }
.eyebrow { margin: 0 0 13px; color: var(--ocean); font-size: 10px; font-weight: 700; letter-spacing: 0.22em; line-height: 1.6; text-transform: uppercase; }
.light-eyebrow { color: var(--sand); }
.hero h1 { margin: 22px 0; font: 400 clamp(72px, 10vw, 122px)/0.82 'Cormorant Garamond', Georgia, serif; }
.hero h1 em { display: block; margin-top: 21px; color: var(--gold); font-size: 0.45em; font-style: normal; line-height: 1.1; }
.hero-copy { max-width: 460px; margin: 18px auto 29px; color: var(--sand); font-size: 15px; line-height: 1.8; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 23px; border: 0; border-radius: 999px; font-size: 13px; font-weight: 700; }
.button-light { color: var(--navy); background: var(--sand); }
.button-light:hover { background: #fff8ed; }
.button-primary { width: 100%; margin-top: 18px; color: var(--sand); background: var(--navy); }
.button-primary:hover { background: #194a70; }
.button-primary:disabled { cursor: wait; opacity: 0.72; }
.hero-horizon { position: absolute; z-index: 1; bottom: 0; left: -3%; width: 106%; height: 120px; background: linear-gradient(180deg, transparent, #0c4263b5 34%, var(--navy)); clip-path: polygon(0 30%,10% 19%,22% 25%,36% 13%,50% 28%,64% 16%,77% 26%,89% 15%,100% 24%,100% 100%,0 100%); }
.lantern { position: absolute; z-index: 1; width: 18px; height: 28px; border: 1px solid #ffe7b5; border-radius: 7px 7px 9px 9px; background: radial-gradient(ellipse at center, #fff5cb, #ffc377 52%, #ea8f54); box-shadow: 0 0 26px #ffd28977; animation: glow 4s ease-in-out infinite; }
.lantern::before { content: ''; position: absolute; left: 5px; right: 5px; top: -5px; height: 3px; border-radius: 10px; background: #fbd7a1; }
.lantern-one { top: 20%; left: 17%; }
.lantern-two { top: 35%; right: 17%; transform: scale(0.75); }
.lantern-three { top: 10%; right: 30%; transform: scale(0.48); }
.lantern-four { bottom: 29%; left: 9%; transform: scale(0.6); }
.lantern-five { right: 8%; bottom: 26%; transform: scale(0.5); }

.content-view { width: min(100vw, 1280px); max-width: 100vw; min-width: 0; min-height: 680px; margin: 0 auto; padding: 66px clamp(24px, 6.5vw, 84px) 80px; }
.display-title { margin: 0; color: var(--navy); font: 500 clamp(48px, 6vw, 76px)/0.95 'Cormorant Garamond', Georgia, serif; }
.lead { max-width: 620px; margin: 19px 0 30px; color: var(--ink-muted); font-size: 16px; line-height: 1.8; }
.chapter-grid { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.chapter-card { min-width: 0; min-height: 305px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 26px 21px; border-radius: 110px 110px 12px 12px; background: linear-gradient(155deg, #4c97a9, #12415f); box-shadow: 0 9px 24px #0f35571a; }
.chapter-card:nth-child(2) { background: linear-gradient(145deg, #c98968, #8c5369 62%, #3b5373); }
.chapter-card:nth-child(3) { background: linear-gradient(150deg, #79bcb6, #267d8c, #12344e); }
.chapter-card:nth-child(4) { background: linear-gradient(150deg, #c98673, #925f68, #264967); }
.chapter-card:nth-child(5) { background: linear-gradient(150deg, #b8a47e, #6295aa, #245479); }
.chapter-card:nth-child(6) { background: linear-gradient(160deg, #bd9875, #806783, #1b456c); }
.chapter-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, #0b2d4f77); pointer-events: none; }
.chapter-number { position: relative; z-index: 1; color: var(--sand); font-size: 10px; letter-spacing: 0.14em; }
.chapter-star { position: absolute; top: 15px; right: 20px; color: #fff8e9b5; font-size: 48px; }
.chapter-card h2 { position: relative; z-index: 1; margin: 8px 0; color: #fff8ea; font: 500 34px/1 'Cormorant Garamond', Georgia, serif; }
.chapter-card p { position: relative; z-index: 1; margin: 0; color: #fff8e9; font-size: 12px; line-height: 1.6; }
.chapter-card .chapter-empty { color: #fff8e9; font-size: 11px; }

.story-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; margin-top: 36px; }
.memory-art { min-height: 330px; position: relative; display: grid; place-items: center; overflow: hidden; margin: 0; border: 9px solid #fff9ee; border-radius: 14px; background: linear-gradient(155deg, #79bdbb 0%, #bad2ba 39%, #f2bd8d 65%, #426c79 100%); box-shadow: 0 9px 35px #0c35572b; }
.memory-art::before { content: ''; position: absolute; bottom: -12%; width: 120%; height: 42%; border-radius: 50% 50% 0 0; background: #1e5870a8; }
.art-star { position: absolute; top: 22px; right: 28px; color: #fff8e9; font-size: 62px; }
.image-placeholder { position: relative; z-index: 1; padding: 10px 14px; color: #fff; background: #0f3557e8; border: 1px solid #f4e7d3; border-radius: 30px; font-size: 12px; text-align: center; }
.memory-art figcaption { position: absolute; bottom: 13px; z-index: 2; color: #fff; font-size: 11px; }
.timeline { margin: 20px 0; padding: 0 0 0 25px; border-left: 2px solid var(--aqua); }
.moment { position: relative; margin-bottom: 25px; }
.moment:last-child { margin-bottom: 0; }
.moment::before { content: ''; position: absolute; top: 5px; left: -32px; width: 11px; height: 11px; border: 3px solid var(--sand); border-radius: 50%; background: var(--coral); }
.moment h2 { margin: 0 0 6px; color: var(--navy); font-size: 14px; line-height: 1.4; }
.moment p { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.7; }
.empty-state { max-width: 620px; margin: 16px 0; padding: 17px 20px; border-left: 3px solid var(--aqua); border-radius: 0 8px 8px 0; color: #294e67; background: #fffaf1; font-size: 14px; line-height: 1.7; }
.section-title { margin: 42px 0 14px; color: var(--navy); font: 500 34px/1.1 'Cormorant Garamond', Georgia, serif; }
.content-image { display: block; width: 100%; height: auto; object-fit: cover; }
.film-view { min-height: auto; padding-top: 32px; }
.film-frame { width: 100%; max-width: 960px; overflow: hidden; margin: 20px auto 0; border-radius: 14px; background: #0F3557; box-shadow: 0 8px 22px #17395718; }
.film-frame video { display: block; width: 100%; height: 100%; }
.image-frame { position: absolute; inset: 0; }
.image-frame .content-image { height: 100%; }
.object-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.object-card, .book-page { min-width: 0; padding: 15px; border: 1px solid #dfceb9; border-radius: 12px; background: #fffaf1; box-shadow: 0 8px 22px #17395718; }
.object-card figure, .book-page figure, .letter-card figure { margin: 0; overflow: hidden; border-radius: 8px; }
.object-card figcaption, .book-page figcaption, .letter-card figcaption { padding: 8px 2px; color: #294e67; font-size: 12px; line-height: 1.6; }
.object-card h3 { margin: 13px 0 6px; color: var(--navy); font: 500 25px/1.15 'Cormorant Garamond', Georgia, serif; }
.object-card p, .book-page p { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.7; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.book-page .chapter-number { display: block; margin-bottom: 10px; color: var(--ocean); }
.letter-meta { margin: -3px 0 13px !important; color: #294e67 !important; font-weight: 600; }

.gallery-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; grid-auto-rows: minmax(175px, auto); gap: 12px; margin-top: 28px; }
.gallery-tile { min-height: 175px; position: relative; display: flex; align-items: flex-end; overflow: hidden; margin: 0; padding: 16px; border: 7px solid #fff8ed; border-radius: 12px; background: linear-gradient(140deg, #75adbe, #f5c99f); box-shadow: 0 8px 22px #203f5120; }
.gallery-tile.large { grid-row: span 2; min-height: 362px; background: linear-gradient(140deg, #548e9e 0%, #c8a883 48%, #254d69 100%); }
.gallery-tile.warm { background: linear-gradient(130deg, #d18b74, #a96970, #284d71); }
.gallery-tile.sea { background: linear-gradient(125deg, #a5c6a2, #6d9ea2, #2c6075); }
.gallery-tile.sand { background: linear-gradient(145deg, #c6ad98, #6995b9); }
.gallery-tile.coral { background: linear-gradient(145deg, #a5c5c3, #dfb186); }
.gallery-tile.blue { background: linear-gradient(130deg, #557e9a, #9bb6b7); }
.gallery-tile.dawn { background: linear-gradient(130deg, #9db7a1, #d9ba83); }
.gallery-tile::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 28%, #0f3557b8); }
.tile-art { position: absolute; top: 15px; right: 20px; color: #fff8e9aa; font-size: 44px; }
.gallery-tile figcaption { position: relative; z-index: 1; display: grid; gap: 5px; width: 100%; padding: 8px 10px; color: #fff; background: #0f3557e8; border-radius: 6px; font-size: 11px; line-height: 1.4; }
.gallery-tile figcaption small { color: #fff; font-size: 10px; }

.letter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.letter-card { min-height: 340px; display: flex; flex-direction: column; align-items: center; padding: 28px 24px 24px; border: 1px solid #DFCEB9; border-radius: 14px; background: #FFFAF1; box-shadow: 0 8px 22px #17395718; text-align: center; }
.letter-icon { color: #995d37; font-size: 36px; }
.letter-seal { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #BA7A62; border-radius: 50%; color: #87452F; font-size: 22px; }
.letter-card h2 { margin: 12px 0 8px; color: var(--navy); font: 500 32px/1.1 'Cormorant Garamond', Georgia, serif; }
.letter-card .letter-meta { margin: 0 0 15px !important; color: #294e67 !important; font-size: 16px; line-height: 1.5; }
.letter-card .letter-transcription { width: 100%; margin: 0; color: #263F50; font: 400 23px/1.5 'Caveat', cursive; white-space: pre-line; }
.letter-card .letter-warning { width: 100%; margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #87452F; border-radius: 0 6px 6px 0; color: #563423; background: #F4E7D3; font-size: 16px; line-height: 1.5; text-align: left; }
.letter-card figure { width: 100%; margin-top: 16px; }
.letter-card .letter-original summary { min-height: 44px; display: flex; align-items: center; justify-content: center; color: #164E70; cursor: pointer; font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; }
.letter-card .letter-original img { max-height: 440px; object-fit: contain; }
.letter-card .letter-signature { align-self: flex-end; margin-top: auto; padding-top: 18px; color: #BA7A62; font: 400 24px/1.25 'Caveat', cursive; }
.letters-empty-state { font-size: 16px; }
.content-view[aria-labelledby="letters-title"] .lead { font-size: 18px; }

.time-capsule { min-height: 430px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; margin-top: 35px; padding: 32px; border-radius: 20px; color: var(--sand); background: radial-gradient(circle at 50% 20%, #5481a6, #193d5f 64%, var(--navy)); text-align: center; }
.capsule-stars { position: absolute; top: 15%; width: 100%; color: #f5b971b8; font-size: 24px; letter-spacing: 0.5em; }
.lock-mark { z-index: 1; width: 100px; height: 100px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); background: #f5b97120; font-size: 42px; }
.time-capsule h2 { z-index: 1; margin: 14px 0 4px; font: 500 53px/1 'Cormorant Garamond', Georgia, serif; }
.time-capsule p { z-index: 1; max-width: 370px; margin: 8px 0; color: var(--sand); font-size: 14px; line-height: 1.75; }
.capsule-pill { z-index: 1; margin-top: 14px; padding: 10px 17px; border: 1px solid #f5b971b8; border-radius: 40px; color: var(--sand); font-size: 12px; }

.family-entry { min-height: 690px; display: grid; grid-template-columns: 1.04fr 0.96fr; }
.entry-art { min-height: 640px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 40px; color: var(--sand); background: linear-gradient(175deg, var(--navy), #327895 56%, #d9a178); text-align: center; }
.entry-art .lantern-one { top: 18%; left: 16%; }
.entry-art .lantern-two { top: 32%; right: 15%; }
.entry-art .lantern-three { top: 13%; right: 31%; }
.entry-art .lantern-four { bottom: 24%; left: 10%; }
.entry-art .lantern-five { right: 9%; bottom: 20%; }
.entry-art h1 { z-index: 1; margin: 18px 0; font: 500 clamp(52px, 6vw, 76px)/0.88 'Cormorant Garamond', Georgia, serif; }
.entry-art > p:last-child { z-index: 1; max-width: 320px; color: var(--sand); font-size: 14px; line-height: 1.8; }
.entry-panel { display: flex; flex-direction: column; justify-content: center; padding: 54px clamp(26px, 8vw, 100px); background: var(--sand); }
.entry-panel h2 { margin: 0 0 12px; color: var(--navy); font: 500 48px/1 'Cormorant Garamond', Georgia, serif; }
.entry-panel > p:not(.eyebrow) { margin: 0 0 18px; color: var(--ink-muted); font-size: 14px; line-height: 1.75; }
.entry-panel label { margin: 10px 0 8px; color: var(--navy); font-size: 12px; font-weight: 700; }
.entry-panel input { min-height: 48px; padding: 14px; border: 1px solid #a9b8b9; border-radius: 8px; color: var(--navy); background: #fff9ee; font-size: 14px; letter-spacing: 0.2em; }
.entry-panel input::placeholder { color: #4a6677; opacity: 1; }
.button-disabled { width: 100%; margin-top: 18px; color: var(--sand); background: var(--navy); cursor: not-allowed; opacity: 0.68; }
.entry-panel small { margin-top: 17px; color: var(--ink-muted); font-size: 11px; line-height: 1.65; }
.login-status { min-height: 1.5em; margin: 10px 0 0; color: var(--navy); font-size: 12px; line-height: 1.5; }

.site-footer { min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px clamp(20px, 5vw, 76px); color: var(--sand); background: var(--navy); font-size: 10px; }

@keyframes glow { 50% { opacity: 0.72; box-shadow: 0 0 15px #ffd28977; } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1000px) {
  .site-header { flex-wrap: wrap; gap: 8px 18px; padding: 14px 22px 10px; }
  .screen-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: thin; }
  .nav-button { flex: 0 0 auto; }
  .private-mark { margin-left: auto; }
}

@media (max-width: 700px) {
  .site-header { min-height: 94px; padding: 12px 16px 8px; }
  .brand-name { font-size: 30px; }
  .brand-caption { font-size: 7px; }
  .private-mark { font-size: 9px; }
  .screen-nav { margin: 0 -3px; gap: 2px; scrollbar-width: none; }
  .screen-nav::-webkit-scrollbar { display: none; }
  .nav-button { min-height: 40px; gap: 5px; padding: 7px 8px; font-size: 10px; }
  .nav-index { font-size: 8px; }
  .hero { min-height: 690px; padding: 70px 24px 110px; }
  .hero h1 { font-size: 76px; }
  .hero h1 em { max-width: 100%; margin: 18px auto 0; font-size: 0.35em; line-height: 1.15; }
  .hero .eyebrow { max-width: 300px; margin-right: auto; margin-left: auto; }
  .hero-copy { max-width: 310px; font-size: 13px; }
  .lantern-one { left: 6%; }
  .lantern-two { right: 7%; }
  .content-view { min-height: auto; padding: 39px 22px 68px; }
  .display-title { font-size: 38px; }
  .lead { margin: 17px 0 25px; font-size: 13px; }
  .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 24px; }
  .chapter-card { min-height: 218px; padding: 19px 12px; border-radius: 95px 95px 10px 10px; }
  .chapter-number { font-size: 9px; }
  .chapter-card h2 { font-size: 26px; }
  .chapter-card p { font-size: 10px; }
  .chapter-star { top: 12px; right: 15px; font-size: 36px; }
  .story-layout { display: flex; flex-direction: column; align-items: stretch; gap: 20px; margin-top: 25px; }
  .memory-art { width: 100%; min-height: 205px; }
  .timeline { margin: 7px 0 0; }
  .moment h2 { font-size: 13px; }
  .moment p { font-size: 12px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(125px, auto); gap: 7px; margin-top: 22px; }
  .gallery-tile { min-height: 125px; padding: 8px; border-width: 5px; }
  .gallery-tile.large { min-height: 260px; }
  .gallery-tile figcaption { padding: 6px 7px; font-size: 9px; }
  .gallery-tile figcaption small { font-size: 8px; }
  .object-grid, .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .object-card, .book-page { padding: 10px; }
  .section-title { margin-top: 31px; font-size: 29px; }
  .empty-state { font-size: 12px; }
  .tile-art { top: 10px; right: 12px; font-size: 30px; }
  .letter-grid { grid-template-columns: 1fr; gap: 13px; margin-top: 23px; }
  .letter-card { min-height: 240px; padding: 22px 18px; }
  .letter-icon { font-size: 27px; }
  .letter-card h2 { margin: 8px 0; font-size: 28px; }
  .letter-card .letter-meta { max-width: 330px; font-size: 16px; }
  .letter-card .letter-transcription { font-size: 22px; }
  .letter-card .letter-signature { padding-top: 12px; font-size: 23px; }
  .time-capsule { min-height: 490px; margin-top: 25px; padding: 24px; }
  .capsule-stars { top: 15%; font-size: 17px; letter-spacing: 0.35em; }
  .time-capsule h2 { font-size: 42px; }
  .time-capsule p { font-size: 12px; }
  .family-entry { display: flex; flex-direction: column; min-height: auto; }
  .entry-art { min-height: 285px; padding: 32px 22px; }
  .entry-art h1 { margin: 12px 0; font-size: 51px; }
  .entry-art > p:last-child { font-size: 12px; }
  .entry-panel { padding: 39px 25px 58px; }
  .entry-panel h2 { font-size: 42px; }
  .entry-panel > p:not(.eyebrow) { font-size: 12px; }
  .site-footer { flex-direction: column; justify-content: center; gap: 6px; padding: 16px; text-align: center; }
  #content { min-height: auto; }
}

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