/* ==========================================================================
   giffgaff365 · shared design system (AppSumo-inspired)
   Load AFTER nav.css. Tokens + reusable components for every page.
   ========================================================================== */

/* 跨页面导航过渡（Chrome 126+ 支持 same-origin MPA），其它浏览器无回退成本 */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}
::view-transition-old(root) { animation-name: gg-vt-out; }
::view-transition-new(root) { animation-name: gg-vt-in; }
@keyframes gg-vt-out { to { opacity: 0; } }
@keyframes gg-vt-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

:root {
  --brand: #07C160;
  --brand-dark: #05a852;
  --brand-tint: #E8FBF1;
  --lime: #E5FF74;
  --ink: #0A0A0A;
  --ink-2: #333;
  --ink-3: #6B7280;
  --ink-4: #9CA3AF;
  --line: #E5E7EB;
  --line-2: #F1F1F1;
  --bg: #FFFFFF;
  --bg-2: #F7F8F7;
  --danger: #D93737;
  --warn: #F5A623;
  --shadow-brutal: 4px 4px 0 var(--ink);
  --shadow-brutal-lg: 6px 6px 0 var(--ink);
}

/* ---------- reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

/* ---------- container ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 960px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) {
  .container, .container-sm, .container-md { padding: 0 16px; }
}

/* ---------- section ---------- */
section.sec { padding: 72px 0; }
section.sec-sm { padding: 48px 0; }
@media (max-width: 640px) {
  section.sec { padding: 48px 0; }
  section.sec-sm { padding: 32px 0; }
}

/* ---------- typography ---------- */
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 900; }
h2 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 900; }
h3 { font-size: 20px; font-weight: 800; }
h4 { font-size: 16px; font-weight: 700; }
p.lead { font-size: 18px; color: var(--ink-2); line-height: 1.6; }
p { line-height: 1.7; color: var(--ink-2); }
@media (max-width: 640px) { p.lead { font-size: 16px; } }

.eyebrow { display: inline-block; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; padding: 6px 12px; border-radius: 6px; text-transform: uppercase; }
.eyebrow.brand { background: var(--brand-tint); color: var(--brand-dark); }
.eyebrow.lime { background: var(--lime); color: var(--ink); }
.eyebrow.line { background: transparent; color: var(--ink); border: 2px solid var(--ink); padding: 4px 10px; }

