/* The LOOP pages (job 34). LOOP's own colors: navy ground, cream type, peach for the one
   main action on a screen. Big type, few things per screen, phones first. */

@font-face {
  font-family: 'Krona One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/public/fonts/krona-one-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/public/fonts/albert-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Albert Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/public/fonts/albert-sans-latin-600-normal.woff2') format('woff2');
}
/* Local fallbacks sized to the two fonts, so nothing moves when they load (site.css). */
@font-face {
  font-family: 'Krona Fallback';
  src: local('Arial');
  size-adjust: 143.5%;
  ascent-override: 69%;
  descent-override: 18%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Albert Fallback';
  src: local('Arial');
  size-adjust: 102.2%;
  ascent-override: 93%;
  descent-override: 24.5%;
  line-gap-override: 0%;
}

:root {
  --navy: #0d416b;
  --peach: #ff8268;
  --cream: #fffeef;
  --deep: #0a3557;
  --dim: #c9d6e0;
  --line: #3b6587;
  --display: 'Krona One', 'Krona Fallback', sans-serif;
  --text: 'Albert Sans', 'Albert Fallback', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.5;
}

.top, main, .foot {
  max-width: 36rem;
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}
.top { padding-top: max(2rem, env(safe-area-inset-top)); display: flex; align-items: center; gap: 1.25rem; }
.emblem { display: block; width: 7.5rem; height: 7.5rem; }
.top.both .emblem { width: 6rem; height: 6rem; }
.ll { display: block; height: 1.75rem; width: auto; }
main { padding-top: 1.5rem; padding-bottom: 1rem; }

h1, h2, summary, .number, .k, .sentence, .headline { font-family: var(--display); font-weight: 400; }
h1, h2 { text-wrap: balance; overflow-wrap: anywhere; margin: 0; }
h1 { font-size: clamp(2rem, 9.5vw, 3.5rem); line-height: 1.08; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.5rem, 6.6vw, 2.25rem); line-height: 1.15; margin-bottom: 1.25rem; }
p { margin: 0 0 1rem; overflow-wrap: anywhere; }
a { color: var(--cream); text-underline-offset: 0.2em; }
time { white-space: nowrap; }

.screen { padding: 2.25rem 0 2.75rem; border-top: 1px solid var(--line); }
.screen.first { border-top: 0; padding-top: 1rem; }
.lead { font-size: clamp(1.25rem, 5.4vw, 1.6rem); line-height: 1.35; text-wrap: pretty; }
.small, .help { color: var(--dim); font-size: 1rem; }
/* Small words in peach on navy would be under 4.5 to 1: the small label is cream, and peach
   is kept for words 24px and up, where 3 to 1 is the measure. */
.k { display: block; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--cream); margin-bottom: 0.25rem; }
.for { font-family: var(--display); color: var(--peach); font-size: 1.5rem; line-height: 1.2; margin: -0.75rem 0 1.5rem; }
.where { font-weight: 600; }
.hours { margin-bottom: 1.5rem; }
.set { margin: 0 0 1.25rem; font-weight: 600; }
.code { font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.04em; color: var(--peach); white-space: nowrap; }

.banner {
  margin: 0;
  padding: max(0.75rem, env(safe-area-inset-top)) 1.25rem 0.75rem;
  background: var(--cream);
  color: var(--navy);
  font-weight: 600;
  text-align: center;
}

