/* ============================================================
   Wafme — Modern landing page styles
   ============================================================ */

:root {
  --primary: #6222cc;
  --primary-light: #8b4dff;
  --primary-dark: #4a18a0;
  --secondary: #ff9c00;
  --secondary-light: #ffb340;
  --accent: #ff5b8a;
  --bg: #fbfaff;
  --bg-soft: #f4f0ff;
  --ink: #1a1033;
  --ink-soft: #5b5570;
  --muted: #8b8499;
  --white: #ffffff;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 4px 16px rgba(98, 34, 204, 0.08);
  --shadow: 0 12px 40px rgba(98, 34, 204, 0.12);
  --shadow-lg: 0 24px 80px rgba(98, 34, 204, 0.18);
  --grad-primary: linear-gradient(135deg, #6222cc 0%, #8b4dff 50%, #ff5b8a 100%);
  --grad-warm: linear-gradient(135deg, #ff9c00 0%, #ff5b8a 100%);
  --grad-soft: linear-gradient(135deg, #f4f0ff 0%, #fff0f6 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

p {
  color: var(--ink-soft);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

.container-x {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Navbar
   ============================================================ */
.nav-modern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(251, 250, 255, 0.7);
  border-bottom: 1px solid transparent;
}

.nav-modern.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(98, 34, 204, 0.08);
  box-shadow: 0 4px 24px rgba(98, 34, 204, 0.06);
  padding: 10px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--primary);
}

.nav-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  background: var(--bg-soft);
  color: var(--primary);
}

.nav-cta {
  background: var(--grad-primary);
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: 999px !important;
  box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
  background: var(--grad-primary) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.open {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
    padding: 16px;
  }

  .nav-links a {
    padding: 12px 16px;
    border-radius: 12px;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 160px 0 80px;
  overflow: hidden;
  background: radial-gradient(
      ellipse at top right,
      rgba(255, 91, 138, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom left,
      rgba(98, 34, 204, 0.12) 0%,
      transparent 50%
    ),
    var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  top: 20%;
  right: -100px;
  width: 400px;
  height: 400px;
  background: var(--grad-primary);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(98, 34, 204, 0.15);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.05); }
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  margin: 0 0 24px;
  letter-spacing: -0.03em;
}

.hero h1 .grad {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 36px;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-cta a {
  display: inline-block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.hero-cta a:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 12px 24px rgba(98, 34, 204, 0.25));
}

.hero-cta img {
  height: 56px;
  width: auto;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-meta strong {
  color: var(--ink);
  font-weight: 700;
}

.stars {
  color: var(--secondary);
  letter-spacing: 2px;
}

/* Device mockup */
.device-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 600px;
}

.device-stage::before {
  content: "";
  position: absolute;
  inset: 10% 0;
  background: var(--grad-primary);
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  z-index: 0;
}

.device-frame {
  position: relative;
  z-index: 2;
  width: 280px;
  aspect-ratio: 9 / 19;
  background: linear-gradient(160deg, #2a2540 0%, #0a0517 100%);
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.1);
  transform: rotate(-3deg);
  animation: float 6s ease-in-out infinite;
}

/* Use when the image already contains a phone mockup */
.phone-image {
  position: relative;
  z-index: 2;
  width: 300px;
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 30px 60px rgba(98, 34, 204, 0.35))
    drop-shadow(0 12px 24px rgba(98, 34, 204, 0.18));
  transform: rotate(-3deg);
  animation: float 6s ease-in-out infinite;
}

@media (max-width: 900px) {
  .phone-image {
    width: 260px;
  }
}

.device-frame.right {
  transform: rotate(4deg) translateY(20px);
  animation-delay: -3s;
}

.device-frame .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
}

.device-frame .screen img,
.device-frame .screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.device-frame .notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 24px;
  background: #000;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}

@keyframes float {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-16px); }
}

