/* =========================================================
   SPECIAL OLYMPICS VOLUNTEER GUIDE — V2
   Shared visual system
   ========================================================= */


/* ---------- DESIGN TOKENS ---------- */

:root {
  --bg: #f7f7f5;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #1d1d1f;
  --text-soft: #5f5f64;
  --muted: #86868b;
  --line: rgba(29, 29, 31, 0.10);

  --dark: #1d1d1f;
  --dark-soft: #2c2c2e;

  --accent: #4867ff;
  --accent-soft: rgba(72, 103, 255, 0.10);

  --good: #337a55;
  --good-soft: #edf7f1;

  --warm: #8a6438;
  --warm-soft: #faf2e7;

  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --radius-xl: 38px;

  --shadow-soft:
    0 14px 40px rgba(0, 0, 0, 0.055);

  --shadow-hover:
    0 20px 55px rgba(0, 0, 0, 0.09);

  --ease:
    cubic-bezier(.22, .8, .22, 1);
}


/* ---------- RESET ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  opacity: 0;
  animation: pageEnter .55s var(--ease) forwards;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}


/* ---------- PAGE ---------- */

.page-shell {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 80px;
}


/* ---------- NAV ---------- */

.topbar {
  min-height: 42px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  text-decoration: none;

  font-size: 15px;
  font-weight: 600;

  transition:
    opacity .2s ease,
    transform .2s var(--ease);
}

.back-link:hover {
  opacity: .58;
}

.back-link:active {
  transform: translateX(-2px);
}

.top-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}


/* ---------- TYPOGRAPHY ---------- */

.eyebrow {
  margin-bottom: 13px;

  color: var(--muted);

  font-size: 13px;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.display-title {
  margin: 0;

  max-width: 800px;

  font-size: clamp(44px, 8vw, 76px);
  line-height: .99;
  letter-spacing: -.052em;
  font-weight: 700;
}

.page-title {
  margin: 0;

  font-size: clamp(39px, 7vw, 66px);
  line-height: 1;
  letter-spacing: -.05em;
}

.section-title {
  margin: 0;

  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.card-title {
  margin: 0;

  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.lead {
  max-width: 660px;

  color: var(--text-soft);

  font-size: 19px;
  line-height: 1.55;
}

.body-copy {
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.58;
}

.small-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}


/* ---------- HERO ---------- */

.hero {
  padding: 78px 0 54px;
}

.hero-copy {
  margin-top: 23px;
}


/* =========================================================
   VISUAL / ANIMATED FIGURES
   ========================================================= */


/*
  These figures are made from simple HTML + SVG.
  No GIFs, external images, or heavy libraries needed.
*/

.visual-stage {
  position: relative;

  width: 100%;
  min-height: 260px;

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: var(--radius-xl);

  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(255,255,255,.98),
      rgba(246,246,243,.92)
    );
}

.visual-stage.compact {
  min-height: 190px;
}


/* Soft moving light */

.visual-stage::before {
  content: "";

  position: absolute;
  width: 220px;
  height: 220px;

  left: 50%;
  top: 45%;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(72,103,255,.08),
      transparent 68%
    );

  transform: translate(-50%, -50%);

  animation: breatheGlow 5s ease-in-out infinite;
}


/* ---------- SIMPLE PERSON FIGURE ---------- */

.person {
  position: absolute;

  width: 76px;
  height: 150px;

  transform-origin: center bottom;
}

.person-head {
  position: absolute;

  width: 50px;
  height: 50px;

  left: 13px;
  top: 0;

  border: 2px solid var(--text);
  border-radius: 50%;

  background: white;
}

.person-body {
  position: absolute;

  width: 62px;
  height: 78px;

  left: 7px;
  top: 55px;

  border: 2px solid var(--text);
  border-radius: 26px 26px 19px 19px;

  background: white;
}

.person-leg-left,
.person-leg-right {
  position: absolute;

  width: 2px;
  height: 31px;

  top: 127px;

  background: var(--text);
  transform-origin: top;
}

