/* BlueBerry Games */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/lato-900.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --night: #121433;        /* the darkest berry: footer, games */
  --ink: #171B3D;          /* navy from the logo outlines */
  --indigo: #23285E;       /* blueberry skin: hero, page heads */
  --indigo-2: #2D3373;
  --berry: #737EC1;        /* BERRY in the wordmark */
  --bloom: #B7BEEA;        /* the dusty bloom on a fresh berry */
  --bloom-2: #CBD0F2;
  --mist: #E4E7F8;         /* reading areas */
  --pink: #F28CA7;         /* the tongues */
  --pink-2: #F7AFC2;
  --cream: #F7F6F3;
  --ink-soft: #3E4370;
  --berry-ink: #3F4895;
  --line: rgba(23, 27, 61, .16);
  --line-dark: rgba(247, 246, 243, .14);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); color: var(--ink); }
body {
  margin: 0;
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--berry-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.08; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--berry-ink); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--pink); }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 20; padding: 10px 14px; border-radius: 8px; background: var(--cream); color: var(--ink); font-weight: 700; }
.skip:focus { left: 12px; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 48px); margin-inline: auto; }

/* Dark areas */
.dark { color: var(--bloom); }
.dark h1, .dark h2, .dark h3 { color: var(--cream); }
.dark a { color: var(--cream); text-decoration-color: var(--pink); }
.dark a:hover { color: var(--pink); }

/* Header */
.site-header { background: var(--indigo); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.logo img { height: 58px; width: auto; }
.nav { display: flex; gap: 32px; }
.nav a { padding: 6px 0; border-bottom: 3px solid transparent; color: var(--cream); font-size: 17px; font-weight: 700; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--pink); color: var(--cream); }

/* Buttons */
.button { display: inline-block; padding: 17px 24px; border-radius: 10px; background: var(--pink); color: var(--ink) !important; font-size: 17px; font-weight: 900; line-height: 1; text-decoration: none; }
.button:hover { background: var(--pink-2); }
.text-link { font-weight: 700; }

/* Home: hero */
.hero { position: relative; overflow: hidden; background: var(--indigo); }
.hero-bloom { position: absolute; right: -150px; bottom: -250px; width: 920px; opacity: .06; pointer-events: none; }
.hero-bloom path, .hero-bloom circle { fill: var(--cream); stroke: var(--cream); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: end; gap: 40px; }
.hero-text { padding: 48px 0 128px; }
.hero h1 { max-width: 11em; margin-bottom: 26px; font-size: clamp(42px, 5.4vw, 76px); line-height: 1.02; letter-spacing: -0.022em; }
.hero .lead { max-width: 30em; margin-bottom: 36px; font-size: 21px; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.hero-berries { justify-self: center; width: min(100%, 500px); margin-bottom: -34px; }
.hero-berries svg { width: 100%; height: auto; overflow: visible; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-berries svg { animation: berry-up .9s cubic-bezier(.22, 1.3, .36, 1) .15s both; }
  @keyframes berry-up { from { transform: translateY(42%); } to { transform: translateY(0); } }
}

/* Home: games */
.games { padding: 104px 0 128px; background: var(--night); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(34px, 4vw, 52px); }
.section-head p { max-width: 26em; margin: 0; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px 48px; }
.game, .game:hover { display: block; color: inherit; text-decoration: none; }
.game .art { margin-bottom: 24px; }
.game h3 { margin-bottom: 6px; font-size: 32px; }
.game .platform { margin-bottom: 10px; color: var(--pink); font-size: 16px; font-weight: 700; }
.game .short { max-width: 31em; margin: 0; color: var(--bloom); }
.game:hover h3, .game:focus-visible h3 { text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.game:focus-visible { outline-offset: 8px; border-radius: 20px; }

.art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 18px; background: var(--indigo-2); }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Home: studio */
.studio { position: relative; padding: 112px 0 136px; background: var(--bloom-2); color: var(--ink); }
.studio-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 72px; align-items: start; }
.studio h2 { margin-bottom: 28px; font-size: clamp(34px, 4vw, 52px); color: var(--ink); }
.studio p { max-width: 32em; font-size: 20px; line-height: 1.65; color: var(--ink); }
.studio .facts { margin-top: 12px; }

