/* ============================================================
   Snug Chill — coming soon
   Brand palette sampled from the master logo.
   ============================================================ */

:root {
  --navy:        #1B2A57;
  --navy-deep:   #14204a;
  --coral:       #F16C5A;
  --coral-dark:  #d9503d;
  --teal:        #36B5A9;
  --teal-dark:   #24968b;
  --ink:         #0A0A0A;

  --bg:          #FDFBF7;
  --surface:     #FFFFFF;
  --text:        #23252B;
  --text-muted:  #5C6270;
  --border:      #E3E1DC;
  --danger:      #C2372A;

  --radius:      16px;
  --radius-sm:   10px;
  --shadow-sm:   0 1px 2px rgb(27 42 87 / .06), 0 2px 8px rgb(27 42 87 / .06);
  --shadow-lg:   0 12px 40px rgb(27 42 87 / .18);

  --font: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system,
          "Helvetica Neue", Arial, sans-serif;

  --sheet-max:   30rem;
  --sheet-h:     min(88dvh, 52rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  /* Confetti hint of the logo's shapes, kept very light so text stays legible. */
  background-image:
    radial-gradient(circle at 12% 18%, rgb(54 181 169 / .10) 0, transparent 42%),
    radial-gradient(circle at 88% 12%, rgb(241 108 90 / .10) 0, transparent 38%),
    radial-gradient(circle at 78% 88%, rgb(27 42 87 / .07) 0, transparent 45%);
  background-attachment: fixed;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------- page */

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) 1.25rem 3rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
  text-align: center;
}

.logo {
  display: block;
  width: min(100%, 24rem);
  height: auto;
  margin: 0 auto clamp(1rem, 4vw, 1.75rem);
}

