/*
Theme Name: Madluppen
Theme URI: https://madluppen.dk
Author: Madluppen
Author URI: https://madluppen.dk
Description: Officielt WordPress-tema for Madluppen — appen der afslører ultraforarbejdet mad. Designet med fokus på hastighed, læsbarhed og dansk tone. Inkluderer forside, funktioner, premium, om, kontakt, blog og 404.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: madluppen
*/

/* === Design tokens === */
:root {
  --green: #2EB872;
  --green-dark: #1B6E45;
  --orange: #FF8A3D;
  --bg: #FAF9F6;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #5C5C5C;
  --border: #E5E5E5;
  --upf-1: #2EB872;
  --upf-2: #A3D977;
  --upf-3: #FFC542;
  --upf-4: #FF5A4E;

  --container: 1200px;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.625;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.375rem, 2.5vw, 1.75rem); }
h4 { font-family: var(--font-body); font-size: 1.125rem; font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* Container */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: white; color: var(--text); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--green); }
.btn-orange { background: var(--orange); color: white; }
.btn-large { padding: 18px 36px; font-size: 1.125rem; }

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-logo:hover { text-decoration: none; }
.site-logo svg { width: 28px; height: 28px; color: var(--green); }
.site-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.site-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
}
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text); }

@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.is-open {
    display: block;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 24px;
  }
  .site-nav.is-open ul { flex-direction: column; gap: 20px; align-items: flex-start; }
  .menu-toggle { display: block; }
}

/* === Hero === */
.hero {
  padding: 80px 0 120px;
  background: linear-gradient(180deg, var(--bg) 0%, white 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(46, 184, 114, 0.1);
  color: var(--green-dark);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 24px; }
.hero p.lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Phone mockup placeholder */
.phone-mockup {
  width: 280px;
  height: 580px;
  background: var(--text);
  border-radius: 40px;
  padding: 12px;
  margin: 0 auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  position: relative;
}
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 24px;
  background: var(--text);
  border-radius: 12px;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 28px;
  overflow: hidden;
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .phone-mockup { width: 220px; height: 460px; }
}

/* === Trust bar === */
.trust-bar {
  background: var(--text);
  color: white;
  text-align: center;
  padding: 20px 0;
  font-weight: 500;
}
.trust-bar .star { color: var(--orange); margin-right: 8px; }

/* === Sections === */
section.section { padding: 96px 0; }
@media (max-width: 768px) { section.section { padding: 64px 0; } }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--text-muted); font-size: 1.125rem; }

/* Feature trio */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.feature-card {
  background: white;
  padding: 40px 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(46, 184, 114, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 24px;
}
.feature-card h3 { margin-bottom: 12px; }
.feature-card p { color: var(--text-muted); }
@media (max-width: 768px) { .feature-grid { grid-template-columns: 1fr; } }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step { text-align: center; position: relative; z-index: 1; }
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 4px solid white;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); }
@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { display: none; }
}

