/* Pure Gloss Rewards — builds on /css/area.css (brand variables, nav, footer, buttons) */
:root {
  --chrome: linear-gradient(100deg, #9fb8e6 0%, #f0f4ff 18%, #5c86d6 34%, #1a4fa0 52%, #8fb0f0 70%, #f0f4ff 84%, #3b82f6 100%);
  --metal-blue: linear-gradient(145deg, #0d2a5c 0%, #1a4fa0 35%, #3b82f6 55%, #123a7a 75%, #0a1c3d 100%);
  --line: rgba(240, 244, 255, 0.08);
  --danger: #f87171;
}

body.rewards { background: var(--black); }
body.rewards main { position: relative; overflow: hidden; }

/* subtle carbon-weave grid behind everything */
body.rewards main::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 80% -10%, rgba(59,130,246,0.22), transparent 45%),
    radial-gradient(circle at -10% 40%, rgba(163,230,53,0.07), transparent 40%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.018) 0 2px, transparent 2px 6px);
}
body.rewards main > * { position: relative; z-index: 1; }

.chrome-text {
  background: var(--chrome); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: chrome-shift 7s ease-in-out infinite alternate;
}
@keyframes chrome-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.lime { color: var(--lime); }
.muted { color: var(--gray); }
.eyebrow {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.78rem; letter-spacing: 5px;
  text-transform: uppercase; color: var(--lime); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--lime); box-shadow: 0 0 12px var(--lime); }

/* ---------- HERO ---------- */
.rw-hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 80px 48px 90px;
}
.rw-hero h1 {
  font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: 3px;
  font-size: clamp(3.4rem, 8vw, 6.8rem); line-height: 0.88; margin: 18px 0 22px;
}
.rw-hero h1 .sub { display: block; font-size: 0.48em; letter-spacing: 8px; color: var(--white); -webkit-text-fill-color: var(--white); }
.rw-hero p.lede { font-size: 1.12rem; color: #b9c5e0; max-width: 520px; line-height: 1.65; margin-bottom: 32px; }
.rw-hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-lime {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  font-size: 0.85rem; color: #0a0c10; background: var(--lime); padding: 16px 30px; border: none; cursor: pointer;
  text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(163,230,53,0.6); }
.btn-lime:disabled, .btn-primary:disabled, .btn-secondary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
button.btn-primary, button.btn-secondary { cursor: pointer; font-family: 'Barlow Condensed', sans-serif; }
button.btn-secondary { background: transparent; }

/* ---------- MEMBER CARD ---------- */
.card-stage { perspective: 1200px; display: flex; justify-content: center; }
.member-card {
  position: relative; width: min(440px, 100%); aspect-ratio: 1.586; border-radius: 18px; padding: 26px 28px;
  background: var(--metal-blue); color: var(--white); overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(37,99,200,0.7), inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.4);
  transform: rotateY(-14deg) rotateX(8deg); transition: transform .6s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; justify-content: space-between;
  animation: card-float 6s ease-in-out infinite;
}
.card-stage:hover .member-card { transform: rotateY(0) rotateX(0); }
@keyframes card-float { 50% { translate: 0 -10px; } }
.member-card::before { /* brushed metal */
  content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: overlay;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 1px, transparent 1px 3px);
}
.member-card::after { /* light sweep */
  content: ""; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: rotate(20deg); animation: sweep 4.5s ease-in-out infinite;
}
@keyframes sweep { 0%, 55% { left: -60%; } 100% { left: 140%; } }
.member-card > * { position: relative; z-index: 1; }
.mc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.mc-brand { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 3px; line-height: 1; }
.mc-brand small { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: .62rem; letter-spacing: 4px; color: var(--lime); margin-top: 4px; }
.mc-top img { width: 46px; height: 46px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.mc-points { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.8rem, 7vw, 3.8rem); line-height: 1; letter-spacing: 2px; }
.mc-points .pts-label { font-family: 'Barlow Condensed', sans-serif; font-size: .8rem; letter-spacing: 3px; color: rgba(240,244,255,.75); margin-left: 6px; }
.mc-bottom { display: flex; justify-content: space-between; align-items: flex-end; font-family: 'Barlow Condensed', sans-serif; letter-spacing: 2px; text-transform: uppercase; font-size: .78rem; }
.mc-bottom b { display: block; font-size: 1rem; letter-spacing: 1px; font-weight: 700; }
.mc-chip { width: 42px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #d9f99d, #a3e635 50%, #65a30d); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }

.dash-head .member-card { width: 380px; max-width: 100%; }

/* ---------- SECTIONS ---------- */
.rw-section { max-width: 1180px; margin: 0 auto; padding: 80px 48px; }
.rw-section h2 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: 2px; line-height: 1; margin: 14px 0 18px; }
.rw-section > p.intro { color: #b9c5e0; max-width: 640px; line-height: 1.7; margin-bottom: 40px; }
.band { background: linear-gradient(180deg, transparent, rgba(22,28,42,.7) 20%, rgba(22,28,42,.7) 80%, transparent); }

.earn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--border); border: 1px solid var(--border); }
.earn { background: var(--charcoal); padding: 34px 30px; position: relative; overflow: hidden; transition: background .3s; }
.earn:hover { background: var(--panel); }
.earn .big { font-family: 'Bebas Neue', sans-serif; font-size: 4rem; line-height: 1; letter-spacing: 2px; }
.earn .big small { font-size: .4em; letter-spacing: 3px; color: var(--lime); margin-left: 6px; }
.earn h3 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: 2px; font-size: 1.1rem; margin: 10px 0 8px; }
.earn p { color: var(--gray); line-height: 1.6; font-size: .95rem; }
.earn::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--lime); transition: width .5s; }
.earn:hover::after { width: 100%; }

