:root {
  --cream: #fffaf1;
  --ink: #18211b;
  --muted: #657067;
  --orange: #ff8629;
  --orange-deep: #e86813;
  --green: #2dcf72;
  --green-deep: #168a4c;
  --line: rgba(34, 54, 41, .10);
  --header-height: 72px;
  --art-width: min(41vw, calc((100svh - 132px) * .91), 520px);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

html {
  min-width: 320px;
  -webkit-text-size-adjust: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 4% 88%, rgba(255, 196, 99, .18), transparent 25rem),
    radial-gradient(circle at 96% 18%, rgba(69, 211, 128, .10), transparent 22rem),
    var(--cream);
  font-family: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: var(--header-height) 0 0;
  content: "";
  opacity: .29;
  background-image: url("./assets/dinolock-pattern.jpeg");
  background-size: 440px auto;
  mix-blend-mode: multiply;
  pointer-events: none;
}

a { color: inherit; }

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-height);
  padding: 0 clamp(20px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 241, .84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange-deep);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.045em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(191, 91, 16, .15);
}

.site-header nav {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  gap: clamp(16px, 2.5vw, 29px);
}

.site-header nav a {
  color: #536057;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: color .16s ease, transform .16s ease;
}

.site-header nav a:hover {
  color: var(--orange-deep);
  transform: translateY(-1px);
}

main {
  height: calc(100svh - var(--header-height));
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 1.02fr) minmax(400px, .98fr);
  align-items: center;
  width: min(1200px, calc(100% - 64px));
  height: 100%;
  margin: 0 auto;
  padding: clamp(18px, 3.2vh, 34px) 0;
  gap: clamp(42px, 6vw, 86px);
}

.character-side {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  isolation: isolate;
}

.character-card {
  position: relative;
  z-index: 3;
  width: var(--art-width);
  max-width: 100%;
  aspect-ratio: .91;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .94);
  border-radius: 999px;
  background: #fff;
  box-shadow:
    inset 0 1px 0 white,
    0 28px 64px rgba(144, 87, 32, .14);
}

.character-card::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255,255,255,.28), transparent 40%);
  pointer-events: none;
}

.character {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  transform: scale(1.035);
}

.orbit {
  position: absolute;
  z-index: 1;
  border: 2px dashed rgba(232, 104, 19, .18);
  border-radius: 999px;
  pointer-events: none;
}

.orbit-one {
  width: calc(var(--art-width) + 24px);
  aspect-ratio: .91;
  animation: orbit-breathe 5.5s ease-in-out infinite;
}

.orbit-two {
  width: calc(var(--art-width) + 52px);
  aspect-ratio: .91;
  border-color: rgba(45, 207, 114, .15);
  animation: orbit-breathe 5.5s ease-in-out 1.1s infinite reverse;
}

.learning-chip {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px 9px 9px;
  border: 1px solid rgba(255,255,255,.94);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 30px rgba(85, 56, 29, .13);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #354039;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.learning-chip span {
  display: grid;
  place-items: center;
  min-width: 43px;
  height: 36px;
  padding: 0 7px;
  border-radius: 11px;
  color: white;
  background: var(--orange);
  font-size: 15px;
}

.question-chip {
  top: 13%;
  left: max(8px, calc(50% - var(--art-width) / 2 - 15px));
  transform: rotate(-3deg);
}

.unlock-chip {
  right: max(8px, calc(50% - var(--art-width) / 2 - 15px));
  bottom: 13%;
  transform: rotate(3deg);
}

.learning-chip .unlock-icon {
  min-width: 36px;
  background: var(--green);
  font-size: 19px;
}

.hero-copy {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 580px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green-deep);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .15em;
}

h1 {
  margin: 0;
  font-size: clamp(62px, min(7vw, 11.5vh), 96px);
  font-weight: 800;
  line-height: .84;
  letter-spacing: -.072em;
}

h1 span,
h1 em { display: block; }

