/* ==========================================================================
   Ice Stream – icestream.se
   Statisk one-pager. Inga externa beroenden; Poppins självhostas.
   ========================================================================== */

/* ---- Fonter ---- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin.woff2") format("woff2");
}

/* ---- Designtokens ---- */
:root {
  --ink: #231f20;
  --body: #494f56;
  --muted: #6b7683;
  --bg: #fbfdfe;
  --surface: #ffffff;
  --frost-1: #eef6fb;
  --frost-2: #dcedf7;
  --ice-300: #a9d5ee;
  --ice-500: #57a8dc;
  --ice-700: #1d6fa5;
  --ice-900: #14517a;
  --border: rgba(29, 111, 165, 0.12);

  --font-heading: "Poppins", ui-sans-serif, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-s: 10px;
  --radius-m: 16px;

  --shadow-rest: 0 4px 16px rgba(20, 81, 122, 0.07);
  --shadow-hover: 0 14px 32px rgba(20, 81, 122, 0.12);

  --container: 1100px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-pad: clamp(4rem, 9vw, 7rem);
}

/* ---- Bas ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
.nowrap { white-space: nowrap; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.17rem; }

p { margin: 0 0 1em; }

a {
  color: var(--ice-700);
  text-decoration: none;
}
a:hover { color: var(--ice-900); }

:focus-visible {
  outline: 2px solid var(--ice-700);
  outline-offset: 2px;
  border-radius: 2px;
}

img, svg { max-width: 100%; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Skip-länk ---- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6em 1.2em;
  background: var(--ice-700);
  color: #fff;
  border-radius: var(--radius-s);
}
.skip-link:focus-visible {
  top: 1rem;
  color: #fff;
}

/* ---- Logotyp (inlinad SVG, original färg #231f20) ---- */
.logo {
  display: block;
  height: 36px;
  width: auto;
}
.logo-fill { fill: var(--logo-color, #231f20); }
.logo-stroke {
  fill: none;
  stroke: var(--logo-color, #231f20);
  stroke-miterlimit: 10;
}
.logo-text {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 32.36px;
  fill: var(--logo-color, #231f20);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 253, 254, 0.8);
  border-bottom: 1px solid rgba(29, 111, 165, 0.1);
  transition: box-shadow 0.25s ease;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--bg); }
}
.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(20, 81, 122, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 0.9rem;
}

.brand { display: inline-block; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.25rem, 1.5vw, 1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: inline-block;
  padding: 0.55em 0.8em;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: var(--radius-s);
}
.nav-list a:hover {
  color: var(--ice-700);
  background: var(--frost-1);
}

/* ---- Sektioner ---- */
.section {
  padding-block: var(--section-pad);
  scroll-margin-top: 5.5rem;
}
.section-frost {
  background: linear-gradient(180deg, var(--frost-1) 0%, #f5fafd 100%);
}

.kicker {
  margin: 0 0 0.75em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ice-700);
}

.section-intro {
  max-width: 58ch;
  margin-bottom: 2.5rem;
}

.prose {
  max-width: 65ch;
  margin-bottom: 3rem;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(520px, 78vh, 780px);
  overflow: hidden;
  background:
    radial-gradient(52rem 30rem at 82% 4%, rgba(169, 213, 238, 0.4), transparent 65%),
    radial-gradient(40rem 26rem at 8% 88%, rgba(220, 237, 247, 0.7), transparent 60%),
    radial-gradient(30rem 20rem at 30% 18%, rgba(232, 244, 251, 0.9), transparent 65%),
    linear-gradient(180deg, #f4fafd 0%, var(--bg) 100%);
}

.hero-watermark {
  position: absolute;
  right: -6%;
  bottom: -14%;
  width: clamp(320px, 46vw, 640px);
  height: auto;
  color: var(--ice-700);
  opacity: 0.07;
  pointer-events: none;
}
.hero-watermark polyline,
.hero-watermark polygon {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.5;
  stroke-miterlimit: 10;
}
.hero-watermark circle { fill: currentColor; }

.hero-inner {
  position: relative;
  max-width: 900px;
  padding-block: var(--section-pad);
}

.hero-sub {
  max-width: 56ch;
  font-size: clamp(1.1rem, 1.9vw, 1.25rem);
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---- Knappar ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.7em;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease,
              box-shadow 0.2s ease, transform 0.2s ease;
}
.btn-primary {
  background: var(--ice-700);
  color: #fff;
  box-shadow: var(--shadow-rest);
}
.btn-primary:hover {
  background: var(--ice-900);
  color: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-rest);
}
.btn-secondary:hover {
  color: var(--ice-700);
  border-color: var(--frost-2);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }

/* ---- Kort ---- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-rest);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.card h3 { margin-bottom: 0.5em; }
.card p:last-of-type { margin-bottom: 0; }

/* ---- Värdepunkter (utan kortram) ---- */
.grid-values { gap: 2.5rem 2.5rem; }
.value::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ice-500), var(--ice-300));
  margin-bottom: 1.2rem;
}
.value h3 { margin-bottom: 0.5em; }
.value p { margin: 0; font-size: 0.98rem; }