.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tier {
  position: relative; padding: 28px 24px 24px; background: linear-gradient(160deg, rgba(37,99,200,.18), rgba(10,12,16,.9) 60%);
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; min-height: 230px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.tier:hover { transform: translateY(-6px); border-color: rgba(59,130,246,.6); box-shadow: 0 24px 50px -26px rgba(59,130,246,.8); }
.tier .cost { font-family: 'Bebas Neue', sans-serif; font-size: 3rem; line-height: 1; letter-spacing: 1px; }
.tier .cost small { font-family: 'Barlow Condensed', sans-serif; font-size: .75rem; letter-spacing: 3px; color: var(--gray); margin-left: 4px; }
.tier .name { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 1.25rem; color: var(--lime); }
.tier p { color: var(--gray); font-size: .9rem; line-height: 1.5; flex: 1; }
.tier .meter { height: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.tier .meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-bright), var(--lime)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.tier.ready { border-color: rgba(163,230,53,.55); }
.tier.ready .cost { color: var(--lime); }
.tier button { margin-top: 6px; width: 100%; }

.rsteps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.rstep { border-top: 1px solid var(--border); padding-top: 22px; }
.rstep::before { counter-increment: step; content: "0" counter(step); font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem; color: var(--blue-bright); display: block; margin-bottom: 6px; }
.rstep h3 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: 1.5px; font-size: 1.05rem; margin-bottom: 8px; }
.rstep p { color: var(--gray); font-size: .92rem; line-height: 1.6; }
.callout { margin-top: 36px; padding: 20px 24px; border-left: 3px solid var(--lime); background: rgba(163,230,53,.06); color: #cfd8ea; line-height: 1.6; font-size: .95rem; }

/* ---------- AUTH ---------- */
.auth-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: start; }
.panel { background: rgba(22,28,42,.85); border: 1px solid var(--border); padding: 32px; backdrop-filter: blur(6px); }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tabs button {
  flex: 1; background: none; border: none; color: var(--gray); padding: 12px 8px; cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: 2px; text-transform: uppercase; font-size: .85rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s;
}
.tabs button[aria-selected="true"] { color: var(--white); border-color: var(--lime); }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-family: 'Barlow Condensed', sans-serif; font-size: .74rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gray); }
.form input, .form select, .form textarea {
  width: 100%; background: var(--black); border: 1px solid var(--border); color: var(--white); padding: 13px 14px;
  font-family: 'Barlow', sans-serif; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .hint { font-size: .82rem; color: var(--gray); line-height: 1.5; }
.form .hint a, .link { color: var(--blue-bright); }
.linkbtn { background: none; border: none; color: var(--blue-bright); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.msg { font-size: .9rem; padding: 12px 14px; line-height: 1.5; display: none; }
.msg.show { display: block; }
.msg.error { background: rgba(248,113,113,.1); border-left: 3px solid var(--danger); color: #fecaca; }
.msg.ok { background: rgba(163,230,53,.08); border-left: 3px solid var(--lime); color: #e2f7c3; }
.perks { list-style: none; display: grid; gap: 16px; margin-top: 26px; }
.perks li { display: flex; gap: 14px; color: #cfd8ea; line-height: 1.5; }
.perks li::before { content: "✦"; color: var(--lime); }

/* ---------- DASHBOARD ---------- */
.dash { max-width: 1180px; margin: 0 auto; padding: 60px 48px 40px; }
.dash-head { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; margin-bottom: 50px; }
.dash-head h1 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: 2px; line-height: .95; margin: 12px 0 14px; }
.next-reward { color: #b9c5e0; max-width: 480px; line-height: 1.6; }
.progress { height: 8px; background: rgba(255,255,255,.07); margin: 16px 0 6px; max-width: 480px; overflow: hidden; position: relative; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-bright), var(--lime)); transition: width 1.4s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 18px rgba(163,230,53,.5); }
.dash-head .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.dash-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; }
.dash-grid .full { grid-column: 1 / -1; }
.box { background: rgba(17,21,32,.9); border: 1px solid var(--border); padding: 26px; }
.box h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 2.5px; font-size: 1rem; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.box h2 small { color: var(--gray); font-weight: 500; letter-spacing: 1px; text-transform: none; font-size: .85rem; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--border); border: 1px solid var(--border); margin-bottom: 24px; }
.stat { background: var(--charcoal); padding: 20px 22px; }
.stat b { display: block; font-family: 'Bebas Neue', sans-serif; font-size: 2.3rem; font-weight: 400; letter-spacing: 1px; line-height: 1; }
.stat span { font-family: 'Barlow Condensed', sans-serif; font-size: .72rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gray); }