/* ---- forms: boxed fields, the label above ---- */
form { margin: 0; }
.field { margin: 0 0 1.25rem; }
label, legend { display: block; font-weight: 600; margin: 0 0 0.4rem; padding: 0; }
.help { margin: 0 0 0.4rem; }
input[type='text'], input[type='email'], input[type='tel'], textarea {
  display: block;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.8rem 0.9rem;
  border: 2px solid var(--cream);
  border-radius: 0.5rem;
  background: var(--deep);
  color: var(--cream);
  font: inherit;
}
textarea { min-height: 6.5rem; resize: vertical; }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--peach); }
fieldset { border: 0; margin: 0 0 1.25rem; padding: 0; min-width: 0; }
.choices { display: grid; gap: 0.6rem; }
.radio {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 4rem; margin: 0; padding: 0.9rem 1rem;
  border: 2px solid var(--line); border-radius: 0.5rem;
  font-family: var(--display); font-weight: 400; font-size: 1rem; cursor: pointer;
}
.radio input { width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--peach); flex: none; }
.radio:has(input:checked) { border-color: var(--peach); }
.error { color: var(--peach); font-weight: 600; font-size: 1.2rem; margin: 0.4rem 0 0; }
.error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The open box: the sentence is the label, and the blank is the box. */
.host { margin: 0 0 1.5rem; }
.sentence { display: block; font-size: clamp(1.6rem, 7.6vw, 2.6rem); line-height: 1.12; margin: 0; text-wrap: balance; }
.host textarea {
  margin: 0.6rem 0;
  min-height: 5.5rem;
  border-width: 0 0 4px;
  border-color: var(--peach);
  border-radius: 0.5rem 0.5rem 0 0;
  font-size: 1.35rem;
  line-height: 1.3;
}
.host .error { margin-top: 0.75rem; }

/* ---- buttons: one filled main action per screen; every other one outlined ---- */
button, .button {
  display: inline-block;
  width: 100%;
  min-height: 3.75rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--peach);
  border-radius: 999px;
  background: var(--peach);
  /* LOOP's navy on LOOP's peach is 4.35 to 1, just under what words this size need (4.5):
     the words on a peach button take the deeper navy, 5.2 to 1. */
  color: var(--deep);
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 150ms ease-out, background-color 150ms ease-out;
}
button.quiet, .button.quiet { background: transparent; color: var(--cream); border-color: var(--cream); }
button:active, .button:active { transform: scale(0.97); }
@media (hover: hover) {
  button:hover, .button:hover { background: var(--cream); border-color: var(--cream); color: var(--navy); }
  button.quiet:hover, .button.quiet:hover { background: var(--deep); color: var(--cream); }
}
:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.actions, .doors { display: grid; gap: 0.75rem; margin: 1.5rem 0 0; }
/* A line that follows a row of buttons (job 36: the send-your-guests line under Saturday's
   calendar link, after RSVP_FRIDAY_UNTIL) stands clear of it. */
.actions + p { margin-top: 1.5rem; }
form[aria-busy='true'] button { opacity: 0.75; }
.privacy-link { margin: 1.25rem 0 0; }

/* What the page says after a form is sent. */
.said {
  font-family: var(--display);
  font-size: clamp(1.25rem, 5.6vw, 1.75rem);
  line-height: 1.25;
  border-left: 4px solid var(--peach);
  padding: 0.25rem 0 0.25rem 1rem;
  text-wrap: balance;
  margin: 0 0 1.5rem;
  outline: none;
}

/* ---- the hotel asks: one line each, opened by a tap ---- */
.ask { border-top: 1px solid var(--line); }
.ask:last-of-type { border-bottom: 1px solid var(--line); }
.ask summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1.3;
  min-height: 4rem;
  padding: 1.1rem 2.5rem 1.1rem 0;
  position: relative;
  text-wrap: balance;
}
.ask summary::-webkit-details-marker { display: none; }
.ask summary::after { content: '+'; position: absolute; right: 0.25rem; top: 0.85rem; font-size: 1.6rem; color: var(--peach); }
.ask[open] summary::after { content: '\2212'; }
.ask[open] { padding-bottom: 1.75rem; }

/* ---- the pass ---- */
.get-pass { margin-top: 1.75rem; }
.pass {
  background: var(--cream);
  color: var(--navy);
  border: 0;
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  margin: 1.5rem 0 2.5rem;
  text-align: center;
  outline: none;
}
.pass .k { color: var(--navy); font-size: 0.95rem; }
.pass .number { font-size: clamp(2.75rem, 15vw, 6rem); line-height: 1; margin: 0.5rem 0 0.75rem; color: var(--navy); white-space: nowrap; overflow-wrap: normal; }
.pass .issued { font-weight: 600; }
.pass .lead { margin-bottom: 0.5rem; }
.pass p:last-child { margin-bottom: 0; }
.pass.over { background: transparent; color: var(--cream); border: 2px dashed var(--line); }
.pass.over .number, .pass.over .k { color: var(--dim); }

