/*
Theme Name: Østfyns Elteknik
Author: Codepilots
Author URI: https://codepilots.io
Description: Lean custom theme for Østfyns El-Teknik, built from the "Forside 1b – Lokal håndværker" handoff. No page builder, no jQuery, no icon font.
Version: 1.0.0
Text Domain: oestfynselteknik
*/

/* Tokens, fonts and text styles (headings, buttons, lists, forms) live in editor-style.css, which header.php
   links before this file so the TinyMCE editors share them. This file is layout and components. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--cream); color: var(--ink); -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; flex: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.skip-link:focus { left: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pagewidth { max-width: 1440px; width: 100%; margin: 0 auto; padding-left: 64px; padding-right: 64px; }
.section { padding-top: 100px; padding-bottom: 100px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; }
.section-head .lead-col { display: flex; flex-direction: column; gap: 16px; max-width: 600px; }
.section-head > p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 420px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 32px; padding: 9px 40px; }
.topbar a { color: #fff; }
.topbar a:hover { color: var(--blue-light); }
.topbar .extra { display: flex; gap: 32px; }
.topbar .sep { opacity: .6; }

/* ---------- Header ---------- */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 21px; flex: none; }
.brand img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand-tag { font-size: 12px; color: var(--subtle); margin-top: 2px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; font-size: 15px; font-weight: 600; }
.main-nav li { position: relative; }
.main-nav li > a { display: flex; align-items: center; gap: 6px; color: var(--ink); padding: 2px 0; border-bottom: 2px solid transparent; }
.main-nav li > a:hover { color: var(--blue); }
.main-nav li > a.active { border-bottom-color: var(--blue); }
.main-nav li > a svg { transition: transform .2s ease; }
.main-nav li:hover > a svg, .main-nav li:focus-within > a svg { transform: rotate(180deg); }
/* Dropdown (the services under "Vi tilbyder"): not in the design, kept simple and in style */
.main-nav .dropdown { display: none; position: absolute; top: calc(100% + 14px); left: -16px; z-index: 60; flex-direction: column; gap: 2px; width: 300px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px -12px rgba(15,27,45,.25); }
.main-nav .dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; } /* keeps hover alive across the gap */
.main-nav li:hover > .dropdown, .main-nav li:focus-within > .dropdown { display: flex; }
.main-nav .dropdown a { display: block; padding: 10px 14px; border-radius: 10px; border: 0; color: var(--ink); font-weight: 600; font-size: 15px; }
.main-nav .dropdown a:hover, .main-nav .dropdown a.active { background: var(--cream); color: var(--ink); }
.main-nav .dropdown .all { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line-2); color: var(--navy); border-radius: 0; display: flex; align-items: center; gap: 8px; }
.main-nav .dropdown .all:hover { background: none; color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .btn { font-size: 14px; padding: 12px 20px; }
.header-actions .btn-ghost { padding: 11px 18px; }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--line-cool); background: none; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.menu-toggle .icon-close { display: none; }
body.menu-open .menu-toggle .icon-menu { display: none; }
body.menu-open .menu-toggle .icon-close { display: block; }