.headline {
  margin: 0 0 .85rem;
  font-size: clamp(1.5rem, 5.2vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.lede {
  margin: 0 auto;
  max-width: 34rem;
  font-size: clamp(1rem, 2.6vw, 1.1rem);
  color: var(--text-muted);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin: clamp(1.75rem, 6vw, 2.5rem) auto 0;
  max-width: 24rem;
}

@media (min-width: 34rem) {
  .actions { flex-direction: row; max-width: none; justify-content: center; }
  .actions .btn { flex: 1 1 0; max-width: 17rem; }
}

/* ---------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--navy);
  --btn-fg: #fff;
  --btn-shadow: var(--navy-deep);

  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3.25rem;
  padding: .85rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .005em;
  cursor: pointer;
  /* Offset solid shadow mirrors the drop shadow baked into the wordmark. */
  box-shadow: 0 4px 0 var(--btn-shadow);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  touch-action: manipulation;
}

.btn:hover  { background: color-mix(in srgb, var(--btn-bg) 88%, #000); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--btn-shadow); }

.btn-primary   { --btn-bg: var(--coral); --btn-shadow: var(--coral-dark); }
.btn-secondary { --btn-bg: var(--teal);  --btn-shadow: var(--teal-dark); }
.btn-block     { width: 100%; }

.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

:where(.btn, .icon-btn, input, textarea, a):focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.icon-btn {
  appearance: none;
  border: 0;
  background: rgb(27 42 87 / .07);
  color: var(--navy);
  font-size: 1.6rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 .15rem;
}
.icon-btn:hover { background: rgb(27 42 87 / .13); }

/* ---------------------------------------------------------- footer */

.footer {
  margin-top: clamp(2.5rem, 8vw, 4rem);
  font-size: .82rem;
  color: var(--text-muted);
}
.footer p { margin: .25rem 0; }
.footer-note { font-variant-numeric: tabular-nums; opacity: .75; }

/* ---------------------------------------------------------- dialog */

.sheet {
  position: relative;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  width: min(100% - 2rem, var(--sheet-max));
  max-height: var(--sheet-h);
  overflow: hidden;
}

.sheet::backdrop {
  background: rgb(20 32 74 / .55);
  backdrop-filter: blur(3px);
}

.sheet[open] { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.sheet[open]::backdrop { animation: fade .22s ease; }

@keyframes pop  { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }

/* Floated above the scrolling body rather than sitting in the flow, so the
   sheet title stays visible and the button stays put while the form scrolls. */
.sheet-dismiss {
  position: absolute;
  top: .7rem;
  right: .7rem;
  z-index: 2;
  margin: 0;
}

.sheet-body {
  padding: clamp(1.4rem, 5vw, 1.75rem) clamp(1.15rem, 5vw, 1.75rem)
           clamp(1.25rem, 5vw, 1.75rem);
  padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
  overflow-y: auto;
  max-height: var(--sheet-h);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet-title {
  margin: 0 0 .4rem;
  padding-right: 3rem;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--navy);
}

.sheet-intro {
  margin: 0 0 1.4rem;
  color: var(--text-muted);
  font-size: .95rem;
  text-wrap: pretty;
}

/* On phones the dialog becomes a bottom sheet: thumb-reachable, and it
   leaves the page visible behind it so the context is never lost. */
@media (max-width: 33.99rem) {
  .sheet {
    width: 100%;
    max-width: none;
    --sheet-h: 92dvh;
    margin: 0 0 auto;
    position: fixed;
    inset: auto 0 0 0;
    border-width: 2px 0 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .sheet[open] { animation: slide-up .26s cubic-bezier(.2, .9, .3, 1); }
  @keyframes slide-up { from { transform: translateY(100%); } }
}

@media (prefers-reduced-motion: reduce) {
  .sheet[open], .sheet[open]::backdrop { animation: none; }
  .btn { transition: none; }
}

/* ---------------------------------------------------------- forms */

.form { text-align: left; }

.field { margin-bottom: 1.15rem; }

.field label {
  display: block;
  margin-bottom: .4rem;
  font-weight: 650;
  font-size: .92rem;
  color: var(--navy);
}

.req      { color: var(--coral-dark); }
.optional { font-weight: 450; color: var(--text-muted); }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  padding: .8rem .9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  /* 16px keeps iOS Safari from zooming the viewport when a field focuses. */
  font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }

input:focus, textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgb(27 42 87 / .12);
  outline: none;
}

input[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.hint {
  margin: .4rem 0 0;
  font-size: .82rem;
  color: var(--text-muted);
}

.error {
  margin: .4rem 0 0;
  font-size: .85rem;
  font-weight: 600;
  color: var(--danger);
}
.error:empty { display: none; }

.field-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .1rem .7rem;
  align-items: start;
  padding: .9rem;
  background: rgb(54 181 169 / .07);
  border: 2px solid rgb(54 181 169 / .25);
  border-radius: var(--radius-sm);
}

.field-check input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: .15rem 0 0;
  accent-color: var(--teal-dark);
  flex-shrink: 0;
}

.field-check label {
  margin: 0;
  font-weight: 450;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--text);
}

.field-check .error { grid-column: 1 / -1; }

/* Honeypot. Kept out of the layout and out of the a11y tree without
   display:none, which some bots specifically skip. */
.gotcha {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.turnstile:not(:empty) { margin: 0 0 1rem; min-height: 65px; }

.fineprint {
  margin: .9rem 0 0;
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
  text-wrap: pretty;
}

.form-status {
  margin: 0 0 .9rem;
  padding: .75rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  background: rgb(194 55 42 / .09);
  border: 2px solid rgb(194 55 42 / .3);
  color: var(--danger);
}
.form-status:empty { display: none; }

.spinner {
  width: 1.05rem;
  height: 1.05rem;
  border: 2.5px solid rgb(255 255 255 / .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- success */

.success { text-align: center; padding: 1rem 0 .5rem; }

.success-mark {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--ink);
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
}

.success h3 {
  margin: 0 0 .5rem;
  font-size: 1.3rem;
  color: var(--navy);
}

.success p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  text-wrap: pretty;
}