h1 em {
  margin-top: 9px;
  color: var(--orange);
  font-style: normal;
}

.intro {
  max-width: 540px;
  margin: clamp(15px, 2.5vh, 23px) auto clamp(14px, 2.3vh, 21px);
  color: var(--muted);
  font-size: clamp(19px, min(1.8vw, 2.8vh), 22px);
  font-weight: 600;
  line-height: 1.38;
}

.research-card {
  position: relative;
  min-height: 132px;
  padding: 18px 28px 14px;
  overflow: hidden;
  border: 0;
  background: transparent;
  text-align: center;
  transition: opacity .18s ease, transform .18s ease;
}

.research-card.is-changing {
  opacity: .35;
  transform: translateY(3px);
}

#research-message {
  min-height: 46px;
  margin: 0;
  color: #273129;
  font-size: 20.5px;
  font-weight: 800;
  line-height: 1.3;
}

.research-dots {
  position: absolute;
  bottom: 13px;
  left: 50%;
  display: flex;
  justify-content: center;
  gap: 7px;
  width: auto;
  margin: 0;
  transform: translateX(-50%);
}

.research-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(24, 33, 27, .18);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.research-dots button.is-active {
  width: 22px;
  background: var(--orange);
}

.research-dots button:focus-visible,
.site-header a:focus-visible {
  outline: 3px solid rgba(45, 207, 114, .42);
  outline-offset: 4px;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(13px, 2.2vh, 20px);
}

.app-store-badge {
  text-decoration: none;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 194px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  color: white;
  background: #101311;
  box-shadow: 0 11px 24px rgba(16, 19, 17, .19);
}

.app-store-badge svg { width: 25px; height: 25px; }
.app-store-badge span { line-height: 1.03; }
.app-store-badge small,
.app-store-badge strong { display: block; }
.app-store-badge small { font-size: 9px; font-weight: 600; }
.app-store-badge strong { font-size: 18px; font-weight: 700; }

@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: .72; }
  50% { transform: scale(1.012); opacity: 1; }
}

@media (max-width: 980px) {
  :root { --art-width: min(39vw, calc((100svh - 130px) * .91), 430px); }

  .hero {
    grid-template-columns: minmax(310px, .92fr) minmax(370px, 1.08fr);
    width: min(920px, calc(100% - 46px));
    gap: 38px;
  }

  h1 { font-size: clamp(56px, min(7.4vw, 10.2vh), 76px); }
}

@media (max-height: 700px) and (min-width: 761px) {
  :root {
    --header-height: 60px;
    --art-width: min(38vw, calc((100svh - 104px) * .91), 450px);
  }

  .brand { font-size: 20px; }
  .brand img { width: 30px; height: 30px; }
  .hero { padding-block: 14px; }
  .eyebrow { font-size: 14px; margin-bottom: 4px; }
  h1 { font-size: clamp(45px, min(5.5vw, 9vh), 62px); }
  .intro { margin-block: 11px; font-size: 16px; }
  .research-card { min-height: 112px; padding: 14px 18px 11px; }
  #research-message { min-height: 40px; font-size: 16px; }
  .research-dots { margin-top: 8px; }
  .download-row { margin-top: 10px; }
  .app-store-badge { padding-block: 6px; }
}

