@font-face { font-family: Cormorant; src: url('public/font-2.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Pinyon; src: url('public/font-7.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Manrope; src: url('public/font-5.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
:root { --paper: #faf6f1; --ink: #392630; --rose: #895168; --gold: #a78352; --muted: #746269; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); font-family: Cormorant, Georgia, serif; background: var(--paper); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url('public/ivory-paper-grain.webp') repeat; background-size: 32rem; opacity: .18; mix-blend-mode: multiply; }
body::after { content: ''; position: fixed; inset: 1.35rem; pointer-events: none; border: 1px solid #a7835238; }
.gate { min-height: 100svh; background: radial-gradient(ellipse at 6% 60%, #e7d3c045, transparent 56%), radial-gradient(ellipse at 93% 18%, #eddae148, transparent 48%), var(--paper); }
.gate-layout { width: min(100%, 74rem); min-height: 100svh; margin: 0 auto; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(1rem, 5vw, 5.5rem); padding: max(4rem, env(safe-area-inset-top)) 4rem max(4rem, env(safe-area-inset-bottom)); }
.gate-art { position: relative; width: 100%; align-self: stretch; min-height: 38rem; display: grid; place-items: center; isolation: isolate; }
.art-halo { position: absolute; inset: 12% -10% 18%; border-radius: 50%; background: radial-gradient(ellipse, #e8d3ba25 0, #eee0d523 36%, transparent 69%); }
.gate-envelope { display: block; width: 110%; height: auto; filter: drop-shadow(0 22px 28px #39263010); transform: rotate(-7deg); transition: transform .8s cubic-bezier(.2,.6,.3,1), opacity .7s; }
.art-heart { position: absolute; font-size: 1.9rem; top: 51%; left: 50%; transform: translate(-50%, -50%) rotate(-7deg); opacity: .85; }
.art-thread { position: absolute; width: 1px; height: 5rem; bottom: 8%; left: 50%; background: linear-gradient(transparent, #a7835270, transparent); }
.gate-copy { width: min(100%, 27rem); position: relative; padding: 1rem 0; }
.gate-heart { color: var(--rose); font: 1.7rem Pinyon, Georgia, serif; display: inline-block; margin-bottom: 2.4rem; transform: rotate(-12deg); opacity: .6; }
.gate-copy h1 { margin: 0; font-weight: 400; font-size: clamp(3.75rem, 5.4vw, 5.1rem); line-height: 1.06; letter-spacing: -.025em; }
.gate-copy h1 em { display: block; font: clamp(5.5rem, 8vw, 7.5rem)/1.33 Pinyon, Georgia, serif; color: var(--rose); margin-left: .02em; }
.gate-intro { font-size: 1.45rem; line-height: 1.6; margin: .8rem 0 2.8rem; color: var(--muted); }
.gate-form { display: grid; gap: .6rem; }
.gate-form label { font: .875rem/1.6 Manrope, Arial, sans-serif; color: var(--muted); }
.password-field { position: relative; }
.gate-form input:not([type='hidden']) { width: 100%; min-height: 3.6rem; padding: .9rem 1.1rem; border: 1px solid #a7835252; border-radius: 3px; background: #fffdf9b3; color: var(--ink); font: 1rem/1.5 Manrope, Arial, sans-serif; box-shadow: 0 2px 12px #39263003; }
.password-field input { padding-right: 3.6rem !important; }
.gate-form input::placeholder { color: #9a868e; }
.gate-form input:focus { border-color: var(--rose); outline: 1px solid #89516835; outline-offset: 2px; }
.password-eye { position: absolute; right: .2rem; top: .2rem; width: 3.2rem; height: 3.2rem; border: 0; background: transparent; color: var(--rose); display: grid; place-items: center; cursor: pointer; }
.gate-submit { display: flex; justify-content: center; align-items: center; gap: 1rem; width: 100%; min-height: 3.6rem; padding: .95rem 1.25rem; margin-top: .75rem; border: 1px solid #704155; border-radius: 999px; color: #fffaf6; background: linear-gradient(135deg, #895168, #6f4357); font: .9375rem/1.4 Manrope, Arial, sans-serif; text-decoration: none; cursor: pointer; box-shadow: 0 8px 24px #8951681c; transition: background .25s, transform .25s, box-shadow .25s; }
.gate-submit span { font: 1.4rem Pinyon, Georgia, serif; opacity: .8; }
.gate-submit:hover { box-shadow: 0 10px 30px #89516829; transform: translateY(-1px); }
.gate-submit:disabled, .gate-form input:disabled { cursor: default; opacity: .55; }
.gate-message { font: .875rem/1.6 Manrope, Arial, sans-serif; color: #874e5e; margin: .25rem 0; }
.gate-hint { margin: 1.8rem 0 0; }
.gate-hint summary { display: inline-block; padding: .5rem 0; color: var(--muted); font: .875rem/1.5 Manrope, Arial, sans-serif; text-decoration: underline; text-decoration-color: #a7835270; text-underline-offset: .4rem; cursor: pointer; list-style: none; }
.gate-hint summary::-webkit-details-marker { display: none; }
.gate-hint[open] summary { color: var(--rose); }
.hint-image { width: 100%; margin-top: 1.2rem; height: 14rem; border: 1px solid #a783523d; padding: .6rem; background: #fffcf780; border-radius: 45% 45% 4px 4px; overflow: hidden; animation: appear .7s ease both; }
.hint-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; border-radius: 45% 45% 0 0; filter: saturate(.7) sepia(.1); }
.opening-letter .gate-envelope { transform: rotate(0) translateY(-12px); opacity: .6; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--rose); outline-offset: 5px; }
.setup { display: grid; place-items: center; padding: 3rem 1.75rem; }
.setup-copy { width: min(100%, 30rem); }
.setup-copy h1 { font: 3.5rem/1.25 Cormorant, Georgia, serif; margin: 0 0 1rem; }
.setup-copy p { font-size: 1.4rem; line-height: 1.5; }
.setup-copy label:not(:first-of-type) { margin-top: .75rem; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  body::after { inset: .7rem; }
  .gate-layout { display: block; min-height: 100svh; padding: max(2.7rem, env(safe-area-inset-top)) 1.9rem max(3rem, env(safe-area-inset-bottom)); }
  .gate-art { position: absolute; top: 0; left: 0; right: 0; min-height: 0; height: 22rem; opacity: .085; pointer-events: none; overflow: hidden; }
  .gate-envelope { width: 105%; max-width: 35rem; transform: rotate(-9deg) translateY(-25%); }
  .art-heart, .art-thread { display: none; }
  .gate-copy { margin: 0 auto; padding-top: 1rem; }
  .gate-heart { margin-bottom: 2rem; }
  .gate-copy h1 { font-size: clamp(3.4rem, 12vw, 4.8rem); }
  .gate-copy h1 em { font-size: clamp(5.4rem, 21vw, 7rem); line-height: 1.4; }
  .gate-intro { font-size: 1.3rem; margin: .6rem 0 2.2rem; }
  .gate-hint { margin-top: 1.35rem; }
  .hint-image { height: 12rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
