/* Fælles farver fra Figma */
:root {
  --background: #f7f5ef;
  --green-dark: #24352b;
  --green-button: #315b40;
  --green-card: #e4ebdd;
}

/* Grundregler */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--green-dark);
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 27px;
}
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible, main:focus-visible {
  outline: 2px solid var(--green-button);
  outline-offset: 4px;
}
.container {
  width: calc(100% - 48px);
  max-width: 1280px;
  margin-inline: auto;
}

/* Spring gentagen navigation over med tastaturet. */
.skip-link {
  position: fixed;
  top: 16px;
  left: 24px;
  z-index: 3;
  max-width: calc(100% - 48px);
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--green-button);
  color: var(--background);
  font-weight: bold;
  transform: translateY(calc(-100% - 24px));
}
.skip-link:focus { transform: translateY(0); }

/* Navigation og mobilmenu */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  min-height: 55px;
}
.site-name { font-size: 24px; font-weight: bold; line-height: 31px; }
.desktop-nav { display: none; }
[aria-current="page"] { font-weight: bold; }
.mobile-menu summary {
  position: relative;
  z-index: 2;
  list-style: none;
  cursor: pointer;
  font-weight: bold;
  line-height: 21px;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.menu-close, .mobile-menu[open] .menu-open { display: none; }
.mobile-menu[open] .menu-close { display: inline; }
.mobile-menu[open]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 360px;
  background: var(--background);
  z-index: 1;
}
.mobile-menu[open] nav {
  position: absolute;
  top: 83px;
  left: 24px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-menu nav a { line-height: 28px; }
.site-name { position: relative; z-index: 2; }

/* Fælles introduktion */
.hero { margin-top: 57px; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
h1 { font-size: 32px; line-height: 38px; }
.hero-text p { color: #000; }
.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--green-button);
  color: var(--background);
  font-weight: bold;
  line-height: 21px;
}
.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 342 / 220;
  object-fit: cover;
  object-position: center top;
  margin-top: 23px;
}

/* Kort, som senere kan genbruges på undersiderne */
.cards { display: grid; gap: 16px; margin-top: 49px; }
ol.cards {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-radius: 12px;
  background: var(--green-card);
}
h2 { font-size: 28px; line-height: 32px; }
.card p { width: 248px; max-width: 100%; }
.card a {
  display: flex;
  align-items: center;
  min-height: 34px;
  font-size: 16px;
  font-weight: bold;
  line-height: 18px;
}

/* Footer */
.site-footer {
  margin-top: 37px;
  padding-bottom: 24px;
  font-size: 16px;
  line-height: 18px;
}

/* Begynderguide: billedplacering og footerafstand fra Figma */
.guide-picture, .equipment-picture, .project-picture { display: block; min-width: 0; }
.page-guide .hero-image {
  width: calc(100% - 1px);
  aspect-ratio: 341 / 221;
  margin-top: 49px;
}
.page-guide .site-footer { margin-top: 48px; }

/* Udstyr: mobilbilledet er lidt smallere end kortene i Figma. */
.page-equipment .hero-image {
  width: calc(100% - 6px);
  aspect-ratio: 336 / 220;
  margin: 77px auto 0;
}
.page-equipment .site-footer { margin-top: 48px; }

/* Første planteprojekt: afstande til billede og footer fra Figma. */
.page-project .hero-image { margin-top: 77px; }
.page-project .site-footer { margin-top: 48px; }

/* Praktisk breakpoint: Figma viser 390 og 1440 px, men angiver intet breakpoint.
   Ved 1200 px er der plads til desktopnavigationen og tre kort. */
@media (min-width: 1200px) {
  .container { width: calc(100% - 160px); }
  .site-header { padding-top: 32px; min-height: 60px; color: #000; }
  .site-name { line-height: 28px; }
  .mobile-menu { display: none; }
  .desktop-nav { display: block; }
  .desktop-nav ul {
    display: flex;
    align-items: center;
    gap: 31px;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .desktop-nav li:nth-child(1) { width: 90px; }
  .desktop-nav li:nth-child(2) { width: 172px; }
  .desktop-nav li:nth-child(3) { width: 79px; }
  .desktop-nav a { line-height: 28px; }
  .hero {
    display: grid;
    grid-template-columns: 560fr 616fr;
    gap: 104px;
    margin-top: 120px;
  }
  h1 { font-size: 40px; line-height: 46px; }
  .hero-text p { max-width: 415px; }
  .hero-image { margin-top: 0; aspect-ratio: 616 / 380; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 80px; }
  .site-footer { margin-top: 80px; min-height: 160px; padding-top: 46px; }
  /* Figma reserverer tre tekstlinjer i desktop-introduktionen. */
  .page-guide .hero-text p, .page-equipment .hero-text p, .page-project .hero-text p { min-height: 81px; }
  .page-guide .hero-image { width: 100%; aspect-ratio: 616 / 380; margin-top: 0; }
  .page-guide .site-footer, .page-equipment .site-footer { margin-top: 53px; }
  .page-equipment .hero-image { width: 100%; aspect-ratio: 616 / 380; margin: 0; }
  .page-project .hero-image { margin-top: 0; }
  .page-project .site-footer { margin-top: 76px; }
  .page-project .desktop-nav li:last-child { width: 162px; white-space: nowrap; }
}

/* Begynderguide: definition og ofte stillede spørgsmål */
.page-guide .guide-content {
  display: grid;
  gap: 24px;
  margin-top: 49px;
}
.page-guide .faq-item h3 {
  margin: 0 0 16px;
  font-size: inherit;
  line-height: inherit;
}
.page-guide .guide-content a { text-decoration: underline; }

/* Udstyr: sammenligningstabel med lokal rulning på smalle skærme */
.page-equipment .equipment-comparison { margin-top: 49px; }
.page-equipment .equipment-table-scroll {
  margin-top: 24px;
  overflow-x: auto;
}
.page-equipment .equipment-table-scroll:focus-visible {
  outline: 2px solid var(--green-button);
  outline-offset: 4px;
}
.page-equipment .equipment-comparison table {
  width: 100%;
  border-collapse: collapse;
}
.page-equipment .equipment-comparison th,
.page-equipment .equipment-comparison td {
  padding: 16px;
  border-bottom: 1px solid var(--green-dark);
  text-align: left;
  vertical-align: top;
}
.page-equipment .equipment-comparison thead { background: var(--green-card); }
