/* =========================================================
   forside.css  –  JPF Farming landingsside
   Palette:
     --earth:    #3B2A1A   (mørk jord)
     --hay:      #C8963E   (gyldent hø)
     --grass:    #4A7C40   (græsgrøn)
     --sky:      #87CEEB   (himmelblå)
     --cream:    #F5EDD8   (lys hvedefarve)
     --wheat:    #E8C97A   (hvedefarve)
     --bark:     #6B4226   (bark/træ)
     --white:    #FFFFFF
   ========================================================= */

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

:root {
  --earth:  #3B2A1A;
  --hay:    #C8963E;
  --grass:  #4A7C40;
  --sky:    #87CEEB;
  --cream:  #F5EDD8;
  --wheat:  #E8C97A;
  --bark:   #6B4226;
  --white:  #FFFFFF;
  --shadow: 0 4px 24px rgba(59,42,26,.15);
  --radius: 14px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--earth);
  overflow-x: hidden;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.4rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all .2s;
}
.btn--primary   { background: var(--hay); color: var(--earth); }
.btn--primary:hover { background: #b07e2f; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost     { background: transparent; color: var(--cream); }
.btn--ghost:hover { background: rgba(255,255,255,.15); }
.btn--outline   { background: transparent; border-color: var(--hay); color: var(--hay); }
.btn--outline:hover { background: var(--hay); color: var(--earth); }
.btn--nav       { background: var(--grass); color: var(--white); padding: .5rem 1.1rem; font-size: .88rem; }
.btn--nav:hover { background: #3a6332; }
.btn--large     { padding: .85rem 2rem; font-size: 1.05rem; }
.btn--full      { width: 100%; justify-content: center; }

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}
.nav--scrolled {
  background: rgba(59,42,26,.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
}
.nav__logo-icon { font-size: 1.5rem; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav__links a {
  text-decoration: none;
  color: rgba(245,237,216,.85);
  font-size: .92rem;
  font-weight: 500;
  transition: color .2s;
}
.nav__links a:hover { color: var(--wheat); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(175deg, #1a3a5c 0%, #2d6a8c 30%, #4a9b5e 60%, #5aad47 80%, #3d8c30 100%);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 6rem 2rem 3rem;
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  /* stretch the section itself */
}
.hero::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(175deg, #1a3a5c 0%, #2d6a8c 30%, #4a9b5e 60%, #5aad47 80%, #3d8c30 100%);
  z-index: -1;
}
/* re-scope the hero bg properly */
section.hero {
  min-height: 100vh;
  background: linear-gradient(175deg, #1a3a5c 0%, #2d6a8c 30%, #4a9b5e 60%, #5aad47 80%, #3d8c30 100%);
  max-width: 100%;
  padding: 6rem 4rem 4rem;
}

.hero__sky {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  pointer-events: none;
}

/* Clouds */
.cloud {
  position: absolute;
  background: rgba(255,255,255,.75);
  border-radius: 50px;
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,.75);
  border-radius: 50%;
}
.cloud--1 { width: 140px; height: 40px; top: 15%; left: 8%; animation: drift 18s linear infinite; }
.cloud--1::before { width: 60px; height: 60px; top: -30px; left: 20px; }
.cloud--1::after  { width: 80px; height: 50px; top: -25px; left: 60px; }
.cloud--2 { width: 100px; height: 30px; top: 22%; left: 55%; animation: drift 24s linear infinite 5s; }
.cloud--2::before { width: 50px; height: 50px; top: -25px; left: 10px; }
.cloud--3 { width: 120px; height: 35px; top: 10%; left: 75%; animation: drift 20s linear infinite 10s; }
.cloud--3::before { width: 55px; height: 55px; top: -28px; left: 30px; }

@keyframes drift {
  from { transform: translateX(-300px); }
  to   { transform: translateX(110vw); }
}

.hero__content {
  position: relative;
  z-index: 2;
  color: var(--white);
}
.hero__eyebrow {
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wheat);
  margin-bottom: 1rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.0;
  margin-bottom: 1.5rem;
  text-shadow: 0 3px 12px rgba(0,0,0,.3);
}
.hero__sub {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255,255,255,.88);
  max-width: 480px;
  margin-bottom: 2rem;
}
.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero__stats {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.stat { text-align: center; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--wheat);
}
.stat__label {
  font-size: .78rem;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.stat__divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,.25);
}

/* Scene illustration */
.hero__scene {
  position: relative;
  z-index: 2;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.scene__ground {
  position: absolute;
  bottom: 0; left: -20px; right: -20px;
  height: 100px;
  background: linear-gradient(180deg, #5aad47 0%, #3d7a2e 100%);
  border-radius: 20px 20px 0 0;
}
.scene__field {
  position: absolute;
  bottom: 80px;
  display: flex;
  gap: 1.5rem;
}
.crop { font-size: 2.8rem; animation: sway 3s ease-in-out infinite; }
.crop--1 { animation-delay: 0s; }
.crop--2 { animation-delay: .4s; }
.crop--3 { animation-delay: .8s; }
.crop--4 { animation-delay: 1.2s; }
@keyframes sway {
  0%, 100% { transform: rotate(-3deg); }
  50%       { transform: rotate(3deg); }
}
.scene__barn    { position: absolute; bottom: 90px; left: 10px; font-size: 4rem; }
.scene__silo    { position: absolute; bottom: 95px; right: 10px; font-size: 3.5rem; }
.scene__tractor { position: absolute; bottom: 78px; left: 80px; font-size: 3rem; animation: truckBob 4s ease-in-out infinite; }
@keyframes truckBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
.scene__animals {
  position: absolute;
  bottom: 82px;
  right: 60px;
  font-size: 2.2rem;
  display: flex;
  gap: .5rem;
}

/* ── SECTION GLOBALS ── */
.section-eyebrow {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grass);
  margin-bottom: .6rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--earth);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.section-sub {
  font-size: 1.05rem;
  color: #6b5a49;
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ── FEATURES ── */
.features {
  background: var(--cream);
  padding: 6rem 2rem;
}
.features__inner {
  max-width: 1100px;
  margin: 0 auto;
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.feature-card {
  background: var(--white);
  border: 1.5px solid rgba(200,150,62,.2);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.feature-card__icon { font-size: 2.2rem; margin-bottom: 1rem; }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .6rem;
  color: var(--earth);
}
.feature-card p {
  font-size: .93rem;
  color: #7a6552;
  line-height: 1.65;
}

/* ── LEVELS ── */
.levels {
  background: var(--earth);
  padding: 6rem 2rem;
  color: var(--cream);
}
.levels__inner { max-width: 800px; margin: 0 auto; }
.levels .section-eyebrow { color: var(--wheat); }
.levels .section-title { color: var(--cream); }
.levels__track {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2.5rem;
  position: relative;
}
.levels__track::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(200,150,62,.3);
}
.level-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 0;
  position: relative;
}
.level-item__badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bark);
  border: 2px solid rgba(200,150,62,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wheat);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.level-item--unlocked .level-item__badge {
  background: var(--grass);
  border-color: var(--hay);
  color: var(--white);
}
.level-item--locked .level-item__badge {
  background: #2a1f16;
  color: #5a4a3a;
  border-color: #3a2a1a;
}
.level-item__info strong {
  display: block;
  font-size: 1.05rem;
  color: var(--wheat);
}
.level-item__info span {
  font-size: .88rem;
  color: rgba(245,237,216,.6);
}
.level-item--locked .level-item__info strong,
.level-item--locked .level-item__info span {
  color: #5a4a3a;
}

/* ── CTA SECTION ── */
.cta-section {
  background: linear-gradient(135deg, var(--grass) 0%, #2d6b3e 100%);
  padding: 6rem 2rem;
  text-align: center;
}
.cta-section__inner { max-width: 700px; margin: 0 auto; }
.cta-section .section-eyebrow { color: var(--wheat); }
.cta-section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1rem;
}
.cta-section__sub {
  color: rgba(255,255,255,.8);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.cta-section__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.cta-section__note {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
}

/* ── FOOTER ── */
.footer {
  background: var(--earth);
  padding: 2rem;
  text-align: center;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--wheat);
  margin-bottom: .5rem;
}
.footer__copy {
  font-size: .82rem;
  color: rgba(245,237,216,.4);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
}
.modal-overlay.active { display: block; }
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.95);
  z-index: 201;
  background: var(--cream);
  border-radius: 20px;
  padding: 2.5rem;
  width: min(440px, 92vw);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  display: none;
  flex-direction: column;
  gap: 1.1rem;
  transition: transform .25s;
}
.modal.active {
  display: flex;
  transform: translate(-50%, -50%) scale(1);
}
.modal__close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #9a8070;
  transition: color .2s;
}
.modal__close:hover { color: var(--earth); }
.modal__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--earth);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: #6b5a49;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-group input {
  padding: .75rem 1rem;
  border: 1.5px solid #d8c9b5;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: .97rem;
  background: var(--white);
  color: var(--earth);
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus { border-color: var(--hay); }
.modal__switch {
  text-align: center;
  font-size: .88rem;
  color: #8a7060;
}
.modal__switch a { color: var(--grass); text-decoration: none; font-weight: 600; }
.modal__msg {
  font-size: .88rem;
  min-height: 1.2rem;
  text-align: center;
  font-weight: 500;
}
.modal__msg.success { color: var(--grass); }
.modal__msg.error   { color: #c0392b; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  section.hero {
    grid-template-columns: 1fr;
    padding: 5rem 1.5rem 3rem;
    text-align: center;
  }
  .hero__cta, .hero__stats { justify-content: center; }
  .hero__scene { display: none; }
  .nav__links a:not(.btn) { display: none; }
  .features__grid { grid-template-columns: 1fr; }
  .cta-section__buttons { flex-direction: column; align-items: center; }
}
