/* BombaDuel web pages (iocodo.com/apps/bombaduel/<slug>/): page shell + DOM board.
   Colours: the landing's slate shell, the app's board (lib/src/core/bombaduel_theme.dart).
   Curves are tokens: entries decelerate, exits accelerate, opacity on its own curve. */
:root {
  --slate-deep: #080B14;
  --slate: #11162A;
  --slate-lite: #1B2340;
  --line: rgba(255, 215, 0, 0.20);
  --cream: #EAEEF6;
  --cream-dim: #A9B4CC;
  --gold: #FFD700;
  --gold-soft: #FFE873;
  --red: #E83A2D;
  --red-ink: #E22719;
  --blue: #2B7FD4;
  --blue-deep: #1B5A9E;
  --card: #F7F4ED;
  --ink: #14110B;
  --ink-soft: #4A5560;
  /* board, from BombaDuelPalette */
  --h: #4A9AE6; --h-alt: #3D8CD8; --h-hi: #7BBDF5; --h-lo: #2A70B8;
  --o: #FFC940; --o-alt: #EEB830; --o-edge: #D4A020;
  --armed: #2C2436; --armed-alt: #251E2E; --armed-hi: #40354F; --armed-lo: #181222;
  --n1: #0E46A8; --n2: #0D5825; --n3: #971818; --n4: #6E20AD;
  --n5: #833600; --n6: #00545F; --n7: #333333; --n8: #4D4D4D;
  --mark: #15152B;
  --frame: #0A0A0A;
  /* motion tokens */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);      /* easeOutQuint */
  --ease-in: cubic-bezier(0.32, 0, 0.67, 0);       /* easeInCubic */
  --ease-fade: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* easeOutQuad */
  /* 8 columns: 44 px or more from a 375 px phone up, 54 px on a desktop */
  --cell: clamp(36px, calc((100vw - 18px) / 8), 54px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-color: var(--slate-deep);
  background-image:
    radial-gradient(120% 60% at 82% -6%, rgba(232, 58, 45, 0.16), transparent 52%),
    radial-gradient(120% 60% at 10% 0%, rgba(43, 127, 212, 0.16), transparent 55%),
    linear-gradient(180deg, var(--slate) 0%, var(--slate-deep) 46%);
  background-repeat: no-repeat;
  min-height: 100vh;
}
h1, h2, .brand span { font-family: 'Outfit', system-ui, sans-serif; letter-spacing: -0.02em; line-height: 1.15; }
a { color: var(--gold-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* header */
.top { border-bottom: 1px solid var(--line); background: rgba(8, 11, 20, 0.92); }
.top .wrap { display: flex; align-items: center; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #fff; text-decoration: none; font-weight: 800; }
.brand:hover { color: #fff; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-size: 1.15rem; }

/* intro */
.crumbs { margin: 14px 0 8px; font-size: 0.86rem; color: var(--cream-dim); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 0; }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--cream-dim); }
.crumbs a { color: var(--cream-dim); }
.crumbs a:hover { color: var(--gold); }
@media (max-width: 599px) { .crumbs li[aria-current] { display: none; } }
/* One size on every window (a bigger screen shows more, never the same bigger): in rem, so the reader's text size and the browser's zoom take it whole; a 6vw term grew 44 px headlines only 1.75x at 200 % zoom. */
h1 { font-size: 1.85rem; font-weight: 800; color: #fff; }
.lede { font-size: 1.1rem; color: var(--cream-dim); margin: 8px 0 0; max-width: 60ch; }

/* board block */
.bd { margin: 14px -16px 0; padding: 6px 0 6px; display: flex; flex-direction: column; align-items: center; }
.bd-bar { width: calc(var(--cell) * 8 + 8px); display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; margin-bottom: 8px; padding: 0 2px; }
.bd-status { font-family: 'Outfit', system-ui, sans-serif; font-weight: 700; font-size: 1.04rem; color: #fff; line-height: 1.3; }
.bd-modes { display: inline-flex; padding: 3px; border-radius: 14px; background: var(--slate-lite); border: 1px solid var(--line); flex: none; }
.bd-modes button {
  min-height: 44px; min-width: 64px; padding: 0 14px; border: 0; border-radius: 11px;
  font: 700 0.95rem 'Outfit', system-ui, sans-serif; color: var(--cream); background: transparent; cursor: pointer;
  transition: background-color 200ms var(--ease-fade), color 200ms var(--ease-fade);
}
.bd-modes button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }

.bd-grid { position: relative; padding: 3px; background: var(--frame); border: 1px solid #333; border-radius: 10px; box-shadow: 0 22px 50px -22px rgba(0, 0, 0, 0.8); transition: box-shadow 400ms var(--ease-fade); }
.bd-cells { position: relative; display: flex; flex-direction: column; border-radius: 7px; overflow: hidden; }
.bd-row { display: flex; }
.bd-c {
  position: relative; width: var(--cell); height: var(--cell); flex: none;
  display: grid; place-items: center; border: 0; padding: 0; margin: 0;
  font: 800 calc(var(--cell) * 0.52) / 1 'Nunito', 'Outfit', system-ui, sans-serif;
  color: var(--ink); background: var(--h); cursor: pointer;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
.bd-c svg { width: 62%; height: 62%; display: block; }
.bd-h { background: var(--h); box-shadow: inset 3px 3px 0 var(--h-hi), inset -3px -3px 0 var(--h-lo); transition: filter 160ms var(--ease-fade); }
.bd-h.bd-alt { background: var(--h-alt); }
.bd-h:hover { filter: brightness(1.08); }
.bd-o { background: var(--o); box-shadow: inset 0 0 0 0.5px var(--o-edge); cursor: default; }
.bd-o.bd-alt { background: var(--o-alt); }
.bd-n { cursor: pointer; padding-top: calc(var(--cell) * 0.02); }
.bd-n1 { color: var(--n1); } .bd-n2 { color: var(--n2); } .bd-n3 { color: var(--n3); } .bd-n4 { color: var(--n4); }
.bd-n5 { color: var(--n5); } .bd-n6 { color: var(--n6); } .bd-n7 { color: var(--n7); } .bd-n8 { color: var(--n8); }
.bd-m { background: var(--card); box-shadow: inset 0 0 0 0.5px #CFC6B2; cursor: default; }
.bd-boom { background: var(--red-ink); cursor: default; }
.bd-you { background: var(--red); box-shadow: inset 0 0 0 1px #B81C10; cursor: default; }
.bd-bot { background: var(--blue); box-shadow: inset 0 0 0 1px var(--blue-deep); cursor: default; }
.bd-g-ink { fill: var(--ink); }
.bd-g-spike { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.bd-g-shine { fill: #fff; opacity: 0.85; }
.bd-g-cloth { fill: var(--red-ink); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.bd-g-white { fill: #fff; }
.bd-g-hollow { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; }
.bd-g-cross { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.bd-c:focus-visible { outline: 3px solid #fff; outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--mark); border-radius: 0; z-index: 2; }
.bd-c[aria-disabled="true"] { cursor: default; }
.bd-c[aria-disabled="true"].bd-h:hover { filter: none; }

/* a cell that just opened */
.bd-pop { animation: bd-pop-s 240ms var(--ease-out), bd-pop-o 170ms var(--ease-fade); }
@keyframes bd-pop-s { from { transform: scale(0.82); } to { transform: none; } }
@keyframes bd-pop-o { from { opacity: 0.35; } to { opacity: 1; } }
.bd-swap { animation: bd-pop-o 220ms var(--ease-fade); }
.bd-won .bd-grid { box-shadow: 0 0 0 3px var(--gold), 0 22px 50px -22px rgba(0, 0, 0, 0.8); }

/* duel: last move (yours = closed frame, the bot's = four corners), bomb squares */
.bd-last-you::after, .bd-last-bot::after { content: ""; position: absolute; inset: 3px; pointer-events: none; }
.bd-last-you::after { border: 3px solid var(--mark); border-radius: 5px; }
.bd-last-bot::after {
  background:
    linear-gradient(var(--mark), var(--mark)) left top / 11px 3px no-repeat,
    linear-gradient(var(--mark), var(--mark)) left top / 3px 11px no-repeat,
    linear-gradient(var(--mark), var(--mark)) right top / 11px 3px no-repeat,
    linear-gradient(var(--mark), var(--mark)) right top / 3px 11px no-repeat,
    linear-gradient(var(--mark), var(--mark)) left bottom / 11px 3px no-repeat,
    linear-gradient(var(--mark), var(--mark)) left bottom / 3px 11px no-repeat,
    linear-gradient(var(--mark), var(--mark)) right bottom / 11px 3px no-repeat,
    linear-gradient(var(--mark), var(--mark)) right bottom / 3px 11px no-repeat;
}
.bd-aim, .bd-blast { position: absolute; pointer-events: none; opacity: 0; border-radius: 6px; transition: opacity 160ms var(--ease-fade); z-index: 3; }
.bd-aim.bd-show, .bd-blast.bd-show { opacity: 1; }
.bd-aim { border: 3px solid #FF6B4A; background: rgba(232, 58, 45, 0.22); box-shadow: 0 0 18px rgba(255, 107, 74, 0.55); }
.bd-blast.bd-by-you { border: 3px solid var(--mark); }
.bd-blast.bd-by-bot { border: 3px dashed var(--mark); }
.bd-armed .bd-h { background: var(--armed); box-shadow: inset 3px 3px 0 var(--armed-hi), inset -3px -3px 0 var(--armed-lo); }
.bd-armed .bd-h.bd-alt { background: var(--armed-alt); }

/* duel score bar */
.bd-score { display: flex; align-items: center; gap: 8px; width: 100%; }
.bd-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; color: #fff; font: 800 0.95rem 'Outfit', system-ui, sans-serif; border: 2px solid transparent; transition: border-color 220ms var(--ease-fade), box-shadow 220ms var(--ease-fade); }
.bd-chip b { font-size: 1.2rem; min-width: 1.4ch; text-align: center; }
.bd-chip-you { background: var(--red-ink); }
.bd-chip-bot { background: var(--blue-deep); }
.bd-chip.bd-turn { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25); }
.bd-target { flex: 1; text-align: center; font-size: 0.86rem; color: var(--cream-dim); line-height: 1.25; }

/* under the board */
.bd-foot { width: calc(var(--cell) * 8 + 8px); display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 0 2px; }
.bd-hint { min-height: 2.9em; font-size: 0.92rem; color: var(--cream-dim); line-height: 1.45; }
.bd-row-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bd-left { font-weight: 700; color: #fff; font-size: 0.95rem; }
.bd-btn {
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  font: 700 0.98rem 'Outfit', system-ui, sans-serif; color: #fff; background: var(--slate-lite); cursor: pointer;
  transition: transform 180ms var(--ease-out), background-color 200ms var(--ease-fade), opacity 200ms var(--ease-fade);
}
.bd-btn:hover { transform: translateY(-1px); }
.bd-btn:active { transform: translateY(1px); }
.bd-btn.bd-primary { background: var(--gold); color: var(--ink); border-color: transparent; }
.bd-btn[aria-disabled="true"] { cursor: default; color: var(--cream-dim); transform: none; }
.bd-bomb.bd-ready:not([aria-disabled="true"]) { background: var(--red-ink); color: #fff; border-color: transparent; }
.bd-fire { background: var(--red-ink); border-color: transparent; }
.bd-hide { display: none; }
.bd-bomb-note { font-size: 0.88rem; color: var(--cream-dim); line-height: 1.4; flex: 1 1 180px; }
.bd-after { opacity: 0; visibility: hidden; transition: opacity 260ms var(--ease-fade), visibility 0s linear 260ms; }
.bd-after.bd-show { opacity: 1; visibility: visible; transition: opacity 260ms var(--ease-fade); }

/* article */
.copy { margin-top: 30px; }
.copy h2 { font-size: 1.45rem; font-weight: 800; color: #fff; margin: 30px 0 10px; }
.copy p, .copy li { color: var(--cream-dim); font-size: 1.03rem; max-width: 66ch; }
.copy p + p { margin-top: 14px; }
.copy ul { list-style: none; margin: 14px 0; display: grid; gap: 10px; }
.copy ul li { position: relative; padding-left: 22px; }
.copy ul li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 9px; height: 9px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.copy strong { color: #fff; }
.faq { margin-top: 34px; display: grid; gap: 12px; }
.faq details { background: var(--card); color: var(--ink); border-radius: 14px; padding: 2px 20px; box-shadow: 0 14px 32px -24px rgba(0, 0, 0, 0.6); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 52px; padding: 12px 0; font: 700 1.04rem/1.35 'Outfit', system-ui, sans-serif; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red-ink); font-size: 1.5rem; font-weight: 500; transition: transform 220ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: 2px; }
.faq details p { color: var(--ink-soft); padding: 0 0 16px; font-size: 1rem; }
.faq details a { color: #1B4F8C; }

/* app card (shown once its gate is public) */
.app-card { margin-top: 34px; border-radius: 22px; padding: 26px 22px; border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 50% 0%, rgba(232, 58, 45, 0.20), transparent 60%), radial-gradient(120% 120% at 50% 100%, rgba(43, 127, 212, 0.18), transparent 60%), linear-gradient(160deg, #161c34, #0b1020); }
.app-card h2 { font-size: 1.4rem; font-weight: 800; color: #fff; }
.app-card ul { list-style: none; margin: 14px 0 0; display: grid; gap: 8px; }
.app-card li { position: relative; padding-left: 22px; color: var(--cream-dim); }
.app-card li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 9px; height: 9px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.app-card .note { margin-top: 12px; color: var(--cream-dim); font-size: 0.95rem; }
/* the site's store-badge pair (BombaDuel landing, cubofix solver) */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px; border-radius: 14px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.22); transition: transform 180ms var(--ease-out), border-color 200ms var(--ease-fade); }
.store-badge:hover { color: #fff; transform: translateY(-2px); border-color: var(--gold); }
.store-badge svg { width: 24px; height: 24px; flex: none; }
.sb-text { display: grid; line-height: 1.1; text-align: left; }
.sb-top { font-size: 0.75rem; }
.sb-bot { font: 700 1.0625rem 'Outfit', system-ui, sans-serif; }

/* related, languages, footer */
.more { margin-top: 34px; display: grid; gap: 18px; }
.related { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.related a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.langs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.langs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--cream); text-decoration: none; font-size: 0.95rem; }
.langs a[aria-current="page"] { border-color: var(--gold); color: #fff; font-weight: 700; }
.foot { margin-top: 42px; border-top: 1px solid var(--line); padding: 22px 0 34px; color: var(--cream-dim); font-size: 0.9rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; justify-content: space-between; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cream-dim); }
.foot a:hover { color: var(--gold); }

@media (min-width: 720px) {
  .bd { margin: 26px 0 0; padding: 22px 0 14px; border-radius: 24px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 215, 0, 0.10); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
