/* ebunstudio.com — one stylesheet for the studio's pages and each app's.
   Two themes on <body>: .studio (pale sage paper, dark green ink) and .game (Mille Cubes' kitchen: sage tiles, cream paper, tomato).
   Type: Nunito for everything, Lilita One for Mille Cubes' own name and headings, both served from here (no outside request). */

@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito-Variable.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Lilita One"; src: url("/assets/fonts/LilitaOne-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --bg: #EEF2EC; --ink: #15231D; --mid: #55665D; --line: #C6D1C8;
  --sage: #6E9C78; --sage-deep: #245A48; --forest: #173026;
  --cream: #FFF3DE; --tomato: #FF5733; --tomato-deep: #C93A1C; --butter: #FFC94D;
  --edge: clamp(20px, 5vw, 56px);
  --wide: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 18px/1.55 "Nunito", ui-rounded, system-ui, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 6px; }
h1, h2, p, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

/* ------------------------------------------------------------------ top and foot */

.top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; max-width: var(--wide); margin: 0 auto; padding: 22px var(--edge) 0; }
.mark { font-weight: 900; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.lang { font-weight: 700; font-size: 16px; color: var(--mid); }

.foot { max-width: var(--wide); margin: 0 auto; padding: 64px var(--edge) 40px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px 56px; color: var(--mid); font-size: 16px; }
.foot h2 { font-size: 16px; font-weight: 900; color: var(--ink); margin-bottom: 6px; }
.foot .sign { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 700; }

/* ------------------------------------------------------------------ the studio's home page */

.hero { max-width: var(--wide); margin: 0 auto; padding: clamp(48px, 9vw, 112px) var(--edge) clamp(36px, 6vw, 72px); }
.hero h1 { font-weight: 900; font-size: clamp(52px, 12.4vw, 160px); line-height: 0.88; letter-spacing: -0.055em; margin-left: -0.04em; }
.hero .lede { margin-top: clamp(20px, 3vw, 36px); max-width: 33ch; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.35; font-weight: 600; color: var(--mid); }

/* the shelf: the apps as they sit on a phone's home screen, with the places still free */
.shelf { max-width: var(--wide); margin: 0 auto; padding: 0 var(--edge) clamp(48px, 8vw, 96px); }
.shelf h2 { font-size: 16px; font-weight: 900; margin-bottom: 18px; }
.shelf ul { display: grid; grid-template-columns: repeat(4, minmax(0, 148px)); gap: clamp(16px, 4vw, 44px); }
.shelf li { text-align: center; font-weight: 800; font-size: 16px; line-height: 1.2; }
.shelf a { display: block; text-decoration: none; }
.shelf img, .shelf i { display: block; width: 100%; aspect-ratio: 1; border-radius: 22.5%; margin-bottom: 10px; }
.shelf img { box-shadow: 0 10px 0 -4px rgba(21, 35, 29, 0.16); transition: transform 0.18s ease; }
.shelf a:hover img { transform: translateY(-4px); }
.shelf i { border: 2px dashed var(--line); }
.shelf small { display: block; font-weight: 600; font-size: 14px; color: var(--mid); }
.shelf .empty { color: var(--mid); font-weight: 600; font-size: 14px; }

/* ------------------------------------------------------------------ an app's band (Mille Cubes) */

.feature { max-width: calc(var(--wide) + 2 * var(--edge)); margin: 0 auto; padding: 0 clamp(10px, 2.5vw, 28px); }
.feature.mc { --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='300'%3E%3Cg fill='%23fff' fill-opacity='.055'%3E%3Crect x='8' y='8' width='134' height='134' rx='24'/%3E%3Crect x='-67' y='158' width='134' height='134' rx='24'/%3E%3Crect x='83' y='158' width='134' height='134' rx='24'/%3E%3C/g%3E%3C/svg%3E"); }
.feature.mc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); align-items: center; gap: clamp(24px, 5vw, 64px);
  padding: clamp(32px, 6vw, 72px) clamp(24px, 6vw, 72px); color: var(--cream);
  background: var(--tile), linear-gradient(180deg, var(--sage), var(--sage-deep)); border-radius: clamp(28px, 4vw, 48px); overflow: hidden; }
