/* ===== iRun8 愛跑吧 — Warm Forest Theme ===== */
:root {
  /* Backgrounds — warm cream */
  --bg-deep:    #f4ede0;
  --bg-1:       #ede2cd;
  --bg-2:       #e6d8be;
  --bg-card:    #fbf7ec;
  --bg-card-hi: #ffffff;

  --line:       rgba(80, 64, 40, 0.10);
  --line-2:     rgba(80, 64, 40, 0.18);

  /* Text — warm dark brown */
  --ink-100: #2d2920;
  --ink-80:  #4a4536;
  --ink-60:  #786f5a;
  --ink-40:  #a99d83;
  --ink-30:  #c8bea7;

  /* Primary — forest olive green (sloth's hat) */
  --lime:       #6b8e5f;
  --lime-soft:  #9ab78d;
  --lime-deep:  #3d5530;
  --lime-glow:  transparent;            /* deprecated — no glow */

  /* Secondary — warm brown (sloth body) */
  --violet:       #a87655;
  --violet-deep:  #7a5535;
  --violet-glow:  transparent;          /* deprecated — no glow */

  /* Card system */
  --glass-bg:        #fbf7ec;
  --glass-bg-hi:     #ffffff;
  --glass-border:    rgba(80, 64, 40, 0.10);
  --glass-border-hi: rgba(80, 64, 40, 0.18);
  --glass-blur:      blur(0px);
  --glass-shadow:    0 6px 22px rgba(80, 64, 40, 0.08), 0 1px 0 rgba(255, 255, 255, 0.7) inset;

  --radius-sm: 14px;
  --radius:    20px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --maxw: 1240px;

  --font-cn:        "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-cn-serif:  "Noto Serif TC", "Source Han Serif TC", "PingFang TC", serif;
  --font-en:        "Bebas Neue", "Space Grotesk", -apple-system, system-ui, sans-serif;
  --font-en-alt:    "Space Grotesk", "Inter", -apple-system, system-ui, sans-serif;
  --font-mono:      "JetBrains Mono", "Space Mono", ui-monospace, monospace;
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg-deep);
  color: var(--ink-100);
  font-family: var(--font-cn);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
  /* Subtle paper-like texture using radial gradients */
  background-image:
    radial-gradient(at 20% 0%, rgba(154,183,141,0.18) 0%, transparent 40%),
    radial-gradient(at 80% 100%, rgba(176,133,98,0.14) 0%, transparent 50%);
  background-attachment: fixed;
}

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

/* ===== Soft hill backdrop blobs ===== */
.blob-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.blob--violet {
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(176,133,98,0.18) 0%, transparent 70%);
  top: -200px; right: -160px;
  animation: blob-drift-1 28s ease-in-out infinite;
}
.blob--lime {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(107,142,95,0.20) 0%, transparent 70%);
  bottom: 8%; left: -120px;
  animation: blob-drift-2 36s ease-in-out infinite;
}
.blob--violet-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(176,133,98,0.12) 0%, transparent 70%);
  top: 50%; right: 8%;
  animation: blob-drift-3 22s ease-in-out infinite;
}

@keyframes blob-drift-1 {
  0%,100% { transform: translate(0,   0)    scale(1);    }
  33%      { transform: translate(-55px, 80px)  scale(1.08); }
  66%      { transform: translate(45px, -40px)  scale(0.94); }
}
@keyframes blob-drift-2 {
  0%,100% { transform: translate(0,    0)    scale(1);    }
  40%     { transform: translate(80px, -65px)  scale(1.10); }
  70%     { transform: translate(-45px, 50px)  scale(0.93); }
}
@keyframes blob-drift-3 {
  0%,100% { transform: translate(0,    0);   }
  50%     { transform: translate(-60px,-80px) scale(1.06); }
}

/* ===== Sloth gentle bob (instead of phone-float) ===== */
@keyframes sloth-bob {
  0%,100% { transform: translateY(0)    rotate(0deg); }
  50%     { transform: translateY(-10px) rotate(-1deg); }
}
.phone-float, .sloth-bob { animation: sloth-bob 5.5s ease-in-out infinite; }

@keyframes sloth-wave {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}
.sloth-wave { animation: sloth-wave 3.2s ease-in-out infinite; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .blob, .phone-float, .sloth-bob, .sloth-wave, * { animation: none !important; transition: none !important; }
}

/* ===== Layout ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 100px 0; position: relative; z-index: 1; }
.section--tight { padding: 64px 0; position: relative; z-index: 1; }

/* ===== Eyebrow ===== */
.eyebrow {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime-deep);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px; border-radius: 2px;
  background: var(--lime);
}
.eyebrow.no-line::before { display: none; }

/* ===== Type ===== */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-cn-serif);
  font-weight: 900;
  line-height: 1.20;
  color: var(--ink-100);
}
h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: 0.01em; }
h2 { font-size: clamp(30px, 4.2vw, 50px); letter-spacing: 0.01em; }
h3 { font-size: clamp(20px, 1.9vw, 25px); letter-spacing: 0.02em; font-weight: 700; }
p  { margin: 0; line-height: 1.85; color: var(--ink-80); }

.lime  { color: var(--lime-deep); }
.muted { color: var(--ink-60); }

/* Solid heading accent — no gradient, no glow */
.gradient-lime {
  color: var(--lime-deep);
  -webkit-text-fill-color: var(--lime-deep);
  background: none;
}