.person-leg-left {
  left: 28px;
  transform: rotate(7deg);
}

.person-leg-right {
  left: 48px;
  transform: rotate(-7deg);
}


/* ---------- FACE ---------- */

.eye {
  position: absolute;

  width: 4px;
  height: 4px;

  top: 20px;

  border-radius: 50%;
  background: var(--text);
}

.eye.left {
  left: 14px;
}

.eye.right {
  right: 14px;
}

.mouth {
  position: absolute;

  width: 20px;
  height: 9px;

  left: 13px;
  top: 28px;

  border-bottom: 2px solid var(--text);
  border-radius: 0 0 16px 16px;

  transition: all .35s var(--ease);
}


/* ---------- GESTURE ARM ---------- */

.arm {
  position: absolute;

  width: 42px;
  height: 2px;

  top: 72px;

  background: var(--text);

  transform-origin: 0 center;
}

.arm.right {
  left: 50px;
}

.arm.left {
  left: 24px;
}


/* =========================================================
   FIGURE ANIMATION TYPES
   ========================================================= */


/* Smile animation */

.figure-smile .mouth {
  animation: smileShift 3.8s var(--ease) infinite;
}


/* Gentle wave */

.figure-wave .arm.right {
  animation: wave 2.8s var(--ease) infinite;
}


/* Give space */

.figure-space .person:first-child {
  animation: subtleLeft 4s var(--ease) infinite;
}

.figure-space .person:last-child {
  animation: subtleRight 4s var(--ease) infinite;
}


/* Waiting dots */

.wait-dots {
  display: flex;
  gap: 7px;
}

.wait-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--text);

  opacity: .22;

  animation: waitingDot 1.45s ease-in-out infinite;
}

.wait-dot:nth-child(2) {
  animation-delay: .16s;
}

.wait-dot:nth-child(3) {
  animation-delay: .32s;
}


/* Pointing arrow */

.motion-arrow {
  display: inline-block;
  animation: pointMove 2.2s var(--ease) infinite;
}


/* Gentle bounce — for behavior page */

.motion-bounce {
  animation: gentleBounce 1.9s var(--ease) infinite;
}


/* Sensory pulse */

.sensory-ring {
  position: absolute;

  width: 82px;
  height: 82px;

  border: 1.5px solid rgba(29,29,31,.27);
  border-radius: 50%;

  animation: sensoryPulse 2.6s ease-out infinite;
}

.sensory-ring.delay {
  animation-delay: .8s;
}


/* ---------- MICRO ILLUSTRATION ---------- */

.mini-visual {
  position: relative;

  height: 150px;

  overflow: hidden;

  border-radius: var(--radius-md);

  background: #f1f1ee;
}


/* ---------- VISUAL CAPTION ---------- */

.visual-caption {
  position: absolute;

  left: 20px;
  bottom: 18px;

  padding: 8px 11px;

  border: 1px solid rgba(255,255,255,.65);
  border-radius: 999px;

  background: rgba(255,255,255,.74);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  font-size: 13px;
  font-weight: 600;
}


/* =========================================================
   CARDS
   ========================================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.nav-card,
.action-card {
  position: relative;

  width: 100%;
  min-height: 185px;

  padding: 26px;

  text-align: left;
  text-decoration: none;

  border: 1px solid var(--line);
  border-radius: var(--radius-lg);

  background: var(--surface-solid);

  cursor: pointer;

  transition:
    transform .24s var(--ease),
    box-shadow .24s var(--ease),
    border-color .24s ease;
}

.nav-card:hover,
.action-card:hover {
  transform: translateY(-4px);

  border-color: rgba(29,29,31,.17);

  box-shadow: var(--shadow-hover);
}

.nav-card:active,
.action-card:active {
  transform: scale(.985);
}

.nav-card.dark {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}

.nav-card-description {
  max-width: 430px;

  margin: 8px 35px 0 0;

  color: var(--muted);

  line-height: 1.45;
}

.nav-card.dark .nav-card-description {
  color: #b8b8bd;
}

.card-arrow {
  position: absolute;

  right: 25px;
  bottom: 25px;

  font-size: 22px;

  transition: transform .22s var(--ease);
}

.nav-card:hover .card-arrow {
  transform: translateX(4px);
}


/* ---------- GLASS CARD ---------- */

