/* Solkart — global styles */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:ital,wght@0,400;0,500;0,600;1,400&display=swap");

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  color: oklch(0.22 0.04 60);
  -webkit-font-smoothing: antialiased;
}

/* ── forecast error banner ──────────────────────────────── */
.forecast-error-banner {
  position: relative; z-index: 10;
  padding: 10px 20px;
  background: oklch(0.92 0.08 25);
  color: oklch(0.3 0.1 25);
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

/* ── backgrounds ────────────────────────────────────────── */
.solkart-root {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
.solkart-root::after {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, oklch(0.55 0.08 65 / 0.08) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}
.solkart-root > * { position: relative; z-index: 1; }
.bg-summer {
  background:
    radial-gradient(ellipse at 80% -10%, oklch(0.92 0.13 80) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 110%, oklch(0.88 0.10 50) 0%, transparent 55%),
    linear-gradient(180deg, oklch(0.97 0.04 85) 0%, oklch(0.95 0.05 75) 100%);
  background-attachment: fixed;
}
.bg-morning {
  background:
    radial-gradient(ellipse at 50% -20%, oklch(0.93 0.11 70) 0%, transparent 60%),
    linear-gradient(180deg, oklch(0.96 0.05 65) 0%, oklch(0.94 0.06 50) 100%);
  background-attachment: fixed;
}
.bg-calm {
  background:
    radial-gradient(ellipse at 80% 0%, oklch(0.95 0.06 90) 0%, transparent 60%),
    linear-gradient(180deg, oklch(0.98 0.015 90) 0%, oklch(0.95 0.02 80) 100%);
  background-attachment: fixed;
}

/* ── header ─────────────────────────────────────────────── */
.solkart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 56px;
  border-bottom: 1px solid oklch(0.86 0.04 75 / 0.6);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand__wordmark {
  font-family: "Newsreader", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: oklch(0.25 0.05 55);
}
.brand__sub {
  font-size: 12px; letter-spacing: 0.08em;
  color: oklch(0.5 0.04 60);
  margin-top: 2px;
}
.header-meta { text-align: right; }
.header-meta__date {
  font-size: 13px; color: oklch(0.45 0.04 60);
  text-transform: capitalize;
}
.header-meta__clock {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px; font-weight: 500; color: oklch(0.25 0.05 55);
  margin-top: 2px;
}
.muted { color: oklch(0.55 0.03 70); font-size: 12px; }

/* ── grid ───────────────────────────────────────────────── */
.solkart-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(540px, 1.15fr);
  gap: 48px;
  padding: 48px 56px 64px;
  max-width: 1640px;
  margin: 0 auto;
}

/* ── left panel ─────────────────────────────────────────── */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.18em; font-weight: 600;
  color: oklch(0.5 0.05 55); text-transform: uppercase;
  padding: 6px 12px;
  background: oklch(0.99 0.01 80 / 0.7);
  border: 1px solid oklch(0.85 0.04 75);
  border-radius: 999px;
}
.kicker.dark { background: transparent; border-color: oklch(0.78 0.05 70); }

.hero-h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(48px, 4.6vw, 72px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 22px 0 24px;
  color: oklch(0.22 0.05 55);
  text-wrap: pretty;
}
.hero-h1 em {
  font-style: italic;
  color: oklch(0.55 0.18 55);
}
.hero-lede {
  font-size: 17px;
  line-height: 1.55;
  color: oklch(0.35 0.03 60);
  max-width: 52ch;
  margin: 0 0 36px;
}

