/* ==========================================================================
   BigPin — shared stylesheet (index.html, mypage.html)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Noto+Sans+KR:wght@400;500;700;800;900&display=swap');

:root {
  /* brand */
  --blue: #1859ff;
  --blue-dark: #0f3fc7;
  --blue-soft: #eaf0ff;
  --navy: #12141c;
  --navy-soft: #1c1f2b;
  --purple: #8b2ff0;
  --purple-soft: #f3e8ff;
  --green: #16a34a;

  /* neutrals */
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --border: #e7e9f0;
  --text: #14151c;
  --text-muted: #61667a;
  --text-faint: #9297a8;
  --white: #ffffff;

  /* layout */
  --header-h: 64px;
  --bottom-nav-h: 76px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  padding-top: var(--header-h);
  padding-bottom: var(--bottom-nav-h);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.num { font-family: 'Space Grotesk', 'Noto Sans KR', sans-serif; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  border: none;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }
.btn-purple { background: var(--purple); color: white; }
.btn-disabled { background: var(--bg-alt); color: var(--text-faint); border: 1px solid var(--border); cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { height: 44px; font-size: 14px; padding: 0 18px; }

/* ---------------- Logo ---------------- */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(160deg, #2a6bff 0%, var(--navy) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.logo-mark span {
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 8px;
  letter-spacing: -0.02em;
}
.logo-word {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.logo-word b { color: var(--blue); font-weight: 700; }

.app-icon {
  width: 120px;
  height: 120px;
  border-radius: 30px;
  background: linear-gradient(160deg, #2a6bff 0%, var(--navy) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px -16px rgba(24, 89, 255, 0.45);
  margin: 0 auto;
}
.app-icon span {
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
}

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 40;
  display: flex;
  align-items: center;
}
.site-header .wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

/* ---------------- Bottom nav (fixed, always visible) ---------------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--bottom-nav-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-inner {
  width: 100%;
  max-width: var(--max);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  width: 56px;
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-item.active { color: var(--blue); }
.nav-cta {
  flex: 1;
  max-width: 420px;
}

.icon { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 56px 0 40px;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: 0;
}
.hero-blob.a { width: 320px; height: 320px; background: #6d9bff; top: -80px; left: -100px; }
.hero-blob.b { width: 260px; height: 260px; background: #b3c8ff; bottom: -60px; right: -80px; }
.hero .wrap { position: relative; z-index: 1; }
.hero-content { text-align: center; max-width: 560px; margin: 0 auto; }
.hero h1 {
  font-size: 34px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.hero p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 28px;
}
.hero-visual { margin: 32px auto 0; max-width: 320px; }
.rate-badge {
  background: var(--navy);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.rate-badge .rate-label { font-size: 13px; color: #aab1c9; margin-bottom: 6px; }
.rate-badge .rate-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 56px;
  font-weight: 700;
  color: #6d9bff;
  line-height: 1;
}
.rate-badge .rate-num span { font-size: 24px; vertical-align: top; }
.rate-badge .rate-sub { font-size: 12px; color: #aab1c9; margin-top: 6px; }

/* ---------------- Marquee (ticker) ---------------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.marquee-track {
  display: inline-flex;
  gap: 28px;
  animation: scroll-left 22s linear infinite;
}
.marquee-track span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-faint);
  opacity: 0.5;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- Feature section ---------------- */
.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 480px; margin: 0 auto 32px; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0 0 10px;
}
.section-head p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.equation .eq-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,0.25);
}
.equation .eq-icon.pin { background: linear-gradient(160deg, #2a6bff, var(--navy)); color: white; flex-direction: column; }
.equation .eq-icon.coupang { background: #ffffff; border: 1px solid var(--border); color: #e2231a; font-family: 'Space Grotesk', sans-serif; }
.equation .eq-sign { font-size: 22px; font-weight: 700; color: var(--text-faint); }
.equation .eq-result { font-size: 26px; }

/* ---------------- Steps ---------------- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 420px;
  margin: 0 auto 24px;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.step-body b { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.step-body span { font-size: 13.5px; color: var(--text-muted); }
.steps-note {
  max-width: 420px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-faint);
}

.phone-mock {
  max-width: 260px;
  margin: 32px auto 0;
  background: var(--navy);
  border-radius: 32px;
  padding: 14px;
  box-shadow: 0 24px 50px -20px rgba(18,20,28,0.4);
}
.phone-mock .screen {
  background: var(--bg-alt);
  border-radius: 20px;
  overflow: hidden;
}
.phone-mock .screen-top {
  background: white;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.phone-mock .amount-card {
  background: var(--navy);
  color: white;
  border-radius: 16px;
  padding: 18px;
  margin: 14px;
  position: relative;
}
.phone-mock .amount-card .amount { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; margin-top: 6px; }
.phone-mock .click-btn {
  margin: 0 14px 16px;
  background: var(--blue);
  color: white;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  position: relative;
}
.phone-mock .click-tag {
  position: absolute;
  top: -14px; right: 8px;
  background: white;
  color: var(--navy);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ---------------- Proof / activity feed ---------------- */
.proof-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto 32px;
}
.proof-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: 0 6px 16px -12px rgba(20,20,30,0.2);
}
.proof-card .badge {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: #fff7d6;
  color: #b8860b;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 13px;
}
.proof-card .proof-text { font-size: 13px; line-height: 1.5; }
.proof-card .proof-text b { color: var(--text); }
.proof-card .proof-amount {
  margin-left: auto;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

/* ---------------- Diagonal marquee ---------------- */
.diagonal-marquee {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 22px 0;
  transform: rotate(-2deg) scale(1.05);
  margin: 64px 0;
}
.diagonal-marquee .marquee-track { animation-duration: 18s; }
.diagonal-marquee .marquee-track span {
  color: rgba(255,255,255,0.55);
  font-size: 16px;
}

/* ---------------- App download ---------------- */
.app-download { text-align: center; }
.store-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
}

/* ---------------- FAQ ---------------- */
.faq-list {
  max-width: 620px;
  margin: 0 auto 32px;
  border-top: 1px solid var(--border);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  color: var(--text);
}
.faq-q .plus {
  flex-shrink: 0;
  width: 20px; height: 20px;
  position: relative;
}
.faq-q .plus::before, .faq-q .plus::after {
  content: '';
  position: absolute;
  background: var(--text-faint);
  transition: transform 0.2s ease;
}
.faq-q .plus::before { top: 9px; left: 2px; width: 16px; height: 2px; }
.faq-q .plus::after { top: 2px; left: 9px; width: 2px; height: 16px; }
.faq-item.open .plus::after { transform: rotate(90deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-item.open .faq-a { max-height: 240px; }
.faq-a p {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 4px 20px;
}
.faq-cta { text-align: center; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--navy);
  color: #aab1c9;
  padding: 40px 0;
}
.site-footer .logo-word { color: white; }
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 18px 0 20px;
  font-size: 13px;
}
.footer-info {
  font-size: 12px;
  line-height: 1.8;
  color: #7c8299;
}

/* ---------------- Mypage: profile card ---------------- */
.mypage-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 28px 0 18px;
}
.profile-card {
  background: linear-gradient(160deg, var(--navy-soft) 0%, var(--navy) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 18px;
}
.profile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.profile-id {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-id .avatar {
  background: var(--blue);
  color: white;
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
}
.profile-id .label { font-size: 11.5px; color: #9aa1ba; }
.profile-id .name { font-size: 14.5px; font-weight: 700; }
.profile-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #cfd3e2;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
.icon-btn svg { width: 14px; height: 14px; }
.saved-label { font-size: 13px; color: #9aa1ba; margin-bottom: 6px; }
.saved-amount { font-family: 'Space Grotesk', sans-serif; font-size: 38px; font-weight: 700; }
.saved-hint { font-size: 12.5px; color: #7c8299; margin-top: 6px; }

.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.stat-card .stat-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 10px;
}
.stat-card .stat-label svg { width: 16px; height: 16px; }
.stat-card .stat-value { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; }
.stat-card .stat-pending { font-size: 12px; color: var(--blue); font-weight: 600; margin: 4px 0 14px; }
.stat-card.cash .stat-value { color: var(--blue); }
.stat-card.point .stat-value { color: var(--purple); }
.stat-card.point .stat-pending { color: var(--purple); }
.stat-card .btn { width: 100%; height: 44px; font-size: 13.5px; }

.tabs {
  display: flex;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 14px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
}
.tab.active { background: white; color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

.history-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 32px;
}
.history-panel .panel-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 24px;
}
.history-panel .panel-head svg { width: 15px; height: 15px; }
.history-empty {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-faint);
  padding: 24px 0;
}

.form-section { margin-bottom: 32px; }
.form-section h3 { font-size: 17px; font-weight: 800; margin: 0 0 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: white;
}
.field input:disabled { background: var(--bg-alt); color: var(--text-muted); }

/* ---------------- Auth modal ---------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18,20,28,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none;
  background: var(--bg-alt);
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
}
.auth-tabs {
  display: flex;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
}
.auth-tab.active { background: white; color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.auth-form .field { margin-bottom: 14px; }
.auth-msg { font-size: 12.5px; margin: -6px 0 14px; display: none; }
.auth-msg.show { display: block; }
.auth-error.show { color: #dc2626; }
.auth-success.show { color: var(--green); }

/* ---------------- Responsive: desktop >= 900px ---------------- */
@media (min-width: 900px) {
  :root { --header-h: 76px; }

  .wrap { padding: 0 40px; }

  .hero { padding: 72px 0 56px; }
  .hero .wrap {
    display: flex;
    align-items: center;
    gap: 56px;
    text-align: left;
  }
  .hero-content { text-align: left; max-width: 480px; margin: 0; flex-shrink: 0; }
  .hero h1 { font-size: 48px; }
  .hero p { font-size: 17px; }
  .hero-visual { flex: 1; max-width: 460px; margin: 0; }
  .rate-badge { padding: 40px; }
  .rate-badge .rate-num { font-size: 72px; }

  .section-head { max-width: 560px; }
  .section-head h2 { font-size: 32px; }
  .section-head p { font-size: 16px; }

  .equation .eq-icon { width: 72px; height: 72px; }

  .steps { flex-direction: row; max-width: none; gap: 28px; }
  .step { flex-direction: column; align-items: flex-start; flex: 1; }
  .phone-mock { max-width: 280px; }

  .proof-cards { max-width: 480px; }

  .faq-list { max-width: 720px; }

  .mypage-title { font-size: 28px; margin: 40px 0 24px; }
  .profile-card { padding: 36px; }
  .saved-amount { font-size: 46px; }
  .stat-cards { gap: 18px; }

  .form-section { max-width: 620px; }
}

@media (min-width: 1200px) {
  .hero h1 { font-size: 54px; }
}