.section-title { max-width: 780px; }
.section-sub { color: var(--ink-60); font-size: 17px; margin-top: 18px; max-width: 600px; line-height: 1.85; }

/* ===== Buttons (chunky 3D — like reference) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px;
  border: 2px solid transparent;
  transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .18s;
  white-space: nowrap;
  font-family: var(--font-cn);
  line-height: 1;
  height: 54px;
  position: relative;
}
.btn--primary {
  background: var(--lime);
  color: #fbf7ec;
  border-color: var(--lime-deep);
  box-shadow: 0 4px 0 var(--lime-deep), 0 8px 18px rgba(61,85,48,0.20);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--lime-deep), 0 14px 28px rgba(61,85,48,0.28);
}
.btn--primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--lime-deep);
}
.btn--ghost {
  background: var(--bg-card);
  border-color: var(--line-2);
  color: var(--ink-80);
  box-shadow: 0 3px 0 rgba(80,64,40,0.10);
}
.btn--ghost:hover {
  border-color: var(--lime);
  color: var(--lime-deep);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(80,64,40,0.10);
}
.btn--lg { height: 60px; padding: 20px 36px; font-size: 17px; }
.btn--sm { height: 40px; padding: 10px 22px; font-size: 14px; box-shadow: 0 3px 0 var(--lime-deep); }
.btn--sm:hover { box-shadow: 0 4px 0 var(--lime-deep); }
.btn--text { padding: 0; color: var(--ink-60); background: transparent; border: none; font-weight: 600; box-shadow: none; height: auto; }
.btn--text:hover { color: var(--lime-deep); transform: none; box-shadow: none; }

/* ===== Cards ===== */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}
.card--solid { background: #fff; }
.card--accent {
  border: 1px solid var(--lime);
  background: linear-gradient(160deg, rgba(154,183,141,0.22) 0%, rgba(255,255,255,0.95) 100%);
  box-shadow: 0 0 0 1px var(--lime), 0 6px 0 rgba(61,85,48,0.10), 0 12px 30px rgba(61,85,48,0.10), inset 0 1px 0 rgba(255,255,255,0.8);
}

/* ===== Tags ===== */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 400;
  font-family: var(--font-en);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(107,142,95,0.14);
  color: var(--lime-deep);
  border: 1px solid rgba(107,142,95,0.30);
  white-space: nowrap; flex-shrink: 0;
  width: fit-content;
}
.tag--violet {
  background: rgba(176,133,98,0.14);
  color: var(--violet-deep);
  border-color: rgba(176,133,98,0.30);
}
.tag--solid {
  background: var(--lime);
  color: #fbf7ec;
  border-color: var(--lime-deep);
  box-shadow: 0 2px 0 var(--lime-deep);
}

/* ===== Coin ===== */
.coin {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--ink-100);
  font-family: var(--font-en); font-weight: 700;
}
.coin__dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(107,142,95,0.40);
  position: relative;
}
.coin__dot::after {
  content: ""; position: absolute;
  inset: 3px 3px 3px 7px;
  background: var(--bg-card); border-radius: 50%;
}

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 237, 224, 0.85);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 8px;
}
.logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-en); font-weight: 800; font-size: 22px; letter-spacing: -0.02em;
  color: var(--ink-100);
}
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  color: var(--ink-60); font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  transition: color .18s ease;
}
.nav__links a:hover { color: var(--lime-deep); }
@media (max-width: 860px) { .nav__links { display: none; } }
@media (max-width: 720px) {
  .nav__inner { padding: 12px 6px; }
  .nav .logo img { height: 28px !important; }
  .nav .logo span { font-size: 20px !important; }
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 40px;
  margin-top: 80px;
  position: relative; z-index: 1;
  background: var(--bg-1);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer h4 {
  font-family: var(--font-cn);
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-40); margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer ul a { color: var(--ink-60); font-size: 14px; transition: color .15s; }
.footer ul a:hover { color: var(--lime-deep); }
.footer__bottom {
  border-top: 1px solid var(--line);
  margin-top: 56px; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--ink-40); font-size: 13px;
}
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

/* ===== Placeholder ===== */
.placeholder {
  background-color: rgba(80,64,40,0.04);
  background-image: repeating-linear-gradient(135deg,
    rgba(80,64,40,0.04) 0px, rgba(80,64,40,0.04) 8px,
    transparent 8px, transparent 18px);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--ink-40); font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em; text-align: center; padding: 24px;
}

/* ===== Utilities ===== */
.grid   { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.glow-line {
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--lime) 50%, transparent 100%);
  opacity: 0.5;
  position: relative; z-index: 1;
}

/* Pricing — equal-height cards with bottom-aligned CTAs */
.pricing__grid { align-items: stretch; }

.pricing__grid > .pricing-card,
.pricing__grid > .pricing-pro-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.pricing-pro-wrap > .pricing-card {
  flex: 1 1 auto;
  height: auto;
}

.pricing-card {
  display: flex !important;
  flex-direction: column;
  width: 100%;
}

/* Push the last button to the bottom of every pricing card */
.pricing-card > .btn:last-child { margin-top: auto !important; }

/* Number stat — large accent */
.stat-number {
  font-family: var(--font-en);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--lime-deep);
}

/* Sloth illustration helpers */
.sloth-img {
  display: block;
  filter: drop-shadow(0 12px 24px rgba(80,64,40,0.16));
  pointer-events: none;
  user-select: none;
}

/* Selection */
::selection { background: var(--lime); color: #fbf7ec; }