.ticker-card {
  background: oklch(0.99 0.005 85 / 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid oklch(0.86 0.04 75);
  border-radius: 24px;
  padding: 32px 32px 24px;
  box-shadow: 0 30px 60px -40px oklch(0.4 0.08 60 / 0.5);
}
.stat-row {
  display: flex; gap: 12px;
  margin-top: 28px;
}

.promo {
  margin-top: 36px;
}
.promo__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.promo__col {
  background: oklch(0.99 0.005 85 / 0.6);
  border: 1px solid oklch(0.86 0.04 75);
  border-radius: 18px;
  padding: 22px 22px 20px;
}
.promo__logo {
  font-family: "Newsreader", Georgia, serif;
  font-size: 19px; font-weight: 600;
  color: oklch(0.55 0.18 45);
  margin-bottom: 10px;
}
.promo__logo.alt { color: oklch(0.5 0.16 230); }
.promo__col p {
  font-size: 14px; line-height: 1.5;
  color: oklch(0.4 0.03 60);
  margin: 0 0 14px;
}
.promo__cta {
  font-size: 13px; font-weight: 600;
  color: oklch(0.5 0.18 45);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.promo__cta.alt { color: oklch(0.5 0.16 230); }
.promo__cta:hover { text-decoration: underline; }

/* ── right (map) panel ──────────────────────────────────── */
.map-card {
  background: oklch(0.99 0.005 85 / 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid oklch(0.86 0.04 75);
  border-radius: 28px;
  padding: 24px 24px 16px;
  box-shadow: 0 30px 60px -40px oklch(0.4 0.08 60 / 0.5);
  position: sticky; top: 24px;
}
.map-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 8px;
  gap: 24px;
}
.map-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px; font-weight: 500;
  letter-spacing: -0.015em;
  color: oklch(0.25 0.05 55);
  margin: 8px 0 0;
}
.map-stage {
  position: relative;
  aspect-ratio: 1000 / 1200;
  max-height: 70vh;
  margin: 0 auto;
}
.map-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px;
  border-top: 1px solid oklch(0.88 0.03 75);
  font-size: 12px;
  color: oklch(0.45 0.03 60);
  gap: 18px;
}

.legend { min-width: 180px; }
.legend__row { display: flex; gap: 2px; }
.legend__swatch {
  flex: 1; height: 14px; border-radius: 2px;
}
.legend__labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: oklch(0.5 0.04 60);
  margin-top: 4px; letter-spacing: 0.04em;
}

/* ── tooltip ────────────────────────────────────────────── */
.hover-tip {
  position: absolute;
  top: 16px; left: 16px;
  background: oklch(0.99 0.005 85);
  border: 1px solid oklch(0.85 0.04 75);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 200px;
  box-shadow: 0 12px 24px -16px oklch(0.3 0.08 60 / 0.5);
  pointer-events: none;
}
.hover-tip__name {
  font-family: "Newsreader", Georgia, serif;
  font-size: 18px; font-weight: 600;
  color: oklch(0.25 0.05 55);
  margin-bottom: 8px;
}
.hover-tip__row {
  display: flex; justify-content: space-between;
  font-size: 13px;
  margin: 3px 0;
}
.hover-tip__row span { color: oklch(0.5 0.03 60); }
.hover-tip__row strong { color: oklch(0.3 0.05 55); font-weight: 600; font-variant-numeric: tabular-nums; }

.night-banner {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: oklch(0.3 0.04 280);
  color: oklch(0.95 0.02 80);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 12px 24px -10px oklch(0.2 0.05 280 / 0.6);
}

