/* DealsPlug website. Mirrors the app's home feed (same colors, cards, badges
   and section headers) so the site feels like the app on a bigger screen. */

:root {
  --blue: #3B5BDB;          /* brand gradient start */
  --violet: #7048E8;        /* brand gradient end */
  --accent: #4361EE;        /* links, active states */
  --orange: #FF6B35;        /* CTAs and discount badges */
  --orange-soft: #F97316;
  --green: #16A34A;
  --pink: #D946EF;
  --ink: #111827;           /* primary text */
  --ink-2: #4B5563;         /* secondary text */
  --muted: #646B78;         /* small print: 4.9:1 on --surface */
  --line: #ECEEF3;
  --surface: #F5F6FA;
  --bg: #FFFFFF;
  --gradient: linear-gradient(135deg, var(--blue), var(--violet));
  --radius: 20px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 10px 28px rgba(17, 24, 39, 0.07);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* One web font (Inter, variable 400 to 900) keeps the first load light;
     codes use the phone's or computer's own monospace font. */
  --display: var(--font);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 16px;
  --page: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand span { font: 900 20px/1 var(--display); letter-spacing: -0.4px; }
.brand b { color: var(--accent); font-weight: inherit; }
.topbar .wrap { gap: 12px; }
/* Small phones: keep the name and the button from touching. */
@media (max-width: 340px) {
  .topbar .brand span { font-size: 17px; }
  .topbar .btn-get { padding: 9px 14px; font-size: 13px; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-weight: 700; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-get { background: var(--orange); color: #fff; padding: 10px 18px; font-size: 14px; box-shadow: 0 6px 16px rgba(255, 107, 53, 0.35); }
.btn-get:hover { background: #F25A22; }
.store-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-store {
  background: #fff; color: var(--ink); padding: 11px 16px; font-size: 14px;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.12);
}
.btn-store svg { width: 18px; height: 18px; flex: none; }
.btn-store small { display: block; font-size: 10px; font-weight: 600; color: var(--ink-2); line-height: 1.1; }
.btn-store .lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn-store.dark { background: var(--ink); color: #fff; box-shadow: none; }
.btn-store.dark small { color: #C7CBD4; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 28px 0 8px; display: grid; gap: 24px; }
.headline {
  margin: 0;
  font: 900 44px/1 var(--display);
  letter-spacing: -1.6px;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin: 8px 0 0; font-size: 17px; font-weight: 700; color: var(--ink-2); }
.lede { margin: 16px 0 0; max-width: 34em; color: var(--ink-2); }
.live {
  display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0;
  padding: 7px 12px; border-radius: 999px; background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }

/* ── Signature: the app itself as a coupon in its own feed ───────────────── */
.app-deal {
  --stub: 96px;
  position: relative; display: grid; grid-template-columns: var(--stub) 1fr;
  color: #fff; background: var(--gradient); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(76, 70, 229, 0.28);
  /* ticket notches at the top and bottom of the perforation */
  -webkit-mask:
    radial-gradient(circle at var(--stub) 0, transparent 11px, #000 11.5px) top / 100% 51% no-repeat,
    radial-gradient(circle at var(--stub) 100%, transparent 11px, #000 11.5px) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle at var(--stub) 0, transparent 11px, #000 11.5px) top / 100% 51% no-repeat,
    radial-gradient(circle at var(--stub) 100%, transparent 11px, #000 11.5px) bottom / 100% 51% no-repeat;
}
.app-deal__stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 8px; border-right: 2px dashed rgba(255, 255, 255, 0.45);
}
.app-deal__stub img { width: 54px; height: 54px; border-radius: 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.app-deal__stub strong { font: 800 13px/1 var(--mono); letter-spacing: 1px; }
.app-deal__body { padding: 20px 20px 18px; min-width: 0; }
.badge-off {
  display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--orange);
  font: 800 12px/1 var(--font); letter-spacing: 0.3px; text-transform: uppercase; color: #fff;
}
.app-deal h2 { margin: 12px 0 4px; font: 900 24px/1.1 var(--display); letter-spacing: -0.5px; }
.app-deal p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.88); font-size: 14.5px; }
.app-deal__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0 !important;
  font: 600 12px/1.4 var(--mono); letter-spacing: 0.4px; color: rgba(255, 255, 255, 0.8) !important;
}
.app-deal--compact { margin: 8px 0 4px; }

/* ── "Your state" picker ──────────────────────────────────────────────── */
.where {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 14px 0 0;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  max-width: 34em;
}
.where label { flex-basis: 100%; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.where select { flex: 1 1 10em; min-width: 0; max-width: 16em; }
.where select, .where input {
  font: 600 14px/1.2 var(--font); color: var(--ink); background: #fff;
  border: 1px solid #D5D9E2; border-radius: 10px; padding: 8px 10px; min-height: 38px;
}
.where input { flex: 0 1 7.5em; min-width: 6em; }
.where__or { font-size: 13px; color: var(--ink-2); }
.where__note { flex-basis: 100%; margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding: 30px 0 4px; }
.section-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.section-head h2 { margin: 0; font: 800 22px/1.2 var(--font); letter-spacing: -0.4px; }
.section-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.section-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 0;
  border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent);
}
.section-more:hover { text-decoration: underline; }
.empty-drops { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: rgba(124, 58, 237, 0.07); border: 1px solid rgba(124, 58, 237, 0.18); margin-bottom: 6px; }
.empty-drops span { font-size: 22px; line-height: 1; }
.empty-drops strong { display: block; font-size: 15px; }
.empty-drops p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }

.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 4px var(--gutter) 18px;
  margin: 0 calc(-1 * var(--gutter)); scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }

/* ── Deal card (same anatomy as the app's DealCard) ─────────────────────── */
.card {
  display: flex; flex-direction: column; text-align: left; width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; cursor: pointer; padding: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(17, 24, 39, 0.05), 0 16px 34px rgba(17, 24, 39, 0.1); }
.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden; }
/* Absolutely positioned so a tall source photo can't stretch the box. */
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__badge {
  position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px);
  padding: 6px 11px; border-radius: 999px; background: var(--orange); color: #fff;
  font: 800 12px/1 var(--font); letter-spacing: 0.3px; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.chip-avail { display: inline-block; width: fit-content; align-self: flex-start; margin: 0 6px 6px 0; padding: 2px 7px; border-radius: 6px; background: #FFF7ED; border: 1px solid #FDBA74; color: #C2410C; font-size: 11px; font-weight: 700; }
.sheet__note { margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: #FFF7ED; border: 1px solid #FED7AA; }
.sheet__note strong { display: block; color: #9A3412; font-size: 14px; }
.sheet__note p { margin: 4px 0 0; font-size: 14px; color: var(--ink); }
.chip-collab {
  align-self: flex-start; padding: 4px 9px; border-radius: 8px; border: 1px solid #D8B4FE;
  background: #FDF4FF; color: #7C3AED; font: 700 11px/1 var(--font);
}
.card__title { margin: 0; font: 800 16px/1.3 var(--font); letter-spacing: -0.2px; color: var(--ink); }
.brandline { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.logo { width: 20px; height: 20px; border-radius: 50%; object-fit: contain; background: #fff; flex: none; }
.logo--letter {
  display: inline-grid; place-items: center; background: #E5E7EB; color: var(--ink-2);
  font: 700 11px/1 var(--font);
}
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  padding: 6px 11px; border-radius: 999px; font: 700 12.5px/1 var(--font); border: 1px solid;
}
.pill--green { color: var(--green); background: #ECFDF3; border-color: #A7F3C0; }
.pill--orange { color: #C2410C; background: #FFF4ED; border-color: #FDC9A8; }
.pill--blue { color: var(--accent); background: #EEF2FF; border-color: #C7D2FE; }
.pill--violet { color: #7C3AED; background: #F5F3FF; border-color: #DDD6FE; }
.pill--gray { color: var(--ink-2); background: var(--surface); border-color: var(--line); }
.pill [data-ends] { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Featured: the big card */
.card--featured .card__media { aspect-ratio: 16 / 9; }
.card--featured .card__title { font-size: 21px; }
.progress { height: 6px; border-radius: 6px; background: #E7F6EC; overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: inherit; }

.card, .rowcard { color: var(--ink); text-decoration: none; }
.featured-wrap { display: grid; gap: 18px; }
.side-title { margin: 0 0 10px; font: 800 16px/1.3 var(--font); color: var(--ink); }

/* List rows (More deals, Ending soon) */
.list { display: grid; gap: 12px; }
.rowcard {
  display: grid; grid-template-columns: 116px 1fr; align-items: stretch; text-align: left; width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; cursor: pointer; padding: 0; transition: box-shadow 0.18s ease;
}
.rowcard:hover { box-shadow: 0 2px 4px rgba(17, 24, 39, 0.05), 0 14px 30px rgba(17, 24, 39, 0.1); }
.rowcard__media { position: relative; background: var(--surface); min-height: 116px; }
.rowcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rowcard__media .card__badge { top: auto; bottom: 8px; left: 8px; font-size: 10.5px; padding: 5px 8px; }
.rowcard__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rowcard .card__title { font-size: 15px; }

/* Loading + error */
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, #F1F2F6 25%, #E7E9EF 37%, #F1F2F6 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.state { padding: 40px 0; text-align: center; color: var(--ink-2); }
.state button { margin-top: 12px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { margin-top: 44px; padding: 32px 0 120px; background: var(--surface); border-top: 1px solid var(--line); }
.footer .brand { margin-bottom: 8px; }
.footer p { margin: 6px 0; color: var(--ink-2); font-size: 13.5px; }
.footer nav { display: flex; gap: 18px; margin: 14px 0; }
.footer nav a { font-weight: 600; text-decoration: none; }
.footer nav a:hover { text-decoration: underline; }
.footer .fine { color: var(--muted); font-size: 12.5px; }

/* ── Sticky "Get the app" bar (phones) ───────────────────────────────────── */
.getbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.18);
  transform: translateY(140%); transition: transform 0.28s ease;
}
.getbar.show { transform: none; }
.getbar img { width: 40px; height: 40px; border-radius: 11px; }
.getbar div { flex: 1; min-width: 0; line-height: 1.25; }
.getbar strong { display: block; font-weight: 800; }
.getbar span { font-size: 12.5px; color: var(--ink-2); }

/* ── Deal sheet / dialogs ────────────────────────────────────────────────── */
dialog {
  border: 0; padding: 0; width: 100%; max-width: 100%; margin: auto auto 0; max-height: 92vh;
  border-radius: 24px 24px 0 0; background: #fff; color: var(--ink);
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.2);
}
dialog::backdrop { background: rgba(17, 24, 39, 0.45); }
dialog[open] { animation: sheet 0.26s ease; }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
.sheet { overflow-y: auto; max-height: 92vh; }
.sheet__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; }
.sheet__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet__close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 0; cursor: pointer; background: rgba(17, 24, 39, 0.6); color: #fff; font-size: 22px; line-height: 1;
}
.sheet__body { padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.sheet__body h2 { margin: 0; font: 900 24px/1.15 var(--display); letter-spacing: -0.4px; }
.sheet__desc { margin: 6px 0 0; color: var(--ink-2); }
.sheet__how { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }
.sheet__how li { margin: 4px 0; }
.codebox {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px;
  padding: 12px 14px; border: 2px dashed #C7D2FE; border-radius: 14px; background: #F7F8FF;
}
.codebox code { font: 800 17px/1.2 var(--mono); letter-spacing: 1.5px; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.codebox__copy {
  flex: none; padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
}
.codebox__copy:hover { background: #3651D4; }
.sheet__cta {
  margin-top: 14px; padding: 16px; border-radius: 18px; background: var(--gradient); color: #fff;
}
.sheet__cta strong { display: block; font: 800 17px/1.25 var(--font); margin-bottom: 12px; }
.soon { padding: 26px 22px 24px; text-align: center; }
.soon img { width: 64px; height: 64px; border-radius: 17px; margin: 0 auto 14px; }
.soon h2 { margin: 0 0 8px; font: 900 22px/1.2 var(--display); }
.soon p { margin: 0 0 18px; color: var(--ink-2); }

/* ── Wider screens ───────────────────────────────────────────────────────── */
@media (min-width: 560px) {
  .row { grid-auto-columns: 46%; }
}
@media (min-width: 820px) {
  :root { --gutter: 24px; }
  .headline { font-size: 68px; letter-spacing: -2.6px; }
  .tagline { font-size: 20px; }
  .lede { font-size: 16.5px; }
  .hero { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px; padding: 56px 0 18px; }
  .app-deal { --stub: 120px; }
  .app-deal h2 { font-size: 28px; }
  .section { padding-top: 40px; }
  .section-head h2 { font-size: 26px; }
  .row { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 4px 0 8px; }
  .featured-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: stretch; }
  .list { grid-template-columns: 1fr 1fr; }
  .list--single { grid-template-columns: 1fr; }
  .getbar { display: none; }
  .footer { padding-bottom: 40px; }
  dialog { max-width: 540px; margin: auto; border-radius: 24px; box-shadow: 0 30px 80px rgba(17, 24, 39, 0.3); }
}
@media (min-width: 1100px) {
  .row { grid-template-columns: repeat(4, 1fr); }
}

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