/* HugDeck website. Colours and type follow app/src/theme/tokens.ts (dark theme, design D
   "Noche + juego"): plum ground, gold DM Serif titles, sticker cards with ink borders and
   solid offset shadows. Fonts are the app's own OFL files, self-hosted. */

@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/dm-serif-display/DMSerifDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque/BricolageGrotesque-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque/BricolageGrotesque-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #160f22;
  --surface: #1e1530;
  --surface-raised: #2a1f3d;
  --text: #f7eef6;
  --text-2: #c9bbd3;
  --text-hint: #a99bb5;
  --gold: #e9c46a;
  --sun: #ffd166;
  --primary: #8a9bff;
  --ink: #1d1a2f;
  --edge: #0b0712;
  --line: rgba(247, 238, 246, 0.28);
  --pink: #ff9eb5;
  --teal: #6fe0cf;
  --lavender: #c3b6ff;
  --peach: #ffb38a;
  --sky: #8fd3ff;
  --green: #a8e6a1;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 6px 6px 0 var(--edge);
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--sun);
}
:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--gold);
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.3rem, 7vw, 4rem);
}
h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
}
h3 {
  font-size: 1.45rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  background: var(--sun);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
}
.skip:focus {
  left: 8px;
}

/* ─── Header ─────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
}
.brand img {
  width: 38px;
  height: 38px;
}
.brand:hover {
  color: var(--gold);
}
.brand .deck {
  color: var(--text);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
}
.lang:hover {
  border-color: var(--sun);
  color: var(--sun);
}

/* ─── Sticker primitives ─────────────────────────────────── */

.sticker {
  border: 3px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.chip {
  display: inline-block;
  background: #fff;
  color: #2a1b33;
  border: 2px solid var(--edge);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 56px 0 64px;
}
.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1.15fr 0.85fr;
  }
}
.hero h1 {
  margin-bottom: 0.35em;
}
.lead {
  font-size: 1.2rem;
  color: var(--text-2);
  max-width: 34em;
  margin: 0 0 28px;
}
.hero-art {
  position: relative;
  justify-self: center;
  width: min(340px, 78vw);
  aspect-ratio: 1;
}
.hero-art .tile {
  width: 100%;
  height: 100%;
  border-radius: 22.4%;
  box-shadow: 10px 10px 0 var(--edge);
  border: 3px solid var(--edge);
  transform: rotate(-4deg);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.badge {
  display: inline-flex;
  flex-direction: column;
  min-width: 190px;
  padding: 10px 18px 11px;
  background: var(--surface-raised);
  color: var(--text);
  border: 3px solid var(--edge);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--edge);
}
.badge small {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sun);
}
.badge strong {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}
.note {
  color: var(--text-hint);
  font-size: 0.95rem;
  margin: 16px 0 0;
}

/* ─── Sections ───────────────────────────────────────────── */

.section {
  padding: 64px 0;
}
.section-head {
  max-width: 40em;
  margin-bottom: 36px;
}
.section-head p {
  color: var(--text-2);
  margin: 0;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: step;
}
.step {
  padding: 18px 20px 22px;
  counter-increment: step;
}
.step:nth-child(1) {
  background: var(--lavender);
  transform: rotate(-1.5deg);
}
.step:nth-child(2) {
  background: var(--pink);
  transform: rotate(1deg);
}
.step:nth-child(3) {
  background: var(--teal);
  transform: rotate(-0.8deg);
}
.step:nth-child(4) {
  background: var(--sun);
  transform: rotate(1.4deg);
}
.step .chip::after {
  content: " " counter(step);
}
.step h3 {
  font-family: var(--sans);
  font-weight: 800;
  color: var(--ink);
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin: 14px 0 8px;
}
.step p {
  margin: 0;
  color: var(--ink);
}

.facts {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.facts li {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-2);
}
.facts strong {
  color: var(--text);
}

