/* ------------------------------------------------------------------
   Nia Pinnn — web design system.
   Ported 1:1 from the app: src/constants/savespot-theme.ts
   (Spot colors, SpotRadius, SpotShadow) + the app font trio.
------------------------------------------------------------------ */
@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Space+Grotesk:wght@500;700&family=IBM+Plex+Sans+Thai:wght@400;500;600&display=swap");

:root {
  /* Spot palette */
  --coral: #ff5a5f;
  --coral-deep: #e23b41;
  --coral-tint: #ffecec;
  --ink: #0f172a;
  --sub: #64748b;
  --slate-light: #94a3b8;
  --line: #e2e8f0;
  --canvas: #f4f4f6;
  --surface: #ffffff;

  /* Fonts */
  --display: "Chakra Petch", "IBM Plex Sans Thai", system-ui, sans-serif;
  --body: "IBM Plex Sans Thai", system-ui, sans-serif;
  --en: "Space Grotesk", "Chakra Petch", system-ui, sans-serif;

  /* Radius (SpotRadius) */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Elevation (SpotShadow) */
  --shadow-card: 0 4px 12px rgba(15, 23, 42, 0.1);
  --shadow-float: 0 10px 20px rgba(15, 23, 42, 0.18);

  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f5f9;
    --sub: #94a3b8;
    --slate-light: #64748b;
    --line: #334155;
    --canvas: #0f172a;
    --surface: #1e293b;
    --coral-tint: #3a2224;
    --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-float: 0 12px 28px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--coral); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }

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

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--en); font-weight: 700; font-size: 19px;
  letter-spacing: -0.02em; text-decoration: none; color: var(--ink);
}
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: var(--shadow-card); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  font-family: var(--en); font-size: 14px; font-weight: 500;
  text-decoration: none; color: var(--sub);
  padding: 8px 12px; border-radius: var(--r-pill);
}
.nav-links a:hover { color: var(--ink); background: var(--coral-tint); }
.nav-links a.lang { color: var(--coral); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  padding: 72px 0 40px;
}
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -160px; left: -120px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255, 90, 95, 0.28), transparent 62%);
  filter: blur(20px); pointer-events: none;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--en); font-size: 13px; font-weight: 500; color: var(--coral-deep);
  background: var(--coral-tint); padding: 6px 13px; border-radius: var(--r-pill);
  margin-bottom: 18px;
}
.eyebrow svg { width: 15px; height: 15px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); margin: 0 0 16px; }
.hero h1 .accent { color: var(--coral); }
.hero .lead { font-size: clamp(16px, 2.2vw, 20px); color: var(--sub); margin: 0; max-width: 40ch; }

/* Store badges */
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 0; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--canvas);
  padding: 13px 20px; border-radius: var(--r-md); text-decoration: none;
  font-family: var(--en); font-weight: 500; box-shadow: var(--shadow-card);
  transition: transform 0.2s ease;
}
.badge:hover { transform: translateY(-2px); }
.badge svg { width: 22px; height: 22px; }
.badge b { font-size: 15px; }
.badge small { display: block; font-weight: 400; font-size: 11px; opacity: 0.75; }
.badge[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* ---------- Phone-ish mock: masonry place cards (mirrors GridPlaceCard) ---------- */
.showcase {
  position: relative;
  padding: 22px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
}
.showcase-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.showcase-head .title { font-family: var(--display); font-weight: 700; font-size: 17px; }
.showcase-head .pill {
  font-family: var(--body); font-size: 12px; color: var(--coral-deep);
  background: var(--coral-tint); padding: 4px 11px; border-radius: var(--r-pill);
}
.masonry { columns: 2; column-gap: 12px; }
.pcard {
  position: relative; break-inside: avoid; margin-bottom: 12px;
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-card);
  color: #fff;
}
.pcard .photo { aspect-ratio: var(--ar, 0.82); display: grid; place-items: center; }
.pcard .photo svg { width: 30px; height: 30px; opacity: 0.85; }
.pcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.62));
}
.pcard .src {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  width: 24px; height: 24px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.92); display: grid; place-items: center;
  box-shadow: var(--shadow-card);
}
.pcard .src svg { width: 14px; height: 14px; }
/* Favorite heart — mirrors the app's FavoriteBadge: white circle, coral filled
   heart, shown only on favorited cards (no two-state stamp anymore). */
.pcard .fav {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-card);
}
.pcard .fav svg { width: 15px; height: 15px; }
.pcard .info { position: absolute; left: 11px; right: 11px; bottom: 10px; z-index: 2; }
.pcard .name { font-family: var(--display); font-weight: 600; font-size: 14px; margin: 0 0 5px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  font-family: var(--body); font-size: 10px; font-weight: 500;
  padding: 2px 8px; border-radius: var(--r-pill);
}

/* ---------- Section shell ---------- */
section.block { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; }
.section-head p { color: var(--sub); font-size: 17px; margin: 0; }

/* ---------- Features ---------- */
.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-3px); border-color: var(--coral); }
.feature .ic {
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: var(--coral-tint); color: var(--coral-deep);
  display: grid; place-items: center; margin-bottom: 16px;
}
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--sub); font-size: 15px; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.step { position: relative; padding: 28px 24px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.step .num {
  counter-increment: step; content: counter(step);
  font-family: var(--en); font-weight: 700; font-size: 15px; color: #fff;
  width: 34px; height: 34px; border-radius: var(--r-pill);
  background: var(--coral); display: grid; place-items: center; margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 17px; margin: 0 0 6px; }
.step p { margin: 0; color: var(--sub); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta {
  text-align: center; padding: 56px 24px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff; box-shadow: var(--shadow-float);
}
.cta h2 { color: #fff; font-size: clamp(24px, 4vw, 34px); margin: 0 0 10px; }
.cta p { margin: 0 0 24px; opacity: 0.92; font-size: 17px; }
.cta .badges { justify-content: center; }
.cta .badge { background: #fff; color: var(--ink); }

/* ---------- Legal / support docs ---------- */
.doc { padding: 48px 0 72px; }
.doc h1 { font-size: 34px; margin: 0 0 4px; }
.doc .updated { color: var(--sub); margin: 0 0 32px; font-size: 14px; }
.doc h2 { font-size: 21px; margin: 34px 0 8px; }
.doc p { margin: 0 0 12px; white-space: pre-line; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 24px; padding: 32px 0; }
footer .wrap { display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: center; align-items: center; }
footer a { font-family: var(--en); color: var(--sub); text-decoration: none; font-size: 14px; }
footer a:hover { color: var(--coral); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 24px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .badges { justify-content: center; }
  .eyebrow { margin-inline: auto; }
}