/* Floating decorative blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.blob-1 {
  top: 10%;
  right: -8%;
  width: 80px;
  height: 80px;
  background: var(--grad-warm);
  filter: blur(2px);
  animation: floatY 8s ease-in-out infinite;
}

.blob-2 {
  bottom: 12%;
  left: -6%;
  width: 60px;
  height: 60px;
  background: var(--grad-primary);
  animation: floatY 10s ease-in-out -2s infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

@media (max-width: 900px) {
  .hero {
    padding: 130px 0 60px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta, .hero-meta {
    justify-content: center;
  }
  .device-stage {
    min-height: 500px;
  }
  .device-frame {
    width: 240px;
  }
}

/* ============================================================
   Stats band
   ============================================================ */
.stats {
  background: var(--grad-primary);
  position: relative;
  padding: 72px 0;
  overflow: hidden;
  color: var(--white);
}

.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 25%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 25%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 16px;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  margin-bottom: 18px;
  font-size: 1.6rem;
  color: var(--white);
  backdrop-filter: blur(10px);
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  margin: 0 0 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.02em;
}

.stat-label {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ============================================================
   Sections / Headings
   ============================================================ */
.section {
  padding: 100px 0;
}

.section-soft {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  margin: 0 0 16px;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ============================================================
   Features
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid rgba(98, 34, 204, 0.08);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--grad-soft);
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card:nth-child(2) .feature-icon {
  background: linear-gradient(135deg, #fff0e6 0%, #ffe6f0 100%);
  color: var(--secondary);
}

.feature-card:nth-child(3) .feature-icon {
  background: linear-gradient(135deg, #e8f8ed 0%, #d8f3e5 100%);
  color: #22c55e;
}

.feature-card:nth-child(4) .feature-icon {
  background: linear-gradient(135deg, #ffe6f0 0%, #fff0e6 100%);
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin: 0 0 10px;
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 1000px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Showcase row (device + steps)
   ============================================================ */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.showcase-device {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 580px;
}

.showcase-device::before {
  content: "";
  position: absolute;
  inset: 5% 10%;
  background: var(--grad-warm);
  filter: blur(80px);
  opacity: 0.25;
  border-radius: 50%;
}

.showcase-device .device-frame {
  animation-name: floatStill;
  transform: rotate(0deg);
}

@keyframes floatStill {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(0deg) translateY(-12px); }
}

.step {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--grad-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}

.step-body h3 {
  font-size: 1.2rem;
  margin: 4px 0 6px;
}

.step-body p {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .showcase {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .showcase-device {
    min-height: 500px;
  }
}

/* ============================================================
   CTA / Download
   ============================================================ */
.cta-band {
  position: relative;
  background: var(--grad-primary);
  border-radius: var(--radius-lg);
  padding: 80px 60px;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  margin: 60px auto;
  max-width: 1100px;
}

.cta-band::before,
.cta-band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cta-band::before {
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.15);
  top: -100px;
  right: -100px;
}

.cta-band::after {
  width: 240px;
  height: 240px;
  background: rgba(255, 156, 0, 0.25);
  bottom: -80px;
  left: -60px;
  filter: blur(40px);
}

.cta-band h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
  margin: 0 0 36px;
  position: relative;
  z-index: 1;
}

.cta-band .badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta-band .badges img {
  height: 56px;
  transition: transform 0.2s ease;
}

.cta-band .badges a:hover img {
  transform: translateY(-3px);
}

@media (max-width: 720px) {
  .cta-band {
    padding: 56px 28px;
    margin: 40px 16px;
  }
}

/* ============================================================
   Footer
   ============================================================ */
.footer-modern {
  background: linear-gradient(180deg, #1a1033 0%, #0d0420 100%);
  color: rgba(255, 255, 255, 0.75);
  padding: 80px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-brand img {
  width: 44px;
  height: 44px;
}

.footer-modern p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-modern h5 {
  color: var(--white);
  font-size: 1rem;
  margin: 0 0 20px;
  font-weight: 700;
}

.footer-modern a {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  margin-bottom: 12px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-modern a:hover {
  color: var(--white);
  transform: translateX(4px);
}

.footer-contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-contact-line i {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--primary-light);
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.socials a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  transition: all 0.2s ease;
}

.socials a:hover {
  background: var(--grad-primary);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom .legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom .legal a {
  display: inline;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom .legal {
    justify-content: center;
  }
}

/* ============================================================
   Back to top
   ============================================================ */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  transform: translateY(-4px);
  color: var(--white);
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Sub-page header
   ============================================================ */
.page-header {
  position: relative;
  padding: 140px 0 60px;
  text-align: center;
  background: radial-gradient(
      ellipse at top right,
      rgba(255, 91, 138, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom left,
      rgba(98, 34, 204, 0.1) 0%,
      transparent 50%
    ),
    var(--bg);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  height: 480px;
  background: var(--grad-primary);
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
  z-index: 0;
}

.page-header .container-x {
  position: relative;
  z-index: 1;
}

.page-header .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  margin: 0 0 14px;
  letter-spacing: -0.03em;
}

.page-header h1 .grad {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 600px;
}

.page-header .updated {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ============================================================
   Legal pages (privacy / terms)
   ============================================================ */
.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 0 100px;
}

.legal-content {
  background: var(--white);
  border: 1px solid rgba(98, 34, 204, 0.08);
  border-radius: var(--radius-lg);
  padding: 56px 64px;
  box-shadow: var(--shadow-sm);
}

.legal-content h2 {
  font-size: 1.6rem;
  margin: 40px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(98, 34, 204, 0.08);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin: 28px 0 10px;
  color: var(--primary);
}

.legal-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.legal-content ul {
  padding-left: 0;
  list-style: none;
  margin: 0 0 16px;
}

.legal-content ul li {
  position: relative;
  padding: 6px 0 6px 28px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.legal-content ul li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-primary);
}

.legal-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(98, 34, 204, 0.3);
  text-underline-offset: 3px;
}

.legal-content a:hover {
  text-decoration-color: var(--primary);
}

@media (max-width: 720px) {
  .legal-content {
    padding: 36px 24px;
    border-radius: var(--radius);
  }
}

/* ============================================================
   Auth pages (reset password / confirm user)
   ============================================================ */
.auth-wrap {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
  position: relative;
  background: radial-gradient(
      ellipse at top right,
      rgba(255, 91, 138, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom left,
      rgba(98, 34, 204, 0.1) 0%,
      transparent 50%
    ),
    var(--bg);
}

.auth-wrap::before {
  content: "";
  position: absolute;
  top: 30%;
  right: -100px;
  width: 360px;
  height: 360px;
  background: var(--grad-primary);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.2;
  z-index: 0;
}

.auth-card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border: 1px solid rgba(98, 34, 204, 0.08);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--grad-soft);
  color: var(--primary);
  font-size: 2rem;
  margin: 0 auto 24px;
}

.auth-card h1 {
  font-size: 1.8rem;
  margin: 0 0 12px;
}

.auth-card .lead {
  color: var(--ink-soft);
  margin: 0 0 32px;
  font-size: 1rem;
}

.auth-card .dev-badge {
  display: inline-block;
  background: var(--grad-warm);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.field {
  position: relative;
  margin-bottom: 20px;
  text-align: left;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.field input:focus {
  border-color: var(--primary);
  background: var(--white);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  background: var(--grad-primary);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--white);
}

.btn-primary:active {
  transform: translateY(0);
}

.auth-message {
  margin-top: 24px;
  padding: 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  display: none;
}

.auth-message.show {
  display: block;
}

.auth-message.success {
  background: #e8f8ed;
  color: #1f7a3a;
  border: 1px solid #b8e3c4;
}

.auth-message.error {
  background: #fef1f1;
  color: #b3261e;
  border: 1px solid #f5c7c4;
}

.auth-back {
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-back a {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   Instruction page
   ============================================================ */
.instruction-section {
  padding: 80px 0;
}

.instruction-section:nth-child(even) {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

.instruction-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.instruction-title .num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--grad-primary);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.instruction-title h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.instruction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
}

.instruction-card {
  background: var(--white);
  border: 1px solid rgba(98, 34, 204, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instruction-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.instruction-img {
  background: var(--bg-soft);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 9 / 14;
}

.instruction-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(98, 34, 204, 0.15);
  display: block;
}

.instruction-card .caption {
  padding: 18px 20px 22px;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

@media (max-width: 540px) {
  .instruction-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .instruction-img {
    padding: 16px;
  }
}
