/* Meadow Hive: the game's own look on the web. Palette, outlines, hard shadows and fonts all match the app. */

@font-face { font-family: 'Pixelify Sans'; src: url('../fonts/PixelifySans_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/Nunito_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/Nunito_800ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('../fonts/Nunito_900Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

:root {
  --cocoa: #3b2416;
  --bark: #6b4a33;
  --honey: #f4b63f;
  --amber: #d98a1e;
  --comb: #f2cf7e;
  --wax: #fbe7b5;
  --cream: #fff6e0;
  --meadow: #8cc56a;
  --meadow-dark: #5e9e4a;
  --sky: #bfe6f2;
  --lavender: #d9ccf2;
  --petal: #f49cb4;
  --alert: #d63a57;
  --page: #f6dda0;
  --outline: 3px solid var(--cocoa);
  --shadow: 0 5px 0 var(--cocoa);
  --shadow-sm: 0 3px 0 var(--cocoa);
  --radius: 20px;
  --wrap: 1120px;
  --title: 'Pixelify Sans', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--cocoa);
  font-family: var(--body);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cocoa); outline-offset: 3px; border-radius: 8px; }

.px { image-rendering: pixelated; image-rendering: crisp-edges; }
@supports (image-rendering: pixelated) { .px { image-rendering: pixelated; } }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cream); border: var(--outline); padding: 8px 14px; border-radius: 12px; }
.skip:focus { left: 16px; }

/* ------------------------------------------------------------ type */

h1, h2, h3 { margin: 0; line-height: 1.1; }
h1, h2 { font-family: var(--title); font-weight: 700; letter-spacing: 0.01em; font-variant-ligatures: no-common-ligatures; }
h2 { font-size: clamp(30px, 4.4vw, 46px); }
h3 { font-family: var(--body); font-weight: 900; font-size: 21px; }
p { margin: 0; }
.kicker { font-weight: 900; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bark); }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--bark); max-width: 38em; }

/* ------------------------------------------------------------ buttons and chips */

.btn {
  --face: var(--meadow);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: var(--outline);
  border-radius: 18px;
  background: var(--face);
  color: var(--cocoa);
  font: 900 18px/1 var(--body);
  text-decoration: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--cocoa); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--cocoa); }
.btn.honey { --face: var(--honey); }
.btn.plain { --face: var(--cream); }
.btn img { width: 26px; height: auto; }
.btn small { display: block; font-size: 12px; font-weight: 800; color: var(--bark); letter-spacing: 0.02em; }
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; line-height: 1.05; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: var(--outline); border-radius: 999px;
  background: var(--cream); font-weight: 900; font-size: 15px; box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------ header */