/* ── pulse animation for live dot ───────────────────────── */
@keyframes solkart-pulse {
  0%   { transform: scale(0.8); opacity: 0.9; }
  80%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

.promo__tag {
  display: inline-block;
  font-size: 10px; letter-spacing: 0.16em; font-weight: 700;
  color: oklch(0.55 0.18 45); text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: oklch(0.94 0.06 75);
  margin-bottom: 12px;
}
.promo__tag.alt { color: oklch(0.45 0.16 230); background: oklch(0.93 0.05 230); }

/* ── embed demo section ─────────────────────────────────── */
.embed-section {
  padding: 24px 56px 72px;
  max-width: 1640px;
  margin: 0 auto;
}
.embed-section__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  background: oklch(0.99 0.005 85 / 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid oklch(0.86 0.04 75);
  border-radius: 28px;
  padding: 44px 48px;
}
.embed-section__title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 36px; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.05;
  color: oklch(0.22 0.05 55);
  margin: 14px 0 14px;
  text-wrap: pretty;
}
.embed-section__lede {
  font-size: 16px; line-height: 1.55;
  color: oklch(0.4 0.03 60);
  max-width: 50ch;
  margin: 0 0 24px;
}
.embed-region-picker {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: oklch(0.45 0.04 60);
  margin-bottom: 18px;
}
.embed-region-picker select {
  font-family: inherit; font-size: 14px;
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid oklch(0.82 0.04 70);
  background: oklch(0.99 0.005 85);
  color: oklch(0.25 0.04 55);
}
.embed-code {
  position: relative;
  background: oklch(0.96 0.015 80);
  border: 1px solid oklch(0.86 0.04 75);
  border-radius: 12px;
  padding: 16px 18px;
}
.embed-code pre {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px; line-height: 1.55;
  color: oklch(0.32 0.04 60);
  white-space: pre-wrap; word-break: break-all;
}
.embed-code button {
  position: absolute; top: 10px; right: 10px;
  background: oklch(0.99 0.005 85);
  border: 1px solid oklch(0.78 0.05 65);
  color: oklch(0.4 0.08 50);
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
}
.embed-code button:hover { background: oklch(0.96 0.04 80); }

.embed-preview-stage {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
}
.embed-preview-frame-label {
  font-size: 11px; letter-spacing: 0.16em; font-weight: 600;
  color: oklch(0.55 0.04 60); text-transform: uppercase;
}
.embed-widget {
  width: 360px;
  background: oklch(0.99 0.005 85);
  border: 1px solid oklch(0.85 0.04 70);
  border-radius: 16px;
  padding: 20px 22px 18px;
  box-shadow: 0 24px 48px -28px oklch(0.4 0.08 60 / 0.4);
  font-family: "DM Sans", system-ui, sans-serif;
}
.embed-widget__head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.18em; font-weight: 700;
  color: oklch(0.5 0.16 35); text-transform: uppercase;
}
.embed-widget__pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: oklch(0.6 0.22 30);
  box-shadow: 0 0 0 0 oklch(0.6 0.22 30 / 0.6);
  animation: solkart-pulse 1.6s ease-out infinite;
}
.embed-widget__value {
  font-family: "Newsreader", Georgia, serif;
  font-size: 44px; font-weight: 600;
  color: oklch(0.22 0.05 55);
  letter-spacing: -0.02em; line-height: 1;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.embed-widget__sub {
  font-size: 13px; color: oklch(0.5 0.04 60);
  margin-top: 4px;
}
.embed-widget__bar {
  margin-top: 16px; height: 6px;
  background: oklch(0.94 0.02 75);
  border-radius: 999px; overflow: hidden;
}
.embed-widget__bar-fill {
  height: 100%; border-radius: 999px;
  transition: width 1s ease, background 1s ease;
}
.embed-widget__meta {
  display: flex; justify-content: space-between;
  font-size: 12px; color: oklch(0.5 0.04 60);
  margin-top: 8px;
}
.embed-widget__title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 17px; font-weight: 600;
  color: oklch(0.3 0.05 55);
  margin-top: 12px; line-height: 1.25;
}
.embed-widget__title + .embed-widget__value { margin-top: 6px; }
.embed-widget__explainer {
  margin-top: 14px;
  font-size: 12px; line-height: 1.5;
  color: oklch(0.45 0.03 60);
}
.embed-widget__foot {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid oklch(0.92 0.02 75);
  font-size: 11px; line-height: 1.45;
  color: oklch(0.55 0.03 60);
}
.embed-widget__foot strong {
  color: oklch(0.35 0.05 55); font-weight: 600;
}

/* ── embed pickers (fylke/kommune toggle) ──────────────── */
.embed-pickers {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px;
}
.embed-mode-toggle {
  display: flex; gap: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid oklch(0.82 0.05 65);
  width: fit-content;
}
.embed-mode-toggle button {
  appearance: none; border: none; cursor: pointer;
  padding: 8px 20px;
  font: 13px/1 "DM Sans", system-ui, sans-serif; font-weight: 600;
  background: oklch(0.97 0.02 80); color: oklch(0.4 0.05 60);
  transition: background 0.15s, color 0.15s;
}
.embed-mode-toggle button.active {
  background: oklch(0.3 0.05 55); color: #fff;
}

