/* PåPlats! – Premium landing page */

:root {
  --bg-base: #EFF7F1;
  --bg-mint: #E4F3E8;
  --bg-mint-deep: #D8EDE2;
  --text-heading: #10251A;
  --text-body: #4F6257;
  --text-muted: #7B8C82;
  --green-primary: #168A55;
  --green-accent: #22B66F;
  --green-glow: rgba(34, 182, 111, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(20, 80, 50, 0.18);
  --glass-border-strong: rgba(20, 80, 50, 0.28);
  --shadow-soft: 0 8px 28px rgba(16, 37, 26, 0.09);
  --shadow-glass: 0 12px 40px rgba(16, 37, 26, 0.1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-width: 1200px;
  --header-height: clamp(64px, 12vw, 88px);
  --header-bg: linear-gradient(180deg, #C8DDD2 0%, #B8D2C4 100%);
  --header-border: rgba(16, 37, 26, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--green-accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green-accent);
  outline-offset: 3px;
}

/* Background atmosphere */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 70% 10%, var(--green-glow), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(22, 138, 85, 0.12), transparent 55%),
    linear-gradient(165deg, var(--bg-base) 0%, var(--bg-mint) 45%, var(--bg-mint-deep) 100%);
}

/* Layout */
.container {
  width: min(100% - clamp(1.25rem, 5vw, 2.5rem), var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section-header {
  text-align: center;
  max-width: 42rem;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-heading);
}

.section-lead {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-body);
}

/* Glass panel */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-glass),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 4px 20px rgba(16, 37, 26, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--green-primary);
}

.logo-img {
  height: clamp(3rem, 9vw, 4rem);
  max-height: calc(var(--header-height) - 0.5rem);
  width: auto;
  display: block;
  object-fit: contain;
}

.logo-bar {
  height: clamp(2.75rem, 7vw, 3.5rem);
  width: auto;
  display: block;
}

/* Mobile-only header wordmark; hidden on desktop */
.logo-bar--header {
  display: none;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-desktop a {
  padding: 0.4rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-desktop a:hover {
  background: rgba(22, 138, 85, 0.08);
  color: var(--green-primary);
}

.nav-stores {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  cursor: pointer;
  color: var(--text-heading);
}

.menu-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-height) 0 0 0;
  z-index: 99;
  background: linear-gradient(180deg, #C8DDD2 0%, #B8D2C4 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-heading);
  border-radius: var(--radius-sm);
}

.mobile-nav a:hover {
  background: rgba(22, 138, 85, 0.08);
}

.mobile-nav-stores {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

/* Store badges */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  background: var(--text-heading);
  color: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.store-badge:hover {
  color: #fff;
  background: #1a3328;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 37, 26, 0.18);
}

.store-badge--outline {
  background: transparent;
  color: var(--text-heading);
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.store-badge--outline:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-heading);
  border-color: rgba(22, 138, 85, 0.25);
}

.store-badge--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.store-badge svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.store-badge-text small {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.75;
  line-height: 1.2;
}

.store-badge-text span {
  display: block;
  line-height: 1.2;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Hero */
.hero {
  padding-block: clamp(1.75rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero-content {
  max-width: 36rem;
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--text-heading);
}

.hero-subtitle {
  margin: 0 0 2rem;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-body);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

.hero-glow {
  position: absolute;
  inset: 10% 5% 5% 5%;
  background: radial-gradient(ellipse at center, var(--green-glow), transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  z-index: 0;
}

.hero-phone-panel {
  position: relative;
  z-index: 1;
  /* Scale so full screenshot fits: image ratio ~521/1024; cap height ~68vh */
  width: min(100%, 300px, calc(68vh * 521 / 1024));
  padding: 0.65rem;
  background: #111111;
  border: 2px solid #2a2a2a;
  border-radius: 2.35rem;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.28),
    0 8px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-phone-panel img {
  border-radius: 1.85rem;
  width: 100%;
  height: auto;
  display: block;
}

/* Floating cards */
.float-card {
  position: absolute;
  z-index: 2;
  padding: 0.75rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(20, 80, 50, 0.58);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 2px rgba(255, 255, 255, 0.65);
}

.float-card--1 {
  top: 8%;
  left: -4%;
  animation: float-a 7s ease-in-out infinite;
}

.float-card--2 {
  top: 42%;
  right: -6%;
  animation: float-b 8s ease-in-out infinite;
}

.float-card--3 {
  bottom: 12%;
  left: 2%;
  animation: float-c 9s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes float-b {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-6px) translateX(4px); }
}

@keyframes float-c {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (hover: hover) {
  .float-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .float-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 36px rgba(16, 37, 26, 0.12);
  }

  .float-card--1:hover { animation-play-state: paused; }
  .float-card--2:hover { animation-play-state: paused; }
  .float-card--3:hover { animation-play-state: paused; }
}

/* Problem section */
.problem {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.problem-inner {
  text-align: center;
  max-width: 38rem;
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3rem);
}

.problem-title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-heading);
}

.problem-text {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.15rem);
  color: var(--text-body);
}

/* Steps */
.steps-grid {
  display: grid;
  gap: 1.25rem;
}

.steps-grid > *,
.benefits-grid > * {
  min-width: 0;
}

.step-card {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(16, 37, 26, 0.1);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-primary);
  background: rgba(22, 138, 85, 0.12);
  border-radius: 12px;
}

.step-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.step-text {
  margin: 0;
  color: var(--text-body);
}

/* Benefits */
.benefits-grid {
  display: grid;
  gap: 1.25rem;
}

.benefit-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 182, 111, 0.15), rgba(22, 138, 85, 0.1));
  color: var(--green-primary);
}

.benefit-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.benefit-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
}