/* ---- the foot ---- */
.foot { padding-top: 2rem; padding-bottom: max(3rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--dim); font-size: 1rem; }
.foot p { margin-bottom: 0.5rem; }
.foot .links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; }
.foot .links a { display: inline-block; padding: 0.6rem 0; }

@media (min-width: 60rem) {
  .top, main, .foot { max-width: 44rem; }
  .emblem { width: 9rem; height: 9rem; }
  .doors { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  button, .button { transition: none; }
  button:active, .button:active { transform: none; }
}

/* ---- the guest piece: a tent card (4 x 6 in) and a sign (8.5 x 11 in), one page each ---- */
@page tent { size: 4in 6in; margin: 0; }
@page sign { size: 8.5in 11in; margin: 0; }
.tools { max-width: 36rem; margin: 0 auto; padding: 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.tools button, .tools .button { min-height: 3rem; padding: 0.6rem 0.75rem; font-size: 0.85rem; overflow-wrap: anywhere; }
.sheet {
  max-width: none;
  margin: 0 auto 2rem;
  background: var(--navy);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  overflow: hidden;
  outline: 1px solid var(--line);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.sheet p { margin: 0; }
.sheet .emblem { flex: none; }
/* The code keeps its own quiet zone of four modules; its corners stay square so none of it is cut. */
.sheet .qr { background: #fafafa; flex: none; }
.sheet .qr svg { display: block; width: 100%; height: 100%; }
.sheet .headline { line-height: 1.08; text-wrap: balance; }
/* The offer is a sentence or two: reading text under the headline, not a second headline. */
.sheet .offer { line-height: 1.3; text-wrap: balance; }
.sheet .scan { font-family: var(--display); color: var(--peach); }
.sheet .terms, .sheet .where { color: var(--dim); }
.sheet .terms { text-wrap: balance; }
.sheet.tent { width: 4in; height: 6in; padding: 0.26in 0.3in 0.22in; page: tent; }
.sheet.tent .emblem { width: 0.7in; height: 0.7in; }
.sheet.tent .headline { font-size: 0.24in; }
.sheet.tent .offer { font-size: 0.135in; }
.sheet.tent .qr { width: 3in; height: 3in; }
.sheet.tent .scan { font-size: 0.17in; }
.sheet.tent .terms, .sheet.tent .where { font-size: 0.1in; line-height: 1.3; }
.sheet.sign { width: 8.5in; height: 11in; padding: 0.7in 0.75in 0.6in; page: sign; }
.sheet.sign .emblem { width: 1.9in; height: 1.9in; }
.sheet.sign .headline { font-size: 0.5in; }
.sheet.sign .offer { font-size: 0.25in; max-width: 6.4in; }
.sheet.sign .qr { width: 4.4in; height: 4.4in; }
.sheet.sign .scan { font-size: 0.32in; }
.sheet.sign .terms, .sheet.sign .where { font-size: 0.16in; line-height: 1.3; }
/* On a screen narrower than the piece, the whole piece is shown smaller. */
@media screen and (max-width: 8.9in) { .loop-piece-sign .sheet { zoom: 0.44; } }
@media screen and (min-width: 5.6in) and (max-width: 8.9in) { .loop-piece-sign .sheet { zoom: 0.62; } }
@media screen and (max-width: 4.2in) { .loop-piece-tent .sheet { zoom: 0.9; } }

@media print {
  html, body { background: #fff; }
  .no-print, .banner, button, .button { display: none !important; }
  .sheet { margin: 0; outline: 0; zoom: 1 !important; break-after: avoid; break-inside: avoid; }
}
