/* Tiny Twigs Studio. Colours match tools/logo.py. */
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/Fredoka-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-Variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --cream: #FFF9EF;
  --cream-deep: #FFF1D6;
  --paper: #FFFFFF;
  --ink: #3B2A1E;
  --ink-soft: #6B5443;
  --bark: #8B5A3C;
  --bark-ink: #5A3A24;
  --leaf: #5DB352;
  --forest: #2F7A35;
  --forest-deep: #22602A;
  --sprout: #EAF6E0;
  --sun: #FFF4D0;
  --sun-deep: #FFD25A;
  --blush: #FF8A5B;
  --line: #EDE2CF;
  --shadow: 0 10px 30px rgba(91, 58, 36, .08), 0 2px 6px rgba(91, 58, 36, .06);
  --radius: 28px;
  --head: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.075rem/1.65 var(--body);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--forest); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--forest-deep); }
:focus-visible { outline: 3px solid var(--blush); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--head); color: var(--bark-ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 6vw, 3.7rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.45rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.wrap .narrow { width: min(760px, 100%); margin-inline: auto; }
.centre { text-align: center; justify-content: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: .6rem 1rem; border-radius: 12px; z-index: 10; }
.skip:focus { left: 8px; }
.ribbon { margin: 0; background: var(--sun-deep); color: var(--ink); text-align: center; font-weight: 700; padding: .4rem 16px; font-size: .95rem; }

.eyebrow { font-family: var(--head); font-weight: 600; color: var(--forest); letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; margin-bottom: .6rem; }
.lede { font-size: clamp(1.12rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 36em; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7rem 1.5rem; border-radius: 999px;
  background: var(--forest); color: #fff; text-decoration: none;
  font: 600 1.08rem/1.2 var(--head); letter-spacing: .01em;
  box-shadow: 0 4px 0 var(--forest-deep);
  transition: transform .12s ease, box-shadow .12s ease;
  overflow-wrap: anywhere; text-align: center;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 0 var(--forest-deep); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--forest-deep); }
.btn-soft { background: var(--paper); color: var(--bark-ink); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn-soft:hover { color: var(--bark-ink); box-shadow: 0 6px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn-soft:active { box-shadow: 0 2px 0 var(--line), inset 0 0 0 2px var(--line); }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:active { transition: none; transform: none; } }

/* header */
.site-header { background: color-mix(in srgb, var(--cream) 92%, transparent); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-block: 10px; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .45rem .85rem; border-radius: 999px; text-decoration: none; color: var(--bark-ink); font: 600 1rem/1.3 var(--head); }
.nav a:hover { background: var(--sprout); color: var(--forest-deep); }
.nav a[aria-current="page"] { background: var(--sprout); color: var(--forest-deep); }
@media (max-width: 640px) {
  .site-header { position: static; }
  .header-row { justify-content: center; }
  .brand img { height: 44px; }
  .nav { justify-content: center; }
  .nav a { padding: .4rem .65rem; }
}

/* hero */
.hero { --hills: clamp(84px, 11vw, 150px); position: relative; background: linear-gradient(#E3F3F8, #F4FAF2); padding: clamp(36px, 6vw, 72px) 0 calc(var(--hills) * .55); overflow: hidden; isolation: isolate; }
.sky { position: absolute; inset: 0 0 auto 0; width: 100%; height: 400px; z-index: -1; }
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: var(--hills); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 32px; }
.hero-buddy { position: relative; justify-self: center; align-self: end; width: min(300px, 70vw); margin-bottom: calc(var(--hills) * -.2); }
.hero-buddy img { width: 100%; filter: drop-shadow(0 12px 12px rgba(91, 58, 36, .12)); animation: wave 4s ease-in-out infinite; transform-origin: 50% 95%; }
.bubble {
  position: absolute; top: 6%; left: -14%; margin: 0;
  background: var(--paper); color: var(--bark-ink); font: 600 1.35rem/1 var(--head);
  padding: .7rem 1.1rem; border-radius: 24px; box-shadow: var(--shadow);
}
.bubble::after { content: ""; position: absolute; right: 18px; bottom: -10px; width: 22px; height: 22px; background: var(--paper); border-radius: 50%; }
@keyframes wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .hero-buddy img { animation: none; } }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text .lede { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .hero-buddy { width: min(200px, 56vw); order: -1; align-self: center; margin-bottom: 0; }
  .bubble { left: -30%; font-size: 1.1rem; }
}

/* sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-sprout { background: var(--sprout); }
.section-sun { background: var(--sun); }
.page-head { padding: clamp(48px, 7vw, 84px) 0 clamp(24px, 4vw, 40px); background: linear-gradient(#E3F3F8, var(--cream)); }
.page-head + .section { padding-top: clamp(24px, 4vw, 48px); }

/* game card */
.game-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-top: 1.5rem; }
.game-art { display: block; background: #E3F3F8; }
.game-art img { width: 100%; aspect-ratio: 1200 / 470; object-fit: cover; object-position: 50% 80%; }
.game-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px 40px; padding: clamp(22px, 4vw, 40px); }
.game-main p:last-child, .game-side .actions { margin-bottom: 0; }
.aside { color: var(--ink-soft); }
.actions.stack { flex-direction: column; align-items: stretch; }
.game-title { display: flex; align-items: center; gap: 16px; margin-bottom: 1rem; }
.game-title img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 2px 8px rgba(91, 58, 36, .15); flex: none; }
.game-title h3 { font-size: 1.7rem; margin: 0; }
.tagline { margin: 0; color: var(--ink-soft); font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 .5rem; }
.pills li { background: var(--sprout); color: var(--forest-deep); border-radius: 999px; padding: .3rem .8rem; font-weight: 700; font-size: .95rem; }
.pills li.soon { background: var(--sun-deep); color: var(--ink); }
.soon-note { margin: 1rem 0 0; color: var(--ink-soft); }
@media (max-width: 860px) { .game-body { grid-template-columns: 1fr; } .game-art img { aspect-ratio: 12 / 7; } .actions.stack { align-items: flex-start; } }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 3vw, 28px); list-style: none; padding: 0; margin: clamp(28px, 5vw, 48px) auto 0; max-width: 760px; }
.shots img { width: 100%; border-radius: 22px; box-shadow: var(--shadow); border: 6px solid var(--paper); }
.more-games { margin-top: 2rem; text-align: center; color: var(--ink-soft); font-weight: 700; }

