/* Guest-facing pages outside the home page: the password screen and /rsvp/. Painted Shore look (Pinyon Script / Cormorant SC / Lora).
   These pages run under a CSP without inline styles, so every position lives here. Mobile first. */
:root { --paper:#FBF6EC; --paper2:#F6EEDF; --ink:#1E3B36; --ink2:#2E4741; --muted:#55665F; --accent:#A24B38; --hover:#3E7F7C; --line:rgba(30,59,54,.16); --field:#8A9A92;
  --night:#2B2230; --cream:#F7EADB; --cream2:#E9D9C8; --coral:#F0A58C; --bad:#8a2d2d;
  --script:'Pinyon Script',cursive; --sc:'Cormorant SC',Georgia,serif; --serif:'Lora',Georgia,serif; --ease:cubic-bezier(.25,.1,.25,1); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--serif); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--ink); } a:hover { color: var(--hover); }
.script { font-family: var(--script); font-weight: 400; }
.sr { position: absolute; left: -9999px; }
input, select, textarea { font: inherit; font-size: 17px; padding: .7em .9em; min-height: 52px; border: 1px solid var(--field); border-radius: 4px; background: var(--paper); color: var(--ink); width: 100%; }
textarea { min-height: 84px; resize: vertical; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.opt:focus-within span { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 32px; border: 1px solid var(--ink); border-radius: 4px; font-family: var(--sc); font-size: 19px; letter-spacing: .16em;
  color: var(--ink); background: transparent; cursor: pointer; text-decoration: none; transition: background-color 320ms var(--ease), color 320ms var(--ease); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); } .btn.solid:hover { background: var(--hover); border-color: var(--hover); }
