/* Deedz.org homepage. Colours match the arcade (site/arcade/styles.css). */
:root {
  color-scheme: dark;
  --bg: #08131f;
  --bg-2: #111f30;
  --card: rgba(15, 29, 45, .86);
  --text: #f6fbff;
  --muted: #bdd0df;
  --line: rgba(255, 255, 255, .14);
  --gold: #ffcb3d;
  --pink: #ff5dab;
  --blue: #8eeaff;
  --green: #67f291;
  --shadow: 0 24px 80px rgba(0, 0, 0, .36);
  --radius: 24px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8ff;
  --bg-2: #eaf1ff;
  --card: rgba(255, 255, 255, .9);
  --text: #102034;
  --muted: #53647e;
  --line: rgba(16, 32, 52, .12);
  --shadow: 0 24px 60px rgba(40, 60, 100, .14);
  --dz-nav-bg: rgba(255, 255, 255, .82);
  --dz-nav-text: #102034;
  --dz-nav-muted: #53647e;
  --dz-nav-line: rgba(16, 32, 52, .12);
  --dz-nav-accent: #1c8fb0;
}
:root[data-theme="light"] .app-card .kicker,
:root[data-theme="light"] .cta { filter: brightness(.7) saturate(1.4); }
/* The bright accent colours are made for dark backgrounds; darken them on white for contrast. */
:root[data-theme="light"] .eyebrow { color: #a8740a; }
:root[data-theme="light"] h1 span { background-image: linear-gradient(90deg, #0f86a8, #c98a00 55%, #d8327f); }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(255, 93, 171, .16), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(142, 234, 255, .14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
.shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 16px 0 40px; }
deedz-nav { min-height: 50px; position: sticky; top: 12px; z-index: 10; }

/* Hero: full-width Deedz artwork with the headline over its dark side.
   The art is always dark, so the hero text stays light in both themes. */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 18px; border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow);
  min-height: clamp(440px, 52vw, 600px);
  display: flex; align-items: center;
  background: #0b0716;
}
.hero-art {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 5, 18, .92) 0%, rgba(8, 5, 18, .72) 38%, rgba(8, 5, 18, 0) 68%),
    linear-gradient(0deg, rgba(8, 5, 18, .55), transparent 40%);
}
.hero-copy { width: min(560px, 100%); padding: clamp(28px, 5vw, 64px); color: #f6fbff; }
.hero .lede { margin: 18px 0 0; max-width: 470px; color: #d6e2ee; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font-weight: 850; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn span { transition: transform .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:hover span { transform: translateX(3px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn.primary { color: #1b1003; background: linear-gradient(135deg, #ffcb3d, #ff9a3d); box-shadow: 0 10px 30px rgba(255, 170, 61, .35); }
.btn.ghost { color: #f6fbff; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.eyebrow {
  margin: 14px 0 10px; color: var(--gold); font-weight: 850; font-size: .8rem;
  letter-spacing: .18em; text-transform: uppercase;
}
h1 {
  margin: 0; font-size: clamp(2.4rem, 6.2vw, 4.6rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 900;
}
h1 span {
  background: linear-gradient(90deg, var(--blue), var(--gold) 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1rem, 2.2vw, 1.15rem); }
/* Hero headline sits on dark art in both themes. */
:root[data-theme="light"] .hero .eyebrow { color: var(--gold); }
:root[data-theme="light"] .hero h1 span { background-image: linear-gradient(90deg, var(--blue), var(--gold) 55%, var(--pink)); }

/* Global HONK counter and button under the hero */
.honk-meter {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 18px; padding: 16px 22px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(122, 64, 255, .22), rgba(255, 93, 171, .14)), var(--card);
  border: 1px solid color-mix(in srgb, #b18cff 40%, var(--line)); box-shadow: var(--shadow);
}
.honk-icon { font-size: 2rem; line-height: 1; }
.honk-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.honk-text h2 {
  margin: 0; font-size: .8rem; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; color: #c9b3ff;
}
.honk-total {
  align-self: flex-start;
  font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 900; line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--gold);
}
.honk-total.bump { animation: honk-bump .5s ease; }
@keyframes honk-bump { 40% { transform: scale(1.12); } }
.honk-button {
  font: inherit; font-weight: 900; font-size: 1.15rem; letter-spacing: .04em; cursor: pointer;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 999px; color: #1b1003;
  background: linear-gradient(135deg, #ffcb3d, #ff9a3d); box-shadow: 0 10px 30px rgba(255, 170, 61, .35);
  transition: transform .12s ease;
}
.honk-button:hover { transform: translateY(-2px); }
.honk-button:active { transform: scale(.95); }
.honk-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (max-width: 700px) { .honk-button { flex: 1 1 100%; } }
:root[data-theme="light"] .honk-text h2 { color: #6a3fd1; }
:root[data-theme="light"] .honk-total { color: #b07a00; }

/* Sections */
.block { margin-top: clamp(36px, 6vw, 56px); }
.section-title {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 16px; font-size: .82rem; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* App cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.app-card {
  --accent: var(--blue);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: inherit; text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.app-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.app-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.app-card.arcade { --accent: var(--pink); }
.app-card.arcade .art { aspect-ratio: 4 / 3; background: #2a1650; }
.app-card.arcade .art img { object-position: 50% 22%; }
.app-card.game { --accent: var(--gold); }
.app-card.speed { --accent: var(--green); }
.app-card.tuner { --accent: var(--gold); }
.app-card.synth { --accent: var(--pink); }
.app-card.twitch { --accent: #b18cff; }

.art { aspect-ratio: 8 / 5; overflow: hidden; background: #071b35; }
.art img, .art svg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.app-card:hover .art img, .app-card:hover .art svg { transform: scale(1.035); }

.body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; flex: 1; }
.kicker { margin: 0; color: var(--accent); font-weight: 850; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; }
.body h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.1; letter-spacing: -.02em; }
.body p:not(.kicker) { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 2px 0 0; padding: 0; }
.tags li {
  font-size: .78rem; font-weight: 750; color: var(--text); padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.cta { margin-top: auto; padding-top: 8px; color: var(--accent); font-weight: 850; }
.cta span { display: inline-block; transition: transform .18s ease; }
.app-card:hover .cta span { transform: translateX(4px); }

/* Game and arcade are the headline acts: full width, picture beside the text on wide screens,
   alternating sides. The four tools sit two per row below. */
.app-card.featured { grid-column: 1 / -1; }
.app-card.game { border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }

/* Two artwork tiles from the game, between the game and arcade cards */
.showcase { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.shot {
  position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9;
  border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #0b0716;
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.shot:hover img { transform: scale(1.04); }
.shot span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px;
  color: #fff; font-weight: 850; font-size: 1.05rem;
  background: linear-gradient(0deg, rgba(8, 5, 18, .85), transparent);
}
.shot:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

@media (min-width: 820px) {
  .app-card.featured { flex-direction: row; }
  .app-card.featured.arcade { flex-direction: row-reverse; }
  /* The arcade goose art is portrait: give it a narrower column and a fixed height matching the game card,
     cropped to his head and shoulders, so the card doesn't stretch tall around mostly empty text. */
  .app-card.featured.arcade .art { flex-basis: 44%; height: 380px; min-height: 0; }
  .app-card.featured.arcade .art img { object-position: 50% 16%; }
  .app-card.featured .art { flex: 0 0 56%; aspect-ratio: auto; min-height: 340px; }
  .app-card.featured .body { justify-content: center; padding: 36px 40px; }
  .app-card.featured h2 { font-size: clamp(2rem, 3.4vw, 2.6rem); }
  .app-card.featured .cta { margin-top: 10px; }
}

.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem;
}
.footer strong { color: var(--text); letter-spacing: .08em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 650; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.theme-toggle {
  font: inherit; font-weight: 750; color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 700px) {
  .grid, .showcase { grid-template-columns: 1fr; }
  .body { padding: 18px 18px 20px; }
  /* Phones: goose picture on top, headline and buttons underneath, so text never covers the goose. */
  .hero { display: block; min-height: 0; }
  .hero-art { position: relative; inset: auto; height: 300px; object-position: 76% 16%; }
  .hero::after { inset: 0 0 auto 0; height: 300px; background: linear-gradient(0deg, #0b0716 0%, rgba(11, 7, 22, 0) 40%); }
  .hero-copy { position: relative; margin-top: -36px; padding: 0 20px 24px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .btn:hover, .btn:hover span { transform: none; }
}

/* Secret Box clue on the Breadstorm tile: shows on hover/focus, always on touch screens. */
.shot .clue {
  position: absolute; top: 12px; right: 12px; padding: 6px 10px; border-radius: 999px;
  font-style: normal; font-size: .8rem; font-weight: 800; color: #1b1003; background: rgba(255, 203, 61, .92);
  opacity: 0; transform: translateY(-4px); transition: opacity .25s ease, transform .25s ease;
}
.shot:hover .clue, .shot:focus-visible .clue { opacity: 1; transform: none; }
@media (hover: none) { .shot .clue { opacity: .9; transform: none; } }

/* An odd card out at the end of a two-column grid spans the row (picture beside the text on wide screens). */
.grid > .app-card:not(.featured):last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 820px) {
  .grid > .app-card:not(.featured):last-child:nth-child(odd) { flex-direction: row; }
  .grid > .app-card:not(.featured):last-child:nth-child(odd) .art { flex: 0 0 50%; aspect-ratio: auto; min-height: 260px; }
  .grid > .app-card:not(.featured):last-child:nth-child(odd) .body { justify-content: center; }
}

/* Phones: roomier footer links so they're easy to tap. */
@media (max-width: 700px) {
  .footer-links { gap: 2px 6px; }
  .footer-links a { display: inline-block; padding: 9px 6px; }
}
.app-card.nameplate { --accent: var(--gold); }

/* Apps: the homepage strip and the /apps/ page head */
.section-head { display: flex; align-items: center; gap: 14px; }
.section-head .section-title { flex: 1; }
.see-all { flex: none; color: var(--text); font-weight: 850; font-size: .92rem; text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; }
.see-all:hover { border-color: var(--gold); }
.apps-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.app-tile {
  --accent: var(--gold);
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card, rgba(255,255,255,.04));
  color: var(--text); text-decoration: none; transition: transform .2s ease, border-color .2s ease;
}
.app-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.app-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.app-tile.synth { --accent: var(--pink); }
.app-tile.speed { --accent: var(--green); }
.app-tile.nameplate { --accent: #ffb13d; }
.tile-icon { grid-row: 1 / span 2; width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 14px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.app-tile b { font-size: 1rem; }
.app-tile small { color: var(--muted); font-size: .84rem; }
.app-card.nameplate { --accent: #ffb13d; }
.page-head { padding: clamp(28px, 5vw, 48px) 4px 0; }
.page-head .eyebrow { margin: 0 0 6px; color: var(--gold); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; }
.page-head h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; }
.page-head h1 span { background: linear-gradient(90deg, #ffcb3d, #ff5dab); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head .lede { max-width: 640px; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
@media (max-width: 900px) { .apps-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .apps-strip { grid-template-columns: minmax(0, 1fr); }
  .section-head { flex-wrap: wrap; }
}
