/* ============================================================
   Connect4.Chat — index.html only (since 2026-10-24).
   The first screen is the ring page from style.css; this file
   makes it one section of a scrolling page and styles the bands
   under it: student stories, how it works, why it works, the
   numbers, the questions, the last call. Built from the tokens
   in style.css; no other page loads this.
   ============================================================ */

/* ---------- the ring page as the first screen ---------- */

/* The glow moves from the body to the first screen, so it stays behind the mark. */
.ring-page { background: #f5f5f7; }
.ring-page main { display: block; }
.ring-home {
  min-height: 100svh;
  background:
    radial-gradient(ellipse 68% 48% at 50% 42%, rgba(255, 204, 32, 0.2), transparent 62%),
    radial-gradient(ellipse 42% 36% at 70% 60%, rgba(0, 111, 255, 0.08), transparent 58%),
    radial-gradient(ellipse 36% 32% at 30% 64%, rgba(115, 62, 205, 0.08), transparent 58%),
    #f5f5f7;
}
/* The footer no longer floats over the first screen; it ends the page. */
.ring-page .site-footer { position: static; background: var(--white); }
body.rings-open .site-footer { opacity: 1; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(0.9rem, 2.5vh, 1.6rem);
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--black);
  border-bottom: 2px solid var(--yellow);
  white-space: nowrap;
  transition: opacity 0.3s ease;
}
.scroll-cue span { display: inline-block; animation: cue-bob 1.6s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
body.rings-open .scroll-cue { opacity: 0; pointer-events: none; }
html { scroll-padding-top: 1rem; }

/* ---------- the bands ---------- */

.band { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 2px solid var(--black); }
.band-white { background: var(--white); }
.band-tint { background: #fffaea; }
.band .container { padding-inline: 24px; }
.band .narrow { max-width: 780px; }

.band h2 {
  font-size: clamp(2.3rem, 5.2vw, 3.6rem);
  max-width: 16em;
  text-wrap: balance;
  margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem);
}
.band h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.25; }
.band p { color: var(--muted); }
.band a:not(.btn):not(.stories-btn) {
  color: var(--purple);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
}

/* ---------- 1. student stories ---------- */

/* Full-bleed row that moves on its own. js/home.js clones the list once so the
   loop is seamless; the animation moves the pair half its width, then repeats. */
.stories {
  position: relative;
  margin-top: 0.4rem;
  padding-block: 8px 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.stories-pair {
  display: flex;
  width: max-content;
  animation: stories-move var(--stories-speed, 48s) linear infinite;
}
.stories-track {
  list-style: none;
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0 0.55rem;
  width: max-content;
}
.stories:hover .stories-pair,
.stories:focus-within .stories-pair,
.stories.paused .stories-pair { animation-play-state: paused; }
@keyframes stories-move { to { transform: translateX(-50%); } }
.story { flex: 0 0 auto; width: min(380px, 78vw); }
.story blockquote {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.35rem 1.25rem;
  border: 2px solid var(--black);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--black);
}
.story:nth-child(4n+1) blockquote { box-shadow: 5px 5px 0 var(--purple); }
.story:nth-child(4n+2) blockquote { box-shadow: 5px 5px 0 var(--blue); }
.story:nth-child(4n+3) blockquote { box-shadow: 5px 5px 0 var(--gray); }
.story:nth-child(4n+4) blockquote { box-shadow: 5px 5px 0 var(--yellow); }
.story p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.02rem, 1.6vw, 1.12rem);
  line-height: 1.42;
  color: var(--black);
  margin: 0;
}
.story footer { font-size: 0.9rem; font-weight: 600; color: var(--subtle); }
/* Without the clone (no JavaScript) or with motion turned down, the row scrolls by hand. */
.stories.static { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
.stories.static::-webkit-scrollbar { display: none; }
.stories.static .stories-track { padding-inline: 24px; }

/* ---------- 2. how it works ---------- */


.rsteps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem 1rem;
  margin: 0;
  padding-top: 0.5rem;
}
.rstep {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0;
}
/* a thick ring in the logo's colors; the card hangs under it */
.ring {
  position: relative;
  z-index: 1;
  width: clamp(96px, 9vw, 124px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2.5px solid var(--black);
  background: var(--ring);
  box-shadow: 5px 5px 0 var(--black);
  display: grid;
  place-items: center;
}
.ring::before {
  content: "";
  width: 54%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--black);
  grid-area: 1 / 1;
}
.ring-num {
  grid-area: 1 / 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  line-height: 1;
  color: var(--black);
}
.r1 { --ring: var(--purple); }
.r2 { --ring: var(--blue); }
.r3 { --ring: var(--gray); }
.r4 { --ring: var(--yellow); }
.rcard {
  width: 100%;
  margin-top: -1.1rem;
  padding: 2rem 1.25rem 1.4rem;
  border: 2px solid var(--black);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--black);
  transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.24, 1), box-shadow 0.35s ease;
}
.rstep:nth-child(1) .rcard { transform: rotate(-2.4deg); }
.rstep:nth-child(2) .rcard { transform: rotate(1.8deg); }
.rstep:nth-child(3) .rcard { transform: rotate(-1.6deg); }
.rstep:nth-child(4) .rcard { transform: rotate(2.6deg); }
.rstep:hover .rcard { transform: rotate(0) translateY(-3px); box-shadow: 7px 7px 0 var(--black); }
/* the small name, then the detail, larger */
.rcard h3 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.5rem;
  text-align: center;
}
.rcard p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.38;
  color: var(--black);
  letter-spacing: -0.01em;
  text-align: center;
}