.glass-card {
  border: 1px solid rgba(255,255,255,.58);
  border-radius: var(--radius-lg);

  background: rgba(255,255,255,.72);

  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}


/* =========================================================
   INTERACTIVE PANELS
   ========================================================= */

.panel {
  display: none;

  margin-top: 20px;
  padding: 30px;

  border: 1px solid var(--line);
  border-radius: var(--radius-lg);

  background: var(--surface-solid);

  transform-origin: top;

  animation: panelReveal .38s var(--ease);
}

.panel.active {
  display: block;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;
}

.panel-label {
  color: var(--muted);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;

  text-transform: uppercase;
}

.close-button {
  width: 38px;
  height: 38px;

  border: none;
  border-radius: 50%;

  background: #efefec;

  cursor: pointer;

  transition:
    transform .18s var(--ease),
    background .18s ease;
}

.close-button:hover {
  background: #e6e6e2;
}

.close-button:active {
  transform: scale(.92);
}


/* =========================================================
   ESSENTIALS EXPERIENCE
   ========================================================= */

.step-shell {
  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: var(--radius-xl);

  background: var(--surface-solid);

  box-shadow: var(--shadow-soft);
}

.progress-track {
  height: 4px;

  background: #ecece8;
}

.progress-bar {
  height: 100%;

  background: var(--dark);

  transition:
    width .45s var(--ease);
}

.step {
  display: none;

  padding: 36px;

  animation: stepEnter .45s var(--ease);
}

.step.active {
  display: block;
}

.step-number {
  margin-bottom: 24px;

  color: var(--muted);

  font-size: 13px;
  font-weight: 600;
}

.step-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(230px, .7fr);

  align-items: center;

  gap: 34px;
}

.step-message {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-soft);
}

.step-tip {
  margin-top: 24px;
  padding: 17px 18px;

  border-radius: var(--radius-sm);

  background: #f3f3f0;

  color: #47474b;

  font-size: 16px;
  line-height: 1.5;
}


/* ---------- CONTROLS ---------- */

.step-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 12px;

  padding: 0 36px 30px;
}

.pill-button {
  padding: 13px 20px;

  border: none;
  border-radius: 999px;

  background: #ededeb;
  color: var(--text);

  font-weight: 600;

  cursor: pointer;

  transition:
    transform .17s var(--ease),
    opacity .17s ease;
}

.pill-button.primary {
  background: var(--dark);
  color: white;
}

.pill-button:active {
  transform: scale(.95);
}


/* =========================================================
   INFORMATION ELEMENTS
   ========================================================= */

.callout {
  margin-top: 20px;
  padding: 19px 20px;

  border-radius: var(--radius-md);

  background: #efefec;

  color: var(--text-soft);

  line-height: 1.55;
}

.callout strong {
  color: var(--text);
}

.callout.warm {
  background: var(--warm-soft);
}

.callout.good {
  background: var(--good-soft);
}


/* ---------- TRY / AVOID ---------- */

.response-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 12px;

  margin-top: 22px;
}

.response-box {
  padding: 19px;

  border-radius: var(--radius-md);

  background: #f2f2ef;
}

.response-box h3 {
  margin: 0 0 10px;

  font-size: 16px;
}

.response-box ul {
  margin: 0;
  padding-left: 19px;
}

.response-box li {
  margin-bottom: 7px;

  color: var(--text-soft);

  line-height: 1.5;
}


/* ---------- POSSIBILITY ---------- */

.possibility-stack {
  display: grid;
  gap: 10px;

  margin-top: 21px;
}

.possibility {
  padding: 18px;

  border-radius: var(--radius-md);

  background: #f2f2ef;
}