.ledger { width: 100%; border-collapse: collapse; font-size: .93rem; }
.ledger th { text-align: left; font-family: 'Barlow Condensed', sans-serif; font-weight: 500; font-size: .7rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gray); padding: 0 10px 10px 0; border-bottom: 1px solid var(--border); }
.ledger td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger td.pts { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; letter-spacing: 1px; text-align: right; white-space: nowrap; }
.ledger th.r { text-align: right; }
.pos { color: var(--lime); }
.neg { color: #93b4ef; }
.scroll { max-height: 440px; overflow: auto; }

.code-card { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.code-card:last-child { border-bottom: none; }
.code { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; letter-spacing: 3px; color: var(--lime); }
.code-card .meta { color: var(--gray); font-size: .85rem; }
.pill { font-family: 'Barlow Condensed', sans-serif; font-size: .68rem; letter-spacing: 2px; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--border); color: var(--gray); white-space: nowrap; }
.pill.issued, .pill.qualified { color: var(--lime); border-color: rgba(163,230,53,.45); }
.pill.used, .pill.approved { color: #93b4ef; border-color: rgba(59,130,246,.45); }
.pill.cancelled, .pill.rejected, .pill.voided { color: #fca5a5; border-color: rgba(248,113,113,.4); }
.mini { font-family: 'Barlow Condensed', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; font-size: .75rem; padding: 8px 14px; background: transparent; color: var(--white); border: 1px solid var(--border); cursor: pointer; transition: border-color .2s, background .2s; text-decoration: none; display: inline-block; }
.mini:hover { border-color: var(--blue-bright); background: rgba(59,130,246,.1); }
.mini.lime { border-color: rgba(163,230,53,.5); color: var(--lime); }
.mini.danger { border-color: rgba(248,113,113,.4); color: #fca5a5; }

.ref-link { display: flex; gap: 0; margin: 8px 0 14px; }
.ref-link input { flex: 1; min-width: 0; background: var(--black); border: 1px solid var(--border); border-right: none; color: var(--white); padding: 12px 14px; font-size: .9rem; }
.ref-link button { border: none; }
.empty { color: var(--gray); font-size: .92rem; padding: 18px 0; line-height: 1.6; }
.skeleton { height: 14px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin: 10px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; background: rgba(5,7,10,.78); backdrop-filter: blur(6px); padding: 20px; }
.modal.open { display: grid; animation: fade .25s ease; }
.modal .panel { max-width: 480px; width: 100%; animation: rise .35s cubic-bezier(.2,.8,.2,1); }
.modal h3 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 2.2rem; letter-spacing: 2px; margin-bottom: 10px; }
.modal p { color: #b9c5e0; line-height: 1.6; margin-bottom: 14px; }
.modal .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }

.toast { opacity: 0; visibility: hidden; position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 140%); z-index: 400; background: var(--panel); border: 1px solid rgba(163,230,53,.5); color: var(--white); padding: 12px 20px; font-size: .9rem; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.hero-in > * { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.hero-in > *:nth-child(2) { animation-delay: .08s; }
.hero-in > *:nth-child(3) { animation-delay: .16s; }
.hero-in > *:nth-child(4) { animation-delay: .24s; }

.fine { color: var(--gray); font-size: .82rem; line-height: 1.7; }
.fine li { margin-left: 18px; margin-bottom: 4px; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .rsteps { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .rw-hero { grid-template-columns: 1fr; padding: 44px 20px 60px; gap: 46px; }
  .member-card { transform: none; }
  .rw-section { padding: 56px 20px; }
  .earn-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; gap: 30px; }
  .dash { padding: 36px 20px 30px; }
  .dash-head { grid-template-columns: 1fr; gap: 30px; }
  .dash-head .card-stage { justify-content: flex-start; }
  .dash-head .member-card { width: 100%; }
  .dash-head > *, .dash-grid > * { min-width: 0; }
  .panel { padding: 24px 20px; }
}
@media (max-width: 540px) {
  .tiers, .rsteps { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .box { padding: 20px 16px; }
  .ledger td.date { white-space: nowrap; font-size: .8rem; }
}