/* ---- Processteg ---- */
.grid-steps {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-rest);
}
.step-number {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--ice-300);
  margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.08rem; }
.step p { margin-bottom: 0; font-size: 0.98rem; }

/* ---- Produktkort ---- */
.grid-products {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.product-card {
  display: flex;
  flex-direction: column;
  padding: 2.2rem 2rem;
}
.product-tag {
  margin: 0 0 0.9rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ice-700);
}
.product-card h3 { font-size: 1.35rem; }
.card-link {
  display: inline-block;
  margin-top: auto;
  padding-top: 1.3rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.98rem;
}
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Kontakt ---- */
.section-contact {
  background:
    radial-gradient(46rem 24rem at 85% 10%, rgba(220, 237, 247, 0.55), transparent 62%),
    radial-gradient(36rem 22rem at 12% 90%, rgba(238, 246, 251, 0.8), transparent 60%),
    var(--bg);
}
.contact-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-inner .section-intro { margin-bottom: 2rem; }

.contact-form {
  width: 100%;
  max-width: 560px;
  display: grid;
  gap: 1.15rem;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: var(--shadow-rest);
}
.form-field {
  display: grid;
  gap: 0.4rem;
}
.form-field label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
}
.form-field input,
.form-field textarea {
  font: inherit;
  color: var(--body);
  background: var(--bg);
  border: 1px solid var(--frost-2);
  border-radius: var(--radius-s);
  padding: 0.65em 0.9em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--ice-500);
  box-shadow: 0 0 0 3px rgba(87, 168, 220, 0.2);
}
.form-field textarea { resize: vertical; min-height: 130px; }

/* Honeypot: dolt för människor, avvisas i mailer.php om ifyllt */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit {
  justify-content: center;
  border: 0;
  cursor: pointer;
  margin-top: 0.3rem;
}

.form-success {
  width: 100%;
  max-width: 560px;
  margin: 0 0 1.5rem;
  padding: 0.9em 1.2em;
  background: var(--frost-1);
  border: 1px solid var(--ice-300);
  border-radius: var(--radius-s);
  color: var(--ice-900);
  font-weight: 500;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  color: #b9c3cc;
  padding-block: 3.5rem 2.5rem;
}
.site-footer .logo { --logo-color: #eef6fb; height: 32px; }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  text-align: center;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a,
.footer-mail {
  color: #dce6ee;
  font-size: 0.95rem;
}
.footer-nav a:hover,
.footer-mail:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer :focus-visible { outline-color: var(--ice-300); }
.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: #8d99a5;
}

/* ---- Scroll-reveal (endast med JS; utan JS syns allt direkt) ---- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
html.js .grid [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
html.js .grid [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
html.js .grid [data-reveal]:nth-child(4) { transition-delay: 0.24s; }

/* ---- Reducerad rörelse ---- */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .card,
  .btn-primary:hover,
  .btn-secondary:hover,
  .card:hover {
    transition: none;
    transform: none;
  }
}

/* ---- Responsivt ---- */
@media (max-width: 640px) {
  .header-inner {
    justify-content: center;
    padding-block: 0.75rem;
  }
  .nav-list { justify-content: center; }
  .nav-list a { padding: 0.5em 0.6em; font-size: 0.9rem; }
  .logo { height: 30px; }
  .section { scroll-margin-top: 7.5rem; }
  .hero-watermark { right: -18%; bottom: -8%; }
}
