/* K Energitjänst — offline static site */
:root {
  --red: #e60000;
  --red-dark: #b80000;
  --gold: #ffc107;
  --gold-dark: #d39e00;
  --gray-section: #706f6f;
  --footer-bg: #3e3a3a;
  --footer-input: #4d4a4a;
  --text: #212529;
  --text-muted: #6c757d;
  --white: #fff;
  --font-nav: "Fira Sans Extra Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --font-body: "Segoe UI", system-ui, sans-serif;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1140px, 100% - 2rem);
  margin-inline: auto;
}

.container-wide {
  width: min(1320px, 100% - 2rem);
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--red);
  box-shadow: var(--shadow);
}

.header-top {
  display: none;
  text-align: center;
  padding: 1.5rem 1rem 0;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-top .logo-text {
  font-family: var(--font-nav);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

.header-top .tagline {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 1rem;
  opacity: 0.95;
}

.header-top .phone {
  font-family: var(--font-nav);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.5rem 0 0;
}

.header-top .phone a {
  color: var(--white);
  text-decoration: none;
}

.nav-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-nav);
  font-size: 1.15rem;
  text-transform: uppercase;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  margin-right: auto;
}

.nav-brand:hover {
  color: var(--gold-dark);
  text-decoration: none;
}

.nav-brand svg {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: #000;
  color: var(--white);
  border: 0;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-nav);
  font-size: 0.85rem;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.nav-menu .has-dropdown > a::after {
  content: " ▾";
  font-size: 0.75em;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--red-dark);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  box-shadow: var(--shadow);
}

.dropdown a {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
}

.has-dropdown.open .dropdown,
.has-dropdown:hover .dropdown {
  display: block;
}

@media (min-width: 992px) {
  .frontpage .header-top {
    display: block;
  }

  .frontpage .nav-brand {
    display: none;
  }
}

@media (max-width: 991px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-menu.open {
    display: flex;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.2);
    padding-left: 1rem;
  }

  .has-dropdown.open .dropdown {
    display: block;
  }

  .has-dropdown:hover .dropdown {
    display: none;
  }

  .has-dropdown.open:hover .dropdown {
    display: block;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: clamp(420px, 55vh, 620px);
  display: flex;
  align-items: center;
  background:
    linear-gradient(115deg, rgba(15, 20, 35, 0.92) 0%, rgba(30, 45, 80, 0.75) 45%, rgba(180, 60, 0, 0.35) 100%),
    radial-gradient(circle at 80% 40%, rgba(255, 140, 0, 0.45) 0%, transparent 45%),
    linear-gradient(180deg, #0d1117 0%, #1a2332 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 80px,
      rgba(255, 255, 255, 0.02) 80px,
      rgba(255, 255, 255, 0.02) 81px
    );
  pointer-events: none;
}

.hero-book {
  position: absolute;
  top: 0;
  right: clamp(1rem, 8%, 10%);
  z-index: 2;
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 1rem 1.25rem;
  text-transform: uppercase;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, background 0.2s;
}

.hero-book:hover {
  background: var(--red-dark);
  transform: translateY(2px);
  text-decoration: none;
  color: var(--white);
}

