/* ===========================================================
   PayBun — fresh identity, Apple-minimal design system
   Shared across index.html and product.html
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');

:root {
  /* Palette */
  --ink:        #303c42;
  --ink-soft:   #283036;
  --gray-900:   #2B2B30;
  --gray-700:   #54545C;
  --gray-500:   #86868B;
  --gray-300:   #C9C9CE;
  --gray-150:   #E6E6E8;
  --gray-100:   #F0F0EF;
  --paper:      #FFFFFF;
  --canvas:     #FAFAF8;

  /* Accent — warm honey/amber nods to "Bun" + enterprise warmth */
  --honey:      #E2902B;
  --honey-deep: #C0741A;
  --honey-tint: #FBF1E2;

  /* Typography */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 60px;

  --shadow-sm: 0 1px 2px rgba(11,11,13,.05), 0 4px 14px rgba(11,11,13,.05);
  --shadow-md: 0 10px 40px rgba(11,11,13,.08);
  --shadow-lg: 0 30px 80px rgba(11,11,13,.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  letter-spacing: -0.011em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Type scale ---------- */
.display {
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.025em; font-weight: 700; }
.h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
.h3 { font-size: 1.32rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.lead { font-size: clamp(1.12rem, 1.6vw, 1.4rem); line-height: 1.45; color: var(--gray-700); font-weight: 400; }
.body { font-size: 1.06rem; color: var(--gray-700); line-height: 1.6; }
.small { font-size: .92rem; color: var(--gray-500); }

.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--honey-deep);
  margin-bottom: 1.1rem;
}
.eyebrow.on-dark { color: var(--honey); }

.accent { color: var(--honey-deep); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(72px, 11vw, 140px) 0; }
.section.tight { padding: clamp(54px, 7vw, 88px) 0; }
.center { text-align: center; }
.muted-bg { background: var(--canvas); }
.dark-bg { background: var(--ink); color: var(--paper); }
.dark-bg .lead, .dark-bg .body { color: rgba(255,255,255,.66); }

.maxread { max-width: 720px; }
.center .maxread { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  padding: .82rem 1.5rem; border-radius: 980px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--honey); color: var(--ink); }
.btn-accent:hover { background: var(--honey-deep); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--gray-300); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.dark-bg .btn-ghost, .cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.dark-bg .btn-ghost:hover, .cta-band .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-arrow::after { content: "→"; transition: transform .2s ease; }
.btn-arrow:hover::after { transform: translateX(4px); }

.link-arrow { color: var(--honey-deep); font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow::after { content: "→"; transition: transform .2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--gray-150);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 38px; width: auto; display: block; }
.footer .brand-logo { height: 42px; }
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-group { position: relative; }
.nav-top, .nav-top-link {
  font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--gray-700);
  background: none; border: 0; cursor: pointer; padding: .5rem .7rem; border-radius: 8px;
  display: inline-flex; align-items: center; gap: .35rem; transition: color .15s ease;
}
.nav-top:hover, .nav-top-link:hover, .nav-top-link.active, .nav-group.active .nav-top { color: var(--ink); }
.caret { width: 6px; height: 6px; border: solid var(--gray-500); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg) translateY(-1px); transition: transform .2s ease; }
.nav-group:hover .caret, .nav-group:focus-within .caret { transform: rotate(45deg) translateY(1px); }
/* invisible bridge so the menu doesn't close in the gap on hover */
.nav-group::before { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 10px; }
.nav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 212px;
  background: #fff; border: 1px solid var(--gray-150); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 8px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu { opacity: 1; visibility: visible; transform: none; }
.nav-menu a { font-size: .92rem; font-weight: 500; color: var(--gray-700); padding: .55rem .7rem; border-radius: 9px; white-space: nowrap; }
.nav-menu a:hover { background: var(--canvas); color: var(--ink); }
.nav-menu a.active { color: var(--honey-deep); }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-cta .btn { font-size: .88rem; padding: .5rem 1.05rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: .25s; }