.possibility strong {
  display: block;

  margin-bottom: 5px;
}

.possibility p {
  margin: 0;

  color: var(--text-soft);

  line-height: 1.5;
}


/* ---------- PHRASES ---------- */

.phrase-cloud {
  display: flex;
  flex-wrap: wrap;

  gap: 9px;

  margin-top: 18px;
}

.phrase {
  padding: 10px 14px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: white;

  transition:
    transform .18s var(--ease),
    background .18s ease;
}

.phrase:hover {
  transform: translateY(-2px);

  background: #f1f1ee;
}


/* =========================================================
   ACCORDION
   ========================================================= */

.accordion {
  border-top: 1px solid var(--line);
}

.accordion-trigger {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 20px 0;

  border: none;

  background: none;

  cursor: pointer;

  text-align: left;

  font-size: 18px;
  font-weight: 600;
}

.accordion-icon {
  transition: transform .28s var(--ease);
}

.accordion.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  display: grid;

  grid-template-rows: 0fr;

  transition:
    grid-template-rows .35s var(--ease);
}

.accordion-content-inner {
  overflow: hidden;
}

.accordion.open .accordion-content {
  grid-template-rows: 1fr;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  margin-top: 60px;
  padding-top: 27px;

  border-top: 1px solid var(--line);

  color: var(--muted);

  font-size: 13px;
  line-height: 1.55;
}


/* =========================================================
   REVEAL ANIMATION
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);

  transition:
    opacity .65s var(--ease),
    transform .65s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =========================================================
   ANIMATION KEYFRAMES
   ========================================================= */

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stepEnter {
  from {
    opacity: 0;
    transform: translateX(13px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes breatheGlow {
  0%,
  100% {
    transform:
      translate(-50%, -50%)
      scale(.92);

    opacity: .65;
  }

  50% {
    transform:
      translate(-50%, -50%)
      scale(1.13);

    opacity: 1;
  }
}

@keyframes smileShift {
  0%,
  28% {
    width: 17px;
    left: 15px;

    border-radius: 0;

    transform: translateY(-2px);
  }

  44%,
  78% {
    width: 21px;
    left: 13px;

    border-radius: 0 0 18px 18px;

    transform: translateY(0);
  }

  100% {
    width: 17px;
    left: 15px;

    border-radius: 0;

    transform: translateY(-2px);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(-18deg);
  }

  35% {
    transform: rotate(-48deg);
  }

  58% {
    transform: rotate(-25deg);
  }

  76% {
    transform: rotate(-42deg);
  }
}

@keyframes subtleLeft {
  0%,
  100% {
    transform: translateX(0);
  }

  48% {
    transform: translateX(-7px);
  }
}

@keyframes subtleRight {
  0%,
  100% {
    transform: translateX(0);
  }

  48% {
    transform: translateX(7px);
  }
}

@keyframes waitingDot {
  0%,
  65%,
  100% {
    transform: translateY(0);
    opacity: .22;
  }

  32% {
    transform: translateY(-7px);
    opacity: .85;
  }
}

@keyframes pointMove {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(7px);
  }
}

@keyframes gentleBounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes sensoryPulse {
  from {
    transform: scale(.6);
    opacity: .65;
  }

  to {
    transform: scale(1.55);
    opacity: 0;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .page-shell {
    width: min(100% - 30px, 900px);
    padding-top: 18px;
  }

  .hero {
    padding: 57px 0 40px;
  }

  .lead {
    font-size: 17px;
  }

  .card-grid,
  .response-grid {
    grid-template-columns: 1fr;
  }

  .nav-card,
  .action-card {
    min-height: 160px;

    padding: 23px;

    border-radius: 24px;
  }

  .step-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .step {
    padding: 26px 23px;
  }

  .step-controls {
    padding: 0 23px 24px;
  }

  .visual-stage {
    min-height: 205px;
  }

  .panel {
    padding: 23px;

    border-radius: 24px;
  }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: .01ms !important;
  }
}
