/* Tiny Orchard's website, in the game's own look: Baloo 2, gold titles with a dark
   outline, wooden ribbons, parchment cards, green and wooden buttons. */

@font-face {
  font-family: 'Baloo 2';
  src: url('/fonts/Baloo2.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #4a2f22;
  --ink-soft: #7a5a44;
  --outline: #4a2a14;
  --parchment: #fff3d6;
  --parchment-light: #fffaea;
  --wood: #c98e56;
  --wood-dark: #8d5e3c;
  --green: #7ed957;
  --green-dark: #3e9b3a;
  --gold-top: #fff7c2;
  --gold-bottom: #ffc928;
  --night: #301808;
  --gutter: clamp(16px, 4vw, 48px);
  --wide: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #5f3d24;
  color: var(--ink);
  font: 500 18px/1.55 'Baloo 2', system-ui, sans-serif;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--green-dark); border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 8px 16px; border-radius: 12px; background: var(--parchment); font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: min(100%, var(--wide)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------- the gold title */
.title {
  position: relative;
  display: block;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .005em;
  white-space: pre-line;
  text-wrap: balance;
  color: var(--outline);
  -webkit-text-stroke: .2em var(--outline);
  text-shadow: 0 .09em 0 rgba(48, 24, 8, .6);
}
.title::after { /* the gold, over the outline; not read a second time */
  content: attr(data-text);
  content: attr(data-text) / '';
  position: absolute;
  inset: 0;
  -webkit-text-stroke: 0;
  text-shadow: none;
  color: var(--gold-bottom);
  background: linear-gradient(180deg, var(--gold-top) 18%, var(--gold-bottom) 82%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.title--xl { font-size: clamp(3.2rem, 6.1vw, 5.2rem); }
.title--l { font-size: clamp(2.1rem, 4.4vw, 3.7rem); }
.title--m { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }

.ribbon {
  display: inline-block;
  padding: .3em 1.25em .22em;
  border: 3px solid var(--outline);
  border-radius: 99px;
  background: linear-gradient(180deg, var(--wood), var(--wood-dark));
  box-shadow: 0 4px 0 rgba(48, 24, 8, .55);
  color: #fff8e1;
  font-weight: 800;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
  line-height: 1.25;
  text-shadow: 0 2px 0 var(--outline), 1px 0 0 var(--outline), -1px 0 0 var(--outline), 0 -1px 0 var(--outline);
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px;
  padding: .45em 1.5em .3em;
  border: 3px solid #1f5e22;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  box-shadow: 0 5px 0 #1f5e22;
  color: #fff;
  font: 800 1.1rem/1.2 'Baloo 2', system-ui, sans-serif;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(31, 94, 34, .9);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #1f5e22; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #1f5e22; }
.btn--wood { border-color: var(--outline); background: linear-gradient(180deg, var(--wood), var(--wood-dark)); box-shadow: 0 5px 0 var(--outline); text-shadow: 0 2px 0 var(--outline); }
.btn--wood:hover { box-shadow: 0 7px 0 var(--outline); }
.btn--wood:active { box-shadow: 0 1px 0 var(--outline); }
.soon {
  display: inline-flex; flex-direction: column;
  padding: .5em 1.5em .35em;
  border: 3px solid var(--outline);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffe58a, #ffc928);
  box-shadow: 0 5px 0 var(--outline);
  color: var(--outline);
  line-height: 1.2;
}
.soon b { font-size: 1.35rem; font-weight: 800; }
.soon small { font-size: .98rem; font-weight: 700; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------------------------------------------------------------- the header */
.top {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, #a06f46, var(--wood-dark));
  border-bottom: 4px solid var(--outline);
  box-shadow: 0 4px 12px rgba(48, 24, 8, .4);
}
.top__row { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; margin-right: auto; color: #fff8e1; font-weight: 800; font-size: 1.25rem; text-decoration: none; text-shadow: 0 2px 0 var(--outline); white-space: nowrap; }
.brand img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(48, 24, 8, .6)); }
.top nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); }
.top nav a { display: inline-block; padding: 8px 2px 4px; color: #fff8e1; font-weight: 700; text-decoration: none; text-shadow: 0 2px 0 var(--outline); }
.top nav a:hover, .top nav a[aria-current] { color: var(--gold-bottom); }
.lang { min-width: 42px; padding: 6px 10px 2px !important; border: 2px solid var(--outline); border-radius: 10px; background: rgba(48, 24, 8, .3); text-align: center; }

/* -------------------------------------------------------------------- scenes */
.scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--night) center / cover no-repeat;
}
.scene::before { /* the art is darkened, so the title stands out */
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, rgba(59, 30, 12, .5), rgba(59, 30, 12, .22) 45%, rgba(48, 24, 8, .55));
}
.scene::after { /* sun rays behind the title */
  content: ''; position: absolute; z-index: -1;
  left: var(--sun-x, 30%); top: 45%;
  width: 240vmax; height: 240vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(255, 233, 168, .13) 0 12.857deg, transparent 12.857deg 25.714deg);
  -webkit-mask: radial-gradient(closest-side, #000 8%, transparent 42%);
  mask: radial-gradient(closest-side, #000 8%, transparent 42%);
  animation: spin 120s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

section[id] { scroll-margin-top: 68px; }
.scene + .scene { border-top: 4px solid var(--outline); }

.hero { padding-block: clamp(32px, 5vw, 64px); --sun-x: 28%; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; }
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.hero__logo { width: clamp(130px, 14vw, 190px); height: auto; margin-bottom: -8px; animation: bob 5s ease-in-out infinite; }
.hero__lead { max-width: 34em; padding: 14px 20px 10px; border: 3px solid var(--outline); border-radius: 18px; background: var(--parchment); box-shadow: 0 5px 0 rgba(48, 24, 8, .5); }
@keyframes bob { 50% { translate: 0 -8px; } }

/* --------------------------------------------------------------- the phone */
.stage { --half: min(170px, calc((100svh - 118px) * .225)); position: relative; display: flex; justify-content: center; }
.phone {
  position: relative;
  width: min(100%, var(--phone-w, min(340px, calc((100svh - 118px) * .45))));
  padding: 11px;
  border-radius: 40px;
  background: linear-gradient(135deg, #4a4a52, #17171b);
  box-shadow: 0 0 0 1px #0b0b0e inset, 0 20px 36px rgba(32, 15, 6, .6);
}
.phone::before, .phone::after { /* power and volume, on the right edge */
  content: ''; position: absolute; left: 100%; width: 5px; border-radius: 0 3px 3px 0; background: #2b2b30;
}
.phone::before { top: 20%; height: 12%; }
.phone::after { top: 36%; height: 7%; }
.phone__glass { position: relative; aspect-ratio: 360 / 780; overflow: hidden; border-radius: 30px; background: #111; }
.phone__glass img, .phone__glass video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.float { position: absolute; z-index: 2; width: var(--s, 110px); height: auto; filter: drop-shadow(0 7px 5px rgba(48, 24, 8, .45)); animation: bob var(--t, 5s) ease-in-out infinite; pointer-events: none; }

/* --------------------------------------------------------------- trust strip */
.strip { background: linear-gradient(180deg, var(--wood), var(--wood-dark)); border-block: 4px solid var(--outline); }
.strip ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 24px; margin: 0; padding: 18px 0 14px; list-style: none; }
.strip li { color: #fff8e1; text-align: center; line-height: 1.25; font-weight: 800; font-size: 1.15rem; text-shadow: 0 2px 0 var(--outline); }
.strip small { display: block; margin-top: 2px; color: #ffeec4; font-weight: 600; font-size: .86rem; text-shadow: 0 1px 0 var(--outline); }

/* ------------------------------------------------------------------ features */
.feature { padding-block: clamp(44px, 7vw, 84px); --sun-x: 68%; }
.feature:nth-of-type(even) { --sun-x: 32%; }
.feature__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature--flip .feature__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.feature--flip .stage { order: 2; }
.feature__text { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.card {
  font-size: 1.08rem;
  border: 3px solid var(--outline);
  border-radius: 20px;
  background: var(--parchment);
  box-shadow: 0 6px 0 rgba(48, 24, 8, .5);
  padding: 18px 22px 14px;
}
.feature .card { max-width: 32em; }
.card ul, .prose ul { margin: 0; padding-left: 1.15em; }
.card li + li { margin-top: 4px; }

/* -------------------------------------------------------------------- bands */
.band { padding-block: clamp(44px, 6vw, 72px); background: var(--parchment); }
.band--dark { background: #5f3d24; }
.band__head { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 32px; text-align: center; }
.band h2.plain { color: var(--ink); font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 800; line-height: 1.15; }
.band p.lede { max-width: 38em; color: var(--ink-soft); }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.stats li { display: flex; flex-direction: column; align-items: center; padding: 14px 8px 10px; border: 3px solid var(--wood-dark); border-radius: 18px; background: var(--parchment-light); text-align: center; line-height: 1.2; }
.stats img { width: 72px; height: 72px; object-fit: contain; }
.stats b { font-size: 2.1rem; font-weight: 800; line-height: 1.15; }
.stats span { color: var(--ink-soft); font-weight: 600; font-size: .98rem; }

.film { padding: 12px; border: 4px solid var(--outline); border-radius: 24px; background: linear-gradient(135deg, var(--wood), var(--wood-dark)); box-shadow: 0 8px 0 rgba(48, 24, 8, .55); }
.film video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; }

.closing { padding-block: clamp(48px, 7vw, 84px); text-align: center; --sun-x: 50%; }
.closing .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.closing img { width: 170px; height: auto; }
.closing .cta { justify-content: center; }

/* ----------------------------------------------------------- features page */
.page-head { padding-block: clamp(36px, 6vw, 68px); text-align: center; --sun-x: 50%; }
.page-head .wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 0; padding: 0; list-style: none; }
.tile { flex: 1 1 250px; max-width: 340px; display: flex; flex-direction: column; align-items: center; padding: 16px 16px 12px; border: 3px solid var(--wood-dark); border-radius: 18px; background: var(--parchment-light); text-align: center; line-height: 1.35; }
.tile img { width: 104px; height: 104px; object-fit: contain; margin-bottom: 6px; }
.tile h3 { font-size: 1.2rem; font-weight: 800; }
.tile p { color: var(--ink-soft); font-size: 1rem; }

.minis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.minis li { padding: 8px 6px 4px; border: 2px solid var(--wood); border-radius: 14px; background: var(--parchment-light); text-align: center; font-weight: 700; font-size: .95rem; line-height: 1.2; }
.minis img { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 2px; }

.region { margin-top: 30px; }
.region h3 { margin-bottom: 12px; font-size: 1.45rem; font-weight: 800; }
.lands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.lands li { overflow: hidden; border: 3px solid var(--outline); border-radius: 16px; background: var(--parchment-light); }
.lands img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; }
.lands div { padding: 8px 10px 4px; line-height: 1.2; }
.lands b { display: block; font-weight: 800; }
.lands span { color: var(--ink-soft); font-size: .92rem; }

/* ------------------------------------------------------ support, legal pages */
.paper { padding-block: clamp(32px, 5vw, 56px); background: var(--parchment); }
.paper .wrap { max-width: 800px; }
.prose h1 { margin-bottom: 8px; font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.15; }
.prose h2 { margin: 1.5em 0 .3em; font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.prose p { margin-bottom: .75em; }
.prose li { margin-bottom: .35em; }
.prose a { color: #1f6e27; font-weight: 700; }
.prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.draft { margin-bottom: 18px; padding: 10px 14px 6px; border: 2px dashed #b4552a; border-radius: 12px; color: #8a3b14; background: #fff7e8; font-weight: 700; }
.missing { padding: 0 6px; border-radius: 6px; background: #ffd9a8; font-weight: 700; }
details { margin-bottom: 10px; border: 3px solid var(--wood-dark); border-radius: 14px; background: var(--parchment-light); }
summary { display: flex; justify-content: space-between; gap: 16px; padding: 11px 16px 7px; font-weight: 800; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; flex: none; color: var(--green-dark); font-size: 1.5rem; line-height: 1; }
details[open] summary::after { content: '\2212'; }
details > div { padding: 0 16px 8px; }
.contact { margin-top: 26px; padding: 16px 20px 10px; border: 3px solid var(--outline); border-radius: 18px; background: var(--parchment-light); }

/* -------------------------------------------------------------------- footer */
.foot { padding-block: 30px 24px; background: var(--night); color: #ffeec4; font-size: .98rem; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-right: auto; }
.foot a { display: inline-block; padding-block: 4px; color: #fff8e1; text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--gold-bottom); text-decoration: underline; }

/* ------------------------------------------------------------- small screens */
@media (max-width: 860px) {
  .hero__grid, .feature__grid, .feature--flip .feature__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__grid, .feature__grid, .feature--flip .feature__grid { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
  .feature__text, .hero__text { display: contents; }
  .feature .stage, .feature--flip .stage, .hero .stage { order: 2; width: 100%; margin-block: 6px; }
  .feature .card, .hero__lead { order: 3; }
  .hero .cta, .hero .soon { order: 4; }
  .title { width: 100%; }
  .feature .card, .hero__lead { text-align: left; }
  .scene { --sun-x: 50% !important; }
  .scene::after { top: 22%; }
  .cta { justify-content: center; }
  .stage { --half: min(34vw, 145px); }
  .phone { --phone-w: min(68vw, 290px); }
  .float { --s: 78px !important; }
  .strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minis { --n: 3 !important; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:last-child { grid-column: 1 / -1; }
  .lands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .brand span { display: none; }
  .top nav a { font-size: .95rem; }
  .tile { flex-basis: calc(50% - 8px); padding: 10px 10px 8px; }
  .tile img { width: 72px; height: 72px; }
  .tile h3 { font-size: 1.05rem; }
  .tile p { font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
