/* Pixuleco: banknote satire. Yellow paper, ink, kraft envelopes, rubber stamps. */
:root {
  --yellow: #fec208;
  --yellow-deep: #d9a100;
  --yellow-pale: #ffe483;
  --ink: #26160a;
  --ink-soft: #5a4226;
  --paper: #fffbea;
  --paper-line: #efd68a;
  --kraft: #d9a661;
  --kraft-deep: #b8863f;
  --note-blue: #2f6fb3;
  --note-orange: #e0772a;
  --stamp: #b3261e;
  --radius: 26px;
  --max: 820px;
  --display: "Fraunces", "Georgia", serif;
  --stamp-font: "Anton", "Impact", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--yellow);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .12 0 0 0 0 0 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; }
p { margin: 0 0 0.9em; }
em { font-style: normal; font-weight: 800; background: linear-gradient(transparent 60%, var(--yellow-pale) 60%); }

/* Guilloche canvas behind the hero, like the banknote lines on the X banner. */
.guilloche {
  position: absolute; inset: 0 0 auto 0; width: 100%; height: 720px;
  pointer-events: none; z-index: 0;
  mask-image: linear-gradient(#000 60%, transparent);
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
}

/* Hero */
.hero {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto;
  padding: 28px 20px 0;
  display: grid; gap: 10px;
}
.hero__kicker {
  font-family: var(--stamp-font); letter-spacing: 0.12em; text-transform: uppercase;
  font-size: 0.72rem; color: var(--ink-soft); margin: 0;
}
.hero__title {
  position: relative; margin: 0; line-height: 0.82;
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(4.2rem, 19vw, 9.5rem); letter-spacing: -0.04em;
}
.hero__word { color: var(--paper); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink); }
.hero__word--ink { color: var(--ink); -webkit-text-stroke: 0; text-shadow: none; }
.hero__stamp {
  position: absolute; right: 0; top: -64px; width: 96px; height: auto;
  transform: rotate(12deg); filter: drop-shadow(0 6px 0 rgba(38, 22, 10, 0.25));
  animation: slam 0.5s cubic-bezier(.2, 1.4, .4, 1) 0.6s both;
}
@media (min-width: 720px) { .hero__stamp { right: -6px; top: -26px; width: 150px; } }
.hero__tagline { font-size: clamp(1.15rem, 4.5vw, 1.6rem); font-weight: 600; margin: 10px 0 0; max-width: 24ch; }
.hero__disclaimer { font-family: var(--stamp-font); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; color: var(--stamp); margin: 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hero__wolf {
  width: min(78vw, 360px); height: auto; justify-self: center;
  margin: -6px 0 -58px; filter: drop-shadow(0 18px 24px rgba(38, 22, 10, 0.28));
}

@media (min-width: 720px) {
  .hero { grid-template-columns: 1fr 340px; grid-template-areas: "k w" "t w" "g w" "d w" "c w"; align-items: end; padding-top: 48px; column-gap: 24px; }
  .hero__kicker { grid-area: k; } .hero__title { grid-area: t; } .hero__tagline { grid-area: g; }
  .hero__disclaimer { grid-area: d; } .hero__cta { grid-area: c; margin-bottom: 36px; }
  .hero__wolf { grid-area: w; width: 340px; justify-self: end; margin: 0 0 -70px; }
}

/* Reveal on load */
.reveal { animation: rise 0.7s cubic-bezier(.2, .8, .2, 1) both; }
.reveal:nth-child(1) { animation-delay: 0.05s; } .reveal:nth-child(2) { animation-delay: 0.15s; }
.reveal:nth-child(3) { animation-delay: 0.25s; } .reveal:nth-child(4) { animation-delay: 0.32s; }
.reveal:nth-child(5) { animation-delay: 0.4s; } .reveal:nth-child(6) { animation-delay: 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes slam { from { opacity: 0; transform: rotate(12deg) scale(2.2); } to { opacity: 1; transform: rotate(12deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .reveal, .hero__stamp { animation: none; } }

/* Ticker */
.ticker {
  position: relative; z-index: 1; margin-top: 46px;
  background: var(--ink); color: var(--yellow); overflow: hidden;
  font-family: var(--stamp-font); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.95rem;
  border-top: 3px solid var(--yellow-deep); border-bottom: 3px solid var(--yellow-deep);
}
.ticker__track { display: inline-flex; gap: 0; white-space: nowrap; padding: 10px 0; animation: ticker 40s linear infinite; }
.ticker__track span { padding: 0 1.4em; }
.ticker__track span::after { content: "✉"; margin-left: 1.4em; color: var(--kraft); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* Layout */
main {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto; padding: 28px 16px 24px;
  display: grid; gap: 22px;
}
h2.h-stamp {
  font-family: var(--stamp-font); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: clamp(1.7rem, 6vw, 2.4rem); margin: 0 0 10px; line-height: 1;
  display: inline-block; padding: 4px 12px; border: 3px solid var(--ink); border-radius: 8px;
  transform: rotate(-1.5deg); background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

/* The banknote */
.note {
  position: relative; overflow: hidden;
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 18px; padding: 26px 22px 22px;
  box-shadow: 8px 8px 0 var(--ink);
  background-image: repeating-linear-gradient(90deg, transparent 0 28px, rgba(217, 161, 0, 0.12) 28px 29px);
}
.note__corner { position: absolute; font-family: var(--stamp-font); font-size: 0.9rem; letter-spacing: 0.08em; color: var(--note-blue); opacity: 0.9; }
.note__corner--tl { top: 10px; left: 14px; }
.note__corner--br { bottom: 10px; right: 14px; transform: rotate(180deg); }
.note__label { font-family: var(--stamp-font); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; color: var(--note-blue); margin: 10px 0 2px; }
.note__value {
  font-family: var(--display); font-weight: 900; font-variation-settings: "opsz" 144;
  font-size: clamp(2.4rem, 11vw, 4.4rem); letter-spacing: -0.03em; line-height: 1; margin: 0;
}
.note__sub { color: var(--ink-soft); font-size: 0.9rem; margin: 6px 0 14px; }
.note__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0 0 12px; position: relative; }
.note__grid div { border-top: 2px dashed var(--paper-line); padding-top: 8px; }
.note__grid dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 700; }
.note__grid dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.note__fine { font-size: 0.8rem; color: var(--ink-soft); margin: 0; max-width: 60ch; position: relative; }
.note__watermark { position: absolute; right: -40px; bottom: -40px; width: 260px; height: auto; opacity: 0.08; pointer-events: none; }

/* The envelope */
.envelope { position: relative; padding-top: 54px; }
.envelope__flap {
  position: absolute; inset: 0 0 auto 0; height: 170px; z-index: 0;
  background: var(--kraft-deep);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.envelope__body {
  position: relative; z-index: 1;
  background: var(--kraft); border-radius: var(--radius); padding: 24px 20px;
  box-shadow: 0 10px 0 var(--kraft-deep), 0 22px 30px rgba(38, 22, 10, 0.2);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 9px);
}
.envelope__body::before {
  content: "✉ PIXULECO ✉ PIXULECO ✉ PIXULECO ✉ PIXULECO ✉ PIXULECO";
  position: absolute; left: 0; right: 0; top: 6px; overflow: hidden; white-space: nowrap;
  font-family: var(--stamp-font); font-size: 0.65rem; letter-spacing: 0.3em; color: var(--kraft-deep); text-align: center;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.chip {
  font: inherit; font-family: var(--stamp-font); letter-spacing: 0.06em; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px;
  padding: 8px 14px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); transition: transform 0.1s;
}
.chip:active { transform: translate(2px, 2px); box-shadow: none; }
.chip--on { background: var(--ink); color: var(--yellow); }

.qr-card { position: relative; display: flex; justify-content: center; margin: 8px 0; }
.qr { background: #fff; border-radius: 14px; padding: 12px; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.qr svg, .qr img { display: block; width: min(68vw, 240px); height: auto; }
.qr-card__sticker { position: absolute; right: max(0px, calc(50% - 190px)); bottom: -24px; width: 110px; height: auto; transform: rotate(-10deg); pointer-events: none; }
.qr--hidden { display: none; }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.button {
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--yellow); border: 2px solid var(--ink);
  border-radius: 999px; padding: 12px 20px; display: inline-block; line-height: 1.2;
  box-shadow: 0 3px 0 rgba(38, 22, 10, 0.4); transition: transform 0.1s, box-shadow 0.1s;
}
.button:active { transform: translateY(2px); box-shadow: none; }
.button--ghost { background: transparent; color: var(--ink); box-shadow: none; }
.button--big { font-family: var(--stamp-font); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; font-size: 1.05rem; padding: 14px 24px; }
.muted { color: var(--ink-soft); font-size: 0.9rem; }

/* "Comprar": everything centered under the QR, like the QR card itself. */
#comprar .envelope__body { text-align: center; }
#comprar .chips, #comprar .buttons { justify-content: center; }
#comprar h2.h-stamp { margin-left: auto; margin-right: auto; }

/* The form, as an official-looking form */
.form-card {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 12px; padding: 22px 20px;
  box-shadow: 8px 8px 0 var(--ink); position: relative;
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, var(--paper-line) 31px 32px);
}
.form-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.form-card__sticker { width: 96px; height: auto; transform: rotate(8deg); margin-top: -34px; }
form { display: grid; gap: 14px; margin: 8px 0 18px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
label { display: grid; gap: 6px; }
label span { font-family: var(--stamp-font); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
input, select {
  font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--ink); border-radius: 8px; padding: 11px 12px; width: 100%;
}
input:focus, select:focus { outline: 3px solid var(--note-blue); outline-offset: 1px; }
input:invalid:not(:placeholder-shown) { border-color: var(--stamp); }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 140px; } }

/* Dossiers: ranking and CPI */
.dossier {
  background: var(--paper); border-radius: var(--radius); padding: 22px 20px;
  border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--kraft-deep);
}
.dossier--cpi { box-shadow: 8px 8px 0 var(--note-orange); }
.dossier__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dossier__sticker { width: 96px; height: auto; transform: rotate(-8deg); margin-top: -34px; }

.rank { list-style: none; counter-reset: rank; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.rank li {
  counter-increment: rank; display: grid; grid-template-columns: 44px 1fr auto; gap: 2px 12px; align-items: center;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px;
}
.rank li::before { content: counter(rank) "º"; font-family: var(--stamp-font); font-size: 1.4rem; grid-row: span 2; }
.rank li:first-child { background: var(--ink); color: var(--yellow); }
.rank li:first-child::before { content: "👑"; }
.rank__name { font-weight: 800; }
.rank__wallet { grid-column: 2; font-size: 0.78rem; opacity: 0.75; }
.rank__pixu { font-family: var(--display); font-weight: 800; white-space: nowrap; grid-row: span 2; font-size: 1.15rem; }
.rank__empty { color: var(--ink-soft); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.facts div { background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 12px; }
.facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 700; }
.facts dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.2rem; }

/* Contract and story */
.contract { padding: 6px 4px; }
.ca { display: grid; gap: 10px; margin: 8px 0 12px; }
.ca code {
  font-size: 0.9rem; word-break: break-all; background: var(--paper); border-radius: 10px; padding: 12px;
  border: 2px dashed var(--ink);
}
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 800; }
.links a { text-decoration-thickness: 3px; text-underline-offset: 4px; }
@media (min-width: 640px) { .ca { grid-template-columns: 1fr auto; align-items: center; } }

.story { padding: 6px 4px 0; }
.story__timeline { display: grid; gap: 12px; margin: 10px 0 16px; }
.story__timeline div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: baseline; }
.story__year { font-family: var(--stamp-font); font-size: 1.6rem; color: var(--note-blue); }
.story__timeline p { margin: 0; font-weight: 600; }

footer {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto; padding: 8px 20px 110px;
  font-size: 0.85rem; color: var(--ink-soft);
}
.footer__art { font-family: var(--stamp-font); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); font-size: 1rem; }

/* Sticky buy bar on phones */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--yellow) 40%);
  display: flex; justify-content: center;
}
.sticky .button { width: min(100%, 420px); text-align: center; }
@media (min-width: 720px) { .sticky { display: none; } footer { padding-bottom: 48px; } }