/* Screenshots: a scroll-snap strip on phones, a row on wide screens. */
.shots {
  list-style: none;
  margin: 0;
  padding: 6px 4px 22px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(68vw, 240px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.shots li {
  scroll-snap-align: center;
}
.shots img {
  width: 100%;
  border: 3px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--sun);
}
@media (min-width: 1100px) {
  .shots {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
  }
}

/* Pro */
.pro {
  background: var(--sun);
  padding: 32px 22px;
  display: grid;
  gap: 28px;
}
@media (min-width: 820px) {
  .pro {
    grid-template-columns: 1fr 1fr;
    padding: 44px 48px;
  }
}
.pro h2 {
  color: var(--ink);
}
.pro p {
  margin: 0 0 12px;
}
.pro .muted {
  color: #4b4570;
}
.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.benefits li {
  background: #fff;
  border: 3px solid var(--edge);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--edge);
  padding: 12px 16px 12px 46px;
  position: relative;
  font-weight: 800;
  line-height: 1.35;
}
.benefits li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 18px;
  margin-top: -9px;
  background: #e05a7a;
  /* Heart from the mark. */
  -webkit-mask: url("/assets/img/heart.svg") center / contain no-repeat;
  mask: url("/assets/img/heart.svg") center / contain no-repeat;
}

/* ─── Legal / prose pages ────────────────────────────────── */

.page {
  padding: 48px 0 72px;
}
.prose {
  max-width: 46rem;
}
.prose h1 {
  font-size: clamp(2.1rem, 6vw, 3.2rem);
}
.prose h2 {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  margin-top: 1.8em;
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 800;
  color: var(--text);
  font-size: 1.15rem;
  margin-top: 1.4em;
}
.prose p,
.prose li {
  color: var(--text-2);
}
.prose strong {
  color: var(--text);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin: 0.35em 0;
}
.meta {
  color: var(--text-hint);
  font-size: 0.95rem;
}
.callout {
  background: var(--surface);
  border: 3px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin: 28px 0;
}
.callout > :first-child {
  margin-top: 0;
}
.callout > :last-child {
  margin-bottom: 0;
}
.callout.sun {
  background: var(--sun);
}
.callout.sun,
.callout.sun p,
.callout.sun li,
.callout.sun strong,
.callout.sun h2 {
  color: var(--ink);
}
.callout.sun a {
  color: #2b36a8;
}
.toc {
  font-size: 0.98rem;
}
.toc ol {
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
}
@media (max-width: 600px) {
  /* Keep columns readable on phones; the wrapper scrolls sideways. */
  .table-wrap table {
    min-width: 560px;
  }
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.98rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px 10px 0;
  color: var(--text-2);
}
th {
  color: var(--text);
  font-weight: 800;
}

/* Facts that only Camilo / the lawyer can fill in. Deliberately loud. */
.ph {
  background: var(--sun);
  color: var(--ink);
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ─── 404 ────────────────────────────────────────────────── */

.notfound {
  padding: 72px 0 96px;
  text-align: center;
}
.notfound img {
  width: 120px;
  height: 120px;
  margin: 0 auto 28px;
  transform: rotate(-6deg);
  border-radius: 22.4%;
  border: 3px solid var(--edge);
  box-shadow: var(--shadow);
}
.notfound p {
  color: var(--text-2);
}
.button {
  display: inline-block;
  background: var(--sun);
  color: var(--ink);
  border: 3px solid var(--edge);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--edge);
  padding: 10px 22px;
  font-weight: 800;
  text-decoration: none;
  margin: 6px;
}
.button:hover {
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--edge);
}

/* ─── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
  color: var(--text-hint);
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: grid;
  gap: 18px;
}
.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.site-footer a {
  color: var(--text-2);
}
.site-footer a:hover {
  color: var(--sun);
}
.site-footer p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: transform 0.16s, box-shadow 0.16s;
  }
}
