/* ==============================================================
   SCREEN SUNSET · page styles
   File: /screen-sunset/screen-sunset.css
   Colours, font and buttons come from site.css.
   The "How it helps" section uses shared styles (site.css, section 13).
   The sunset's colours live in screen-sunset.js (section 1).

   Sections:
     1  The invitation
     2  The sunset (fills the screen)
   ============================================================== */


/* --------------------------------------------------------------
   1 · THE INVITATION
   -------------------------------------------------------------- */
.dusk {
  padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 5rem);
  background: linear-gradient(var(--c-sky-top), color-mix(in srgb, #F4B36C 18%, var(--bg)));
}
.dusk__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 4rem);
  align-items: center;
}
@media (max-width: 800px) {
  .dusk__inner { grid-template-columns: 1fr; }
  .dusk__preview { order: -1; }
}
.dusk__title {
  margin-bottom: .35em;
  font-size: clamp(2.6rem, 1.6rem + 4vw, 5rem);
  font-weight: var(--weight-light);
  letter-spacing: -.025em;
}
.dusk__lede {
  max-width: 30rem;
  margin-bottom: .75rem;
  font-size: var(--step-1);
  font-weight: var(--weight-light);
  line-height: 1.45;
}
.dusk__body {
  max-width: 30rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.dusk-choice {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}
.dusk-choice legend {
  padding: 0;
  margin-bottom: .5rem;
  font-size: var(--step--1);
  font-weight: var(--weight-strong);
}
.dusk-choice__row { display: flex; flex-wrap: wrap; gap: .4rem; }
.dusk-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 42px;
  padding: .35rem .95rem .35rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: .95rem;
}
.dusk-pill input { margin: 0; width: 1rem; height: 1rem; accent-color: var(--accent); }
.dusk-pill:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.dusk-pill:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.dusk-check {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
}
.dusk-check input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--accent); }

.dusk__begin { font-size: 1.1rem; }
.dusk__note {
  margin-top: .75rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.dusk__preview {
  aspect-ratio: 1;
  max-width: 26rem;
  width: 100%;
  margin-inline: auto;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.dusk__preview canvas { display: block; width: 100%; height: 100%; }


/* --------------------------------------------------------------
   2 · THE SUNSET
   -------------------------------------------------------------- */
.sunset {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  cursor: none;
  animation: sunset-in 1.4s ease both;
}
.sunset canvas { display: block; width: 100%; height: 100%; }
@keyframes sunset-in { from { opacity: 0; } to { opacity: 1; } }

.sunset__words {
  position: absolute;
  left: 0;
  right: 0;
  top: 22%;
  padding-inline: 1.5rem;
  text-align: center;
  pointer-events: none;
}
.sunset__line {
  max-width: 34rem;
  margin: 0 auto;
  color: rgba(255, 244, 230, .92);
  font-size: clamp(1.3rem, 1rem + 1.6vw, 2rem);
  font-weight: var(--weight-light);
  line-height: 1.35;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .35);
  opacity: 0;
  transition: opacity 2.5s ease;
}
.sunset__small {
  max-width: 30rem;
  margin: .9rem auto 0;
  color: rgba(255, 244, 230, .6);
  font-size: 1rem;
  font-weight: var(--weight-light);
  opacity: 0;
  transition: opacity 2.5s ease;
}
.sunset__line.is-shown,
.sunset__small.is-shown { opacity: 1; }

.sunset__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: rgba(255, 244, 230, .65);
  font-size: .9rem;
  pointer-events: none;
  transition: opacity 2s ease;
}
.sunset__hint.is-gone { opacity: 0; }
body.sunset-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .sunset { animation: none; }
}