/* ---------- 3. why it works ---------- */


.pill-ing {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 1rem;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--black);
}
.p1 { background: var(--purple); color: var(--white); }
.p2 { background: var(--blue); color: var(--white); }
.p3 { background: var(--gray); }
.p4 { background: var(--yellow); }
.p5 { background: var(--white); }
.pill-ing.human { background: var(--black); color: var(--white); box-shadow: 3px 3px 0 var(--yellow); }

/* Option A: the beaker */
.mix {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "pills stage";
  align-items: center;
  column-gap: clamp(1.5rem, 4vw, 3rem);
  row-gap: 1rem;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 2px solid var(--black);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--yellow);
}
.mix-pills { grid-area: pills; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin: 0; padding-inline: 1rem; }
/* room above the glass for the card that rises out of it */
.mix-stage { grid-area: stage; position: relative; width: min(100%, 300px); margin: 3.2rem auto 0; }
.beaker { display: block; width: 100%; height: auto; overflow: visible; }
.mix-liquid { transform: translateY(70px); }
.mix-wave { transform: translateY(70px); }
.mix-swirl { opacity: 0; transform-origin: 130px 240px; }

.mix-card {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 0;
  transform: translate(-50%, 40%) scale(0.85);
  opacity: 0;
  width: min(86%, 240px);
  padding: 0.8rem 0.95rem 0.85rem;
  border: 2px solid var(--black);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--black);
  text-align: left;
}
.mix-card p { margin: 0; color: var(--black); }
.mix-card-label { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--purple) !important; margin-bottom: 0.25rem !important; }
.mix-card-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.mix-card-meta { font-size: 0.86rem; color: var(--muted) !important; margin-top: 0.2rem !important; }

/* the sequence: pills drop, the mix rises and swirls, the card comes up */
.mix.go .mix-pills .pill-ing { animation: drop-in 0.75s cubic-bezier(0.5, 0, 0.6, 1) forwards; }
.mix.go .mix-pills .pill-ing:nth-child(1) { animation-delay: 0.15s; }
.mix.go .mix-pills .pill-ing:nth-child(2) { animation-delay: 0.45s; }
.mix.go .mix-pills .pill-ing:nth-child(3) { animation-delay: 0.75s; }
.mix.go .mix-pills .pill-ing:nth-child(4) { animation-delay: 1.05s; }
.mix.go .mix-pills .pill-ing:nth-child(5) { animation-delay: 1.35s; }
@keyframes drop-in {
  0% { transform: none; opacity: 1; }
  55% { transform: translate(var(--dx, 60vw), calc(var(--dy, 120px) - 30px)) scale(0.7); opacity: 1; }
  100% { transform: translate(var(--dx, 60vw), var(--dy, 120px)) scale(0.35); opacity: 0; }
}
.mix.go .mix-liquid, .mix.go .mix-wave { animation: mix-rise 1.4s cubic-bezier(0.22, 0.8, 0.24, 1) 0.6s forwards; }
@keyframes mix-rise { from { transform: translateY(70px); } to { transform: translateY(0); } }
.mix.go .mix-wave { animation: mix-rise 1.4s cubic-bezier(0.22, 0.8, 0.24, 1) 0.6s forwards, wave 2.4s linear 2s 2; }
@keyframes wave { from { transform: translateX(0); } to { transform: translateX(-60px); } }
.mix.go .mix-swirl { animation: swirl 1.6s ease-in-out 2.1s 2; }
@keyframes swirl { 0% { opacity: 0; transform: rotate(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(360deg); } }
.mix.go .mix-card { animation: card-up 0.7s cubic-bezier(0.22, 0.8, 0.24, 1) 4.6s forwards; }
@keyframes card-up { from { transform: translate(-50%, 40%) scale(0.85); opacity: 0; } to { transform: translate(-50%, -58%) scale(1); opacity: 1; } }
/* once it has run, the pills come back so the list still reads */
.mix.done .mix-pills .pill-ing { animation: pills-back 0.5s ease forwards; }
@keyframes pills-back { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* the three promises, in the academicindex.ai layout */
.promises {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: clamp(2.6rem, 5vw, 4rem) 0 0;
  text-align: center;
}
.promises li { min-width: 0; display: grid; align-content: start; justify-items: center; gap: 0.7rem; padding-inline: 0.5rem; }
.promise-icon { width: 46px; height: 46px; color: var(--black); margin-bottom: 0.4rem; }
.promises h3 { margin: 0; font-size: 1.2rem !important; }
.promises p { font-size: 0.98rem; line-height: 1.55; max-width: 30em; margin: 0; }
.promise-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}
.promise-link svg { width: 18px; height: 18px; color: var(--black); flex-shrink: 0; }
.fine { margin: clamp(2rem, 4vw, 3rem) auto 0; max-width: 40em; text-align: center; font-size: 0.92rem; color: var(--subtle); }

/* ---------- 4. the numbers ---------- */


.stats {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-auto-rows: 1fr;
  gap: 1rem;
  margin: 0;
}
.stat-big {
  grid-row: 1 / span 2;
  align-content: center !important;
  justify-items: start;
  padding: 1.6rem 1.6rem 1.8rem !important;
}
.stat-big .stat-num { font-size: clamp(4rem, 8vw, 6.4rem); }
.stat-big .stat-label { font-size: 1.1rem; color: var(--black); font-weight: 600; }
.stat {
  min-width: 0;
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 1.25rem 1.2rem 1.35rem;
  border: 2px solid var(--black);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--black);
}
.stat:nth-child(1) { box-shadow: 5px 5px 0 var(--purple); }
.stat:nth-child(2) { box-shadow: 5px 5px 0 var(--blue); }
.stat:nth-child(3) { box-shadow: 5px 5px 0 var(--gray); }
.stat:nth-child(4) { box-shadow: 5px 5px 0 var(--yellow); }
.stat:nth-child(5) { box-shadow: 5px 5px 0 var(--black); }
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.3rem, 4.2vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--black);
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 0.93rem; line-height: 1.4; color: var(--muted); }