/* ── API section ───────────────────────────────────────── */
.api-section {
  padding: 24px 48px 80px;
}
.api-section__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 48px;
}
.api-section__intro { max-width: 720px; }
.api-section__title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 32px; font-weight: 600; letter-spacing: -0.01em;
  color: oklch(0.22 0.05 55); margin: 12px 0 16px;
}
.api-section__lede {
  font-size: 16px; line-height: 1.6; color: oklch(0.35 0.04 55);
}

/* API features grid */
.api-section__why h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px; font-weight: 600; color: oklch(0.25 0.05 55);
  margin-bottom: 24px;
}
.api-features {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.api-feature {
  display: flex; gap: 16px; padding: 24px;
  background: oklch(0.99 0.005 80 / 0.7); border-radius: 16px;
  border: 1px solid oklch(0.88 0.03 75);
}
.api-feature__icon { font-size: 28px; flex-shrink: 0; }
.api-feature strong {
  display: block; font-size: 15px; font-weight: 700;
  color: oklch(0.25 0.05 55); margin-bottom: 6px;
}
.api-feature p {
  font-size: 13.5px; line-height: 1.55; color: oklch(0.4 0.04 55); margin: 0;
}

/* Pricing plans */
.api-section__plans h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px; font-weight: 600; color: oklch(0.25 0.05 55);
  margin-bottom: 24px;
}
.api-plans {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.api-plan {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px 24px; border-radius: 16px;
  background: oklch(0.99 0.005 80 / 0.7);
  border: 1px solid oklch(0.88 0.03 75);
}
.api-plan.featured {
  border-color: oklch(0.55 0.18 35);
  box-shadow: 0 4px 24px oklch(0.5 0.12 40 / 0.12);
}
.api-plan__badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  padding: 3px 14px; border-radius: 99px;
  background: oklch(0.55 0.18 35); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap;
}
.api-plan__name {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 18px; font-weight: 700; color: oklch(0.25 0.05 55);
  margin-bottom: 8px;
}
.api-plan__price {
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px; font-weight: 600; color: oklch(0.3 0.1 40);
  margin-bottom: 20px;
}
.api-plan__price span { font-size: 14px; font-weight: 400; color: oklch(0.5 0.04 55); }
.api-plan__features {
  list-style: none; padding: 0; margin: 0 0 24px; flex: 1;
  display: flex; flex-direction: column; gap: 10px;
}
.api-plan__features li {
  font-size: 13.5px; color: oklch(0.35 0.04 55); line-height: 1.4;
  padding-left: 20px; position: relative;
}
.api-plan__features li::before {
  content: "✓"; position: absolute; left: 0; color: oklch(0.5 0.18 140); font-weight: 700;
}
.api-plan__cta {
  display: block; text-align: center; padding: 10px 16px; border-radius: 10px;
  font: 14px/1.2 "DM Sans", system-ui, sans-serif; font-weight: 600;
  text-decoration: none;
  background: oklch(0.94 0.02 80); color: oklch(0.3 0.05 55);
  transition: background 0.15s;
}
.api-plan__cta:hover { background: oklch(0.9 0.03 75); }
.api-plan__cta.featured {
  background: oklch(0.55 0.18 35); color: #fff;
}
.api-plan__cta.featured:hover { background: oklch(0.48 0.18 35); }

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .solkart-grid { grid-template-columns: 1fr; gap: 32px; padding: 32px 24px 56px; }
  .map-card { position: static; }
  .solkart-header { padding: 18px 24px; }
  .promo__row { grid-template-columns: 1fr; }
  .stat-row { flex-wrap: wrap; }
  .embed-section { padding: 12px 24px 56px; }
  .embed-section__inner { grid-template-columns: 1fr; gap: 32px; padding: 32px 24px; }
  .api-section { padding: 24px 24px 56px; }
  .api-features { grid-template-columns: 1fr; }
  .api-plans { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .api-plans { grid-template-columns: 1fr; }
}