/* Mobile menu */
.mobile-nav { display: none; flex-direction: column; padding: 0 20px 16px; font-size: 18px; font-weight: 600; border-bottom: 1px solid var(--line); background: var(--cream); }
.mobile-nav a { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.mobile-nav a.active { color: var(--blue); }
.mobile-nav .sub { display: flex; flex-direction: column; padding-left: 16px; }
.mobile-nav .sub a { font-size: 16px; font-weight: 500; padding: 11px 0; justify-content: flex-start; gap: 10px; }
.mobile-nav .sub a::before { content: "→"; color: var(--blue); font-weight: 700; }
.mobile-nav .phone { color: var(--navy); border-bottom: 0; }
body.menu-open .mobile-nav { display: flex; }

/* ---------- Hero ---------- */
.hero { padding-top: 40px; display: flex; flex-direction: column; gap: 36px; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.hero h1 { margin: 0; }
.hero-aside { display: flex; flex-direction: column; gap: 22px; padding-bottom: 6px; }
.hero-aside .lead { max-width: 480px; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-media { position: relative; height: 560px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; }
.quote-card { position: absolute; left: 40px; bottom: -60px; width: 460px; background: #fff; border-radius: 20px; padding: 30px 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-card); }
.quote-card blockquote { margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.quote-card blockquote p { margin: 0; font-size: 23px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.quote-card .who { display: flex; align-items: center; gap: 12px; }
.quote-card .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.quote-card .who > div { display: flex; flex-direction: column; line-height: 1.2; }
.quote-card .who b { font-size: 14px; }
.quote-card .who span { font-size: 13px; color: var(--subtle); }

/* ---------- Stats ---------- */
.stats { padding-top: 120px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 24px 0; border-top: 2px solid var(--ink); }
.stat .num { font-size: 36px; font-weight: 700; letter-spacing: -.03em; color: var(--navy); line-height: 1.1; }
.stat .label { font-size: 15px; color: var(--subtle); }

/* ---------- Det vi gør ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.about-text { display: flex; flex-direction: column; gap: 24px; }
.about-text h2 { margin: 0; }
.about-text p { margin: 0; font-size: 17px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; font-size: 16px; font-weight: 600; margin: 0; padding: 0; list-style: none; }
.checks li { display: flex; gap: 10px; align-items: center; }
.checks .check { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.about-text .btn { align-self: flex-start; }
.mosaic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 16px; height: 520px; min-width: 0; }
.mosaic figure { margin: 0; min-width: 0; min-height: 0; }
.mosaic figure:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }

/* ---------- Vi tilbyder ---------- */
.services { background: #fff; }
.services .pagewidth { display: flex; flex-direction: column; gap: 48px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.service-card { display: flex; flex-direction: column; gap: 14px; background: var(--cream); border-radius: 20px; padding: 14px 14px 22px; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.service-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(15,27,45,.35); }
.service-card .thumb { height: 190px; }
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.service-card .thumb.empty { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--blue); }
.services.on-cream .service-card .thumb.empty { background: var(--cream); }
.service-card .text { display: flex; flex-direction: column; gap: 6px; padding: 0 6px; }
.service-card .title { font-size: 19px; font-weight: 700; line-height: 1.25; }
.service-card .short { font-size: 14px; color: var(--subtle); line-height: 1.5; }
.pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pill { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 999px; padding: 18px 24px; font-size: 16px; font-weight: 600; color: var(--ink); transition: border-color .2s ease; }
.pill:hover { color: var(--ink); border-color: var(--blue); }
.pill svg { color: var(--blue); }
.services.on-cream { background: none; }
.services.on-cream .service-card { background: #fff; }
.services.on-cream .pill { background: #fff; }

/* ---------- Anmeldelser ---------- */
.reviews { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 64px; align-items: start; }
.reviews-intro { display: flex; flex-direction: column; gap: 18px; }
.reviews-intro h2 { margin: 0; font-size: 40px; line-height: 1.1; }
.reviews-intro p { margin: 0; }
.reviews-intro .textlink { padding: 0; font-size: 15px; align-self: flex-start; }
.reviews-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.review { background: #fff; border-radius: 20px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.review .stars { display: flex; gap: 3px; color: var(--blue); }
.review blockquote { margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.review blockquote p { margin: 0; font-size: 17px; line-height: 1.55; font-weight: 400; color: var(--ink); }
.review cite { font-style: normal; font-size: 13px; color: var(--subtle); font-weight: 600; }
.business { grid-column: span 2; background: #fff; border-radius: 20px; padding: 30px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
.business > div { display: flex; flex-direction: column; gap: 6px; }
.business .title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.business .text { font-size: 14px; color: var(--subtle); }
.business .btn { white-space: nowrap; font-size: 14px; padding: 12px 20px; }

/* ---------- Kontakt ---------- */
.contact { background: var(--navy); color: #fff; }
.contact a { color: #fff; }
.contact a:hover { color: var(--blue-light); }
.contact .pagewidth { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 80px; align-items: center; }
.contact-text { display: flex; flex-direction: column; gap: 28px; }
.contact-text .eyebrow { color: var(--blue-light); }
.contact-text h2 { margin: 0; font-size: 52px; line-height: 1.02; letter-spacing: -.03em; color: #fff; }
.contact-text > p { margin: 0; font-size: 18px; line-height: 1.55; opacity: .8; max-width: 480px; color: #fff; }
.contact-rows { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); }
.contact-rows > div { display: flex; gap: 16px; align-items: baseline; }
.contact-rows .k { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .6; width: 90px; flex: none; }
.contact-rows .big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.contact-rows .v { font-size: 17px; }

.form-card { position: relative; background: #fff; color: var(--ink); border-radius: 24px; padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.form-card form { display: flex; flex-direction: column; gap: 14px; }
.form-card .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-card .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-card .field.error input, .form-card .field.error textarea { border-color: #d33; }
.form-card .field .msg { display: none; font-size: 13px; color: #c22; }
.form-card .field.error .msg { display: block; }
.form-card .btn { margin-top: 6px; width: 100%; font-size: 16px; padding: 17px; }
.form-card .btn[disabled] { opacity: .6; cursor: progress; }
.form-card .note { font-size: 12px; color: var(--subtle); text-align: center; }
.form-card .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-card .status { display: none; padding: 14px 16px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.form-card .status.ok { display: block; background: #e8f5ec; color: #1d6b3a; }
.form-card .status.fail { display: block; background: #fdecec; color: #b42323; }
.form-card.sent form { display: none; }
.form-card.sent .status.ok { font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding: 64px 0 32px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--blue-light); }
.site-footer .pagewidth { display: flex; flex-direction: column; gap: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.footer-grid > div { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer-grid .brand { gap: 12px; color: #fff; margin-bottom: 4px; }
.footer-grid .brand-mark { width: 36px; height: 36px; font-size: 19px; background: var(--blue); }
.footer-grid .brand-name { font-size: 19px; }
.footer-grid .blurb { margin: 0; font-size: 14px; line-height: 1.6; opacity: .65; max-width: 320px; color: #fff; }
.footer-grid .title { font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .5; }
.footer-grid .dim { opacity: .65; }
.footer-bottom { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; opacity: .5; border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; }
.footer-bottom .social { display: flex; gap: 8px; }

/* ---------- Subpages ---------- */
.page-head { padding-top: 48px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.page-head > * { max-width: 900px; }
.page-head h1 { margin: 0; font-size: 56px; }
.page-head .lead { max-width: 640px; margin: 0; }
.page-head .eyebrow a { color: var(--blue); }
.page-body { padding-bottom: 100px; }
.page-body .content { max-width: 760px; }
.page-body .content img { border-radius: 20px; }
.page-media { padding-bottom: 56px; }
.page-media img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 28px; }
.related { padding-bottom: 100px; display: flex; flex-direction: column; gap: 28px; }
.related h2 { margin: 0; font-size: 30px; }
.error-page { padding-top: 120px; padding-bottom: 120px; text-align: center; display: flex; flex-direction: column; gap: 20px; align-items: center; }
.error-page h1 { margin: 0; }
.error-page .actions { justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .topbar .extra, .main-nav, .header-actions .btn-ghost { display: none; }
  .menu-toggle { display: flex; }
  h1, .hero h1 { font-size: 50px; }
  h2 { font-size: 36px; }
  .contact-text h2 { font-size: 44px; }
  .page-head h1 { font-size: 46px; }
  .reviews { grid-template-columns: 300px minmax(0, 1fr); gap: 40px; }
  .contact .pagewidth { grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; }
  .cards, .pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pagewidth { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .site-header { padding-top: 16px; padding-bottom: 16px; }
  .brand-name { font-size: 17px; }
  .brand-tag { display: none; }
  .header-actions .btn-navy { font-size: 13px; padding: 11px 16px; white-space: nowrap; }
  h1, .hero h1 { font-size: 42px; }
  h2 { font-size: 30px; }
  .reviews-intro h2 { font-size: 30px; }
  .contact-text h2 { font-size: 36px; }
  .page-head h1 { font-size: 36px; }
  .hero { padding-top: 24px; gap: 28px; }
  .hero-top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-media { height: auto; }
  .hero-media img { height: 320px; }
  .quote-card { position: relative; left: auto; bottom: auto; z-index: 2; width: auto; margin: -48px 16px 0; padding: 24px; }
  .quote-card blockquote p { font-size: 19px; }
  .stats { padding-top: 56px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
  .stat .num { font-size: 30px; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .mosaic { height: 320px; }
  .services .pagewidth { gap: 28px; }
  .reviews { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .reviews-grid { grid-template-columns: minmax(0, 1fr); }
  .business { grid-column: auto; flex-direction: column; align-items: flex-start; }
  .business .btn { white-space: normal; }
  .contact .pagewidth { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .contact-rows .big { font-size: 26px; }
  .form-card { padding: 24px 20px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .page-head { padding-top: 24px; padding-bottom: 24px; }
  .page-body, .related { padding-bottom: 56px; }
  .error-page { padding-top: 64px; padding-bottom: 64px; }
}
@media (max-width: 560px) {
  /* Tight header (the handoff flags 390px): smaller mark, one-line name, compact CTA and toggle */
  .site-header { gap: 10px; }
  .brand { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; font-size: 19px; }
  .brand-name { font-size: 16px; white-space: nowrap; }
  .header-actions { gap: 8px; }
  .header-actions .btn-navy { font-size: 13px; padding: 10px 14px; }
  .menu-toggle { width: 40px; height: 40px; }
  .cards, .pills { grid-template-columns: minmax(0, 1fr); }
  .form-card .row { grid-template-columns: minmax(0, 1fr); }
  .checks { grid-template-columns: 1fr; }
  .hero .actions { flex-direction: column; align-items: flex-start; }
}
