/* ========================================================================
   Healing Pet — Landing Page
   Paper Design System
   ======================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Colors */
  --clr-primary: #111111;
  --clr-secondary: #8B5CF6;
  --clr-success: #16A34A;
  --clr-warning: #D97706;
  --clr-danger: #DC2626;
  --clr-surface: #FFFFFF;
  --clr-text: #111827;
  --clr-text-muted: #6B7280;
  --clr-border: #E5E7EB;
  --clr-bg: #FAF9F7;          /* warm paper off-white */
  --clr-accent: #8B5CF6;
  --clr-accent-soft: rgba(139, 92, 246, 0.08);

  /* Typography */
  --ff-display: 'Montserrat', system-ui, sans-serif;
  --ff-body: 'Roboto', system-ui, sans-serif;
  --ff-mono: 'PT Mono', monospace;

  /* Scale */
  --fs-xs: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 24px;
  --fs-xl: 32px;
  --fs-2xl: 40px;

  /* Spacing */
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;

  /* Radius */
  --radius: 12px;
  --radius-lg: 20px;

  /* Transition */
  --ease: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(139,92,246,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.03) 0%, transparent 50%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--clr-secondary); }

:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--sp-24);
}

/* ---------- Section shared ---------- */
.section__label {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-accent);
  display: inline-block;
  margin-bottom: var(--sp-8);
}

.section__title {
  font-family: var(--ff-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.15;
  color: var(--clr-primary);
  margin-bottom: var(--sp-32);
}

.section__title--accent {
  color: var(--clr-accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  font-family: var(--ff-body);
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--clr-accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--clr-secondary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--clr-text-muted);
  border: 1px solid var(--clr-border);
}
.btn--ghost:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.btn--sm { padding: var(--sp-8) var(--sp-16); font-size: var(--fs-xs); }
.btn--md { padding: var(--sp-12) var(--sp-24); font-size: var(--fs-base); }
.btn--lg { padding: var(--sp-16) var(--sp-32); font-size: var(--fs-base); }
.btn--xl { padding: var(--sp-20) var(--sp-40); font-size: var(--fs-md); }

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
  transition: box-shadow var(--ease);
}

.nav.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--sp-16) var(--sp-24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-16);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--clr-primary);
  text-decoration: none;
}
.nav__brand:hover { color: var(--clr-accent); }

.nav__logo { font-size: 1.25em; }

.nav__links {
  display: flex;
  list-style: none;
  gap: var(--sp-24);
}
.nav__links a {
  color: var(--clr-text-muted);
  font-size: var(--fs-base);
  transition: color var(--ease);
}
.nav__links a:hover { color: var(--clr-primary); }

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero__paper-bg {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 32px,
      rgba(139, 92, 246, 0.03) 32px,
      rgba(139, 92, 246, 0.03) 33px
    );
  pointer-events: none;
}

.hero__badge {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  padding: var(--sp-8) var(--sp-16);
  background: var(--clr-accent-soft);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 999px;
  color: var(--clr-accent);
  margin-bottom: var(--sp-24);
}

.hero__title {
  font-family: var(--ff-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--clr-primary);
  margin-bottom: var(--sp-24);
}

.hero__title--accent {
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: var(--fs-md);
  color: var(--clr-text-muted);
  max-width: 520px;
  margin: 0 auto var(--sp-32);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-16);
  margin-bottom: var(--sp-40);
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--sp-32);
  flex-wrap: wrap;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}
.hero__stat--num {
  font-family: var(--ff-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-primary);
}
.hero__stat--label {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}
.hero__stat--sep {
  position: relative;
}
.hero__stat--sep::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 36px;
  background: var(--clr-border);
}

/* ========== FEATURES ========== */
.features {
  padding: 80px 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-24);
}

.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-32);
  transition: all var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border-color: rgba(139, 92, 246, 0.2);
}

.card--highlight {
  background: linear-gradient(135deg, var(--clr-accent-soft), rgba(139,92,246,0.03));
  border-color: rgba(139, 92, 246, 0.15);
}

.card__icon {
  font-size: 2em;
  display: block;
  margin-bottom: var(--sp-16);
}

.card__title {
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--clr-primary);
  margin-bottom: var(--sp-8);
}

.card__desc {
  color: var(--clr-text-muted);
  line-height: 1.6;
}

/* ========== MODES ========== */
.modes {
  padding: 80px 0;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.modes__grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-40);
}

.mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-32);
  align-items: center;
}
.mode:nth-child(even) { direction: rtl; }
.mode:nth-child(even) > * { direction: ltr; }

.mode__mockup {
  display: flex;
  justify-content: center;
}

.mode__img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  max-width: 260px;
  transition: transform var(--ease);
}
.mode__img:hover {
  transform: scale(1.03);
}

.mode__tag {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--clr-accent);
  margin-bottom: var(--sp-8);
  display: block;
}

.mode__name {
  font-family: var(--ff-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: var(--sp-12);
}

.mode__desc {
  color: var(--clr-text-muted);
  line-height: 1.7;
}

/* ========== SCREENSHOTS ========== */
.screenshots {
  padding: 80px 0;
}

.screenshots__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-24);
  margin-bottom: var(--sp-40);
}

.shot {
  text-align: center;
}

.shot img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  margin: 0 auto var(--sp-12);
  transition: all var(--ease);
  max-width: 200px;
}
.shot img:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.shot figcaption {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}

.screenshots__note {
  text-align: center;
  font-size: var(--fs-base);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-24);
}

.screenshots__grid--dark img {
  filter: brightness(0.85) contrast(1.05);
}

/* ========== TECH ========== */
.tech {
  padding: 80px 0;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.tech__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-24);
}

.tech__item {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: var(--sp-24);
  text-align: center;
  transition: all var(--ease);
}
.tech__item:hover {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.08);
}

.tech__item-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-8);
}

.tech__item-value {
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--clr-primary);
}

/* ========== CTA ========== */
.cta {
  padding: 80px 0;
  text-align: center;
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta__icon {
  font-size: 3em;
  margin-bottom: var(--sp-16);
}

.cta__title {
  font-family: var(--ff-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: var(--sp-12);
}

.cta__desc {
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-32);
  max-width: 440px;
  line-height: 1.7;
}

/* ========== FOOTER ========== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--clr-border);
  background: var(--clr-surface);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-16);
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--clr-primary);
}

.footer__copy {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  line-height: 1.6;
}

.footer__link {
  color: var(--clr-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav__links { display: none; }

  .hero { padding: 130px 0 60px; }
  .hero__actions { flex-direction: column; align-items: center; }

  .mode { grid-template-columns: 1fr; text-align: center; }
  .mode:nth-child(even) { direction: ltr; }

  .screenshots__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--sp-16); }
  .section__title { font-size: var(--fs-xl); }
  .features__grid { grid-template-columns: 1fr; }
  .screenshots__grid { grid-template-columns: 1fr 1fr; }
  .hero__stats { gap: var(--sp-16); }
  .hero__stat--sep::before { display: none; }
}
