/* Oops! Tiny Disasters: design system (single source, no overrides) */
:root {
  /* palette */
  --cream: #f6efe4; --ink: #2c241f; --coral: #ff6b4a; --leaf: #3d8f6e;
  --butter: #f6c445; --peach: #f4a574; --sky: #7eb6d9; --card: #fffaf3; --muted: #5b4d43;
  /* identity */
  --line: 3px; --radius: 22px; --shadow: 0 8px 0 rgb(44 36 31 / 12%);
  --font: "Avenir Next", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  /* type scale */
  --fs-sm: .9rem;
  --fs-base: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --fs-lead: clamp(1.05rem, .98rem + .45vw, 1.3rem);
  --fs-h3: clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  --fs-h2: clamp(1.5rem, 1.1rem + 2vw, 2.6rem);
  --fs-h1: clamp(2rem, 1.2rem + 4.2vw, 4rem);
  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --ease-out: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.6; color: var(--ink);
  background: linear-gradient(#dcedf7 0%, var(--cream) 30%, #f3e6d3 100%);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 var(--s3); font-weight: 800; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--s4); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--s3); top: -80px; background: var(--butter); border: var(--line) solid var(--ink); border-radius: 999px; padding: var(--s2) var(--s4); z-index: 10; }
.skip:focus { top: var(--s3); }
.wrap { width: min(1120px, 100% - 2 * var(--s4)); margin-inline: auto; }

/* background: two slow, light blobs */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg span { position: absolute; border-radius: 50%; filter: blur(28px); opacity: .38; }
.bg span:nth-child(1) { width: 38vmax; height: 38vmax; left: -10vmax; top: -12vmax; background: #b9ddf3; animation: drift 40s ease-in-out infinite alternate; }
.bg span:nth-child(2) { width: 30vmax; height: 30vmax; right: -8vmax; top: 30vh; background: #ffd2b4; animation: drift 48s ease-in-out -12s infinite alternate-reverse; }
.bg span:nth-child(n+3), .bg i { display: none; }
@keyframes drift { to { transform: translate(5vw, 6vh) scale(1.06); } }

/* nav */
.nav { position: relative; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.6rem; }
.brand img { width: 42px; height: 42px; border-radius: 12px; border: var(--line) solid var(--ink); }
.nav-links { display: flex; align-items: center; gap: var(--s2); font-weight: 700; }
.nav-links a { text-decoration: none; padding: var(--s2) var(--s3); border-radius: 999px; }
.nav-links a:hover { background: rgb(255 255 255 / 60%); }
.nav-links .lang { border: 2px solid var(--ink); }
.nav-toggle { display: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: var(--s2) var(--s5); border-radius: 999px;
  border: var(--line) solid var(--ink); background: var(--butter); color: var(--ink);
  font: inherit; font-weight: 800; line-height: 1.25; text-decoration: none; box-shadow: 0 4px 0 var(--ink);
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.ghost { background: var(--card); }
.btn small { display: block; font-size: .78em; font-weight: 700; opacity: .8; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s7); align-items: center; padding: var(--s6) 0 var(--s8); }
.hero h1 { max-width: 15ch; }
.lead { font-size: var(--fs-lead); max-width: 38ch; color: var(--ink); }
.updated { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 var(--s4); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* slider */
.slider { margin: 0; justify-self: center; outline: none; }
.slider .device {
  width: min(300px, 72vw); aspect-ratio: 390/844; border: 10px solid var(--ink); border-radius: 46px;
  overflow: hidden; background: var(--ink); box-shadow: 0 24px 48px rgb(44 36 31 / 22%), var(--shadow);
}
.slider:focus-visible .device { outline: 4px solid var(--coral); outline-offset: 6px; }
.slides { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; transition: transform .6s var(--ease-out); }
.slide { flex: 0 0 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.dots { display: flex; gap: var(--s1); justify-content: center; margin-top: var(--s4); }
.dots button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); transition: width .3s var(--ease-out), background .3s; }
.dots button[aria-current="true"]::before { width: 28px; background: var(--coral); }
.slider figcaption { text-align: center; font-size: var(--fs-sm); color: var(--muted); margin-top: var(--s1); }

/* sections */
.section { padding: var(--s7) 0; }
.section-head { max-width: 46ch; margin-bottom: var(--s5); }
.section-head p { color: var(--muted); }

/* feature highlights */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.feature { border: var(--line) solid var(--ink); border-radius: var(--radius); padding: var(--s5); background: var(--card); box-shadow: var(--shadow); }
.feature.butter { background: var(--butter); }
.feature.peach { background: var(--peach); }
.feature.sky { background: #cfe5f3; }
.feature h3 { margin-bottom: var(--s2); }
.feature p { margin: 0; }
.feature ul { margin: var(--s3) 0 0; padding: 0; list-style: none; font-weight: 700; }
.feature li + li { margin-top: var(--s1); }

/* ribbon: wraps, never clipped */
.ribbon { background: var(--ink); color: var(--cream); border-block: var(--line) solid var(--ink); padding: var(--s3) 0; overflow: hidden; }
.ribbon p { margin: 0; font-weight: 800; font-size: var(--fs-h3); text-align: center; line-height: 1.5; width: min(1120px, 100% - 2 * var(--s4)); margin-inline: auto; }

/* at a glance */
.glance { margin: var(--s6) auto 0; font-size: var(--fs-sm); color: var(--muted); border-left: 4px solid var(--coral); padding: var(--s2) var(--s4); background: rgb(255 250 243 / 70%); border-radius: 0 12px 12px 0; }
.glance strong { color: var(--ink); }

/* Q&A: collapsible answers in a 2-col grid */
.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.qa { background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: var(--s4) var(--s5); }
.qa summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-weight: 800; font-size: 1.5rem; line-height: 1; flex: none; }
.qa[open] summary::after { content: "–"; }
.qa summary h2 { font-size: var(--fs-h3); margin: 0; }
.qa p { margin: var(--s3) 0 0; }

/* FAQ */
.faq details { background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: var(--s3) var(--s5); margin: var(--s3) 0; }
.faq details[open] { background: #fff; }
.faq summary { font-weight: 800; cursor: pointer; padding: var(--s1) 0; }
.faq details p { margin: var(--s2) 0 var(--s1); }

/* facts table (kept visually hidden per owner request) */
.facts-table { width: 100%; border-collapse: collapse; }

/* subpages */
.page { padding: var(--s3) 0 var(--s8); }
.page h1 { margin: var(--s2) 0 var(--s3); }
.page h2 { font-size: var(--fs-h3); margin: var(--s6) 0 var(--s2); }
.page p, .page li { max-width: 65ch; }
.page a.mail { font-weight: 800; }
.card { background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: var(--s5); margin: var(--s6) 0; }

/* footer */
.foot { border-top: var(--line) solid var(--ink); padding: var(--s5) 0 var(--s6); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); font-weight: 700; }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); }
.foot a { text-decoration: none; padding: var(--s2) var(--s1); display: inline-block; }
.foot a:hover { text-decoration: underline; }

/* motion (only when JS is running; content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js .reveal.visible { opacity: 1; transform: none; }
.js .hero > div > * { animation: rise .8s var(--ease-out) both; }
.js .hero > div > *:nth-child(2) { animation-delay: .08s; }
.js .hero > div > *:nth-child(3) { animation-delay: .14s; }
.js .hero > div > *:nth-child(4) { animation-delay: .2s; }
.js .slider { animation: fadein .9s .15s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* responsive */
@media (max-width: 960px) {
  .features { grid-template-columns: 1fr 1fr; }
  .features .feature:last-child { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .nav-toggle { display: block; min-height: 44px; border: var(--line) solid var(--ink); background: var(--card); border-radius: 999px; font: inherit; font-weight: 800; padding: var(--s2) var(--s4); }
  .nav-links { display: none; position: absolute; top: 72px; right: 0; left: 0; flex-direction: column; align-items: stretch; background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--radius); padding: var(--s3); z-index: 5; }
  .nav-links.open { display: flex; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s6); padding: var(--s4) 0 var(--s7); }
  .about { grid-template-columns: minmax(0, 1fr); }
  .bg span { animation: none; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: minmax(0, 1fr); }
  .cta-row .btn { width: 100%; }
  .foot { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg span, .js .hero > div > *, .js .slider { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .dots button::before { transition: none !important; }
  .slides { transition: transform .35s ease-out; }
}

/* Language dropdown */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: var(--s2) var(--s3); border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 800; box-shadow: 0 3px 0 var(--ink); user-select: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.lang-menu > summary:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.lang-menu .caret { width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.lang-menu[open] .caret { transform: rotate(-135deg) translateY(-2px); }
.lang-list { position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px; margin: 0; padding: 6px; list-style: none; background: var(--card); border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); z-index: 20; }
.nav-links .lang-list a { display: block; padding: 8px 14px; border-radius: 12px; }
.nav-links .lang-list a:hover, .nav-links .lang-list a:focus-visible { background: var(--butter); outline: none; }
.nav-links .lang-list a[aria-current] { background: var(--ink); color: var(--cream); }
.nav-links .lang-list a[aria-current]::after { content: " ✓"; }
@media (max-width: 799px) {
  .lang-menu > summary { width: 100%; justify-content: space-between; }
  .lang-list { position: static; margin-top: var(--s2); box-shadow: none; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
}

/* Floating bubbles */
.bg b { position: absolute; bottom: -12vh; left: var(--x); width: var(--d); height: var(--d); border-radius: 50%; background: radial-gradient(circle at 32% 30%, rgb(255 255 255 / 70%) 0 12%, rgb(var(--c) / 30%) 13% 62%, rgb(var(--c) / 14%) 100%); border: 1.5px solid rgb(var(--c) / 32%); opacity: .75; animation: bubble var(--t) linear var(--w) infinite; will-change: transform; }
@keyframes bubble { 0% { transform: translate3d(0,0,0) scale(.85); } 25% { transform: translate3d(var(--s),-30vh,0) scale(1); } 50% { transform: translate3d(0,-60vh,0) scale(1); } 75% { transform: translate3d(calc(var(--s) * -1),-90vh,0) scale(.95); } 100% { transform: translate3d(0,-125vh,0) scale(.9); } }
.bg b:nth-of-type(1) { --x: 4.8%; --d: 34px; --c: 255 107 74; --t: 34s; --w: -3s; --s: -24px; }
.bg b:nth-of-type(2) { --x: 9.9%; --d: 34px; --c: 246 196 69; --t: 38s; --w: -13s; --s: -23px; }
.bg b:nth-of-type(3) { --x: 15.9%; --d: 44px; --c: 244 165 116; --t: 29s; --w: -2s; --s: 21px; }
.bg b:nth-of-type(4) { --x: 23.1%; --d: 90px; --c: 126 182 217; --t: 29s; --w: -20s; --s: -43px; }
.bg b:nth-of-type(5) { --x: 31.3%; --d: 18px; --c: 255 107 74; --t: 23s; --w: -17s; --s: -36px; }
.bg b:nth-of-type(6) { --x: 34.6%; --d: 44px; --c: 246 196 69; --t: 25s; --w: -18s; --s: 29px; }
.bg b:nth-of-type(7) { --x: 42.9%; --d: 18px; --c: 244 165 116; --t: 28s; --w: -11s; --s: -22px; }
.bg b:nth-of-type(8) { --x: 47.4%; --d: 56px; --c: 126 182 217; --t: 28s; --w: -15s; --s: 38px; }
.bg b:nth-of-type(9) { --x: 56.1%; --d: 44px; --c: 255 107 74; --t: 36s; --w: -23s; --s: 33px; }
.bg b:nth-of-type(10) { --x: 61.1%; --d: 90px; --c: 246 196 69; --t: 29s; --w: -2s; --s: 49px; }
.bg b:nth-of-type(11) { --x: 69.9%; --d: 34px; --c: 244 165 116; --t: 31s; --w: -4s; --s: -50px; }
.bg b:nth-of-type(12) { --x: 74.3%; --d: 44px; --c: 126 182 217; --t: 32s; --w: -9s; --s: 44px; }
.bg b:nth-of-type(13) { --x: 84.0%; --d: 18px; --c: 255 107 74; --t: 24s; --w: -24s; --s: 39px; }
.bg b:nth-of-type(14) { --x: 88.2%; --d: 70px; --c: 246 196 69; --t: 37s; --w: -37s; --s: 22px; }
@media (max-width: 799px) { .bg b:nth-of-type(n+9) { display: none; } .bg b { border-width: 1px; } }
@media (prefers-reduced-motion: reduce) { .bg b { animation: none; bottom: auto; top: calc(var(--x) * .9 + 5%); opacity: .5; } }