/* promises */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.promises li { background: var(--paper); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); }
.promises p { margin: 0; color: var(--ink-soft); }
.icon { width: 56px; height: 56px; padding: 6px; border-radius: 18px; background: var(--sprout); margin-bottom: 14px; fill: none; stroke: var(--forest); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.section-sprout .icon { background: var(--sun); }
.icon .fill { fill: var(--blush); stroke: none; }
@media (max-width: 900px) { .promises { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .promises { grid-template-columns: 1fr; } }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: center; }
.about-badge { width: 260px; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } .about-badge { width: 180px; margin-inline: auto; grid-row: 1; } }

/* contact */
.contact { text-align: center; max-width: 680px; }
.contact p { color: var(--ink-soft); }

/* text pages */
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.ticks li { position: relative; padding-left: 2rem; margin-bottom: .75rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .32em; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.4l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.link-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; list-style: none; padding: 0; margin: 1rem 0 0; }
.link-cards a { display: block; height: 100%; background: var(--paper); border-radius: 20px; padding: 18px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.link-cards a:hover { outline: 2px solid var(--leaf); }
.link-cards strong { display: block; font: 600 1.15rem/1.3 var(--head); color: var(--forest); margin-bottom: .2rem; }
.link-cards span { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 600px) { .link-cards { grid-template-columns: 1fr; } }

/* press */
.facts { margin: 1rem 0 0; background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); padding: 8px 24px; }
.facts div { display: grid; grid-template-columns: 10rem 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-weight: 800; color: var(--bark-ink); }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }
.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; list-style: none; padding: 0; margin: 1.5rem 0 2.5rem; }
.logo-grid li { background: var(--paper); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.logo-grid h3 { font-size: 1.1rem; margin: 14px 0 .2rem; }
.logo-grid p { margin: 0; font-weight: 700; }
.logo-tile { display: grid; place-items: center; height: 170px; border-radius: 18px; background: var(--cream); padding: 18px; }
.logo-tile img { height: 112px; width: auto; max-width: 100%; object-fit: contain; }
.logo-tile-dark { background: var(--ink); }
@media (max-width: 640px) { .logo-grid { grid-template-columns: 1fr; } }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.swatches li { background: var(--paper); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.swatches strong { display: block; font-family: var(--head); font-weight: 600; }
.swatch { display: block; height: 64px; border-radius: 12px; margin-bottom: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.sw-twig { background: #8B5A3C; } .sw-bark { background: #5A3A24; } .sw-leaf { background: #5DB352; }
.sw-forest { background: #2F7A35; } .sw-cream { background: #FFF1D6; } .sw-blush { background: #FF8A5B; }
@media (max-width: 560px) { .swatches { grid-template-columns: repeat(2, 1fr); } }
.press-art { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; list-style: none; padding: 0; margin: 1.2rem 0; align-items: start; }
.press-art img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); }
.press-art p { margin: .6rem 0 0; font-weight: 700; }
@media (max-width: 560px) { .press-art { grid-template-columns: 1fr; } }

/* 404 */
.lost img { width: 160px; margin: 0 auto 1rem; }
.lost .lede { margin-inline: auto; }

/* footer */
.site-footer { background: var(--ink); color: #E9DDCB; padding: 48px 0 28px; }
.site-footer a { color: #B5E3A0; }
.site-footer a:hover { color: #D7F2C9; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; align-items: flex-start; }
.footer-brand img { height: 60px; width: auto; margin-bottom: 12px; }
.footer-brand p { margin: 0; max-width: 24em; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-weight: 700; }
.footer-note { border-top: 1px solid rgba(233, 221, 203, .18); margin-top: 32px; padding-top: 20px; font-size: .95rem; }
.footer-note p { margin: 0; }
