/* Cards With Benefits — mycardswithbenefits.com
   Shared styles. Plain static site, no build step. */

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #15171c;
  --muted: #616b78;
  --line: #e7e4dd;
  --gold: #c8a24a;
  --gold-deep: #a8852f;
  --green: #2f9e63;
  --card-1: #1c2128;
  --card-2: #2a313b;
  --radius: 18px;
  --maxw: 980px;
  --shadow: 0 10px 40px rgba(20, 23, 28, 0.10);
  --shadow-sm: 0 4px 18px rgba(20, 23, 28, 0.08);
  font-synthesis: none;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 246, 243, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .name { font-size: 16px; letter-spacing: -0.01em; }
.navlinks { display: flex; gap: 22px; align-items: center; }
.navlinks a { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.navlinks a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) {
  .navlinks { gap: 15px; }
  .navlinks a { font-size: 13px; }
  .brand .name { display: none; }
}

/* ---------- CWB monogram chip ---------- */
.chip {
  width: 34px; height: 26px; flex: 0 0 auto;
  border-radius: 6px;
  background: linear-gradient(135deg, #e9c878 0%, var(--gold) 45%, var(--gold-deep) 100%);
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px;
  padding: 5px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
.chip span { background: rgba(20,23,28,0.22); border-radius: 1.5px; }
.chip.lg { width: 52px; height: 40px; border-radius: 9px; padding: 7px; gap: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn[disabled], .btn.coming { opacity: 0.55; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--gold-deep);
  background: rgba(200,162,74,0.12); padding: 6px 13px; border-radius: 999px;
}
h1 {
  font-size: clamp(34px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.025em;
  margin: 20px auto 14px; max-width: 14ch; font-weight: 700;
}
.lede { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 56ch; margin: 0 auto 30px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* phone mock card */
.showcase { margin: 54px auto 0; max-width: 360px; }
.phonecard {
  aspect-ratio: 1.586; border-radius: 22px;
  background: linear-gradient(135deg, var(--card-1), var(--card-2));
  color: #fff; padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.phonecard::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 80% -10%, rgba(200,162,74,0.25), transparent 55%);
}
.phonecard .top { display: flex; justify-content: space-between; align-items: flex-start; }
.phonecard .label { font-size: 12px; letter-spacing: 0.08em; opacity: 0.7; text-transform: uppercase; }
.phonecard .bignum { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.16); overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; width: 72%; background: linear-gradient(90deg, var(--gold), #e9c878); }

/* ---------- Sections ---------- */
section.block { padding: 56px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; text-align: center; margin: 0 0 10px; }
.sub { text-align: center; color: var(--muted); max-width: 54ch; margin: 0 auto 40px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
section.alt .feature { background: var(--bg); }
.feature .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(200,162,74,0.14); color: var(--gold-deep); font-size: 20px; margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Article / legal pages ---------- */
.article { padding: 56px 0 24px; max-width: 760px; }
.article h1 { text-align: left; font-size: clamp(30px, 5vw, 42px); margin: 0 0 6px; max-width: none; }
.article .updated { color: var(--muted); font-size: 14px; margin-bottom: 36px; }
.article h2 { font-size: 22px; letter-spacing: -0.01em; margin: 38px 0 10px; }
.article h3 { font-size: 17px; margin: 24px 0 6px; }
.article p, .article li { color: #2b313b; font-size: 16.5px; }
.article ul { padding-left: 20px; }
.article li { margin: 6px 0; }
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 12px; padding: 16px 18px; margin: 22px 0; box-shadow: var(--shadow-sm);
}
.callout p { margin: 0; }

/* FAQ */
.faq { max-width: 760px; }
details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 4px 20px; margin: 12px 0; box-shadow: var(--shadow-sm);
}
details[open] { box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 600; font-size: 17px; padding: 16px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 22px; color: var(--gold-deep); font-weight: 400; }
details[open] summary::after { content: "\2013"; }
details .body { padding: 0 0 18px; color: var(--muted); font-size: 16px; }

/* contact */
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); max-width: 560px; margin-top: 24px;
}
.contact-card .email { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 30px; color: var(--muted); }
.foot { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--muted); font-size: 14px; }
.foot a:hover { color: var(--ink); text-decoration: none; }
.foot .links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot .legal { font-size: 13px; max-width: 60ch; }

.center { text-align: center; }
.mt { margin-top: 28px; }

/* ====================================================================
   Additions for Story / Wallet / Calculator + Share + Coffee.
   Uses existing :root tokens only. Appended — no existing rules changed.
   ==================================================================== */

/* Story page eyebrow sits above the left-aligned article h1 */
.article .eyebrow { margin-bottom: 14px; }
.story p { margin: 0 0 18px; }
.story .signoff { font-weight: 600; color: var(--ink); margin-top: 26px; }

/* Low-key "buy me a coffee" support link */
.coffee { margin-top: 40px; font-size: 15px; color: var(--muted); }
.coffee a { font-weight: 600; }

/* Share button confirmation text */
.share-done { font-size: 13px; font-weight: 600; color: var(--green); }
.share-done:empty { display: none; }

/* ---------- Wallet ---------- */
.wallet-list { display: grid; gap: 18px; margin-top: 26px; }
.wallet-card { padding: 24px 26px; }
.wallet-card h3 { margin: 0 0 2px; font-size: 20px; }
.wallet-issuer {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold-deep); font-weight: 600; margin-bottom: 14px;
}
.wallet-card p { color: #2b313b; font-size: 15.5px; margin: 0 0 10px; }
.wallet-card .wallet-math {
  color: var(--muted); font-size: 14.5px; font-style: italic;
  border-left: 3px solid var(--gold); padding-left: 12px; margin: 4px 0 18px;
}
.wallet-learn { margin-top: 4px; }
.wallet-disclosure {
  margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}

/* ---------- Calculator ---------- */
.calc-tiles {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 26px;
}
@media (max-width: 520px) { .calc-tiles { grid-template-columns: 1fr; } }
.calc-tile {
  text-align: left; cursor: pointer; width: 100%; font: inherit; color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.calc-tile h3 { margin: 0 0 2px; font-size: 17px; }
.calc-tile-issuer {
  font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 12px;
}
.calc-tile-total { font-size: 15px; font-weight: 700; color: var(--ink); }
.calc-tile.is-selected {
  border-color: var(--gold); box-shadow: 0 0 0 2px rgba(200,162,74,0.35), var(--shadow-sm);
  background: rgba(200,162,74,0.07);
}
.calc-tile.is-selected .calc-tile-total { color: var(--gold-deep); }

/* Big-number dark accent panel — reuses .phonecard motif */
.calc-total { max-width: 420px; margin: 30px 0 0; }
.calc-total .bignum { font-size: clamp(34px, 9vw, 46px); }

/* Per-card breakdown */
.calc-breakdown { margin-top: 20px; }
.calc-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 2px; border-bottom: 1px solid var(--line);
}
.calc-line-name { color: var(--ink); font-weight: 500; }
.calc-line-amt { color: var(--gold-deep); font-weight: 700; white-space: nowrap; }
.calc-hint { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.calc-disclaimer { color: var(--muted); font-size: 13px; margin-top: 24px; }


/* ---------- Homepage "what's left" benefit peek ---------- */
.benefit-peek {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--card-1), var(--card-2));
  border-radius: 18px; padding: 18px 20px; color: #fff;
  box-shadow: var(--shadow-sm); text-align: left;
}
.bp-head { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 10px; }
.bp-list { list-style: none; margin: 0; padding: 0; }
.bp { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 15px; }
.bp:last-child { border-bottom: none; }
.bp-ic { width: 20px; height: 20px; border-radius: 999px; flex: 0 0 auto; display: grid; place-items: center; font-size: 12px; line-height: 1; }
.bp.done .bp-ic { background: #c8a24a; color: #1c2128; font-weight: 700; }
.bp.open .bp-ic { border: 2px solid rgba(233,200,120,0.55); }
.bp-name { flex: 1; }
.bp.done .bp-name { color: rgba(255,255,255,0.4); }
.bp.open .bp-name { color: #fff; }
.bp-amt { font-weight: 700; color: #e9c878; }
.bp-used { font-size: 12px; color: rgba(255,255,255,0.35); font-weight: 500; }
.bp-foot { margin-top: 12px; font-size: 13.5px; font-weight: 600; color: #e9c878; }


/* ---------- Shared nav: responsive hamburger ---------- */
header.site#site-header:empty { min-height: 65px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px;
  cursor: pointer; flex: 0 0 auto; width: 40px; height: 40px; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 4px auto;
  background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
@media (max-width: 640px) {
  .brand .name { display: inline; }
  .nav-toggle { display: block; }
  .navlinks {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(247,246,243,0.98);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 4px 22px 14px;
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    transition: max-height .25s ease, opacity .2s ease;
  }
  header.site.nav-open .navlinks { max-height: 340px; opacity: 1; pointer-events: auto; }
  .navlinks a { font-size: 16px; padding: 11px 0; width: 100%; }
  header.site.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  header.site.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  header.site.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}


/* ---------- Interactive hero demo ---------- */
#demo { position: relative; }
.bp-list { display: flex; flex-direction: column; }
button.bp {
  width: 100%; background: none; border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; margin: 0; border-radius: 8px; transition: background .15s;
}
button.bp:last-child { border-bottom: none; }
button.bp:hover { background: rgba(255,255,255,0.06); }
button.bp:focus-visible { outline: 2px solid #e9c878; outline-offset: 2px; }
.bp-right { margin-left: auto; }
.bp.open .bp-right { font-weight: 700; color: #e9c878; }
.bp.done .bp-right { font-size: 12px; color: rgba(255,255,255,0.4); font-weight: 500; }
.bp .bp-ic { transition: background .2s, border-color .2s, transform .2s; }
.bp.just-captured .bp-ic { animation: bp-pop .35s ease; }
@keyframes bp-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.bp-hint { font-size: 12.5px; color: #b89243; font-weight: 600; margin: -2px 0 10px; transition: opacity .3s; }
.progress { position: relative; }
.progress > i { transition: width .55s cubic-bezier(.22,1,.36,1); }
.progress .fee-tick { position: absolute; top: -2px; bottom: -2px; left: 32%; width: 2px; background: rgba(255,255,255,0.5); border-radius: 2px; }
.phonecard.celebrate { animation: pc-pulse .7s ease; }
@keyframes pc-pulse { 0%,100% { transform: scale(1); } 35% { transform: scale(1.025); box-shadow: 0 18px 55px rgba(200,162,74,0.45); } }
.confetti-piece { position: absolute; top: 38%; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; z-index: 3; }
@keyframes confetti-fall { 0% { opacity: 1; transform: translate(0,0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx,0), var(--dy,120px)) rotate(var(--rot,180deg)); } }
@media (prefers-reduced-motion: reduce) {
  .bp .bp-ic, .progress > i, .bp-hint { transition: none; }
  .bp.just-captured .bp-ic, .phonecard.celebrate { animation: none; }
  .confetti-piece { display: none; }
}


/* ---------- Ko-fi support button ---------- */
.btn-coffee { background: var(--gold); color: #15171c; border-color: var(--gold); }
.btn-coffee:hover { background: var(--gold-deep); color: #fff; }
p.coffee { margin-top: 26px; }


/* ---------- Wallet: real cards ---------- */
.wallet-tier { margin: 40px 0 14px; }
.wallet-card { margin: 0 0 16px; }
.wallet-blurb { margin: 0; color: #2b313b; font-size: 16px; line-height: 1.65; }
.wallet-learn { margin-top: 14px; }
.wallet-disclosure { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

/* Trust line under the hero lede + calculator fine print */
.verify-line { font-size: 14px; color: var(--muted); margin: -16px auto 26px; max-width: 56ch; }
.verify-line .tick { color: var(--gold-deep); font-weight: 700; }
