/* ==========================================================================
   school-workshop.html — "The Resonant Room"
   Page-scoped composition, responsive behaviour, and atmosphere treatments.
   Motion is handled by assets/js/school-workshop.js (GSAP + ScrollTrigger).

   Color constants below mirror tailwind.config.js.  Only the three tokens
   that are not compiled as text-* utilities in tailwind-output.css are
   declared; scrims use black/white keywords with color-mix().
   ========================================================================== */

:root {
  /* Derived from tailwind.config.js — keep synchronised. */
  --sws-dark: #1C2321;        /* dark */
  --sws-ground: #F4F5F6;      /* surface.ground */
  --sws-teal: #00C2B2;        /* brand.teal */
  --sws-teal-deep: #009b8e;   /* brand.teal-deep */
  --sws-teal-bright: #0DDBC7; /* brand.teal-bright */
  --sws-muted: #7F8C8D;       /* muted */
}

.sws-page {
  overflow: clip;
}

.sws-shell {
  width: min(82.5rem, calc(100% - 3rem));
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .sws-shell { width: min(82.5rem, calc(100% - 7rem)); }
}

/* ---------- Hero (HKICF-family architecture) ---------- */
.sws-hero {
  position: relative;
  min-height: 94svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.sws-hero__media,
.sws-hero__media img,
.sws-hero__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sws-hero__media img {
  object-fit: cover;
  object-position: center 34%;
  display: block;
}

.sws-hero__scrim {
  background:
    linear-gradient(to bottom, color-mix(in srgb, black 55%, transparent), transparent 32%, color-mix(in srgb, black 88%, transparent) 88%),
    linear-gradient(to right, color-mix(in srgb, black 62%, transparent), transparent 66%);
}

/* Resonance arcs motif — recurs in hero and finale. */
.sws-hero__arcs,
.sws-finale__arcs {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.sws-hero__arcs span,
.sws-finale__arcs span {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  width: 120%;
  aspect-ratio: 1;
  translate: -50% 0;
  border: 1px solid color-mix(in srgb, currentColor 9%, transparent);
  border-radius: 50%;
}

.sws-hero__arcs span:nth-child(2),
.sws-finale__arcs span:nth-child(2) {
  width: 100%;
  bottom: 5rem;
  border-color: color-mix(in srgb, currentColor 7%, transparent);
}

.sws-hero__arcs span:nth-child(3),
.sws-finale__arcs span:nth-child(3) {
  width: 80%;
  bottom: 9rem;
  border-color: color-mix(in srgb, var(--sws-teal-bright) 16%, transparent);
}

.sws-hero__content {
  position: relative;
  z-index: 3;
  width: min(82.5rem, calc(100% - 3rem));
  margin-inline: auto;
  padding-bottom: clamp(8rem, 14vh, 11rem);
}

.sws-hero__eyebrow {
  margin-bottom: 1.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 80%, transparent);
}

.sws-hero h1 {
  font-family: "Futura", "Jost", sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.sws-hero__line {
  display: block;
  overflow: hidden;
}

.sws-hero__line > span {
  display: block;
}

.sws-hero__lede {
  margin-top: 1.5rem;
  max-width: 30rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: color-mix(in srgb, currentColor 84%, transparent);
}

.sws-hero__curve,
.sws-carry__curve,
.sws-finale__curve {
  position: absolute;
  z-index: 5;
  left: 0;
  width: 100%;
  height: clamp(3rem, 7vw, 6rem);
  pointer-events: none;
}

.sws-hero__curve {
  bottom: -1px;
  color: var(--sws-ground);
}

.sws-carry__curve {
  top: -1px;
  color: var(--sws-dark);
}

.sws-finale__curve {
  top: -1px;
  color: #fff;
}

/* ---------- The invitation ---------- */
.sws-invite {
  padding-block: clamp(5.5rem, 11vw, 10rem);
}

.sws-invite__statement {
  margin-top: 2rem;
  max-width: 52rem;
  font-family: "Futura", "Jost", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.sws-invite__cue {
  margin-top: 2.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sws-muted);
  max-width: 30rem;
}

/* ---------- The rooms ---------- */
.sws-rooms {
  position: relative;
}

.sws-rooms__viewport {
  position: relative;
}

.sws-rooms__track {
  display: grid;
}

.sws-room-panel {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 78svh;
  overflow: hidden;
  isolation: isolate;
}

.sws-room-panel__media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}

.sws-room-panel__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, color-mix(in srgb, black 88%, transparent), transparent 62%),
    linear-gradient(to right, color-mix(in srgb, black 52%, transparent), transparent 70%);
}

.sws-room-panel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.sws-room-panel__copy {
  position: relative;
  z-index: 2;
  width: min(46rem, calc(100% - 3rem));
  margin-inline: auto;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

@media (min-width: 1024px) {
  .sws-room-panel__copy {
    width: min(82.5rem, calc(100% - 7rem));
    max-width: none;
  }
  .sws-room-panel__copy > * { max-width: 40rem; }
}

.sws-room-panel__no {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: currentColor;
  margin-bottom: 1.1rem;
}

.sws-room-panel h3 {
  font-family: "Futura", "Jost", sans-serif;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
  text-wrap: balance;
}

.sws-room-panel__copy > p:last-child {
  font-size: 1.02rem;
  line-height: 1.75;
  color: color-mix(in srgb, currentColor 78%, transparent);
}

/* Progress readout — visible only during the pinned horizontal walk. */
.sws-rooms__progress {
  display: none;
}

/* --- Horizontal walk (JS applies .is-horizontal on wide no-preference only) --- */
.sws-rooms__viewport.is-horizontal {
  height: 100svh;
  overflow: hidden;
}

.sws-rooms__viewport.is-horizontal .sws-rooms__track {
  display: flex;
  height: 100%;
  width: max-content;
}

.sws-rooms__viewport.is-horizontal .sws-room-panel {
  width: 100vw;
  height: 100svh;
  min-height: 0;
}

.sws-rooms__viewport.is-horizontal .sws-rooms__progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.25rem;
  z-index: 6;
  width: min(82.5rem, calc(100% - 7rem));
  margin-inline: auto;
}