.benefit-text {
  margin: 0;
  font-size: 0.975rem;
  color: var(--text-body);
}

/* Privacy */
.privacy {
  background: linear-gradient(180deg, transparent, rgba(230, 245, 236, 0.5));
}

.privacy-inner {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 3.5rem);
}

.privacy-icon {
  display: inline-flex;
  margin-bottom: 1.25rem;
  color: var(--green-primary);
}

.privacy-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

/* Final CTA */
.cta-final {
  text-align: center;
}

.cta-final .section-title {
  margin-bottom: 2rem;
}

.cta-final .store-row {
  justify-content: center;
}

/* Footer */
.site-footer {
  padding-block: 3rem 2rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.4);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo {
  margin-bottom: 0.75rem;
}

.footer-tagline {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 22rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
}

.footer-links a:hover {
  color: var(--green-primary);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive */
@media (min-width: 640px) {
  .steps-grid,
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet+: two-column hero so phone sits beside copy */
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .hero-phone-panel {
    width: min(100%, 320px, calc(70vh * 521 / 1024));
  }
}

@media (min-width: 1040px) {
  .menu-toggle {
    display: none;
  }

  .nav-desktop {
    display: flex;
  }

  .nav-stores {
    display: flex;
  }

  .hero-phone-panel {
    width: min(100%, 340px, calc(72vh * 521 / 1024));
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }

  .float-card--1 { left: -4%; }
  .float-card--2 { right: -6%; }
  .float-card--3 { bottom: 12%; left: 2%; }
}

@media (max-width: 899px) {
  /* —— Mobil shell (desktop oförändrad ovanför 900px) —— */
  :root {
    --header-height: 76px;
  }

  .logo-img {
    display: block;
    height: 4.5rem;
    max-height: calc(var(--header-height) - 0.35rem);
    width: auto;
  }

  .logo-bar--header {
    display: none;
  }

  .menu-toggle {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
  }

  .mobile-nav.is-open {
    gap: 0.15rem;
    padding-top: 1.25rem;
  }

  .mobile-nav a:not(.store-badge) {
    padding: 0.95rem 1rem;
    font-size: 1.125rem;
    font-weight: 600;
  }

  .mobile-nav-stores {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    gap: 0.75rem;
  }

  .mobile-nav-stores .store-badge,
  .mobile-nav-stores .store-badge.store-badge--outline {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem 1.15rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    gap: 0.7rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-heading);
    border: 1.5px solid rgba(20, 80, 50, 0.28);
    box-shadow: 0 4px 14px rgba(16, 37, 26, 0.06);
    white-space: nowrap;
  }

  .mobile-nav-stores .store-badge:hover,
  .mobile-nav-stores .store-badge.store-badge--outline:hover {
    background: #fff;
    color: var(--text-heading);
    transform: none;
    box-shadow: 0 6px 18px rgba(16, 37, 26, 0.1);
  }

  .mobile-nav-stores .store-badge svg {
    width: 1.45rem;
    height: 1.45rem;
    flex-shrink: 0;
    display: block;
  }

  /* —— Mobil hero —— */
  .hero {
    padding-block: 1.25rem 2rem;
  }

  .hero-grid {
    gap: 1.35rem;
  }

  .hero-content {
    max-width: none;
    text-align: center;
  }

  .hero-title {
    margin-bottom: 0.65rem;
    font-size: clamp(1.7rem, 7vw, 2.05rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
  }

  .hero-subtitle {
    margin-inline: auto;
    margin-bottom: 1.15rem;
    max-width: 22rem;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .hero .store-row {
    justify-content: center;
    gap: 0.65rem;
  }

  .hero .store-badge,
  .hero .store-badge.store-badge--outline {
    padding: 0.75rem 1.05rem;
    font-size: 0.9rem;
    border-radius: 14px;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-heading);
    border: 1.5px solid rgba(20, 80, 50, 0.28);
    box-shadow: 0 4px 14px rgba(16, 37, 26, 0.07);
  }

  .hero .store-badge:hover,
  .hero .store-badge.store-badge--outline:hover {
    background: #fff;
    color: var(--text-heading);
    transform: none;
  }

  .hero .store-badge svg {
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
  }

  .hero .store-badge-text small {
    font-size: 0.65rem;
    opacity: 0.7;
  }

  .hero .store-badge-text span {
    font-size: 0.95rem;
  }

  .hero-visual {
    padding-inline: 0.75rem;
    overflow-x: clip;
  }

  .hero-phone-panel {
    width: min(56vw, 200px, calc(40vh * 521 / 1024));
    padding: 0.45rem;
    border-radius: 1.7rem;
  }

  .hero-phone-panel img {
    border-radius: 1.3rem;
  }

  .float-card {
    display: none;
  }

  .section {
    padding-block: 2.75rem;
  }

  .section-title {
    font-size: clamp(1.4rem, 5.5vw, 1.85rem);
  }

  .problem-title {
    font-size: clamp(1.25rem, 5vw, 1.55rem);
  }

  .steps-grid,
  .benefits-grid {
    gap: 0.85rem;
  }

  .step-card,
  .benefit-card {
    padding: 1.15rem 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero .store-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero .store-row .store-badge {
    width: 100%;
    justify-content: center;
  }

  .hero-phone-panel {
    width: min(52vw, 185px, calc(38vh * 521 / 1024));
  }

  .cta-final .section-title {
    font-size: 1.4rem;
  }

  .cta-final .store-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-final .store-row .store-badge {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  :root {
    --header-height: 72px;
  }

  .logo-img {
    height: 4.15rem;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .hero-phone-panel {
    width: min(50vw, 168px, calc(36vh * 521 / 1024));
  }
}
