/* DOAL Games website
   Layout: the DOAL board. The hero is a grid of tiles where real game icons sit
   among the logo's letter pieces; the gallery below continues the same tile language.
   Single dark look (graphite), from the DOAL Games design system tokens. */
/* Fonts: Inter and Outfit variable (SIL OFL 1.1, from @fontsource-variable 5.3.0), served from
   assets/fonts so no request goes to a third party. Licenses: assets/fonts/OFL-*.txt */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/outfit-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/outfit-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #1D1D1F;          /* doal-graphite */
  --bg-raised: #2A2A2E;   /* doal-graphite-2 */
  --ink: #FFFFFF;         /* doal-white */
  --ink-muted: #93939C;   /* doal-steel, 5.53:1 on graphite */
  --accent: #04CDFF;      /* doal-cyan */
  --on-accent: #1D1D1F;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.2);
  --scrim: rgba(14, 14, 16, 0.74);
  --bezel: #0B0B0C;

  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Inter", ui-sans-serif, system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-icon: 22%;
  --wrap: 1264px;
  --head-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--bg);
}
img { max-width: 100%; }

/* Launch toggles. <html data-hide="partners"> hides the partners section and its nav link;
   remove the word to bring it back. Elements with [hidden] (e.g. demo-only copy) stay hidden. */
