/* S-Plug marketing site — splug.co.za
 * Layout cloned from shopify.com/shop (hero-centered, metric cards, benefit
 * split, accordion section, phone showcase, charcoal footer), re-skinned in
 * S-Plug brand green #007749 with real app screenshots. */

:root {
  --green: #007749;
  --green-deep: #005a38;
  --ink: #1a1a1a;
  --muted: #5c5f62;
  --paper: #ffffff;
  --tint: #f6f6f7;
  --tint-green: #eaf4ef;
  --line: #e3e3e3;
  --footer-bg: #111213;
  --radius-lg: 28px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(1200px, 100% - 3rem); margin-inline: auto; }

h1, h2, h3 { line-height: 1.05; text-wrap: balance; letter-spacing: -0.03em; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.3125rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.brand .mark { height: 34px; width: auto; }

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  opacity: 0.85;
}

.nav-links a:hover { opacity: 1; }

.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: none;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }

.btn-lg { padding: 1.05rem 2.1rem; font-size: 1.0625rem; }

.btn-ghost { background: transparent; color: var(--ink); font-weight: 600; }
.btn-ghost:hover { text-decoration: underline; text-underline-offset: 4px; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

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

/* ---------- store badges ---------- */

.badges { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1.2rem 0.55rem 0.95rem;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  line-height: 1.15;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.store-badge:hover { background: #000; transform: translateY(-2px); }
.store-badge svg { width: 24px; height: 24px; flex: none; }
.store-badge .small { display: block; font-size: 0.65rem; opacity: 0.8; }
.store-badge .big { display: block; font-size: 1rem; font-weight: 600; }

/* ---------- hero (centered, Shop-style) ---------- */

.hero {
  text-align: center;
  padding-block: 5rem 0;
  background: linear-gradient(180deg, #fff 0%, #f2f7f4 100%);
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 650;
  max-width: 17ch;
  margin-inline: auto;
}

.hero h1 em { font-style: normal; color: var(--green); }

.hero .lede {
  max-width: 34rem;
  margin: 1.5rem auto 2.25rem;
  font-size: 1.25rem;
  color: var(--muted);
}

.hero .alt-link { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--muted); }
.hero .alt-link a { color: var(--green); font-weight: 600; }

/* phone composite */

.hero-devices {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2.5rem;
  margin-top: 4rem;
  padding-inline: 1rem;
}

.device {
  background: #17181a;
  border-radius: 40px;
  padding: 10px;
  box-shadow: 0 30px 70px -25px rgba(17, 18, 19, 0.4);
  flex: none;
}

.device .screen-img {
  border-radius: 31px;
  overflow: hidden;
  background: #f5f5f5;
}

.device img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.hero-devices .device.main { width: min(320px, 78vw); }
.hero-devices .device.main .screen-img { height: 640px; }

.hero-devices .device.side { width: 250px; margin-bottom: -80px; }
.hero-devices .device.side .screen-img { height: 470px; }

.hero-devices .device.side.left { transform: rotate(-6deg); }
.hero-devices .device.side.right { transform: rotate(6deg); }

@media (max-width: 900px) {
  .hero-devices .device.side { display: none; }
  .hero-devices .device.main .screen-img { height: 560px; }
}

/* Load-in: hero rises, side phones fade (opacity only, so their rotation
 * transform survives). Whole block is inert under prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero .badges, .hero-devices .device.main {
    animation: hero-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero .lede { animation-delay: 0.08s; }
  .hero .badges { animation-delay: 0.16s; }
  .hero-devices .device.main { animation-duration: 0.9s; animation-delay: 0.2s; }
  .hero-devices .device.side { animation: hero-fade 0.9s ease-out both 0.4s; }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes hero-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- metric cards ---------- */

.metrics { padding-block: 5.5rem 2rem; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.metric {
  background: var(--tint);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
}

.metric .num {
  font-size: 3.5rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric h3 { font-size: 1.125rem; font-weight: 600; margin: 0.75rem 0 0.375rem; letter-spacing: -0.01em; }
.metric p { color: var(--muted); font-size: 0.9375rem; }

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

/* ---------- section scaffolding ---------- */

.section { padding-block: 5.5rem; }

.section-head { text-align: center; max-width: 44rem; margin: 0 auto 3.5rem; }

.section-head h2 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 650;
}

.section-head p { color: var(--muted); font-size: 1.1875rem; margin-top: 1rem; }

/* ---------- benefits (cards + phone) ---------- */

.benefits-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.benefit-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.benefit {
  background: var(--tint);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.benefit .kicker {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.625rem;
}

.benefit h3 { font-size: 1.25rem; font-weight: 650; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.benefit p { color: var(--muted); font-size: 0.9375rem; }

.benefits-grid .device { width: min(300px, 80vw); margin-inline: auto; }
.benefits-grid .device .screen-img { height: 540px; }

@media (max-width: 900px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .benefit-cards { grid-template-columns: 1fr; }
}

/* ---------- providers (accordion + phone) ---------- */

.providers { background: var(--tint); }

.providers-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: center;
}

.providers-grid .device { width: min(300px, 80vw); margin-inline: auto; }
.providers-grid .device .screen-img { height: 540px; }

.acc-list { display: flex; flex-direction: column; }

.acc {
  border-bottom: 1px solid var(--line);
  padding-block: 1.5rem;
}

.acc:first-child { border-top: 1px solid var(--line); }

.acc h3 { font-size: 1.5rem; font-weight: 650; margin-bottom: 0.5rem; }
.acc p { color: var(--muted); font-size: 1rem; max-width: 34rem; }

.providers .cta-row { margin-top: 2.25rem; }

@media (max-width: 900px) {
  .providers-grid { grid-template-columns: 1fr; }
  .providers-grid .device { order: 2; }
}

/* ---------- showcase (phone carousel row) ---------- */

.showcase { overflow: hidden; }

.showcase-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.showcase-row .device { width: 220px; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.showcase-row .device:hover { transform: translateY(-8px); }
.showcase-row .device .screen-img { height: 430px; }
.showcase-row .device:nth-child(odd) { margin-top: 2.5rem; }

@media (max-width: 1080px) {
  .showcase-row .device:nth-child(5) { display: none; }
}
@media (max-width: 880px) {
  .showcase-row .device:nth-child(4) { display: none; }
}
@media (max-width: 660px) {
  .showcase-row { gap: 1.25rem; }
  .showcase-row .device { width: 165px; }
  .showcase-row .device .screen-img { height: 330px; }
}

.showcase .cta-row { text-align: center; }

.cta-row { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

/* ---------- services strip ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.chip {
  padding: 0.625rem 1.375rem;
  border-radius: 999px;
  background: var(--tint);
  font-weight: 500;
  font-size: 0.9375rem;
}

/* ---------- footer ---------- */

.footer { background: var(--footer-bg); color: #b5b8ba; font-size: 0.9375rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 4rem 3rem;
}

.footer .brand { color: #fff; margin-bottom: 0.75rem; }

.footer .tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #6db895;
}

.footer h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}

.footer ul { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-block: 1.5rem;
  border-top: 1px solid #2a2c2e;
  font-size: 0.8125rem;
  color: #85898c;
}

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

/* ---------- legal pages ---------- */

.legal-hero { padding-block: 4rem 1rem; }
.legal-hero .eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}
.legal-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 650; margin-block: 0.75rem 0.5rem; }
.legal-hero .date { color: var(--muted); font-size: 0.9375rem; }

.legal-doc {
  max-width: 46rem;
  padding-block: 2rem 5rem;
  color: var(--muted);
}

.legal-doc h2 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 2.25rem 0 0.625rem;
}

.legal-doc p + p { margin-top: 0.75rem; }

.legal-doc ul {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

.legal-doc strong { color: var(--ink); font-weight: 600; }

.legal-doc a {
  color: var(--green);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