/* ---------- Grid utilities ---------- */
.grid { display: grid; gap: 26px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* compliance scheme grid (5 across) */
.comp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
@media (max-width: 940px) { .comp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .comp-grid { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--gray-150);
  border-radius: var(--radius);
  padding: 34px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gray-300); }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--honey-tint); color: var(--honey-deep);
  display: grid; place-items: center; margin-bottom: 20px;
}
.card .ic svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--gray-700); font-size: 1rem; line-height: 1.55; }

.card.on-dark { background: #3a4750; border-color: #4d5b65; }
.card.on-dark p { color: rgba(255,255,255,.62); }
.card.on-dark .ic { background: rgba(226,144,43,.14); color: var(--honey); }

/* ---------- Hero ---------- */
.hero { padding: clamp(70px, 10vw, 130px) 0 clamp(40px, 6vw, 70px); position: relative; }
.hero .wrap { position: relative; z-index: 2; }
.hero-glow {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 8%, rgba(226,144,43,.12), transparent 70%),
    radial-gradient(50% 40% at 10% 30%, rgba(226,144,43,.07), transparent 70%);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-actions.center { justify-content: center; }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat .num { font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 700; letter-spacing: -0.03em; }
.stat .num .accent { font-family: var(--sans); }
.stat .lbl { color: var(--gray-500); font-size: .95rem; margin-top: 4px; }

/* ---------- Module showcase rows ---------- */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.row.flip .row-media { order: -1; }
.row + .row { margin-top: clamp(60px, 8vw, 120px); }
.row-media {
  border-radius: var(--radius); overflow: hidden;
  background: var(--canvas); border: 1px solid var(--gray-150);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}
.tag {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: var(--honey-deep); background: var(--honey-tint);
  padding: .3rem .7rem; border-radius: 999px; margin-bottom: 14px;
}
.feature-list { list-style: none; margin-top: 22px; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--gray-700); font-size: 1.02rem; }
.feature-list .ck {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--honey-tint); color: var(--honey-deep);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; margin-top: 1px;
}

/* ---------- Mock UI panels (used inside .row-media) ---------- */
.mock { width: 100%; height: 100%; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.mock-bar { display: flex; align-items: center; gap: 8px; }
.mock-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--gray-300); }
.mock-dot.r { background: #f0a8a0; } .mock-dot.y { background: #f2cf81; } .mock-dot.g { background: #a8d8a8; }
.mock-card { background: #fff; border: 1px solid var(--gray-150); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-sm); }
.mock-rowline { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--gray-100); font-size: .9rem; }
.mock-rowline:last-child { border-bottom: 0; }
.mock-pill { font-size: .72rem; font-weight: 600; padding: .18rem .6rem; border-radius: 999px; background: var(--honey-tint); color: var(--honey-deep); }
.mock-pill.ok { background: #e6f4ea; color: #1f7a3d; }
.mock-bars { display: flex; align-items: flex-end; gap: 10px; height: 90px; }
.mock-bars span { flex: 1; background: linear-gradient(180deg, var(--honey), var(--honey-deep)); border-radius: 6px 6px 0 0; opacity: .85; }
.muted-line { height: 9px; border-radius: 999px; background: var(--gray-150); }

/* ---------- Device / partner cards ---------- */
.device-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: .24rem .65rem; border-radius: 999px; background: var(--honey-tint); color: var(--honey-deep);
  text-transform: uppercase; margin-bottom: 14px;
}
.spec-list { list-style: none; margin-top: 16px; border-top: 1px solid var(--gray-150); }
.spec-list li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--gray-100); font-size: .92rem; }
.spec-list li span { color: var(--gray-500); }
.spec-list li strong { font-weight: 600; text-align: right; }
.device-code { font-size: .9rem; color: var(--gray-500); font-weight: 600; }

/* ---------- Flow diagram ---------- */
.flow-diagram {
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 30px 30px 22px;
  background-image: radial-gradient(60% 80% at 50% 0%, rgba(226,144,43,.12), transparent 70%);
}
.flow-diagram svg { width: 100%; height: auto; display: block; }
.flow-caption { text-align: center; color: rgba(255,255,255,.55); font-size: .95rem; margin-top: 14px; }

