/* Kapp Nordic static site
   Plain HTML + CSS. No JavaScript.
   Assumes existing /logo.png is available on the deployed site.
*/

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #eef3f7;
  --ink: #101820;
  --muted: #5e6a73;
  --line: #d9e1e7;
  --blue: #0F70B7;
  --blue-dark: #0F70B7;
  --blue-soft: #d9edf8;
  --accent: #2DAAE1;
  --max: 1180px;
  --radius: 2px;
  --shadow: 0 14px 40px rgba(16, 24, 32, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

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

p {
  margin: 0 0 1rem;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(3.1rem, 8vw, 7rem);
  max-width: 980px;
}

h2 {
  font-size: clamp(2.1rem, 4.5vw, 4.25rem);
  max-width: 850px;
}

h3 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

h4 {
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

small {
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  font-size: .93rem;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta {
  padding: .65rem .9rem;
  border: 1px solid var(--ink);
  color: var(--ink) !important;
  font-weight: 650;
}

main {
  overflow: hidden;
}

.section {
  padding: clamp(4rem, 8vw, 8rem) 1.25rem;
}

.section-tight {
  padding: clamp(3rem, 6vw, 5rem) 1.25rem;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 73px);
  display: grid;
  align-items: center;
  padding: clamp(5rem, 9vw, 8rem) 1.25rem;
  background:
    radial-gradient(circle at 80% 18%, rgba(45, 170, 225, .20), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--blue-dark);
  font-weight: 750;
  font-size: .78rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 1.25rem;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 2px;
  background: var(--accent);
}

.hero-lede {
  margin-top: 1.6rem;
  max-width: 720px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: #31404b;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .8rem 1.05rem;
  border: 1px solid var(--ink);
  font-weight: 750;
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.hero-panel-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.kpi {
  margin-top: 1.2rem;
  display: grid;
  gap: .75rem;
}

.kpi-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: .92rem;
}

.bar {
  height: 10px;
  background: var(--surface-soft);
  position: relative;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0F70B7, #2DAAE1);
}

.panel-note {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
}

.split {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.copy-large {
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  color: #283744;
}

.muted {
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--surface);
  padding: clamp(1.4rem, 3vw, 2rem);
  min-height: 220px;
}

.card p {
  color: var(--muted);
}

.card .meta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.pill {
  border: 1px solid var(--line);
  padding: .32rem .5rem;
  font-size: .78rem;
  color: var(--muted);
  background: #fff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 2.5rem;
}

.product-card {
  background: var(--surface);
  padding: clamp(1.4rem, 3vw, 2rem);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card h3 {
  margin-bottom: .55rem;
}

.product-card p {
  color: var(--muted);
}

.product-card .category {
  color: var(--blue-dark);
  font-weight: 750;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.product-card a {
  color: var(--blue-dark);
  font-weight: 750;
}

.dark {
  background: #0b1218;
  color: #fff;
}

.dark .muted,
.dark p {
  color: #bac6cf;
}

.dark .card,
.dark .product-card {
  background: #101a23;
  border-color: rgba(255,255,255,.1);
}

.dark .grid-3,
.dark .grid-2,
.dark .portfolio-grid {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.12);
}

.dark .pill {
  background: #0b1218;
  border-color: rgba(255,255,255,.18);
  color: #c7d2da;
}

.quote-block {
  border-left: 4px solid var(--accent);
  padding-left: 1.4rem;
  font-size: clamp(1.35rem, 2.5vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.list-clean {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .8rem;
}

.list-clean li {
  padding-left: 1.3rem;
  position: relative;
  color: var(--muted);
}

.list-clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.page-hero {
  padding: clamp(5rem, 8vw, 7rem) 1.25rem clamp(3rem, 6vw, 5rem);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.page-hero p {
  max-width: 780px;
  margin-top: 1.4rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: #31404b;
}

.text-block {
  max-width: 820px;
}

.text-block h2 {
  margin-bottom: 1.25rem;
}

.text-block h3 {
  margin: 2.2rem 0 .8rem;
}

.text-block p,
.text-block li {
  font-size: 1.06rem;
  color: #44515c;
}

.site-footer {
  background: #071018;
  color: #fff;
  padding: 3rem 1.25rem;
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  align-items: start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem 1.2rem;
  justify-content: flex-end;
  color: #bac6cf;
}

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

.form {
  display: grid;
  gap: 1rem;
  max-width: 760px;
  margin-top: 2rem;
}

.form label {
  font-weight: 700;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: .9rem 1rem;
  font: inherit;
  background: #fff;
}

.form textarea {
  min-height: 170px;
  resize: vertical;
}

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

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

  .nav {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta-row {
    display: none;
  }

  body {
    background: #fff;
  }

  .section,
  .page-hero {
    padding: 2rem 0;
  }
}


/* Brand colour refinements */
.dark .eyebrow {
  color: #2DAAE1;
}

.dark .eyebrow::before {
  background: #2DAAE1;
}

.dark .product-card .category,
.dark .product-card a {
  color: #2DAAE1;
}

.dark .button.secondary {
  color: #ffffff;
  border-color: rgba(255,255,255,.75);
}

.dark .button {
  background: #2DAAE1;
  border-color: #2DAAE1;
  color: #071018;
}

.dark .button.secondary {
  background: transparent;
  color: #ffffff;
}

.brand img {
  width: 42px;
  height: 42px;
}

@media (max-width: 900px) {
  .brand img {
    width: 38px;
    height: 38px;
  }
}


/* Header brand update */
.nav {
  min-height: 92px;
}

.brand {
  gap: 1rem;
}

.brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .28rem;
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.brand-kapp {
  color: #2DAAE1;
}

.brand-nordic {
  color: #0F70B7;
}

@media (max-width: 900px) {
  .nav {
    min-height: 80px;
  }

  .brand img {
    width: 58px;
    height: 58px;
  }

  .brand-wordmark {
    font-size: 1.35rem;
  }
}


/* Restrained Nordic motion
   CSS-only. No JS. Slow aurora/grid effect for hero and dark sections.
*/

.hero,
.dark {
  position: relative;
  isolation: isolate;
}

.hero::before,
.hero::after,
.dark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.hero::before {
  background:
    linear-gradient(115deg, transparent 0%, rgba(45,170,225,.10) 32%, transparent 58%),
    linear-gradient(72deg, transparent 12%, rgba(15,112,183,.09) 42%, transparent 70%);
  background-size: 180% 180%, 160% 160%;
  opacity: .85;
  animation: nordicAurora 28s ease-in-out infinite alternate;
}

.hero::after {
  background-image:
    linear-gradient(rgba(15,112,183,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,112,183,.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.65), transparent 78%);
  opacity: .55;
  animation: nordicGridDrift 42s linear infinite;
}

.dark::before {
  background:
    linear-gradient(120deg, transparent 8%, rgba(45,170,225,.075) 36%, transparent 64%),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 180% 180%, 72px 72px, 72px 72px;
  opacity: .75;
  animation: nordicDarkDrift 36s ease-in-out infinite alternate;
}

@keyframes nordicAurora {
  0% {
    background-position: 0% 42%, 100% 30%;
    transform: translate3d(0, 0, 0);
  }
  100% {
    background-position: 100% 56%, 0% 65%;
    transform: translate3d(0, -1.5%, 0);
  }
}

@keyframes nordicGridDrift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 56px 56px, 56px 56px;
  }
}

@keyframes nordicDarkDrift {
  0% {
    background-position: 0% 50%, 0 0, 0 0;
  }
  100% {
    background-position: 100% 50%, 72px 36px, 72px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after,
  .dark::before {
    animation: none;
  }
}


/* v5: replace animated CSS background with fixed image panels */
.hero::before,
.hero::after,
.dark::before {
  display: none;
}


/* Fixed image background / parallax-style sections */
.image-fixed {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: center;
  color: #ffffff;
  background-image:
    linear-gradient(90deg, rgba(7,16,24,.92), rgba(7,16,24,.58) 48%, rgba(7,16,24,.78)),
    url("nordic-platform-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  isolation: isolate;
}

.image-fixed::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,16,24,.08), rgba(7,16,24,.84)),
    radial-gradient(circle at 74% 24%, rgba(45,170,225,.18), transparent 28rem);
  pointer-events: none;
  z-index: -1;
}

.image-fixed .container {
  position: relative;
  z-index: 1;
}

.image-fixed h2,
.image-fixed h1 {
  color: #ffffff;
}

.image-fixed p {
  color: #d8e5ed;
}

.image-fixed .eyebrow {
  color: #2DAAE1;
}

.image-fixed .eyebrow::before {
  background: #2DAAE1;
}

.image-fixed .quote-block {
  border-left-color: #2DAAE1;
  color: #ffffff;
}

.image-fixed .button {
  background: #2DAAE1;
  border-color: #2DAAE1;
  color: #071018;
}

.image-fixed .button.secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,.75);
}

/* Keep fixed backgrounds sane on mobile/tablet where background-attachment: fixed is often poor */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .image-fixed {
    background-attachment: scroll;
    min-height: auto;
  }
}