@media (max-width: 760px) {
  :root {
    --header-height: 58px;
    --art-width: min(70vw, calc((100svh - 432px) * .91), 280px);
  }

  .site-header {
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
  }

  .brand { font-size: 19px; }
  .brand img { width: 29px; height: 29px; border-radius: 8px; }
  .site-header nav { gap: 13px; }
  .site-header nav a { font-size: 11px; }

  .hero {
    display: flex;
    flex-direction: column;
    width: min(520px, calc(100% - 26px));
    height: 100%;
    padding: 13px 0 10px;
    gap: 7px;
  }

  .hero-copy {
    order: 1;
    flex: 0 0 auto;
    text-align: center;
  }

  .character-side {
    order: 2;
    flex: 1 1 auto;
    min-height: 0;
  }

  .eyebrow { margin-bottom: 3px; font-size: 11px; }
  h1 { font-size: clamp(43px, min(13.5vw, 8.5vh), 58px); line-height: .86; }
  h1 em { margin-top: 4px; }

  .intro {
    max-width: 440px;
    margin: 8px auto;
    font-size: clamp(13px, 3.8vw, 16px);
    line-height: 1.25;
  }

  .research-card {
    min-height: 104px;
    padding: 11px 14px 9px;
    border-radius: 18px;
  }

  #research-message { min-height: 34px; font-size: 14px; line-height: 1.22; }
  .research-dots { bottom: 8px; }

  .download-row {
    justify-content: center;
    margin-top: 8px;
  }

  .app-store-badge {
    min-width: 172px;
    padding: 6px 13px;
  }

  .app-store-badge svg { width: 21px; height: 21px; }
  .app-store-badge small { font-size: 8px; }
  .app-store-badge strong { font-size: 16px; }

  .orbit-one { width: calc(var(--art-width) + 16px); }
  .orbit-two { width: calc(var(--art-width) + 34px); }

  .learning-chip {
    gap: 6px;
    padding: 6px 8px 6px 6px;
    border-radius: 12px;
    font-size: 9px;
  }

  .learning-chip span {
    min-width: 33px;
    height: 29px;
    padding: 0 5px;
    border-radius: 8px;
    font-size: 12px;
  }

  .learning-chip .unlock-icon { min-width: 29px; font-size: 15px; }
  .question-chip { top: 7%; transform: rotate(-3deg); }
  .unlock-chip { bottom: 7%; transform: rotate(3deg); }
}

@media (max-width: 430px) {
  .site-header nav a:first-child { display: none; }
  .question-chip { left: calc(50% - var(--art-width) / 2); }
  .unlock-chip { right: calc(50% - var(--art-width) / 2); }
}

@media (max-height: 620px) and (max-width: 760px) {
  :root {
    --header-height: 52px;
    --art-width: min(57vw, calc((100svh - 350px) * .91), 205px);
  }

  .brand img { width: 26px; height: 26px; }
  .hero { padding-block: 7px 5px; gap: 4px; }
  .eyebrow { font-size: 8px; }
  h1 { font-size: clamp(38px, min(12vw, 8vh), 48px); }
  .intro { margin: 5px auto; font-size: 11px; }
  .research-card { min-height: 92px; padding-block: 8px 6px; }
  #research-message { min-height: 27px; font-size: 11px; }
  .research-dots { bottom: 6px; }
  .download-row { margin-top: 5px; }
  .app-store-badge { padding-block: 4px; }
  .learning-chip { transform: scale(.88); }
}

@media (orientation: landscape) and (max-height: 540px) {
  :root {
    --header-height: 48px;
    --art-width: min(33vw, calc((100svh - 112px) * .91), 280px);
  }

  .site-header { padding-inline: 14px; }
  .brand { font-size: 17px; }
  .brand img { width: 25px; height: 25px; }

  .hero {
    display: grid;
    grid-template-columns: minmax(210px, .82fr) minmax(310px, 1.18fr);
    width: min(900px, calc(100% - 28px));
    padding: 8px 0;
    gap: 24px;
  }

  .character-side { order: 1; }
  .hero-copy { order: 2; text-align: center; }
  .eyebrow { font-size: 8px; }
  h1 { font-size: clamp(35px, min(6vw, 11vh), 48px); }
  .intro { margin: 5px auto; font-size: 10px; }
  .research-card { min-height: 84px; padding: 7px 12px 5px; }
  #research-message { min-height: 24px; font-size: 10px; }
  .research-dots { bottom: 5px; }
  .download-row { justify-content: center; margin-top: 5px; }
  .app-store-badge { min-width: 150px; padding: 4px 11px; }
  .app-store-badge strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit { animation: none; }
  .research-card { transition: none; }
}