/* ---------- Steps / how it works ---------- */
.steps { counter-reset: step; display: grid; gap: 28px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 22px; align-items: start; }
.step .n {
  counter-increment: step; width: 56px; height: 56px; border-radius: 16px;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 700;
}
.step .n::before { content: counter(step); }
.step h3 { margin-bottom: 6px; }

/* ---------- Clients ---------- */
.clients { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 52px; }
.client-chip {
  font-weight: 600; color: var(--gray-500); font-size: 1.05rem;
  padding: 14px 26px; border: 1px solid var(--gray-150); border-radius: 12px;
  background: var(--paper); letter-spacing: -0.01em;
}
.client-logo { display: inline-flex; align-items: center; justify-content: center; height: 48px; }
.client-logo img {
  max-height: 48px; max-width: 150px; width: auto; object-fit: contain;
  filter: grayscale(1); opacity: .6; transition: filter .2s ease, opacity .2s ease;
}
.client-logo:hover img { filter: grayscale(0); opacity: 1; }
.client-logo b { display: none; font-weight: 600; color: var(--gray-500); font-size: 1.05rem; letter-spacing: -0.01em; }

/* ---------- Certification card ---------- */
.cert-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 0;
  max-width: 880px; margin: 0 auto;
  border: 1px solid var(--gray-150); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-md); background: var(--paper);
}
.cert-badge {
  background: var(--ink); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center;
}
.cert-badge svg { width: 54px; height: 54px; color: var(--honey); }
.cert-badge span { font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
.cert-body { padding: 32px 34px; }
.cert-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin-bottom: 26px; }
.cert-meta > div { display: flex; flex-direction: column; gap: 2px; }
.cert-meta span { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); }
.cert-meta strong { font-size: .98rem; font-weight: 600; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 680px) {
  .cert-card { grid-template-columns: 1fr; }
  .cert-badge { flex-direction: row; padding: 22px; }
  .cert-meta { grid-template-columns: 1fr; }
}

/* ---------- Testimonials ---------- */
.quote { background: var(--paper); border: 1px solid var(--gray-150); border-radius: var(--radius); padding: 32px; }
.quote p { font-size: 1.08rem; line-height: 1.55; color: var(--gray-900); }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.quote .av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--honey), var(--honey-deep)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.quote .who .nm { font-weight: 600; font-size: .98rem; } .quote .who .rl { color: var(--gray-500); font-size: .86rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; border-radius: 28px; padding: clamp(48px, 7vw, 84px); text-align: center; position: relative; overflow: hidden; }
.cta-band .glow { position: absolute; inset: 0; background: radial-gradient(50% 80% at 50% 0%, rgba(226,144,43,.22), transparent 70%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band .lead { color: rgba(255,255,255,.7); }

/* ---------- Footer ---------- */
.footer { background: var(--canvas); border-top: 1px solid var(--gray-150); padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-500); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a { color: var(--gray-700); font-size: .95rem; }
.footer ul a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--gray-150); color: var(--gray-500); font-size: .88rem; }

/* ---------- Forms / contact ---------- */
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field label { font-size: .86rem; font-weight: 600; color: var(--gray-900); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: .8rem .95rem; border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  background: var(--paper); transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--gray-300); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(226,144,43,.16);
}
.form-ok {
  margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: #e6f4ea; color: #1f7a3d; font-size: .95rem; font-weight: 500;
}
.form-err {
  margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: #fdecec; color: #b53a2a; font-size: .95rem; font-weight: 500;
}

.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--gray-150); }
.contact-item:last-of-type { border-bottom: 0; }
.contact-item .ic {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
  background: var(--honey-tint); color: var(--honey-deep); display: grid; place-items: center;
}
.contact-item .ic svg { width: 22px; height: 22px; }
.contact-item .ci-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); font-weight: 600; margin-bottom: 3px; }
.contact-item a { font-weight: 600; }
.contact-item a:hover { color: var(--honey-deep); }