[hidden] { display: none !important; }
html[data-hide~="partners"] #partners,
html[data-hide~="partners"] a[href="#partners"] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
p { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 40;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

/* Labels and type scale */
.eyebrow {
  font: 600 12px/1 var(--font-display);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  font-weight: 700;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.012em;
}
h2 {
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.006em;
}
h3 { font-weight: 600; font-size: 20px; line-height: 1.25; }
.accent { color: var(--accent); }
.lede { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--ink-muted); max-width: 34em; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-md);
  font: 600 16px/1 var(--font-display);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.15s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { box-shadow: 0 0 0 4px rgba(4, 205, 255, 0.22); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

/* Header */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(29, 29, 31, 0.84);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in { height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; }
.brand img { display: block; width: 140px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font: 500 15px/1 var(--font-text); }
.nav a { text-decoration: none; color: var(--ink-muted); transition: color 0.15s; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--ink); padding: 10px 14px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav .nav-cta:hover { background: rgba(255, 255, 255, 0.06); }
@media (max-width: 620px) {
  .nav-wide { display: none; }
  .brand img { width: 120px; }
}

/* Hero board */
.hero { padding-block: clamp(20px, 4vw, 48px) clamp(40px, 6vw, 72px); overflow: hidden; }
.board {
  --cell: 68px;
  --gap: 11px;
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), var(--cell));
  gap: var(--gap);
  justify-content: center;
}
.hero-copy {
  grid-column: 1 / -1;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: clamp(0px, 2vw, 32px);
  min-width: 0;
}
.board.is-narrow .hero-copy { padding: 8px 0 20px; }
.tile {
  width: var(--cell);
  height: var(--cell);
  display: grid;
  place-items: center;
  animation: pop 0.6s var(--ease) both;
  animation-delay: var(--d, 0ms);
}
.tile-glyph svg { width: 100%; height: 100%; display: block; fill: var(--ink); opacity: var(--op, 0.07); }
.tile-glyph.tile-cyan svg { fill: var(--accent); }
.tile-glyph.tile-lit svg { fill: var(--accent); opacity: 1; }
.tile-game {
  padding: 0;
  border: 0;
  background: var(--bg-raised);
  border-radius: var(--r-icon);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38), 0 0 0 1px var(--line);
  transition: transform 0.26s var(--ease), box-shadow 0.2s;
}
.tile-game img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-game:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45), 0 0 0 2px var(--accent); }
.tile-game.is-flipping { transform: perspective(400px) rotateY(90deg); }
@keyframes pop { from { transform: scale(0.55); } to { transform: none; } }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head > div { display: flex; flex-direction: column; gap: 14px; }
.sec-note { color: var(--ink-muted); font: 500 15px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.mock-tag {
  font: 600 11px/1 var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* Gallery toolbar */
.toolbar { display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1 1 420px; min-width: 0; padding: 3px; margin: -3px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink-muted);
  font: 500 14px/1 var(--font-text);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.chip:hover { color: var(--ink); }
.chip .n { font-size: 12px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.search { position: relative; flex: 0 1 260px; min-width: 180px; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; fill: var(--ink-muted); pointer-events: none; }
.search input {
  width: 100%;
  min-height: 40px;
  padding: 0 14px 0 40px;
  border-radius: 999px;
  border: 0;
  background: var(--bg-raised);
  color: var(--ink);
  font: 400 15px/1 var(--font-text);
}
.search input::placeholder { color: var(--ink-muted); }
@media (max-width: 620px) { .search { flex-basis: 100%; } }

/* Gallery grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 20px; }
@media (max-width: 540px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.grid > li { display: flex; min-width: 0; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42); }
.card-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  overflow: hidden;
  background: color-mix(in srgb, var(--tint, var(--bg-raised)) 52%, var(--bg));
  transition: background-color 0.4s;
}
.card-media > img.shot { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.card:hover .card-media > img.shot { transform: scale(1.045); }
.card-media > img.big-icon { width: 46%; border-radius: var(--r-icon); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4); }
.card-meta { display: flex; align-items: center; gap: 12px; padding: 12px 14px 14px; }
.card-icon { width: 44px; height: 44px; border-radius: var(--r-icon); flex: none; background: var(--bg); }
.card-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-name { font: 600 15px/1.25 var(--font-display); overflow-wrap: anywhere; }
.card-cat { font: 500 13px/1.2 var(--font-text); color: var(--ink-muted); }
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--on-accent);
  font: 600 11px/1 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.empty { color: var(--ink-muted); padding-block: 24px; }

/* Partners (placeholder) */
.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.logo-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  max-width: 100%;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  color: var(--ink-muted);
  font-size: 13px;
}
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.case { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--r-lg); background: var(--bg-raised); }
.case p:last-child { color: var(--ink-muted); }
.case-kind { font: 600 11px/1 var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }

/* Studio */
.studio { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.studio-text { display: flex; flex-direction: column; gap: 14px; }
.big { font: 500 clamp(22px, 2.3vw, 30px)/1.32 var(--font-display); max-width: 26em; margin-top: 10px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; margin: 0; }
.facts div { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.facts dt { font: 600 11px/1 var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-muted); }
.facts dd { margin: 10px 0 0; font: 700 clamp(28px, 3vw, 40px)/1 var(--font-display); font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .studio { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.contact > div { display: flex; flex-direction: column; gap: 16px; max-width: 40em; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.foot-in { display: flex; align-items: center; gap: 16px; color: var(--ink-muted); font-size: 14px; }
.foot-in img { display: block; }
.foot-in p { flex: 1; }
.foot-in a { text-decoration: none; }
.foot-in a:hover { color: var(--ink); }

/* Game sheet */
.sheet {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.sheet::backdrop { background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet[open] { animation: rise 0.32s var(--ease); }
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
.sheet-in {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: clamp(20px, 3.4vw, 44px);
  border-radius: 28px;
  background: var(--bg-raised);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}
.sheet-in:focus { outline: none; }
.close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  cursor: pointer;
}
.close:hover { background: rgba(255, 255, 255, 0.16); }
.close svg { width: 18px; height: 18px; fill: currentColor; }

.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.device {
  height: min(640px, calc(100dvh - 190px));
  aspect-ratio: 9 / 19.5;
  max-width: 100%;
  padding: 9px;
  border-radius: 38px;
  background: var(--bezel);
  box-shadow: 0 0 0 1px var(--line-strong), 0 30px 60px rgba(0, 0, 0, 0.5);
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: var(--bg); }
.sheet-in.is-landscape { grid-template-columns: minmax(0, 1fr); }
.sheet-in.is-landscape .device { height: auto; width: min(640px, 100%); aspect-ratio: 19.5 / 9; }
.shots { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.shots::-webkit-scrollbar { display: none; }
.shots img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; display: block; }
.screen-empty, .demo { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.screen-empty img, .demo img { width: 38%; border-radius: var(--r-icon); }
.demo-name { font: 700 20px/1.2 var(--font-display); }
.demo-note { color: var(--ink-muted); font-size: 14px; max-width: 18em; }
.bar { width: 60%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.bar span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; animation: load 1.6s var(--ease) both; }
.demo.is-done .bar span { animation: none; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.dots { display: flex; gap: 8px; min-height: 8px; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line-strong); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--ink); }

.info { display: flex; flex-direction: column; gap: 22px; min-width: 0; align-self: center; padding-right: 28px; }
.info-head { display: flex; align-items: center; gap: 18px; }
.info-icon { width: 72px; height: 72px; border-radius: var(--r-icon); flex: none; box-shadow: 0 0 0 1px var(--line); }
#sheet-title { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.05; }
.info-sub { margin-top: 8px; color: var(--ink-muted); font-size: 15px; }
.info-desc { font-size: 16px; line-height: 1.6; max-width: 36em; white-space: pre-line; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 16px; margin: 0; }
.meta div { border-top: 1px solid var(--line-strong); padding-top: 10px; }
.meta dt { font: 600 11px/1 var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-muted); }
.meta dd { margin: 8px 0 0; font: 600 18px/1.2 var(--font-display); }
.pager { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.pager-btn { padding: 8px 0; border: 0; background: none; color: var(--ink-muted); font: 500 14px/1 var(--font-text); cursor: pointer; }
.pager-btn:hover { color: var(--ink); }

@media (max-width: 760px) {
  .sheet { width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; }
  .sheet-in {
    grid-template-columns: minmax(0, 1fr);
    max-height: 100dvh;
    height: 100%;
    border-radius: 0;
    padding: calc(64px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  .close { top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); }
  .device { height: auto; width: min(64vw, 260px); }
  .sheet-in.is-landscape .device { width: 100%; }
  .info { padding-right: 0; }
}

::view-transition-group(game) { animation-duration: 0.42s; animation-timing-function: var(--ease); }
::view-transition-old(game), ::view-transition-new(game) { height: 100%; object-fit: cover; }

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