.sws-rooms__progress-label,
.sws-rooms__count {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 60%, transparent);
}

.sws-rooms__ticks {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  max-width: 18rem;
}

.sws-rooms__ticks i {
  flex: 1;
  height: 2px;
  background: color-mix(in srgb, currentColor 22%, transparent);
  transition: background-color 260ms ease;
  display: block;
  font-style: normal;
}

.sws-rooms__ticks i.is-active {
  background: var(--sws-teal-bright);
}

/* ---------- What you carry back ---------- */
.sws-carry {
  position: relative;
  padding-block: clamp(7rem, 12vw, 11rem) clamp(5rem, 10vw, 9rem);
}

.sws-carry h2,
.sws-path h2,
.sws-finale__copy h2 {
  font-family: "Futura", "Jost", sans-serif;
  font-size: clamp(2.25rem, 4.5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 1.25rem;
}

.sws-carry__lede {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--sws-muted);
}

.sws-carry__keepsakes {
  list-style: none;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

.sws-keepsake {
  position: relative;
  padding: 2.25rem 1.75rem 2rem 0;
  border-left: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  padding-left: 1.75rem;
}

.sws-keepsake:first-child {
  border-left: 0;
  padding-left: 0;
}

.sws-keepsake__no {
  display: block;
  font-family: "Futura", "Jost", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sws-teal-deep);
  margin-bottom: 1.5rem;
}

.sws-keepsake h3 {
  font-family: "Futura", "Jost", sans-serif;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.55rem;
}

.sws-keepsake p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--sws-muted);
}

@media (max-width: 1023px) {
  .sws-carry__keepsakes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sws-keepsake:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 639px) {
  .sws-carry__keepsakes {
    grid-template-columns: 1fr;
  }
  .sws-keepsake {
    border-left: 0;
    padding-left: 0;
    padding-block: 1.75rem;
    border-bottom: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  }
}

/* ---------- The path ---------- */
.sws-path {
  padding-block: clamp(5rem, 10vw, 9rem);
}

.sws-path__steps {
  list-style: none;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: sws-step;
}

.sws-path__step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1rem 3rem;
  align-items: baseline;
  padding-block: clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  counter-increment: sws-step;
}

.sws-path__step h3 {
  font-family: "Futura", "Jost", sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.sws-path__step h3::before {
  content: "0" counter(sws-step);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--sws-teal-deep);
}

.sws-path__step > p:last-child {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--sws-muted);
  max-width: 34rem;
}

@media (max-width: 767px) {
  .sws-path__step {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

/* ---------- Finale ---------- */
.sws-finale {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(7rem, 13vw, 12rem) clamp(6rem, 10vw, 9rem);
}

.sws-finale__grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.sws-finale__copy {
  position: sticky;
  top: 7rem;
}

.sws-finale__copy h2 {
  margin-block: 1rem 1.5rem;
}

.sws-finale__copy > p:last-of-type {
  font-size: 1.05rem;
  line-height: 1.75;
  color: color-mix(in srgb, currentColor 76%, transparent);
  max-width: 30rem;
}

/* ---------- Form (on the dark stage) ---------- */
.sws-form {
  display: grid;
  gap: 1.75rem;
  background: #fff;
  border-radius: 2rem;
  padding: clamp(1.75rem, 4vw, 3rem);
}

.sws-form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--sws-muted);
}

.sws-form__legend {
  margin-bottom: 0.75rem;
  color: var(--sws-muted);
}

.sws-form__input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, black 12%, transparent);
  background: #fff;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sws-form__input:focus-visible {
  outline: none;
  border-color: var(--sws-teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sws-teal) 22%, transparent);
}

.sws-form__textarea {
  resize: none;
}

.sws-form__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.sws-form__checks {
  display: grid;
  gap: 0.75rem;
}

.sws-form__check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sws-form__check input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--sws-teal);
  flex-shrink: 0;
}

.sws-form__consent {
  font-size: 0.78rem;
  color: var(--sws-muted);
  line-height: 1.55;
}

.sws-form__submit {
  width: 100%;
  border: 0;
  border-radius: 9999px;
  padding: 1rem 2rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.sws-form__submit:hover {
  background: var(--sws-teal-deep);
}

.sws-form__submit:focus-visible {
  outline: 2px solid var(--sws-teal);
  outline-offset: 3px;
}

.sws-form__privacy {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--sws-muted);
  text-align: center;
}

@media (max-width: 1023px) {
  .sws-finale__grid {
    grid-template-columns: 1fr;
  }
  .sws-finale__copy {
    position: static;
  }
}

@media (max-width: 639px) {
  .sws-form__pair {
    grid-template-columns: 1fr;
  }
}

/* ---------- Motion helpers ---------- */
[data-reveal] {
  will-change: transform, opacity;
}
