:root {
  --ink: #17233B;
  --ink-soft: #2A3A5C;
  --sun: #F5B82E;
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --line: #E6E3DA;
  --muted: #5C6170;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--ink); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.brand .mark { width: 36px; height: 36px; }

.pill {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.pill:hover { border-color: var(--ink); }

/* ── Hero ───────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 56px;
  padding-top: 48px;
  padding-bottom: 88px;
}

.eyebrow {
  margin: 0 0 16px;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--sun);
  padding: 4px 10px;
  border-radius: 6px;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lead {
  margin: 20px 0 32px;
  max-width: 34em;
  font-size: 19px;
  color: var(--muted);
}

.cta {
  display: inline-block;
  padding: 14px 22px;
  min-height: 48px;
  border-radius: 12px;
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
}

.cta:hover { background: var(--ink-soft); }

.cta:focus-visible,
.pill:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.fine {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ── El ticket partido ──────────────────────────────── */
.ticket {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 10px;
  filter: drop-shadow(0 18px 30px rgba(23, 35, 59, 0.16));
  transform: rotate(-3deg);
}

.ticket-left,
.ticket-right {
  padding: 28px 24px;
  min-height: 300px;
}

/* Borde en zigzag: el izquierdo sale hacia la derecha y el amarillo encaja. */
.ticket-left {
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 14px 0 0 14px;
  padding-right: 34px;
  clip-path: polygon(0 0, 100% 0, 92% 14%, 100% 28%, 92% 42%, 100% 57%, 92% 71%, 100% 86%, 94% 100%, 0 100%);
}

.ticket-right {
  background: var(--sun);
  color: var(--ink);
  border-radius: 0 14px 14px 0;
  padding-left: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 9% 100%, 0 86%, 13% 71%, 0 57%, 13% 42%, 0 28%, 13% 14%);
}

.t-title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}

.ticket ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
}

.ticket li,
.t-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.t-total {
  margin: 8px 0 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.35);
  padding-top: 12px;
  font-weight: 600;
}

.t-people {
  margin: 14px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.t-label {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.t-amount {
  margin: 4px 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* ── Funciones ──────────────────────────────────────── */
.features { padding-bottom: 96px; }

h2 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.025em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.grid p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* ── Pie ────────────────────────────────────────────── */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.foot p { margin: 0; }
.foot a { color: var(--muted); }

/* ── Página de invitación ───────────────────────────── */
.join {
  max-width: 560px;
  padding-top: 56px;
  padding-bottom: 96px;
}

.join h1 { font-size: clamp(36px, 6vw, 52px); }

.join .lead { margin-bottom: 28px; }

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-top: 24px;
    padding-bottom: 72px;
  }
  .ticket { max-width: 440px; transform: rotate(-2deg); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .pill { display: none; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .ticket-left, .ticket-right { min-height: 260px; padding-top: 22px; padding-bottom: 22px; }
  .ticket-left { padding-left: 18px; }
  .ticket-right { padding-right: 16px; }
  .ticket ul { font-size: 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  .ticket-right { transition: transform 0.4s ease; }
  .ticket:hover .ticket-right { transform: translateX(6px); }
}
