/* =========================================================================
   ColoPlus design brief. Design tokens
   Character: premium DTC-supplement. Klinisk-trygg möter aktiv/sport,
   i linje med AG1/Whoop/Ritual. Ren, förtroendeingivande bas i ett
   genomgående blå-vitt gradient-tema, med ColoPlus riktiga varumärkesblå
   (från coloplus.se) som primärfärg och en djupare, mättad nyans av samma
   blå som accent för CTA:er — monokromt, inget lösryckt korall/orange.
   Typsnitt: Outfit (rubriker, geometrisk, distinkt sport/hälsa-känsla) +
   Inter (brödtext, hög läsbarhet). Båda från Google Fonts.
   ========================================================================= */
:root {
  /* Color palette. Matches coloplus.se's brand blue */
  --color-primary: #024b94;        /* ColoPlus blå. Hälsa, vetenskap, förtroende */
  --color-primary-dark: #01315f;
  --color-primary-darker: #011f42;
  --color-primary-light: #0d63bd;
  --color-accent: #012a52;         /* Djup, mättad ColoPlus-blå. Monokromt CTA-tema */
  --color-accent-dark: #001a35;
  --color-accent-light: #024b94;
  --color-bg: #f0f5fb;
  --color-bg-gradient: linear-gradient(180deg, #e7f0fa 0%, #eef4fb 45%, #ffffff 100%);
  --color-surface: #ffffff;
  --color-surface-sunken: #eef3f9;
  --color-border: #e1e6ed;
  --color-text: #12202e;
  --color-text-muted: #55697a;
  --color-success: #1a8a4a;
  --color-error: #c0392b;

  /* Typography. Consistent 8px-aligned scale (12/14/16/18/24/32/48/64) */
  --font-heading: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-base: 1rem;     /* 16px */
  --fs-md: 1.125rem;   /* 18px */
  --fs-lg: 1.5rem;     /* 24px */
  --fs-xl: 2rem;        /* 32px */
  --fs-2xl: 3rem;       /* 48px */
  --fs-3xl: 4rem;       /* 64px */
  --lh-tight: 1.12;
  --lh-normal: 1.6;
  --ls-tight: -0.01em;

  /* Spacing scale (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Layout */
  --container-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 3px rgba(2, 75, 148, 0.08);
  --shadow-md: 0 8px 24px rgba(2, 75, 148, 0.12);
  --shadow-lg: 0 20px 48px rgba(2, 75, 148, 0.18);
  --focus-ring: 0 0 0 3px rgba(217, 98, 46, 0.35);

  /* Motion. Custom expo-out curve (snappier start, soft settle) reads more
     considered than the browser's default ease-out on hovers/press states */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 220ms var(--ease-out);
  --transition-slow: 350ms var(--ease-out);

  /* Header height, used for sticky offset / scroll anchoring */
  --header-height: 76px;
}

html {
  font-family: var(--font-body);
  color: var(--color-text);
  /* One continuous blue-white wash over the whole document (not per-section
     flat blocks), so scrolling between sections never hits a hard color seam. */
  background: var(--color-bg-gradient);
  -webkit-font-smoothing: antialiased;
}

/* Visible, accessible focus ring on every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

body { overflow-x: hidden; }
body.nav-open { overflow: hidden; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-primary-dark);
}

p { line-height: var(--lh-normal); color: var(--color-text); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--space-8);
}

/* Used only on index.html's first section, directly after the scroll-world
   outro + usp-bar - the usual --space-8 top padding stacked on top of the
   usp-bar's own padding left too much dead space right as the scroll-hero
   finishes fading out. Doubled-up selector so this beats responsive.css's
   `.section { padding-block }` mobile override on specificity rather than
   relying on source order (which it would otherwise lose - that rule is
   loaded after this file). */
.section.section--tight-top {
  padding-top: var(--space-5);
}

/* Used on the last section before the footer when that section already ends
   in its own visually-bounded content (e.g. butik.html's product grid cards
   have their own bottom edge) - the default --space-8 bottom padding plus
   .site-footer's --space-9 top margin otherwise stack into a ~160px dead
   gap. Doubled-up selector for the same specificity-over-source-order reason
   as --tight-top above. */
.section.section--tight-bottom {
  padding-bottom: var(--space-5);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-7);
}

.section-header h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}

.section-header p {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--space-4);
  z-index: 1000;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-3);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 248, 252, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: 0 1px 0 var(--color-border), 0 4px 20px rgba(2, 75, 148, 0.06);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links a {
  font-weight: 500;
  font-size: var(--fs-sm);
  color: var(--color-text);
  position: relative;
  padding-block: var(--space-2);
  transition: color var(--transition-fast);
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a[aria-current='page']::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--color-text);
  /* The icon itself is 22px, well under the ~44px minimum touch target
     recommended by Apple/Google - easy to mis-tap on mobile. Padding grows
     the hit area without changing the visual icon size or spacing; the
     matching negative margin cancels the padding's effect on layout so
     .nav-actions' gap between icons looks exactly the same as before. */
  padding: 11px;
  margin: -11px;
}

.account-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-text);
  padding: 11px;
  margin: -11px;
}

.account-link .icon,
.cart-link .icon {
  width: 22px;
  height: 22px;
  transition: color var(--transition-fast);
}

.account-link:hover .icon,
.cart-link:hover .icon {
  color: var(--color-primary);
}

.cart-badge {
  background: var(--color-accent);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  padding-inline: 4px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-darker);
  color: #cfe0f2;
  padding-block: var(--space-8) var(--space-6);
  margin-top: var(--space-9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-6);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.footer-grid h3 {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.footer-grid p, .footer-grid a {
  color: #a9c7e3;
  font-size: var(--fs-sm);
  line-height: 1.8;
}

.footer-grid a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--container-max);
  margin-inline: auto;
  margin-top: var(--space-7);
  padding-inline: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  color: #9db8cf;
}

.usp-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.usp-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.usp-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text);
}

.usp-item .icon-inline {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.payment-icons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.payment-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #cfe0f2;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
}

.payment-icon svg {
  width: 15px;
  height: 15px;
}

.payment-icons-light {
  justify-content: center;
  margin-top: var(--space-3);
}

.payment-icons-light .payment-icon {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.footer-newsletter {
  max-width: var(--container-max);
  margin: 0 auto var(--space-7);
  padding-inline: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-newsletter h3 {
  color: #fff;
  margin: 0 0 4px;
}

.footer-newsletter p {
  margin: 0;
  color: #9db8cf;
  font-size: var(--fs-sm);
}

.footer-newsletter-form {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.footer-newsletter-form input[type="email"] {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  min-width: 240px;
}

.footer-newsletter-form input[type="email"]::placeholder {
  color: #9db8cf;
}

.footer-newsletter-status {
  width: 100%;
  font-size: var(--fs-xs);
  margin-top: var(--space-2);
}

.footer-newsletter-status.error { color: #ffb4a8; }
.footer-newsletter-status.success { color: #a8e6bb; }

.regulatory-notice {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-7);
  margin-bottom: var(--space-5);
  padding-top: var(--space-5);
  max-width: 720px;
}