.btn:disabled { opacity: .6; cursor: wait; }
.hint { color: var(--muted); font-size: 15px; margin: .5rem 0; }
.msg { color: var(--bad); min-height: 1.6em; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- password screen (night on the beach) ---------- */
body.gate { background: var(--night); color: var(--cream); }
.night { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; background: linear-gradient(180deg, #241C2A 0%, #3A2D3C 48%, #6A4F5E 74%, #8C6A78 100%); }
.night img { position: absolute; display: block; height: auto; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.shore { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 1440 / 480; pointer-events: none; }
.shore .band { position: absolute; left: 0; right: 0; }
.n-sea { top: calc(220 / 480 * 100%); height: 25%; background: linear-gradient(180deg, #6F7799 0%, #5A6286 100%); border-radius: 50% 50% 0 0 / 26px 26px 0 0; }
.n-sand { top: calc(320 / 480 * 100%); bottom: 0; background: linear-gradient(180deg, #7E6152 0%, #5E4741 100%); border-radius: 50% 50% 0 0 / 34px 34px 0 0; }
.n-tide { left: -20px !important; right: -20px !important; top: calc(314 / 480 * 100%); height: 10px; border-radius: 50%; background: rgba(247,234,219,.6); filter: blur(1.5px); animation: n-tide 9s cubic-bezier(.37,0,.63,1) infinite; }
.n-lights { left: calc(270 / 1440 * 100%); top: calc(100 / 480 * 100%); width: 62.5%; filter: drop-shadow(0 0 10px rgba(255,210,120,.85)); animation: n-tw 6s ease-in-out infinite; }
.n-palm-l { left: calc(-90 / 1440 * 100%); top: 0; width: calc(560 / 1440 * 100%); opacity: .55; filter: brightness(.4) saturate(.6) sepia(.3); transform-origin: 50% 100%; animation: n-sway 14s cubic-bezier(.37,0,.63,1) infinite; }
.n-palm-r { left: calc(1040 / 1440 * 100%); top: calc(30 / 480 * 100%); width: calc(480 / 1440 * 100%); opacity: .55; filter: brightness(.4) saturate(.6) sepia(.3); scale: -1 1; transform-origin: 50% 100%; animation: n-sway 17s cubic-bezier(.37,0,.63,1) -6s infinite; }
.n-dog { left: calc(1010 / 1440 * 100%); top: calc(332 / 480 * 100%); width: calc(140 / 1440 * 100%); opacity: .8; filter: saturate(.6) brightness(.8) sepia(.12); transform-origin: 50% 100%; animation: n-breathe 4.6s ease-in-out infinite; }
.n-moon { left: calc(1150 / 1440 * 100%); top: 150px; width: 76px; opacity: .85; }
.n-g { opacity: .2; animation: n-glint 7s ease-in-out infinite; }
.n-g1 { left: 12.5%; top: 110px; width: 18px; } .n-g2 { left: 29.2%; top: 70px; width: 10px; animation-delay: 1.6s; } .n-g3 { left: 73.6%; top: 60px; width: 14px; animation-delay: 3.1s; }
.n-g4 { left: 86.8%; top: 90px; width: 12px; animation-delay: 4.4s; } .n-g5 { left: 50%; top: 50px; width: 12px; animation-delay: 5.6s; }
.pw { position: relative; z-index: 2; width: min(820px, 100%); margin: 0 auto; padding: 120px 24px 48px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.pw h1 { font-size: clamp(76px, 7.2vw, 104px); line-height: 1.05; color: var(--cream); }
.pw .cap { margin-bottom: 18px; font-family: var(--sc); font-size: 20px; letter-spacing: .2em; color: var(--cream2); }
.pw label { font-family: var(--sc); font-size: 19px; letter-spacing: .16em; }
.pwrow { display: flex; gap: 10px; width: 100%; }
.pw input { flex: 1; min-width: 0; height: 56px; padding: 0 18px; border: 1px solid rgba(247,234,219,.5); background: rgba(43,34,48,.55); color: var(--cream); font-size: 18px; text-align: center; letter-spacing: .2em; }
.pw input[aria-invalid="true"] { border: 1.5px solid var(--coral); }
.pw input.shake { animation: n-shake 420ms cubic-bezier(.36,.07,.19,.97) both; }
.pw .btn { height: 56px; padding: 0 28px; border: 0; background: var(--cream); color: var(--night); }
.pw .btn:hover { background: #fff; color: var(--night); }
.pw .hint { margin: 0; font-style: italic; font-size: 17px; color: var(--cream2); }
.pw .msg { color: var(--coral); line-height: 1.5; }
.gate :focus-visible { outline-color: var(--coral); }
br.m { display: none; }
@media (max-width: 767px) {
  .shore { aspect-ratio: 390 / 344; }
  .n-sea { top: calc(150 / 344 * 100%); height: calc(90 / 344 * 100%); border-radius: 50% 50% 0 0 / 18px 18px 0 0; }
  .n-sand { top: calc(224 / 344 * 100%); border-radius: 50% 50% 0 0 / 22px 22px 0 0; }
  .n-tide, .n-palm-r { display: none; }
  .n-lights { left: calc(25 / 390 * 100%); top: calc(60 / 344 * 100%); width: calc(340 / 390 * 100%); filter: drop-shadow(0 0 8px rgba(255,210,120,.85)); }
  .n-palm-l { left: calc(-80 / 390 * 100%); top: calc(60 / 344 * 100%); width: calc(250 / 390 * 100%); }
  .n-dog { left: calc(230 / 390 * 100%); top: calc(232 / 344 * 100%); width: calc(100 / 390 * 100%); }
  .n-moon { left: auto; right: 46px; top: 64px; width: 44px; }
  .n-g1 { left: 10%; top: 60px; width: 14px; } .n-g3 { left: 77%; top: 90px; width: 10px; } .n-g5 { left: 49%; top: 40px; width: 10px; } .n-g2, .n-g4 { display: none; }
  .pw { padding-top: 150px; gap: 12px; } .pw h1 { font-size: 76px; line-height: 1; } br.m { display: inline; }
  .pw .cap { font-size: 15px; margin-bottom: 14px; } .pw label { font-size: 17px; }
  .pwrow { flex-direction: column; } .pw input { height: 54px; } .pw .btn { height: 52px; width: 100%; }
  .pw .hint { font-size: 16px; }
}
@keyframes n-glint { 0%, 100% { opacity: .2; } 15% { opacity: .9; } 30% { opacity: .2; } }
@keyframes n-tw { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }
@keyframes n-tide { 0%, 100% { transform: translateY(0); opacity: .7; } 50% { transform: translateY(4px); opacity: .4; } }
@keyframes n-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.014); } }
@keyframes n-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(.9deg); } }
@keyframes n-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---------- /rsvp/ ---------- */
.bar { height: 88px; padding: 0 56px; display: flex; align-items: center; justify-content: space-between; }
.bar .logo { font-family: var(--script); font-size: 36px; text-decoration: none; line-height: 1; }
.bar .site { font-family: var(--sc); font-size: 18px; letter-spacing: .14em; text-decoration: none; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 16px 24px 96px; }
.wrap > header { text-align: center; margin-bottom: 32px; }
.wrap > header h1 { font-size: clamp(72px, 9vw, 110px); line-height: 1; }
.wrap > header p { color: var(--ink2); font-size: 18px; margin-top: 8px; }
#main > h2 { font-family: var(--script); font-weight: 400; font-size: clamp(42px, 6vw, 56px); line-height: 1.1; text-align: center; }
.lede { color: var(--ink2); text-align: center; margin: 8px auto 24px; max-width: 34rem; }
form.find { display: flex; flex-direction: column; gap: 12px; padding: 28px 32px 32px; background: var(--paper2); border-radius: 10px; }
form.find .btn { margin-top: 6px; }
.row2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
label.f { display: block; text-align: left; font-family: var(--sc); font-size: 18px; letter-spacing: .14em; margin-bottom: 4px; }
.match { display: flex; flex-direction: column; width: 100%; text-align: left; margin: 10px 0; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); min-height: 52px; transition: border-color 320ms var(--ease); }
.match:hover { border-color: var(--hover); }
.match b { font-family: var(--script); font-weight: 400; font-size: 32px; line-height: 1.15; } .match span { color: var(--muted); font-size: 15px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px 28px 28px; margin: 20px 0; }
.card h3 { font-family: var(--script); font-weight: 400; font-size: 44px; line-height: 1.1; margin-bottom: 4px; }
.ev { border-top: 1px solid rgba(30,59,54,.1); padding-top: 16px; margin-top: 16px; }
.ev h4 { font-family: var(--sc); font-weight: 600; font-size: 21px; letter-spacing: .1em; }
.ev .when { color: var(--muted); font-size: 15px; margin: 2px 0 12px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: 4px 8px; border: 1px solid var(--field); border-radius: 4px; background: var(--paper);
  font-family: var(--sc); font-size: 17px; letter-spacing: .1em; line-height: 1.15; transition: background-color 320ms var(--ease), color 320ms ease; }
.opt input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.extra { margin-top: 8px; display: grid; gap: 4px; }
.extra label.f { margin-top: 8px; font-size: 16px; }
form > .btn.solid { margin-top: 8px; }
.ok { display: flex; gap: 20px; align-items: center; color: var(--ink); background: #E5F0EC; border-radius: 8px; padding: 18px 22px; margin: 20px 0; font-size: 17px; line-height: 1.6; }
.ok img { width: 96px; flex: none; opacity: .92; filter: saturate(.82) sepia(.06); }
.error { color: var(--bad); }
.back { background: none; border: 0; color: var(--ink); font-family: var(--sc); font-size: 17px; letter-spacing: .1em; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; padding: .5rem 0; min-height: 44px; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) {
  .bar { height: 64px; padding: 0 20px; } .bar .logo { font-size: 30px; } .bar .site { font-size: 15px; letter-spacing: .12em; }
  .wrap { padding: 8px 16px 56px; } .wrap > header { margin-bottom: 20px; } .wrap > header p { font-size: 15px; }
  form.find { padding: 20px; } .card { padding: 18px 18px 20px; } .card h3 { font-size: 36px; }
  .ev h4 { font-size: 18px; letter-spacing: .08em; } .opt span { font-size: 14px; letter-spacing: .03em; }
  .ok { gap: 14px; padding: 16px; font-size: 15px; } .ok img { width: 72px; }
}