/* ---------- 5. questions ---------- */

.faq { border-top: 2px solid var(--black); }
.faq details { border-bottom: 2px solid var(--black); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.3;
  color: var(--black);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--black);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 55% no-repeat;
  transition: background-color 0.18s ease, transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(180deg); background-color: var(--yellow); }
.faq summary:hover::after { background-color: var(--yellow); }
.faq summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.faq-body { padding: 0 2.6rem 1.15rem 0; }
.faq-body p { font-size: 1rem; line-height: 1.6; }
.faq .arrow { color: var(--purple); font-weight: 600; }

/* ---------- 6. the last call ---------- */

.band-final { background: var(--yellow); border-bottom: 2px solid var(--black); }
.final-inner { text-align: center; max-width: 760px; }
.band-final h2 { font-size: clamp(2rem, 4.6vw, 3rem); margin-inline: auto; margin-bottom: 1rem; }
.band-final h2 .highlight { background: linear-gradient(transparent 56%, var(--white) 56%); }
.band-final p { margin: 0 auto 1.8rem; max-width: 34em; font-size: 1.1rem; color: var(--black); }
.band-final p span { font-weight: 700; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .rsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 1.2rem; }
  .ring { width: 104px; }
}

@media (max-width: 720px) {
  .mix { grid-template-columns: 1fr; grid-template-areas: "pills" "stage"; }
  .mix-stage { width: min(100%, 260px); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .stat-big { grid-row: auto; grid-column: 1 / -1; }
  .promises { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  /* one step per row: the ring on the left, the tilted card beside it */
  .rsteps { grid-template-columns: 1fr; gap: 1.1rem; }
  .rstep { grid-template-columns: 84px minmax(0, 1fr); align-items: center; justify-items: start; column-gap: 0; }
  .ring { width: 84px; }
  .rcard { margin: 0 0 0 -1rem; padding: 1.1rem 1.1rem 1.1rem 1.9rem; }
  .rcard h3, .rcard p { text-align: left; }
  .rstep:nth-child(odd) .rcard { transform: rotate(-1.4deg); }
  .rstep:nth-child(even) .rcard { transform: rotate(1.4deg); }
  .stats { grid-template-columns: 1fr; }
  .stat-big { grid-column: auto; }
  .pill-ing { height: 38px; font-size: 0.92rem; padding: 0 0.85rem; }
  .band-final .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; }
  .stories-pair { animation: none; }
  .rcard { transition: none; }
  .mix .mix-pills .pill-ing, .mix.go .mix-pills .pill-ing { animation: none !important; opacity: 1; transform: none; }
  .mix .mix-liquid, .mix .mix-wave, .mix.go .mix-liquid, .mix.go .mix-wave { animation: none !important; transform: translateY(0); }
  .mix .mix-swirl, .mix.go .mix-swirl { animation: none !important; opacity: 0; }
  .mix .mix-card, .mix.go .mix-card { animation: none !important; opacity: 1; transform: translate(-50%, -58%) scale(1); }
}
