@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/fraunces-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/fraunces-italic500.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/nunitosans-var.woff2') format('woff2');
}

:root{
  --bg: #f8f6fb;
  --surface: #ffffff;
  --surface-tint: #f1ecfa;
  --ink: #1e2a4a;
  --ink-soft: #545e7e;
  --purple: #6c3fa1;
  --purple-deep: #4e2c79;
  --teal: #12888a;
  --green: #6ea82c;
  --line: rgba(30,42,74,0.14);
  --shadow: 0 20px 45px -25px rgba(30,42,74,0.35);
  --focus: #3454d1;

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body: 'Nunito Sans', ui-sans-serif, system-ui, sans-serif;

  --step-caption: clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);
  --step-body: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-body-lg: clamp(1.125rem, 1.06rem + 0.28vw, 1.25rem);
  --step-h3: clamp(1.375rem, 1.2rem + 0.75vw, 1.75rem);
  --step-h2: clamp(1.75rem, 1.45rem + 1.3vw, 2.5rem);
  --step-h1: clamp(2.1rem, 1.6rem + 2.2vw, 3.35rem);
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg: #121a33;
    --surface: #1a2447;
    --surface-tint: #202b52;
    --ink: #f3f1fa;
    --ink-soft: #b9c0de;
    --purple: #c39ee8;
    --purple-deep: #9a72d1;
    --teal: #5fd6d3;
    --green: #a9d96c;
    --line: rgba(255,255,255,0.14);
    --shadow: 0 20px 45px -25px rgba(0,0,0,0.55);
    --focus: #8fb0ff;
  }
}
:root[data-theme="dark"]{
  --bg: #121a33;
  --surface: #1a2447;
  --surface-tint: #202b52;
  --ink: #f3f1fa;
  --ink-soft: #b9c0de;
  --purple: #c39ee8;
  --purple-deep: #9a72d1;
  --teal: #5fd6d3;
  --green: #a9d96c;
  --line: rgba(255,255,255,0.14);
  --shadow: 0 20px 45px -25px rgba(0,0,0,0.55);
  --focus: #8fb0ff;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; }
:focus-visible{ outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap{
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap-wide{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section{ padding: clamp(3rem, 6vw, 5.5rem) 0; }

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-caption);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--purple-deep);
}
.eyebrow::before{
  content: "";
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--purple);
}

h1,h2,h3{
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h1{ font-size: var(--step-h1); line-height: 1.08; letter-spacing: -0.01em; }
h2{ font-size: var(--step-h2); line-height: 1.12; }
h3{ font-size: var(--step-h3); line-height: 1.2; }

.tagline{
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--teal);
}

p{ margin: 0; }
.lede{ font-size: var(--step-body-lg); color: var(--ink-soft); max-width: 62ch; }

