:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --primary: #ff6b00;
  --primary-dark: #d95700;
  --line: #e4e7ec;
  --success: #079455;
  --shadow: 0 16px 45px rgba(16, 24, 40, 0.08);
  --radius: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top left, #fff1e8 0, transparent 35%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.page { width: min(1120px, 100%); margin: 0 auto; padding: 24px 18px 48px; }
.hero {
  position: relative; overflow: hidden; background: linear-gradient(135deg, #151515, #2a1608);
  color: white; border-radius: 30px; padding: 34px 24px; box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 190px; height: 190px;
  border-radius: 999px; background: rgba(255, 107, 0, 0.22);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; position: relative; z-index: 1; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; background: var(--primary);
  display: grid; place-items: center; font-weight: 900; letter-spacing: -1px;
}
.brand-text strong { display: block; font-size: 17px; }
.brand-text span { color: rgba(255,255,255,.72); font-size: 13px; }
.hero h1 {
  position: relative; z-index: 1; font-size: clamp(32px, 6vw, 58px);
  line-height: .98; max-width: 780px; letter-spacing: -2px; margin-bottom: 16px;
}
.hero p {
  position: relative; z-index: 1; color: rgba(255,255,255,.78);
  max-width: 600px; font-size: 17px; line-height: 1.5;
}
.hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  border: 0; border-radius: 999px; padding: 13px 18px; font-weight: 800;
  cursor: pointer; transition: .18s ease; font-size: 14px; display: inline-block; text-align: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-light { background: rgba(255,255,255,.12); color: white; border: 1px solid rgba(255,255,255,.18); }
.btn-light:hover { background: rgba(255,255,255,.18); }
.section-head { margin: 34px 0 18px; display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.section-head h2 { font-size: 28px; letter-spacing: -1px; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.search-box {
  width: min(340px, 100%); background: white; border: 1px solid var(--line);
  border-radius: 999px; padding: 12px 16px; font-size: 14px; outline: none;
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 8px 30px rgba(16, 24, 40, 0.04);
  transition: .2s ease; display: flex; flex-direction: column; min-height: 260px;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.logo {
  width: 58px; height: 58px; border-radius: 18px; background: #f2f4f7;
  border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
  font-weight: 900; color: var(--primary); flex: 0 0 auto;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.merchant h3 { font-size: 18px; margin-bottom: 4px; }
.merchant span { color: var(--muted); font-size: 13px; }
.discount { margin-top: 4px; font-size: 38px; font-weight: 950; letter-spacing: -1.5px; color: var(--primary); }
.card p { color: var(--muted); line-height: 1.45; font-size: 14px; margin: 10px 0 20px; flex: 1; }
.btn-card { width: 100%; background: #101828; color: white; }
.btn-card:hover { background: #000; }
.tag {
  display: inline-flex; align-items: center; width: fit-content; gap: 6px; color: var(--success);
  background: #ecfdf3; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
}
.how { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.step b {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px;
  background: #fff1e8; color: var(--primary); margin-bottom: 12px;
}
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; line-height: 1.45; }
.footer {
  margin-top: 28px; padding: 24px; border-radius: 24px; background: white;
  border: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.footer p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .62); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 18px; z-index: 20;
}
.modal-overlay.open { display: flex; }
.modal {
  width: min(460px, 100%); background: white; border-radius: 28px; padding: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28); animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: .3; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 16px; }
.close {
  border: 0; width: 38px; height: 38px; border-radius: 999px; background: #f2f4f7;
  cursor: pointer; font-size: 22px; line-height: 1;
}
.coupon { border: 2px dashed #f79009; border-radius: 22px; padding: 18px; background: #fffbf5; margin: 16px 0; }
.coupon small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.coupon-code { font-size: 32px; font-weight: 950; letter-spacing: -1px; margin: 8px 0; }
.coupon p { color: var(--muted); line-height: 1.45; font-size: 14px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { width: 100%; }
.empty {
  display: none; background: white; border: 1px solid var(--line);
  border-radius: 20px; padding: 22px; color: var(--muted);
}
@media (max-width: 880px) { .grid, .how { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .page { padding: 14px 12px 36px; }
  .hero { padding: 26px 18px; border-radius: 24px; }
  .hero h1 { letter-spacing: -1.2px; }
  .section-head { display: block; }
  .search-box { margin-top: 14px; }
  .grid, .how { grid-template-columns: 1fr; }
  .footer { display: block; }
  .footer .btn { width: 100%; margin-top: 16px; }
  .modal-actions { flex-direction: column; }
}