/* ---------- Updates / release notes ---------- */
.mod-tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  color: var(--honey-deep); background: var(--honey-tint);
  padding: .22rem .6rem; border-radius: 999px; text-transform: uppercase;
}
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  padding: .22rem .6rem; border-radius: 999px;
}
.badge.enh { background: #e6f4ea; color: #1f7a3d; }
.badge.bug { background: #fdeee0; color: #b5641a; }
.ver { font-size: .82rem; font-weight: 600; color: var(--gray-500); font-variant-numeric: tabular-nums; }

/* major-update spotlight */
.spotlight {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 0;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--gray-150); box-shadow: var(--shadow-lg);
}
.spotlight-main { background: var(--honey-tint); padding: clamp(30px,4vw,52px); }
.spotlight-main .badge-new {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--honey-deep);
  background: #fff; border: 1px solid var(--gray-150); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 18px;
}
.spotlight-main h2 { margin-bottom: 12px; }
.spotlight-main p { color: var(--gray-700); font-size: 1.05rem; line-height: 1.6; }
.spotlight-side {
  background: linear-gradient(150deg, var(--honey), var(--honey-deep)); color: #fff;
  padding: clamp(30px,4vw,52px); display: flex; flex-direction: column; justify-content: center;
}
.spotlight-side .s-label { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-bottom: 16px; }
.spotlight-rate { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.25); }
.spotlight-rate:last-child { border-bottom: 0; }
.spotlight-rate .pct { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.spotlight-rate .ph { font-size: .9rem; opacity: .9; }
@media (max-width: 820px) { .spotlight { grid-template-columns: 1fr; } }

/* featured */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feat-card {
  background: var(--paper); border: 1px solid var(--gray-150); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gray-300); }
.feat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.feat-card h3 { margin-bottom: 10px; }
.feat-card p { color: var(--gray-700); font-size: .98rem; line-height: 1.55; flex: 1; }
.feat-date { margin-top: 18px; color: var(--gray-500); font-size: .85rem; }

/* filter chips */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 44px; }
.chip {
  font-family: var(--sans); font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--gray-300);
  background: var(--paper); color: var(--gray-700); transition: all .15s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* timeline list */
.month-head { display: flex; align-items: baseline; gap: 14px; margin: 40px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-150); }
.month-head h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; }
.month-head span { color: var(--gray-500); font-size: .9rem; }
.rel-list { list-style: none; display: grid; gap: 12px; }
.rel-item {
  display: grid; grid-template-columns: 150px 1fr 90px; gap: 20px; align-items: start;
  background: var(--paper); border: 1px solid var(--gray-150); border-radius: var(--radius-sm);
  padding: 18px 22px; transition: border-color .18s ease, box-shadow .18s ease;
}
.rel-item:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }
.rel-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rel-title { font-weight: 600; font-size: 1.02rem; margin-bottom: 4px; }
.rel-desc { color: var(--gray-700); font-size: .94rem; line-height: 1.5; }
.rel-side { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.rel-date { color: var(--gray-500); font-size: .84rem; }
.rel-empty { text-align: center; color: var(--gray-500); padding: 40px 0; display: none; }

@media (max-width: 760px) {
  .feat-grid { grid-template-columns: 1fr; }
  .rel-item { grid-template-columns: 1fr; gap: 10px; }
  .rel-meta { flex-direction: row; }
  .rel-side { flex-direction: row; justify-content: flex-start; gap: 12px; text-align: left; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 0; align-items: stretch;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--gray-150); padding: 8px 0;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav.open .nav-group { width: 100%; }
  .nav.open .nav-top, .nav.open .nav-top-link {
    width: 100%; justify-content: space-between; padding: 15px 28px; border-radius: 0; font-size: 1rem;
  }
  .nav.open .nav-group::before { display: none; }
  .nav.open .nav-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0; padding: 0 0 6px; margin: 0;
    min-width: 0; background: var(--canvas); display: none;
  }
  .nav.open .nav-group.open .nav-menu { display: flex; }
  .nav.open .nav-group.open .caret { transform: rotate(-135deg) translateY(0); }
  .nav.open .nav-menu a { padding: 12px 40px; }
  .row, .row.flip .row-media { grid-template-columns: 1fr; }
  .row.flip .row-media { order: 0; }
  .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
