/* ==========================================================================
   Eco Städ – stylesheet
   ========================================================================== */

:root {
  --green: #2E7D4F;
  --green-deep: #1B6E4A;
  --green-deep-dark: #155a3c;
  --gold: #D4A72C;
  --gold-dark: #b88f21;
  --charcoal: #3A4550;
  --slate: #6B7686;
  --bg: #FBFBF9;
  --bg-tint: #F1F5F1;
  --white: #ffffff;

  --font-heading: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(58, 69, 80, 0.06);
  --shadow-md: 0 12px 32px rgba(58, 69, 80, 0.10);
  --shadow-lg: 0 20px 48px rgba(27, 110, 74, 0.14);

  --container-w: 1160px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--charcoal);
  line-height: 1.2;
  margin: 0 0 0.6em;
}
p { margin: 0 0 1em; }
button { font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only, .visually-hidden-field {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--green-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.9em;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85em 1.7em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-accent {
  background: var(--gold);
  color: var(--green-deep-dark);
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  border-color: rgba(58,69,80,0.18);
  color: var(--charcoal);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(251, 251, 249, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(58,69,80,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand-icon { width: 40px; height: 40px; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--charcoal);
}
.main-nav ul {
  display: flex;
  gap: 28px;
}
.main-nav a {
  font-weight: 500;
  color: var(--charcoal);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.2s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.header-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 22px; height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(17,46,32,0.94) 0%, rgba(19,55,38,0.82) 34%, rgba(19,55,38,0.42) 62%, rgba(19,55,38,0.22) 100%),
    linear-gradient(0deg, rgba(15,38,27,0.35) 0%, rgba(15,38,27,0) 30%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0;
  padding-top: 160px;
  padding-bottom: 96px;
  padding-left: clamp(24px, 6vw, 88px);
  padding-right: 24px;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  margin-bottom: 0.45em;
}
.hero-lead {
  font-size: 1.14rem;
  color: rgba(255,255,255,0.86);
  max-width: 520px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 1.6em;
}
.btn-ghost-invert {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}
.btn-ghost-invert:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 2.2em;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}
.hero-badge img { width: 20px; height: 20px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; scroll-margin-top: 84px; }
#kontakt, #om-oss, #tjanster, #varfor-vi { scroll-margin-top: 84px; }
.section-tint { background: var(--bg-tint); }
.section-heading { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-heading .eyebrow { display: block; }
.section-lead { color: var(--slate); font-size: 1.05rem; }

/* ---------- Om oss ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.about-text h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.about-points { margin-top: 1.4em; display: flex; flex-direction: column; gap: 12px; }
.about-points li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.about-points .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.about-visual { display: flex; justify-content: center; }
.about-blob {
  width: 320px; height: 320px;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  background: linear-gradient(150deg, var(--bg-tint), #e7efe8);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.about-blob img { width: 55%; height: 55%; object-fit: contain; }

/* ---------- Cards (Tjänster) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--bg-tint);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.card-icon svg { width: 30px; height: 30px; }
.card h3 { font-size: 1.4rem; }
.card-list { margin: 1.2em 0; display: flex; flex-direction: column; gap: 10px; }
.card-list li {
  padding-left: 26px;
  position: relative;
  color: var(--charcoal);
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 14px; height: 8px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.card-link {
  display: inline-block;
  margin-top: 0.5em;
  font-weight: 600;
  color: var(--green-deep);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.card-link:hover { border-color: var(--gold); color: var(--gold-dark); }

/* ---------- Features (Varför välja oss) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--white);
  color: var(--green-deep);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 0.4em; }
.feature p { color: var(--slate); font-size: 0.98rem; margin: 0; }

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 26px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--white);
  color: var(--green-deep);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-label { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate); margin-bottom: 0.15em; }
.contact-item a { font-weight: 500; color: var(--charcoal); }
.contact-item a:hover { color: var(--green-deep); }

.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row-half { flex-direction: row; gap: 20px; }
.form-row-half > div { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.contact-form label { font-weight: 600; font-size: 0.92rem; }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(58,69,80,0.18);
  background: var(--bg);
  color: var(--charcoal);
  resize: vertical;
  transition: border-color 0.2s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--green);
  outline: none;
}
.form-submit { align-self: flex-start; margin-top: 4px; }
.form-status {
  font-weight: 600;
  min-height: 1.4em;
  color: var(--green-deep);
}
.form-status.error { color: #b3413a; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,0.88);
  padding-top: 72px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: rgba(255,255,255,0.72); max-width: 320px; }
.social-links { display: flex; gap: 12px; margin-top: 18px; }
.social-links a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  color: #fff;
}
.social-links a svg { width: 18px; height: 18px; }
.social-links a:hover { background: var(--gold); color: var(--green-deep-dark); }

.footer-nav h4, .footer-contact h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1.1em;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-contact a { color: rgba(255,255,255,0.78); }
.footer-nav a:hover, .footer-contact a:hover { color: var(--gold); }
.footer-contact p { color: rgba(255,255,255,0.78); margin-bottom: 0.6em; }

.footer-bottom {
  padding: 22px 24px;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
}
.footer-bottom p { margin: 0; }

/* ---------- Scroll reveal ---------- */
/* Progressive enhancement: elements only start hidden once script.js has
   confirmed it can run and will un-hide them (it adds "js" to <html>
   immediately). With JavaScript disabled/blocked, .reveal never gets the
   hidden state at all, so all content stays visible by default instead of
   silently disappearing. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
  .about-blob { width: 220px; height: 220px; }
  .card-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid rgba(58,69,80,0.08);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.is-open { max-height: 340px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
  .main-nav li { border-bottom: 1px solid rgba(58,69,80,0.06); }
  .main-nav a { display: block; padding: 14px 0; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { min-height: 0; }
  .hero-media img { object-position: center 18%; }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(15,38,27,0.55) 0%, rgba(15,38,27,0.72) 55%, rgba(15,38,27,0.92) 100%),
      linear-gradient(100deg, rgba(17,46,32,0.55) 0%, rgba(19,55,38,0.35) 100%);
  }
  .hero-inner { padding: 220px 24px 56px; max-width: 100%; }
  .hero-badge { font-size: 0.8rem; padding: 9px 14px; margin-top: 1.8em; }
  .section { padding: 64px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .form-row-half { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
}