/* Premium teaser */
.premium-teaser {
  background: var(--text);
  color: white;
  border-radius: var(--radius);
  padding: 64px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.premium-teaser h2 { color: white; margin-bottom: 16px; }
.premium-teaser p { color: rgba(255, 255, 255, 0.8); margin-bottom: 24px; font-size: 1.0625rem; }
.premium-mockup {
  background: linear-gradient(135deg, var(--orange) 0%, #d63a8e 100%);
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-size: 1.5rem;
  padding: 32px;
  text-align: center;
}
@media (max-width: 768px) {
  .premium-teaser { padding: 40px 28px; grid-template-columns: 1fr; }
}

/* Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.testimonial {
  background: white;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.testimonial p { font-size: 1.0625rem; line-height: 1.6; margin-bottom: 24px; font-style: italic; }
.testimonial cite { color: var(--text-muted); font-style: normal; font-weight: 600; font-size: 0.9375rem; }
@media (max-width: 768px) { .testimonials { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); padding: 24px 0; }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  padding: 0;
}
.faq-question::after {
  content: '+';
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--green);
  transition: transform 0.2s;
}
.faq-item.is-open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding-top 0.3s ease;
  color: var(--text-muted);
}
.faq-item.is-open .faq-answer { max-height: 500px; padding-top: 16px; }

/* Final CTA */
.final-cta {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: white;
  text-align: center;
  padding: 96px 24px;
  border-radius: var(--radius);
}
.final-cta h2 {
  color: white;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.final-cta .btn { background: white; color: var(--green-dark); }
.final-cta .btn:hover { background: var(--bg); }

/* Newsletter */
.newsletter { padding: 80px 0; text-align: center; }
.newsletter h2 { margin-bottom: 16px; }
.newsletter p {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; }
.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: white;
}
.newsletter-form input:focus { outline: none; border-color: var(--green); }
@media (max-width: 480px) { .newsletter-form { flex-direction: column; } }

/* === Footer === */
.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 32px;
  margin-top: 96px;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.site-footer h4 {
  color: white;
  margin-bottom: 16px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.7); font-size: 0.9375rem; }
.site-footer a:hover { color: white; }
.footer-brand .site-logo { color: white; margin-bottom: 16px; display: inline-flex; }
.footer-brand p { font-size: 0.9375rem; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 48px;
  padding-top: 24px;
  text-align: center;
  font-size: 0.875rem;
}
@media (max-width: 768px) { .site-footer .container { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .container { grid-template-columns: 1fr; } }

/* === Funktioner page === */
.feature-list-section { padding: 80px 0; }
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 96px;
}
.feature-row:nth-child(even) .feature-row-text { order: 2; }
.feature-row:last-child { margin-bottom: 0; }
.feature-row-text h2 { margin-bottom: 16px; }
.feature-row-text p { font-size: 1.0625rem; color: var(--text-muted); }
.feature-row-visual {
  background: linear-gradient(135deg, rgba(46, 184, 114, 0.12), rgba(255, 138, 61, 0.12));
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  color: var(--green-dark);
  font-size: 1.25rem;
  text-align: center;
  padding: 32px;
}
@media (max-width: 768px) {
  .feature-row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; }
  .feature-row:nth-child(even) .feature-row-text { order: 0; }
}

/* === Premium page === */
.pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 880px;
  margin: 0 auto;
}
.pricing-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
}
.pricing-card.is-featured { border-color: var(--green); position: relative; }
.pricing-card.is-featured::before {
  content: 'Mest populær';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pricing-card h3 { margin-bottom: 8px; }
.pricing-card .price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0;
}
.pricing-card .price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.pricing-card ul { list-style: none; margin: 24px 0; }
.pricing-card ul li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--text-muted);
}
.pricing-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
.pricing-card .btn { display: block; text-align: center; }
@media (max-width: 768px) { .pricing { grid-template-columns: 1fr; } }

/* === Generic page === */
.page-content { max-width: 760px; margin: 0 auto; padding: 64px 24px; }
.page-content h1 { margin-bottom: 32px; }
.page-content h2 { margin-top: 48px; margin-bottom: 16px; }
.page-content p { font-size: 1.0625rem; line-height: 1.7; margin-bottom: 16px; color: var(--text-muted); }
.page-content ul { font-size: 1.0625rem; line-height: 1.7; margin: 0 0 16px 24px; color: var(--text-muted); }
.page-content li { margin-bottom: 8px; }

/* === Blog === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.blog-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.blog-card-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
}
img.blog-card-image { width: 100%; object-fit: cover; display: block; background: none; }
.post-hero-image { width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 40px; display: block; }
.blog-card-content { padding: 28px; }
.blog-card h3 { margin-bottom: 12px; font-size: 1.25rem; }
.blog-card h3 a { color: inherit; }
.blog-card p { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 16px; }
.blog-meta { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 8px; }
@media (max-width: 768px) { .blog-grid { grid-template-columns: 1fr; } }

/* === Contact form === */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form input,
.contact-form textarea {
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--green); }