.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }

/* Footer */
.site-footer { position: relative; padding: 44px 0 48px; background: var(--night); color: var(--bloom); font-size: 16px; }
.footer-berry { position: absolute; right: max(24px, calc((100% - 1180px) / 2)); top: 0; width: 120px; transform: translateY(-62%); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 36px; }
.footer-logo img { height: 48px; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a { color: var(--cream); font-weight: 700; text-decoration: none; }
.footer-nav a:hover { color: var(--pink); }
.footer-meta { margin: 0; }

/* Inner pages */
.page-head { position: relative; overflow: hidden; padding: 32px 0 72px; background: var(--indigo); }
.page-head.has-art { padding-bottom: 210px; }
.page-berry { position: absolute; right: max(24px, calc((100% - 1180px) / 2)); bottom: -14px; width: 150px; }
.back { display: inline-block; margin-bottom: 26px; font-size: 16px; font-weight: 700; text-decoration: none !important; }
.back:hover { text-decoration: underline !important; }
.page-head h1 { max-width: 14em; margin-bottom: 18px; font-size: clamp(40px, 5vw, 70px); line-height: 1.03; letter-spacing: -0.022em; }
.page-head .lead { max-width: 32em; margin: 0; font-size: 21px; line-height: 1.5; }

.game-art { margin-top: -176px; position: relative; }
.game-art .art { aspect-ratio: 16 / 8; box-shadow: 0 24px 60px rgba(18, 20, 51, .28); }
.game-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 72px; align-items: start; padding: 76px 0 88px; }
.game-main h2 { margin-bottom: 18px; font-size: 32px; color: var(--ink); }
.game-main p { max-width: 34em; }
.help { padding: 36px 0 112px; border-top: 1px solid var(--line); }
.help p { margin: 0 0 .4em; }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 960px; margin-inline: auto; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; border: 2px solid #B89553; border-radius: 22px; background: #14180F; box-shadow: 0 24px 60px rgba(18, 20, 51, .3); }

.prose { padding: 64px 0 112px; }
.prose h2 { margin: 48px 0 14px; font-size: 27px; letter-spacing: -0.01em; color: var(--ink); }
.prose > h2:first-child { margin-top: 0; }
.prose p, .prose li { max-width: 40em; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--berry); }
.prose .summary { margin: 0 0 8px; padding: 24px 28px; border-radius: 14px; background: var(--bloom-2); }
.prose .summary p:last-child { margin-bottom: 0; }

.notfound { padding: 56px 0 128px; }

/* Smaller screens */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-text { padding: 32px 0 24px; }
  .hero-berries { width: min(80%, 400px); margin-bottom: -26px; }
  .hero-bloom { display: none; }
  .game-grid { grid-template-columns: 1fr; gap: 64px; }
  .studio-inner, .game-main { grid-template-columns: 1fr; gap: 40px; }
  .game-art .art { aspect-ratio: 16 / 10; }
  .page-berry { width: 110px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .wrap, .narrow { width: calc(100% - 36px); }
  .header-inner { min-height: 76px; }
  .logo img { height: 42px; }
  .nav { gap: 18px; }
  .nav a { font-size: 16px; }
  .hero .lead, .page-head .lead { font-size: 19px; }
  .games { padding: 80px 0 96px; }
  .studio { padding: 80px 0 120px; }
  .studio p { font-size: 18px; }
  .facts div { grid-template-columns: 7.5em minmax(0, 1fr); }
  .page-head { padding-bottom: 96px; }
  .page-head.has-art { padding-bottom: 128px; }
  .page-berry { width: 92px; bottom: -10px; }
  .game-art { margin-top: -108px; }
  .footer-berry { width: 92px; }
  .shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .shots figure { flex: 0 0 72%; scroll-snap-align: center; }
}
@media (max-width: 380px) {
  .logo img { height: 36px; }
  .nav { gap: 14px; }
  .nav a { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