.top {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  padding: 16px 0;
}
.top .wrap { display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 12px; border: var(--outline); box-shadow: var(--shadow-sm); background: var(--lavender); }
.brand span { font: 700 24px/1 var(--title); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { padding: 8px 12px; border-radius: 12px; font-weight: 900; font-size: 15px; text-decoration: none; }
.nav a:hover { background: rgb(255 246 224 / 0.7); }
.clock {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: var(--outline); border-radius: 999px;
  background: var(--cream); box-shadow: var(--shadow-sm); cursor: pointer; padding: 0;
}
.clock img { width: 26px; height: 26px; }
.night .brand span, .night .nav a { color: var(--cream); text-shadow: 0 2px 0 var(--cocoa); }
.night .nav a:hover { background: rgb(59 36 22 / 0.35); }
@media (max-width: 760px) { .nav a:not(.keep) { display: none; } .brand span { font-size: 20px; } }

/* ------------------------------------------------------------ hero: the living meadow */

.hero {
  position: relative;
  height: clamp(620px, 92vh, 860px);
  overflow: hidden;
  background: #b3e0f0;
  border-bottom: var(--outline);
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.hero .copy {
  position: absolute; z-index: 2;
  left: max(16px, calc((100% - var(--wrap)) / 2));
  top: clamp(110px, 17vh, 170px);
  width: min(560px, calc(100% - 32px));
}
.hero h1 {
  font-size: clamp(54px, 8vw, 104px);
  color: var(--cream);
  text-shadow: 0 5px 0 var(--cocoa), 3px 0 0 var(--cocoa), -3px 0 0 var(--cocoa), 0 -3px 0 var(--cocoa), 3px 5px 0 var(--cocoa), -3px 5px 0 var(--cocoa);
}
.hero .tag {
  margin-top: 14px;
  display: inline-block;
  padding: 10px 16px;
  border: var(--outline); border-radius: 16px;
  background: var(--cream); box-shadow: var(--shadow);
  font-size: clamp(18px, 2vw, 22px); font-weight: 900;
}
.hero .tag em { font-style: normal; color: var(--alert); }
.hero .sub { margin-top: 14px; max-width: 30em; font-size: 18px; color: var(--cocoa); text-shadow: 0 1px 0 rgb(255 246 224 / 0.8); }
.night .hero .sub { color: var(--cream); text-shadow: 0 2px 0 var(--cocoa); }
.hero .ctas { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .hint {
  position: absolute; z-index: 2; right: max(16px, calc((100% - var(--wrap)) / 2)); bottom: 18px;
  padding: 6px 12px; border-radius: 999px; background: rgb(255 246 224 / 0.85); border: 2px solid var(--cocoa);
  font-size: 13px; font-weight: 900;
}
@media (max-width: 760px) {
  .hero { height: clamp(640px, 100svh, 820px); }
  .hero .copy { top: 92px; text-align: center; left: 16px; width: calc(100% - 32px); }
  .hero .ctas { justify-content: center; }
  .hero .sub { margin-inline: auto; }
  .hero .hint { left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }
}

/* ------------------------------------------------------------ sections */

section { position: relative; padding: clamp(64px, 9vw, 110px) 0; }
.comb-bg {
  background-color: var(--page);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33M0 16L-28 0M56 16L84 0' fill='none' stroke='%23e9c27a' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 56px 97px;
}
.meadow-bg { background: #cfe6b8; border-block: var(--outline); }
.sky-bg { background: var(--sky); border-block: var(--outline); }
.head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 52px); max-width: 720px; }
.head.center { text-align: center; margin-inline: auto; justify-items: center; }

.panel { background: var(--cream); border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); }

/* the three things the bees make */
.makes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.make { padding: 24px; display: grid; gap: 12px; align-content: start; }
.make .chain { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 15px; color: var(--bark); }
.make .chain img { width: 40px; height: auto; }
.make .arrow { font-size: 22px; color: var(--amber); }
.make .fact { font-size: 15px; color: var(--bark); border-top: 2px dashed var(--comb); padding-top: 12px; }
@media (max-width: 860px) { .makes { grid-template-columns: 1fr; } }

/* phones */
.phones { display: flex; justify-content: center; gap: clamp(16px, 3vw, 36px); align-items: flex-end; }
.phone {
  flex: 0 0 auto; width: clamp(220px, 24vw, 280px); aspect-ratio: 390 / 844;
  border: var(--outline); border-radius: 40px; background: var(--cocoa); padding: 9px;
  box-shadow: 0 8px 0 var(--cocoa); position: relative;
}
/* the screenshot sits under a status bar (its top colour, set per phone), so the island never covers the game */
.phone img {
  width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 31px; display: block;
  padding-top: 11.5%; background: var(--top, var(--wax));
}
.phone::before { content: ''; position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 30%; aspect-ratio: 5 / 1; border-radius: 999px; background: var(--cocoa); z-index: 1; }
.phone::after { content: '9:41'; position: absolute; top: 17px; left: 15%; font: 800 11px/1 var(--body); color: var(--top-ink, var(--cocoa)); z-index: 1; }
.phone:nth-child(2) { transform: translateY(-26px); }
.phone figcaption { position: absolute; left: 50%; bottom: -54px; transform: translateX(-50%); white-space: nowrap; }
.phones-wrap { padding-bottom: 56px; }
@media (max-width: 860px) {
  .phones { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px 16px 70px; margin-inline: -16px; }
  .phone { scroll-snap-align: center; }
  .phone:nth-child(2) { transform: none; }
}

/* bee jobs */
.jobs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.job { padding: 22px; display: grid; gap: 10px; align-content: start; }
.job .art { height: 96px; display: flex; align-items: flex-end; gap: 4px; }
.job .art img { height: 72px; width: auto; }
.job .fills { font-size: 14px; font-weight: 900; color: var(--meadow-dark); }
.events { margin-top: 20px; padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; background: var(--lavender); }
.events img { height: 64px; width: auto; }
@media (max-width: 860px) { .jobs { grid-template-columns: 1fr; } }

/* the journey */
.journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
.stage { padding: 22px; display: grid; gap: 10px; justify-items: start; }
.stage .art { height: 176px; width: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 14px; background: linear-gradient(#bfe6f2 0 62%, #8cc56a 62%); border: 2px solid var(--cocoa); padding-bottom: 14px; }
.stage .art img { width: auto; }
.stage .n { width: 34px; height: 34px; border-radius: 999px; border: var(--outline); background: var(--honey); display: grid; place-items: center; font-weight: 900; }
.stage .what { font-size: 15px; color: var(--bark); }
@media (max-width: 860px) { .journey { grid-template-columns: 1fr; } }

/* meet the bees */
.bees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.bee { padding: 22px; display: grid; gap: 14px; justify-items: center; text-align: center; grid-template-rows: auto auto 1fr auto; }
.bee .sprite { width: 144px; height: 156px; background-repeat: no-repeat; background-size: 288px 156px; animation: flap 0.22s steps(1) infinite, bob 2.4s ease-in-out infinite; }
.bee .role { font-size: 14px; color: var(--bark); margin-top: 4px; }
.bubble {
  position: relative; width: 100%; padding: 14px 16px; border: var(--outline); border-radius: 16px;
  background: #fff; font-size: 16px; text-align: left; min-height: 6.2em;
}
.bubble::before { content: ''; position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 18px; height: 18px; background: #fff; border-left: var(--outline); border-top: var(--outline); }
.bubble.queen { background: var(--lavender); }
.bubble.queen::before { background: var(--lavender); }
.next-fact { font: 900 14px/1 var(--body); background: none; border: none; color: var(--bark); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
@keyframes flap { 0% { background-position: 0 0; } 50% { background-position: -144px 0; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (max-width: 860px) { .bees { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .bee .sprite { animation: none; } }

/* price and questions */
.deal { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
.price { padding: 26px; display: grid; gap: 16px; }
.price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.price li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.price li img { width: 30px; height: auto; margin-top: 2px; }
.price strong { font-weight: 900; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--cream); border: var(--outline); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 15px 0; font-weight: 900; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 700 22px/1 var(--title); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 0 16px; color: var(--bark); font-size: 16px; }
@media (max-width: 860px) { .deal { grid-template-columns: 1fr; } }

/* last call */
.cta-band { text-align: center; }
.cta-band .panel { padding: clamp(28px, 5vw, 52px); display: grid; gap: 18px; justify-items: center; background: var(--honey); }
.cta-band .panel { position: relative; overflow: hidden; }
.cta-band .pals { position: absolute; inset: 0; pointer-events: none; }
.cta-band .pal { position: absolute; left: 7%; top: 22%; width: 120px; height: 130px; background-size: 240px 130px; background-repeat: no-repeat; animation: flap 0.22s steps(1) infinite, bob 2.6s ease-in-out infinite; }
.cta-band .pal.right { left: auto; right: 7%; top: 44%; animation-delay: 0s, -1.3s; }
@keyframes flap5 { 0% { background-position: 0 0; } 50% { background-position: -120px 0; } }
.cta-band .pal { animation-name: flap5, bob; }
@media (max-width: 760px) { .cta-band .pal { width: 72px; height: 78px; background-size: 144px 78px; top: 6%; left: 4%; animation-name: flap3, bob; } .cta-band .pal.right { top: 6%; right: 4%; } }
@keyframes flap3 { 0% { background-position: 0 0; } 50% { background-position: -72px 0; } }
@media (prefers-reduced-motion: reduce) { .cta-band .pal { animation: none; } }
.cta-band .panel img.icon { width: 112px; height: 112px; border-radius: 26px; border: var(--outline); box-shadow: var(--shadow); }

/* footer */
footer { padding: 38px 0 54px; background: var(--cocoa); color: var(--wax); font-size: 15px; }
footer .wrap { display: grid; gap: 16px; }
footer .row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
footer a { color: var(--cream); font-weight: 900; text-underline-offset: 3px; }
footer .credits { color: #d9c3a0; font-size: 14px; }
footer .brand span { color: var(--cream); }

/* ------------------------------------------------------------ simple pages (support, privacy) */

.page-head {
  position: relative; overflow: hidden; border-bottom: var(--outline); padding: 16px 0 64px;
  background: linear-gradient(var(--sky) calc(100% - 26px), var(--meadow) 0);
}
.page-head .top { position: static; padding: 0 0 28px; }
.page-head .head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; position: relative; z-index: 1; }
.page-head .kicker { margin-bottom: 8px; }
/* a bee hovering by the title (the sprite sheet's two frames at 4x), and flowers along a strip of meadow */
.page-head .pal { flex: 0 0 auto; width: 96px; height: 104px; margin: 0 4% 8px 0; background-size: 192px 104px; background-repeat: no-repeat; animation: flap4 0.22s steps(1) infinite, bob 2.4s ease-in-out infinite; }
@keyframes flap4 { 0% { background-position: 0 0; } 50% { background-position: -96px 0; } }
.page-head .edge { position: absolute; inset: auto 0 10px 0; height: 57px; pointer-events: none; }
.page-head .flower { position: absolute; bottom: 0; width: 45px; height: 57px; background-size: 135px 57px; background-position: -45px 0; background-repeat: no-repeat; }
@media (max-width: 760px) {
  .page-head .pal { width: 72px; height: 78px; background-size: 144px 78px; animation-name: flap3, bob; margin-right: 0; }
  .page-head .flower:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .page-head .pal { animation: none; } }
.page-head h1 { font-size: clamp(40px, 6vw, 64px); color: var(--cream); text-shadow: 0 4px 0 var(--cocoa), 3px 0 0 var(--cocoa), -3px 0 0 var(--cocoa), 0 -3px 0 var(--cocoa), 3px 4px 0 var(--cocoa), -3px 4px 0 var(--cocoa); }
.page-head p { margin-top: 12px; color: var(--bark); }
.doc { padding: 48px 0 80px; }
.doc .panel { padding: clamp(22px, 4vw, 40px); max-width: 820px; margin-inline: auto; }
.doc h2 { font-size: 28px; margin: 34px 0 10px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 22px 0 6px; font-size: 18px; }
.doc p, .doc li { color: #4b3222; font-weight: 700; }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 22px; display: grid; gap: 6px; margin: 10px 0; }
.doc .note { background: var(--wax); border: 2px solid var(--cocoa); border-radius: 14px; padding: 14px 16px; margin: 16px 0; }
.contact { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 6px; }
.doc .stack { max-width: 820px; margin-inline: auto; display: grid; gap: 40px; }
.doc .stack .panel { max-width: none; }
.doc .faq-title { margin: 0 0 16px; }
.doc a { font-weight: 900; text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc .btn { text-decoration: none; }