.hl { background: var(--lime); padding: 0 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; border-radius: 4px; }
.text-muted { color: var(--ink-3); }
.text-brand { color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; border-radius: 999px; padding: 14px 26px; cursor: pointer;
  border: 2px solid transparent; transition: transform .1s, background .15s, border-color .15s, color .15s;
  font-size: 15px; white-space: nowrap;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #222; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; padding-left: 12px; padding-right: 12px; }
.btn-ghost:hover { background: var(--bg-2); }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- section header ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head .h { flex: 1; min-width: 280px; }
.section-head h2 { margin-bottom: 8px; }
.section-head p { color: var(--ink-3); font-size: 15px; }

/* ---------- hero shell ---------- */
.hero { padding: 64px 0 40px; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 700; background: #fff; color: var(--ink); cursor: pointer; font-family: inherit; }
.chip.active, .chip:hover { background: var(--ink); color: #fff; }
.chip-tint { border-color: var(--line); background: var(--bg-2); color: var(--ink-2); font-weight: 600; }
.chip-tint:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- cards ---------- */
.card { background: #fff; border: 2px solid var(--ink); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-brutal); }
.card-plain { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.card-tint { background: var(--bg-2); border-radius: 16px; padding: 24px; }
.card-hoverable { transition: transform .15s, box-shadow .15s; }
.card-hoverable:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-brutal-lg); }

/* ---------- deal card (AppSumo product card) ---------- */
.deals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .deals { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .deals { grid-template-columns: 1fr; } }

.deal { background: #fff; border: 2px solid var(--ink); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-brutal); transition: transform .15s, box-shadow .15s; }
.deal:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-brutal-lg); }
.deal-media { position: relative; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--brand-tint) 0%, #d4f4e2 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.deal-media .sim { font-size: 96px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.15)); }
.deal-media img { width: 100%; height: 100%; object-fit: cover; }
.deal-badge { position: absolute; top: 14px; left: 14px; background: var(--ink); color: var(--lime); font-size: 11px; font-weight: 900; padding: 6px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.deal-badge.hot { background: var(--brand); color: #fff; }
.deal-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.deal-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 700; }
.deal-title { font-size: 20px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.deal-desc { font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.deal-stars { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.deal-stars .stars { color: var(--warn); letter-spacing: 1px; }
.deal-stars b { color: var(--ink); font-weight: 800; }
.deal-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.deal-price .now { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }
.deal-price .unit { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.deal-price .msrp { font-size: 14px; color: var(--ink-3); text-decoration: line-through; margin-left: auto; }
.deal-cta { display: block; width: 100%; text-align: center; margin-top: 10px; }

/* ---------- trust bar ---------- */
.trustbar { background: var(--bg-2); padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trustbar-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
@media (max-width: 640px) { .trustbar-inner { grid-template-columns: repeat(2, 1fr); } }
.trustbar .num { font-size: 26px; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; }
.trustbar .lb { font-size: 12px; color: var(--ink-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* ---------- features strip (black band) ---------- */
.features-strip { background: var(--ink); color: #fff; padding: 48px 0; }
.features-strip .g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 640px) { .features-strip .g { grid-template-columns: 1fr; gap: 24px; } }
.feat { display: flex; gap: 16px; align-items: flex-start; }
.feat .ico { flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.feat h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; color: #fff; }
.feat p { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
.step { border: 2px solid var(--ink); border-radius: 16px; padding: 22px; background: #fff; position: relative; }
.step .n { font-size: 48px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; margin-bottom: 12px; color: var(--brand); }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* ---------- quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }
.quote { background: var(--bg-2); border-radius: 16px; padding: 24px; }
.quote .qm { font-family: Georgia, serif; font-size: 56px; line-height: 0; color: var(--brand); position: relative; top: 18px; }
.quote p { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-bottom: 16px; }
.quote .who { display: flex; align-items: center; gap: 12px; }
.quote .who .av { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.quote .who .name { font-size: 14px; font-weight: 700; }
.quote .who .meta { font-size: 12px; color: var(--ink-3); }

/* ---------- marquee (auto-scrolling testimonials) ---------- */
.marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 60px, #000 calc(100% - 60px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 60px, #000 calc(100% - 60px), transparent);
}
.marquee__track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: gg-marquee 60s linear infinite;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__track .quote {
  flex: 0 0 340px;
  width: 340px;
  margin: 0;
}
@media (max-width: 640px) {
  .marquee__track .quote { flex: 0 0 280px; width: 280px; }
  .marquee__track { animation-duration: 45s; }
}
@keyframes gg-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- CTA band ---------- */
.band { background: var(--brand); color: #fff; border-radius: 24px; padding: 56px 40px; text-align: center; margin: 32px 0; position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.15), transparent 40%), radial-gradient(circle at 80% 80%, rgba(0,0,0,.15), transparent 40%); pointer-events: none; }
.band > * { position: relative; }
.band h2 { color: #fff; margin-bottom: 12px; }
.band p { color: rgba(255,255,255,.9); font-size: 17px; margin-bottom: 24px; }
.band .btn { background: #fff; color: var(--ink); }
.band .btn:hover { background: var(--ink); color: #fff; }
.band-dark { background: var(--ink); }
.band-dark .btn { background: var(--brand); color: #fff; }
.band-dark .btn:hover { background: #fff; color: var(--ink); }

/* ---------- form controls ---------- */
.field { display: block; margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field label .opt { color: var(--ink-4); font-weight: 400; margin-left: 4px; }
.input, .textarea, .select {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px;
  color: var(--ink); background: #fff; font-family: inherit; -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(7,193,96,.12); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.field-err { color: var(--danger); font-size: 13px; margin-top: 6px; line-height: 1.5; }
.field-hint { color: var(--ink-3); font-size: 12px; margin-top: 6px; line-height: 1.5; }

.qty-row { display: inline-flex; align-items: stretch; }
.qty-row .qty-input { width: 60px; text-align: center; border: 2px solid var(--line); border-left: 0; border-right: 0; font-size: 15px; font-family: inherit; -moz-appearance: textfield; background: #fff; }
.qty-row .qty-input::-webkit-outer-spin-button, .qty-row .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-row .qty-btn { width: 42px; background: var(--bg-2); border: 2px solid var(--line); font-size: 18px; cursor: pointer; user-select: none; font-family: inherit; color: var(--ink); }
.qty-row .qty-btn:first-child { border-radius: 12px 0 0 12px; }
.qty-row .qty-btn:last-child { border-radius: 0 12px 12px 0; }

/* radio-like plan tiles */
.plan-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .plan-tiles { grid-template-columns: 1fr; } }
.plan-tile { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 20px; text-align: left; cursor: pointer; position: relative; transition: border-color .15s, box-shadow .15s; }
.plan-tile:hover { border-color: var(--ink); }
.plan-tile.selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(7,193,96,.15); }
.plan-tile.selected::after { content: "✓"; position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.plan-tile .badge { display: inline-block; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 4px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.plan-tile .badge.brand { background: var(--brand); }
.plan-tile .price { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 4px; }
.plan-tile .price .sym { font-size: 16px; color: var(--ink-3); font-weight: 500; margin-right: 2px; }
.plan-tile .title { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.plan-tile .desc { font-size: 12px; color: var(--ink-3); line-height: 1.55; }

/* ---------- tags / badges ---------- */
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark); }
.tag.dark { background: var(--ink); color: #fff; }
.tag.warn { background: #FFF3D9; color: var(--warn); }
.tag.danger { background: #FEE7E7; color: var(--danger); }
.tag.line { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- table ---------- */
.table-wrap { border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 700; background: var(--bg-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FAFAFA; }

/* ---------- footer ---------- */
footer.site-foot { background: var(--ink); color: rgba(255,255,255,.7); padding: 56px 0 32px; }
footer.site-foot .foot-g { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 640px) { footer.site-foot .foot-g { grid-template-columns: 1fr 1fr; } }
footer.site-foot .foot-brand { font-size: 22px; font-weight: 900; color: #fff; margin-bottom: 12px; letter-spacing: -0.02em; }
footer.site-foot .foot-brand .g { color: var(--brand); }
footer.site-foot .foot-desc { font-size: 13px; line-height: 1.6; max-width: 260px; }
footer.site-foot .foot-col h4 { font-size: 12px; font-weight: 800; color: #fff; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
footer.site-foot .foot-col a { display: block; font-size: 14px; padding: 4px 0; color: rgba(255,255,255,.6); }
footer.site-foot .foot-col a:hover { color: #fff; }
footer.site-foot .foot-b { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,.5); flex-wrap: wrap; gap: 12px; }
footer.site-foot .foot-b a { color: rgba(255,255,255,.5); margin-left: 12px; }
footer.site-foot .foot-b a:hover { color: #fff; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 9999; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: 0 12px 40px rgba(0,0,0,.25);
  animation: toast-in .2s ease;
}
.toast.success { background: var(--brand); }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- utils ---------- */
.stack-1 > * + * { margin-top: 8px; }
.stack-2 > * + * { margin-top: 16px; }
.stack-3 > * + * { margin-top: 24px; }
.stack-4 > * + * { margin-top: 32px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .row-2, .row-3, .row-4 { grid-template-columns: 1fr; } }

.divider { height: 1px; background: var(--line); margin: 24px 0; border: 0; }

/* Print / long-form pages */
.prose { max-width: 780px; margin: 0 auto; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 20px; }
.prose h2 { font-size: 24px; margin: 40px 0 12px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-2); line-height: 1.75; margin-bottom: 12px; font-size: 15px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose blockquote { border-left: 4px solid var(--brand); padding: 6px 16px; margin: 20px 0; background: var(--brand-tint); border-radius: 0 8px 8px 0; }