.mc h1, .mc h2 { font-family: "Lilita One", "Nunito", sans-serif; font-weight: 400; font-size: clamp(64px, 11vw, 132px); line-height: 0.84; letter-spacing: 0; text-shadow: 0 0.075em 0 var(--forest); }
.mc h1 span, .mc h2 span { display: block; }
.mc h1 span + span, .mc h2 span + span { color: var(--tomato); }
.mc .icon { width: 84px; border-radius: 22.5%; margin-bottom: 22px; box-shadow: 0 6px 0 var(--forest); }
.mc .line { margin-top: 0.9em; font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; line-height: 1.2; }
.mc .line + p { margin-top: 10px; max-width: 34ch; font-weight: 600; color: rgba(255, 243, 222, 0.88); }
.actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.btn { display: inline-block; padding: 15px 26px 17px; border-radius: 999px; background: var(--tomato); color: #fff; font-family: "Lilita One", "Nunito", sans-serif; font-size: 21px; line-height: 1.1; text-decoration: none; box-shadow: 0 6px 0 var(--tomato-deep); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--tomato-deep); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--tomato-deep); }
.quiet { font-weight: 800; font-size: 17px; color: var(--cream); }

.phones { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 2vw, 22px); align-items: start; }
.phones img { border: clamp(5px, 0.7vw, 9px) solid var(--cream); border-radius: clamp(22px, 3.2vw, 42px); box-shadow: 0 18px 30px -12px rgba(10, 30, 20, 0.55); }
.phones img + img { margin-top: 14%; }

/* ------------------------------------------------------------------ an app's own pages */

.game { background: var(--forest); color: var(--ink); }
.game .top { color: var(--cream); padding-bottom: 22px; }
.game .lang { color: rgba(255, 243, 222, 0.75); }
.game .foot { color: rgba(255, 243, 222, 0.72); }
.game .foot h2 { color: var(--cream); }
.game .foot .sign { border-color: rgba(255, 243, 222, 0.2); }

.sheet { max-width: 860px; margin: clamp(14px, 2.5vw, 28px) auto 0; padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 64px); background: var(--cream); border-radius: clamp(24px, 3.5vw, 40px); }
.sheet > h2, .sheet > h1 { font-family: "Lilita One", "Nunito", sans-serif; font-weight: 400; font-size: clamp(30px, 4.4vw, 42px); line-height: 1.05; margin-bottom: 0.7em; }
main > .sheet { width: calc(100% - 2 * clamp(10px, 2.5vw, 28px)); }

.facts > div { display: grid; grid-template-columns: 11.5em 1fr; gap: 4px 28px; padding: 15px 0; border-top: 1px solid rgba(21, 35, 29, 0.14); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-weight: 900; font-size: 20px; }
.facts dd { color: var(--mid); }

.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2.5vw, 26px); }
.strip img { border-radius: clamp(16px, 2.6vw, 30px); border: 5px solid #fff; box-shadow: 0 10px 22px -12px rgba(21, 35, 29, 0.5); }
.strip figcaption { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--mid); text-align: center; }

.faq details { border-top: 1px solid rgba(21, 35, 29, 0.14); }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; padding: 15px 34px 15px 0; font-weight: 900; font-size: 19px; line-height: 1.3; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 9px; font-size: 28px; font-weight: 700; color: var(--tomato); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 18px; max-width: 62ch; color: var(--mid); }
.after { margin-top: 22px; font-weight: 700; }
.after + .after { margin-top: 12px; }

/* a text page: the privacy policy */
.text { max-width: 760px; }
.text .crumb { font-weight: 800; margin-bottom: 14px; color: var(--mid); }
.text .date { color: var(--mid); font-weight: 700; margin: -10px 0 8px; }
.sheet.text > h2 { font-family: inherit; font-size: 21px; font-weight: 900; line-height: 1.3; margin: 30px 0 6px; }
.text p { max-width: 66ch; }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 760px) {
  body { font-size: 17px; }
  .feature.mc { grid-template-columns: 1fr; }
  .phones { max-width: 420px; }
  .shelf ul { grid-template-columns: repeat(4, 1fr); }
  .shelf li { font-size: 13px; }
  .shelf small { font-size: 12px; }
  .shelf .empty { font-size: 12px; }
  .foot { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(3, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(-1 * clamp(22px, 5vw, 64px)); }
  .strip figure { scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) { .shelf img, .btn { transition: none; } }
