:root {
  color-scheme: dark;
  --bg: #05080c;
  --bg-soft: #08131b;
  --panel: rgba(8, 19, 27, 0.8);
  --panel-solid: #0b1821;
  --text: #f4f8f7;
  --muted: #bdc8ce;
  --soft: #80919a;
  --line: rgba(205, 225, 235, 0.15);
  --accent: #1f8ad4;
  --accent-soft: #9fe8d2;
  --accent-strong: #eef8ff;
  --warm: #ffb252;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --header-height: 86px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f8fb;
  --bg-soft: #eaf2f6;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #ffffff;
  --text: #07131c;
  --muted: #405360;
  --soft: #657782;
  --line: rgba(18, 49, 70, 0.14);
  --accent: #0c72b8;
  --accent-soft: #087f99;
  --accent-strong: #07131c;
  --shadow: 0 24px 70px rgba(9, 32, 50, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(31, 138, 212, 0.18), transparent 30rem),
    radial-gradient(circle at 90% 18%, rgba(159, 232, 210, 0.12), transparent 26rem),
    linear-gradient(180deg, #05080c 0%, #08131b 46%, #040608 100%);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  min-width: 320px;
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 15% 0%, rgba(31, 138, 212, 0.16), transparent 30rem),
    radial-gradient(circle at 90% 18%, rgba(113, 190, 180, 0.14), transparent 26rem),
    linear-gradient(180deg, #f6f9fb 0%, #edf4f7 48%, #f7fafb 100%);
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(3, 6, 10, 0.5);
  border-bottom: 1px solid transparent;
  display: flex;
  gap: 2rem;
  height: var(--header-height);
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(1.25rem, 4vw, 4.5rem);
  position: fixed;
  right: 0;
  top: 0;
  transition: background 220ms ease, border-color 220ms ease, height 220ms ease;
  z-index: 20;
}

.site-header.is-scrolled {
  background: rgba(3, 7, 11, 0.9);
  border-color: var(--line);
  height: 74px;
}

[data-theme="light"] .site-header {
  background: rgba(247, 251, 253, 0.58);
}

[data-theme="light"] .site-header.is-scrolled {
  background: rgba(247, 251, 253, 0.9);
}

.brand {
  align-items: center;
  display: inline-flex;
  min-width: 240px;
  position: relative;
  z-index: 25;
}

.brand-mark {
  align-items: center;
  display: flex;
  height: 46px;
  justify-content: flex-start;
  min-width: 236px;
}

.logo-shell img {
  max-height: 42px;
  object-fit: contain;
  width: auto;
}

.logo-shell.is-missing::before {
  color: var(--text);
  content: "Nordic Modular";
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.1rem);
}

.main-nav a {
  color: color-mix(in srgb, var(--text) 76%, transparent);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
}

.header-actions {
  align-items: center;
  display: flex;
  flex-direction: row-reverse;
  gap: 1rem;
}

.theme-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0 0.85rem;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(31, 138, 212, 0.46);
  transform: translateY(-1px);
}

.theme-toggle-dot {
  background: linear-gradient(135deg, #9fd4ff, #9fe8d2);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(159, 212, 255, 0.5);
  height: 0.7rem;
  width: 0.7rem;
}

[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .theme-toggle:hover,
[data-theme="light"] .theme-toggle:focus-visible {
  background: #ffffff;
}

.menu-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: background 180ms ease, transform 180ms ease;
  width: 44px;
  z-index: 25;
}

.menu-toggle span:not(.sr-only) {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
  width: 18px;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  align-items: center;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  padding: calc(var(--header-height) + 3rem) clamp(1.25rem, 5vw, 5rem) 7rem;
  position: relative;
}

.hero > img,
.hero::before {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.hero.is-missing::before,
.interior-card.is-missing::before {
  background:
    radial-gradient(circle at 70% 10%, rgba(159, 232, 210, 0.22), transparent 24rem),
    linear-gradient(130deg, rgba(31, 138, 212, 0.18), transparent 36%),
    linear-gradient(150deg, #102538 0%, #05090e 48%, #142923 100%);
  content: "";
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.9) 0%, rgba(2, 5, 9, 0.6) 43%, rgba(2, 5, 9, 0.18) 100%),
    linear-gradient(0deg, rgba(4, 8, 12, 0.88) 0%, transparent 38%),
    radial-gradient(circle at 63% 15%, rgba(159, 232, 210, 0.08), transparent 30rem);
  inset: 0;
  position: absolute;
  z-index: 1;
}

[data-theme="light"] .hero-overlay {
  background:
    linear-gradient(90deg, rgba(246, 250, 252, 0.78) 0%, rgba(246, 250, 252, 0.42) 35%, rgba(246, 250, 252, 0.08) 66%, rgba(246, 250, 252, 0) 100%),
    linear-gradient(0deg, rgba(246, 250, 252, 0.58) 0%, rgba(246, 250, 252, 0.2) 28%, transparent 52%);
}

.hero-content {
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3.5rem, 7.4vw, 8.2rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 1.5rem;
  max-width: 11ch;
  white-space: nowrap;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 4.3rem);
  letter-spacing: 0;
  line-height: 1.03;
  margin-bottom: 1.45rem;
}