.hero-book .icon {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(640px, 100% - 2rem);
  margin: 4rem auto 3rem  clamp(1rem, 8%, 10%);
  padding: 2rem 2.25rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-inner h1 {
  font-family: var(--font-nav);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  text-transform: uppercase;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.hero-inner p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.hero-inner .lead {
  font-family: var(--font-nav);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 700;
  color: var(--red);
  margin: 0;
  text-transform: uppercase;
}

@media (max-width: 991px) {
  .hero-book {
    display: none;
  }

  .hero-inner {
    margin-inline: auto;
  }
}

/* —— Services grid —— */
.services {
  background: var(--gray-section);
  color: var(--white);
  padding: 4rem 0;
}

.section-title {
  font-family: var(--font-nav);
  text-transform: uppercase;
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 2.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-card .icon-wrap {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #555 0%, #333 100%);
  border-bottom: 3px solid var(--gold);
}

.service-card .icon-wrap svg {
  width: 64px;
  height: 64px;
  opacity: 0.9;
}

.service-card .body {
  padding: 1.25rem 1rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card h3 {
  font-family: var(--font-nav);
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.service-card h3 a {
  color: var(--white);
  text-decoration: none;
}

.service-card h3 a:hover {
  color: var(--gold);
}

.service-card p {
  margin: 0 0 1.25rem;
  flex: 1;
  font-size: 0.95rem;
  opacity: 0.92;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-nav);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  text-decoration: none;
  color: #000;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--text);
  text-decoration: none;
}

/* —— CTA band —— */
.cta-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 280px;
}

.cta-band .cta-text {
  background: var(--red);
  color: var(--white);
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta-band .cta-text h2 {
  font-family: var(--font-nav);
  text-transform: uppercase;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 1rem;
}

.cta-band .cta-text p {
  margin: 0 0 1.5rem;
  max-width: 36ch;
}

.cta-band .cta-visual {
  background:
    linear-gradient(135deg, rgba(255, 0, 0, 0.15) 0%, transparent 50%),
    linear-gradient(160deg, #2a2a2a 0%, #1a1a1a 100%);
  position: relative;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
}

.cta-band .cta-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 60% 50%, rgba(255, 120, 0, 0.35) 0%, transparent 55%),
    repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(255, 255, 255, 0.03) 24px, rgba(255, 255, 255, 0.03) 25px);
}

@media (max-width: 768px) {
  .cta-band {
    grid-template-columns: 1fr;
  }

  .cta-band .cta-visual {
    min-height: 160px;
    clip-path: none;
  }
}

/* —— Page content —— */
main.page-main {
  flex: 1;
  padding: 4rem 0;
}

.page-title {
  font-family: var(--font-nav);
  text-transform: uppercase;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 2rem;
  color: var(--red);
}

.content-block {
  max-width: 72ch;
}

.content-block h2 {
  font-family: var(--font-nav);
  text-transform: uppercase;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.content-block ul.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.content-block ul.checklist li {
  padding: 0.35rem 0 0.35rem 1.75rem;
  position: relative;
}

.content-block ul.checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: bold;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 2rem 0;
}

.feature-grid .btn-outline {
  border-color: var(--red);
  color: var(--red);
  text-align: center;
  padding: 0.65rem 0.5rem;
  font-size: 0.8rem;
}

.feature-grid .btn-outline:hover {
  background: var(--red);
  color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.map-placeholder {
  aspect-ratio: 16/10;
  background: linear-gradient(145deg, #4a6741 0%, #2d3a28 40%, #8b7355 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 1rem;
}

/* —— Footer —— */
.site-footer {
  background: var(--footer-bg);
  color: var(--white);
  padding: 3.5rem 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  font-family: var(--font-nav);
  text-transform: uppercase;
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.site-footer a {
  color: var(--gold);
}

.site-footer a:hover {
  color: var(--white);
}

.footer-skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.footer-skills a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  font-size: 0.82rem;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.footer-skills a:hover {
  background: var(--red);
  border-color: var(--red);
  text-decoration: none;
}

.contact-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.contact-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 576px) {
  .contact-form .row {
    grid-template-columns: 1fr;
  }
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #666;
  background: var(--footer-input);
  color: var(--white);
  font: inherit;
  border-radius: var(--radius);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25);
}

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

.form-note {
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0 1.5rem;
  text-align: right;
  color: #8c8585;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: #8c8585;
}

.sitemap-list {
  columns: 2;
  gap: 2rem;
  list-style: none;
  padding: 0;
}

@media (max-width: 576px) {
  .sitemap-list {
    columns: 1;
  }
}

.sitemap-list li {
  margin-bottom: 0.5rem;
  break-inside: avoid;
}

.badge-offline {
  display: inline-block;
  background: rgba(255, 193, 7, 0.15);
  color: var(--gold-dark);
  border: 1px solid var(--gold);
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