/* ---------- Hero ---------- */
.hero{
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 7vw, 6rem);
}
.hero-blobs{
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.blob{
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
}
.blob-1{ width: 340px; height: 340px; background: var(--purple); top: -80px; left: -100px; }
.blob-2{ width: 300px; height: 300px; background: var(--teal); top: 40px; right: -120px; }
.blob-3{ width: 260px; height: 260px; background: var(--green); bottom: -120px; left: 30%; }

.hero-inner{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.logo-frame{
  width: min(460px, 84vw);
  padding: 1.4rem 1.7rem;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}
.logo-frame img{ width: 100%; height: auto; }

@keyframes float{
  0%, 100%{ transform: translateY(0) rotate(-0.4deg); }
  50%{ transform: translateY(-10px) rotate(0.4deg); }
}

.hero h1{ max-width: 18ch; }
.hero .lede{ margin: 0 auto; }

.growth-path{
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.growth-step{
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--step-caption);
  font-weight: 700;
  color: var(--ink-soft);
}
.growth-step svg{ width: 22px; height: 22px; }
.growth-step.is-current{ color: var(--purple-deep); }
.growth-step.is-current svg{ color: var(--purple); }
.growth-dash{
  width: 26px; height: 2px;
  background: var(--line);
  border-radius: 2px;
}

/* ---------- Cards / grids ---------- */
.pillars{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1.25rem;
  margin-top: 2.25rem;
}
.pillar{
  background: var(--surface-tint);
  border-radius: 20px;
  padding: 1.5rem;
}
.pillar h3{ font-size: var(--step-body-lg); margin-bottom: .4rem; font-family: var(--font-body); font-weight: 800;}
.pillar p{ color: var(--ink-soft); font-size: var(--step-body); }

.areas-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.area-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: var(--shadow);
}
.area-icon{
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.area-icon svg{ width: 22px; height: 22px; }
.area-card h3{ font-size: 1.05rem; font-family: var(--font-body); font-weight: 800; }
.area-card p{ color: var(--ink-soft); font-size: .95rem; }

.values-row{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.75rem;
}
.value-chip{
  font-size: var(--step-caption);
  font-weight: 700;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--purple-deep);
  border: 1px solid var(--line);
}

.section-head{
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 62ch;
}
.section-head.center{ margin: 0 auto; text-align: center; align-items: center; }

hr.divider{
  border: none;
  height: 1px;
  background: var(--line);
  margin: 0 auto;
  max-width: 880px;
}

/* ---------- Game ---------- */
.game-shell{
  margin-top: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(1rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}
.game-stats{
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.stat{
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.stat-label{
  font-size: var(--step-caption);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  font-weight: 700;
}
.stat-value{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}
.btn{
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--step-body);
  border: none;
  border-radius: 999px;
  padding: .75rem 1.5rem;
  cursor: pointer;
  background: var(--purple);
  color: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
  touch-action: manipulation;
}
.btn:hover{ transform: translateY(-2px); box-shadow: 0 12px 24px -12px var(--purple); }
.btn:active{ transform: translateY(0); }
.btn.ghost{
  background: transparent;
  color: var(--purple-deep);
  border: 2px solid var(--line);
}

.board{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: clamp(.4rem, 1.6vw, .75rem);
  perspective: 800px;
  touch-action: manipulation;
}
.card{
  aspect-ratio: 1;
  position: relative;
  border-radius: 14%;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.card-inner{
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.4,.2,.2,1);
  border-radius: 14%;
}
.card.is-flipped .card-inner,
.card.is-matched .card-inner{ transform: rotateY(180deg); }
.card-face{
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14%;
  backface-visibility: hidden;
  user-select: none;
}
.card-back{
  background: linear-gradient(155deg, var(--purple), var(--purple-deep));
}
.card-back::after{
  content: "";
  width: 40%; height: 40%;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 50%;
}
.card-front{
  background: var(--surface-tint);
  border: 1px solid var(--line);
  transform: rotateY(180deg);
  color: var(--ink);
}
.card-front svg{ width: 46%; height: 46%; }
.card.is-matched .card-front{
  background: color-mix(in srgb, var(--green) 22%, var(--surface-tint));
  color: var(--green);
  border-color: var(--green);
}
.card:disabled{ cursor: default; }

.win-banner{
  display: none;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--green) 16%, var(--surface));
  border: 1px solid var(--green);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.win-banner.is-visible{ display: flex; }
.win-banner p{ font-weight: 800; }
.win-banner strong{ font-family: var(--font-display); font-size: 1.15rem; }

.sr-only{
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Footer ---------- */
footer{
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.footer-grid{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}
.footer-brand{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
.footer-meta{ color: var(--ink-soft); font-size: var(--step-caption); margin-top: .4rem; }
address{ font-style: normal; color: var(--ink-soft); font-size: var(--step-body); line-height: 1.8; }

/* ---------- Responsive ---------- */
@media (max-width: 720px){
  .pillars{ grid-template-columns: 1fr; }
  .areas-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 460px){
  .areas-grid{ grid-template-columns: 1fr; }
  .game-stats{ justify-content: flex-start; gap: 1rem 1.5rem; }
  .game-stats .btn{ width: 100%; order: 5; }
}
@media (max-width: 380px){
  .board{ gap: .35rem; }
  .card-back::after{ width: 34%; height: 34%; }
}
@media (max-width: 340px){
  .wrap, .wrap-wide{ padding: 0 1rem; }
  .game-shell{ padding: .85rem; }
}

@media (hover: none){
  .btn:hover{ transform: none; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .logo-frame{ animation: none; }
  .card-inner{ transition: none; }
  .btn{ transition: none; }
}
