/* Gano Knows Chemistry: site styles */

:root {
  --ink: #2B2350;
  --ink-soft: #4A4270;
  --cream: #FFF8EC;
  --cream-alt: #FFEFD6;
  --white: #FFFFFF;
  --red: #D63C3C;
  --orange: #F59E2B;
  --yellow: #F5D33B;
  --green: #5BBF6A;
  --blue: #3FA7D6;
  --purple: #8B6BE0;
  --line: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --radius: 20px;
  --heading: "Fredoka", "Trebuchet MS", sans-serif;
  --body: "Nunito", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }

.sprite { display: none; }
.icon {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 3.2;
  stroke-linecap: round; stroke-linejoin: round;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

.rainbow-bar {
  height: 10px;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--purple));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--heading); font-weight: 600; font-size: 20px;
  text-decoration: none;
  padding: 12px 24px;
  border: var(--line); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-red { background: var(--red); color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); }
.btn-small { font-size: 17px; padding: 8px 16px; box-shadow: 3px 3px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center-row { justify-content: center; }

a:focus-visible, .btn:focus-visible { outline: 3px dashed var(--purple); outline-offset: 4px; }

/* ---------- Element tiles (logo) ---------- */
.tile {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px;
  font-family: var(--heading); font-weight: 700; font-size: 24px;
  padding-top: 6px;
  border: var(--line); border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
}
.tile small { position: absolute; top: 2px; left: 5px; font-size: 11px; font-weight: 600; }
.tile-ga { background: var(--orange); transform: rotate(-4deg); }
.tile-no { background: var(--blue); transform: rotate(3deg); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--cream);
  border-bottom: var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-words { font-family: var(--heading); font-weight: 600; font-size: 26px; margin-left: 8px; white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { font-weight: 800; font-size: 17px; text-decoration: none; }
.nav a:hover { text-decoration: underline wavy var(--orange); text-underline-offset: 6px; }
.show-sm { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.kicker {
  display: inline-block;
  font-family: var(--heading); font-weight: 600; font-size: 18px;
  background: var(--white); border: var(--line); border-radius: 999px;
  padding: 4px 16px; margin-bottom: 20px;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; margin-bottom: 20px; }
.marker {
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding: 0 4px;
}
.lead { font-size: 22px; color: var(--ink-soft); margin-bottom: 28px; }

.hero-art { position: relative; justify-self: center; width: min(360px, 78vw); }
.avatar-ring {
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 14px;
  background: conic-gradient(var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--purple), var(--red));
  border: var(--line);
  box-shadow: 7px 7px 0 var(--ink);
}
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: var(--line); }
.doodle { position: absolute; width: 58px; height: 58px; fill: var(--white); stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.doodle-flask { left: -30px; bottom: 6px; transform: rotate(-12deg); fill: #DFF3E2; }
.doodle-atom { right: -26px; top: -6px; width: 64px; height: 64px; fill: none; stroke: var(--purple); }
.bubble { position: absolute; border: var(--line); border-radius: 50%; background: var(--white); }
.b1 { width: 18px; height: 18px; left: -6px; bottom: 78px; }
.b2 { width: 12px; height: 12px; left: 12px; bottom: 104px; }
.b3 { width: 22px; height: 22px; right: -8px; bottom: 34px; background: var(--yellow); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.stat {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 22px;
  border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-num { font-family: var(--heading); font-weight: 700; font-size: 52px; line-height: 1; }
.stat-label { font-weight: 800; font-size: 18px; line-height: 1.3; }
.stat-orange { background: var(--orange); }
.stat-blue { background: var(--blue); }
.stat-green { background: var(--green); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; border-top: var(--line); }
.section.alt { background: var(--cream-alt); }
h2 { font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 700; margin-bottom: 28px; }
.squiggle { text-decoration: underline wavy; text-decoration-thickness: 3px; text-underline-offset: 12px; }
.squiggle-purple { text-decoration-color: var(--purple); }
.squiggle-blue { text-decoration-color: var(--blue); }
.squiggle-orange { text-decoration-color: var(--orange); }
.squiggle-green { text-decoration-color: var(--green); }
.squiggle-red { text-decoration-color: var(--red); }
.sub { font-size: 20px; color: var(--ink-soft); margin-top: -8px; }
h3 { font-size: 23px; font-weight: 600; margin-bottom: 6px; }

/* ---------- Photos ---------- */
.polaroid {
  position: relative; margin: 0;
  background: var(--white);
  padding: 14px 14px 18px;
  border: var(--line); border-radius: 6px; box-shadow: var(--shadow);
}
.polaroid img { border: 2px solid var(--ink); border-radius: 3px; }
.polaroid figcaption { font-family: var(--heading); font-weight: 500; font-size: 20px; text-align: center; padding-top: 12px; line-height: 1.3; }
.tilt-left { transform: rotate(-2.5deg); }
.tilt-right { transform: rotate(2.5deg); }
.tape {
  position: absolute; top: -16px; left: 50%;
  width: 110px; height: 30px; margin-left: -55px;
  background: rgba(245, 211, 59, .75);
  border: 2px solid rgba(43, 35, 80, .25);
  transform: rotate(-3deg);
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: center; }
.about-grid .polaroid { max-width: 400px; justify-self: center; }
.big { font-family: var(--heading); font-weight: 500; font-size: 25px; line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 8px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 17px;
  background: var(--white); border: var(--line); border-radius: 999px;
  padding: 6px 16px;
}

/* ---------- Experience ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 12px; }
.card {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--white);
  padding: 22px 24px;
  border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--ink-soft); }
.card-wide { grid-column: 1 / -1; }
.icon-bubble {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 62px; height: 62px;
  border: var(--line); border-radius: 50%;
  font-size: 30px;
}
.bg-purple { background: #D9CCFA; }
.bg-green { background: #C9ECCE; }
.bg-red { background: #F8C9C9; }
.bg-orange { background: #FCDDB0; }
.bg-blue { background: #C3E6F5; }

/* ---------- Awards ---------- */
.award-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 12px; }
.award {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--white);
  padding: 24px 18px;
  border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.award h3 { font-size: 21px; }
.award p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.medal { width: 66px; height: 66px; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.c-yellow { fill: var(--yellow); }
.c-red { fill: #F28B8B; }
.c-blue { fill: var(--blue); }
.c-green { fill: var(--green); }
.year {
  font-family: var(--heading); font-weight: 600; font-size: 16px;
  background: var(--ink); color: var(--cream);
  border-radius: 999px; padding: 2px 12px; margin-bottom: 12px;
}

/* ---------- Fees ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 36px 0 40px; }
.price {
  position: relative; text-align: center;
  background: var(--white);
  padding: 30px 20px 24px;
  border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.price-featured { background: #FFF4C2; }
.amount { font-family: var(--heading); font-weight: 700; font-size: 60px; line-height: 1.1; margin: 8px 0 4px; }
.note { margin: 0; color: var(--ink-soft); font-weight: 700; }
.sticker {
  position: absolute; top: -18px; right: -10px;
  font-family: var(--heading); font-weight: 600; font-size: 16px;
  background: var(--red); color: var(--white);
  border: var(--line); border-radius: 999px;
  padding: 3px 14px;
  transform: rotate(6deg);
}
.pay { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.pay p { margin: 0; font-family: var(--heading); font-weight: 600; font-size: 22px; }
.pay .chips { margin: 0; justify-content: center; }

/* ---------- Fun photos ---------- */
.fun-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: 56px; margin-top: 20px; }

/* ---------- Contact ---------- */
.contact-card {
  max-width: 720px; margin: 0 auto; text-align: center;
  background: var(--white);
  padding: 48px 28px;
  border: var(--line); border-radius: 28px;
  box-shadow: 8px 8px 0 var(--purple), 8px 8px 0 3px var(--ink);
}
.contact-card h2 { margin-bottom: 18px; }
.phone-big {
  display: block;
  font-family: var(--heading); font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 4rem);
  text-decoration: none; margin: 8px 0 24px;
}
.email-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 28px 0 0; font-weight: 700; font-size: 20px; flex-wrap: wrap; }
.email { word-break: break-all; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--cream); border-top: var(--line); }
.footer-inner { padding-top: 24px; padding-bottom: 28px; text-align: center; }
.footer p { margin: 0; font-weight: 700; font-size: 16px; }

/* ---------- Tablets ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { order: -1; width: min(300px, 66vw); }
  .price h3 { font-size: 20px; }
  .award-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .wrap { padding: 0 16px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .tile { width: 42px; height: 42px; font-size: 20px; }
  .tile small { font-size: 9px; }
  .logo-words { font-size: 20px; margin-left: 4px; }
  .hero { padding: 36px 0 32px; }
  .hero-art { width: min(250px, 66vw); }
  .doodle { width: 44px; height: 44px; }
  .doodle-flask { left: -18px; }
  .doodle-atom { right: -16px; width: 50px; height: 50px; }
  .lead { font-size: 20px; }
  .btn { font-size: 19px; }
  .stats { margin-top: 40px; }
  .section { padding: 56px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid .polaroid { max-width: 300px; }
  .card-grid, .price-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; gap: 14px; }
  .icon-bubble { width: 52px; height: 52px; font-size: 26px; }
  .fun-grid { grid-template-columns: minmax(0, 300px); gap: 44px; }
  .contact-card { padding: 36px 18px; }
}

@media (max-width: 420px) {
  .award-grid { grid-template-columns: 1fr; }
  .topbar-inner { gap: 10px; }
  .logo { gap: 6px; }
  .logo-words { font-size: 17px; line-height: 1.05; white-space: normal; max-width: 6.5em; }
  .tile { width: 38px; height: 38px; font-size: 18px; }
  .btn-small { padding: 7px 14px; font-size: 16px; }
  .kicker { font-size: 15px; padding: 4px 12px; }
}

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