.slogan {
  color: color-mix(in srgb, var(--text) 88%, var(--accent) 12%);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-text {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  max-width: 680px;
}

.button {
  align-items: center;
  border-radius: var(--radius);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.3rem;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.primary-button {
  background: linear-gradient(135deg, #f3fbff, #9fd4ff);
  box-shadow: 0 18px 46px rgba(31, 138, 212, 0.24);
  color: #04101b;
  margin-top: 1.4rem;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(31, 138, 212, 0.36);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(230, 244, 237, 0.32);
  color: var(--accent-strong);
  white-space: nowrap;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(230, 244, 237, 0.58);
}

.section {
  padding: clamp(5.5rem, 10vw, 9rem) clamp(1.25rem, 5vw, 5rem);
  scroll-margin-top: var(--header-height);
}

.section-inner {
  margin: 0 auto;
  max-width: 1180px;
  width: 100%;
}

.concept-section {
  background:
    radial-gradient(circle at 85% 14%, rgba(255, 178, 82, 0.08), transparent 24rem),
    linear-gradient(180deg, rgba(5, 10, 15, 0.96), rgba(8, 19, 27, 0.99)),
    var(--bg-soft);
}

[data-theme="light"] .concept-section {
  background:
    radial-gradient(circle at 85% 14%, rgba(255, 178, 82, 0.12), transparent 24rem),
    linear-gradient(180deg, rgba(246, 250, 252, 0.96), rgba(232, 241, 246, 0.99)),
    var(--bg-soft);
}

.concept-grid {
  align-items: center;
  display: grid;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
}

.concept-copy p {
  color: var(--muted);
  font-size: 1.03rem;
  max-width: 660px;
}

.interior-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 178, 82, 0.04);
  margin: 0;
  overflow: hidden;
  position: relative;
}

.interior-card img,
.interior-card::before {
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  width: 100%;
}

.keyword-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.keyword-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--accent-strong);
  display: flex;
  font-weight: 700;
  justify-content: center;
  min-height: 96px;
  padding: 1rem;
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

[data-theme="light"] .keyword-card {
  background: rgba(255, 255, 255, 0.7);
}

.keyword-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(31, 138, 212, 0.48);
  transform: translateY(-4px);
}

.cta-section {
  background:
    radial-gradient(circle at 20% 20%, rgba(31, 138, 212, 0.18), transparent 28rem),
    linear-gradient(120deg, rgba(159, 232, 210, 0.08), transparent 42%),
    #05080c;
}

[data-theme="light"] .cta-section {
  background:
    radial-gradient(circle at 20% 20%, rgba(31, 138, 212, 0.12), transparent 28rem),
    linear-gradient(120deg, rgba(113, 190, 180, 0.12), transparent 42%),
    #f7fafb;
}

.cta-panel {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(12, 30, 43, 0.95), rgba(5, 10, 15, 0.94)),
    var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(1.5rem, 4.5vw, 4rem);
}

[data-theme="light"] .cta-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 246, 250, 0.9)),
    var(--panel-solid);
}

.cta-panel h2 {
  font-size: clamp(1.8rem, 3.2vw, 3.3rem);
  max-width: 820px;
}

.cta-panel p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 680px;
}

.site-footer {
  background: #03070a;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.95rem;
  padding: 2rem clamp(1.25rem, 5vw, 5rem);
  text-align: center;
}

[data-theme="light"] .site-footer {
  background: #edf4f7;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.image-shell.is-missing img {
  display: none;
}

@media (max-width: 980px) {
  .concept-grid,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .interior-card {
    max-width: 620px;
  }

  .keyword-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .secondary-button {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 76px;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .brand {
    min-width: 178px;
  }

  .brand-mark {
    height: 40px;
    min-width: 178px;
  }

  .logo-shell img {
    max-height: 36px;
    max-width: 162px;
  }

  .menu-toggle {
    display: flex;
  }

  .header-actions {
    gap: 0.55rem;
  }

  .theme-toggle {
    height: 44px;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    width: 44px;
  }

  .theme-toggle [data-theme-label] {
    display: none;
  }

  .main-nav {
    align-items: stretch;
    background: rgba(5, 12, 16, 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: grid;
    gap: 0;
    left: 0;
    opacity: 0;
    padding: calc(var(--header-height) + 0.5rem) 1rem 1rem;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateY(-12px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 15;
  }

  .menu-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav a {
    border-top: 1px solid var(--line);
    font-size: 1rem;
    padding: 1rem 0.2rem;
  }

  .hero {
    min-height: 92svh;
    padding-bottom: 5rem;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(2, 5, 9, 0.9), rgba(2, 5, 9, 0.62)),
      linear-gradient(0deg, rgba(4, 8, 12, 0.88) 0%, transparent 44%);
  }

  [data-theme="light"] .hero-overlay {
    background:
      linear-gradient(90deg, rgba(246, 250, 252, 0.8), rgba(246, 250, 252, 0.46)),
      linear-gradient(0deg, rgba(246, 250, 252, 0.58) 0%, transparent 44%);
  }

  h1 {
    font-size: clamp(2.85rem, 15vw, 5rem);
    white-space: normal;
  }

  .keyword-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .keyword-card {
    min-height: 82px;
  }

  .secondary-button {
    white-space: normal;
    width: 100%;
  }
}

@media (max-width: 460px) {
  .section,
  .hero {
    padding-inline: 1rem;
  }

  .keyword-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
