/*
Theme Name: Site Theme
Description: Responsive news and business theme for Håkans Vatten & Energibrunnar.
Version: 1.6.1
Text Domain: site-theme
*/

:root {
    /* Shared brand background for the header, navigation, and footer. */
    --primary: #eaf3f8;
    --on-primary: var(--navy);
    --navy: #082f4d;
    --blue: #087eaa;
    --blue-dark: #066487;
    --ink: #183447;
    --muted: #687b86;
    --line: #dce5e9;
    --paper: #fff;
    --wash: #f3f7f8;
    --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 3px solid #e4ac42; outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.utility-bar { display: none; background: var(--primary); color: var(--on-primary); font-size: 13px; }
.utility-inner { min-height: 38px; display: flex; align-items: center; justify-content: flex-end; gap: 28px; }
.utility-bar a { color: var(--on-primary); text-decoration: none; }
.utility-bar a:hover { text-decoration: underline; }
.site-header { background: var(--primary); position: relative; z-index: 5; }
.header-inner { min-height: 120px; display: flex; align-items: center; position: relative; }
.brand { display: inline-flex; align-items: center; padding: 10px; text-decoration: none; flex-shrink: 0; }
.brand-logo { display: block; width: 230px; height: auto; }
.custom-logo-link img { width: auto; max-height: 58px; }
.main-nav { display: flex; align-items: center; gap: clamp(28px, 2.8vw, 54px); position: absolute; right: 0; }
.main-nav ul { display: flex; align-items: center; gap: clamp(28px, 2.8vw, 54px); margin: 0; padding: 0; list-style: none; }
.main-nav li { position: relative; }
.main-nav a { color: var(--on-primary); font-size: 19px; font-weight: 400; text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--blue-dark); }
.main-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 0; height: 0; margin: 0 0 3px 12px; border: 6px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: -18px; min-width: 220px; padding: 12px 18px; background: var(--primary); box-shadow: 0 12px 32px #001c3970; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu li { padding: 7px 0; }
.main-nav .sub-menu a { font-size: 15px; }
.main-nav #about-menu-item .sub-menu { left: auto; right: 0; width: 340px; max-width: calc(100vw - 40px); }
.main-nav #about-menu-item .sub-menu a { display: block; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 940px) {
    .main-nav #about-menu-item .sub-menu { width: 100%; max-width: none; }
}
.search-toggle { width: 28px; height: 32px; position: relative; padding: 0; border: 0; background: transparent; cursor: pointer; }
.search-toggle::before { content: ""; position: absolute; width: 12px; height: 12px; top: 6px; left: 5px; border: 3px solid var(--on-primary); border-radius: 50%; }
.search-toggle::after { content: ""; position: absolute; width: 9px; height: 3px; top: 21px; left: 19px; transform: rotate(48deg); transform-origin: left center; border-radius: 2px; background: var(--on-primary); }
.site-search-form { position: absolute; z-index: 3; right: 0; top: calc(50% + 25px); display: flex; gap: 8px; padding: 10px; background: #fff; box-shadow: 0 8px 24px #001c3950; }
.site-search-form[hidden] { display: none; }
.site-search-form input { min-width: 230px; padding: 9px 11px; border: 1px solid var(--line); font: inherit; }
.site-search-form button { border: 0; padding: 8px 12px; color: #fff; background: var(--blue); font: inherit; cursor: pointer; }
.menu-toggle { display: none; border: 0; background: none; color: var(--on-primary); font: inherit; font-weight: 700; padding: 10px; }

.breadcrumbs { padding-top: 30px; color: #778791; font-size: 13px; }
.breadcrumbs a { color: #687b86; text-decoration: none; }
.breadcrumbs .sep { padding-inline: 10px; color: #a7b2b8; }
.page-intro { max-width: 850px; padding: 35px 0 28px; }
.page-intro h1, .entry-title { margin: 0 0 14px; color: var(--navy); font-size: clamp(38px, 5vw, 60px); line-height: 1.08; letter-spacing: -.045em; font-weight: 700; }
.page-intro p { max-width: 800px; margin: 0; color: #435d6c; font-size: 18px; line-height: 1.7; }
.page-intro .page-content > :first-child { margin-top: 0; }

.hero { position: relative; isolation: isolate; display: grid; min-height: 75vh; overflow: hidden; place-items: center; background: #304a4a; color: #fff; }
.hero-media, .hero-shade { position: absolute; z-index: -1; inset: 0; }
.hero-media { z-index: -2; }
.hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.hero-shade { background: linear-gradient(90deg, rgb(4 29 43 / 58%), rgb(4 29 43 / 26%) 58%, rgb(4 29 43 / 35%)), linear-gradient(0deg, rgb(4 29 43 / 25%), transparent 55%); }
.hero-inner { padding-block: clamp(76px, 10vh, 132px); text-align: center; }
.hero-kicker { margin: 0 0 18px; color: #f4bf67; font-size: 14px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.hero-title { max-width: 1000px; margin: 0 auto 24px; color: #fff; font-size: clamp(54px, 7.2vw, 108px); font-weight: 800; letter-spacing: -.055em; line-height: .99; text-wrap: balance; text-shadow: 0 2px 24px rgb(0 0 0 / 20%); }
.hero-description { max-width: 780px; margin: 0 auto; color: rgb(255 255 255 / 94%); font-size: clamp(18px, 1.6vw, 23px); line-height: 1.55; text-shadow: 0 1px 12px rgb(0 0 0 / 20%); }
.hero-description > :first-child { margin-top: 0; }
.hero-description > :last-child { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.hero-button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 11px 24px; border: 1px solid #fff; color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.hero-button:hover { color: var(--navy); background: #fff; }
.hero-button-primary { border-color: #ed8b00; background: #ed8b00; }
.hero-button-primary:hover { border-color: #fff; }
.hero-scroll { position: absolute; bottom: 22px; left: 50%; display: flex; transform: translateX(-50%); flex-direction: column; align-items: center; gap: 7px; color: #fff; font-size: 11px; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.hero-scroll span { width: 18px; height: 18px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-3px, -3px); }
.home-content-anchor { scroll-margin-top: 20px; }
.home-services { padding: clamp(64px, 8vw, 108px) 0 clamp(72px, 9vw, 120px); background: #f3f7f8; }
.services-heading { margin: 0 auto clamp(30px, 4vw, 52px); text-align: center; }
.services-kicker { margin: 0 0 10px; color: var(--blue-dark); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.services-heading h2 { margin: 0; color: var(--navy); font-size: clamp(38px, 5vw, 64px); letter-spacing: -.045em; line-height: 1.1; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.service-card { position: relative; isolation: isolate; display: grid; min-width: 0; min-height: 420px; aspect-ratio: 1.15 / 1; overflow: hidden; place-items: center; background: #193e56; color: #fff; text-align: center; }
.service-card-image, .service-card-shade { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.service-card-image { z-index: -2; object-fit: cover; object-position: center 58%; transition: transform .45s ease, filter .35s ease; }
.service-card:nth-child(2) .service-card-image { object-position: 32% 68%; filter: hue-rotate(12deg) saturate(.8); }
.service-card:nth-child(3) .service-card-image { object-position: 76% 44%; filter: hue-rotate(-12deg) saturate(.8); }
.service-card:nth-child(4) .service-card-image { object-position: 56% 76%; filter: hue-rotate(24deg) saturate(.72); }
.service-card:nth-child(5) .service-card-image { object-position: 40% 62%; filter: hue-rotate(8deg) saturate(.85); }
@media (min-width: 761px) {
    .service-card:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: auto; }
}
.service-card:hover .service-card-image { transform: scale(1.035); }
.service-card-shade { background: linear-gradient(180deg, rgb(5 32 49 / 49%), rgb(5 32 49 / 76%)); }
.service-card-content { width: min(100% - 44px, 480px); padding: 34px 0; }
.service-icon { display: grid; width: 78px; height: 78px; place-items: center; margin: 0 auto 23px; border: 2px solid #fff; border-radius: 50%; }
.service-icon svg { width: 37px; height: 37px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.service-card h3 { margin: 0 0 8px; color: #fff; font-size: clamp(26px, 3vw, 38px); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.service-summary { margin: 0 0 24px; color: rgb(255 255 255 / 92%); font-size: 17px; line-height: 1.5; }
.service-card-details { width: fit-content; max-width: 100%; margin: 0 auto; text-align: left; }
.service-card-details summary { display: flex; min-height: 54px; align-items: center; justify-content: center; gap: 14px; padding: 10px 23px; background: #ed8b00; color: #fff; cursor: pointer; font-size: 14px; font-weight: 700; letter-spacing: .09em; list-style: none; text-transform: uppercase; }
.service-card-details summary::-webkit-details-marker { display: none; }
.service-card-details summary span { font-size: 23px; letter-spacing: -5px; line-height: 1; }
.service-card-details > p { max-width: 390px; margin: 14px auto 0; color: #fff; font-size: 15px; line-height: 1.55; text-align: center; text-shadow: 0 1px 8px #0008; }
.service-card-details[open] summary { background: #c66f00; }
.service-card-cta { display: inline-flex; min-height: 54px; align-items: center; gap: 14px; padding: 10px 23px; background: #ed8b00; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; }
.service-card-cta:hover { background: #c66f00; color: #fff; }
.service-card-cta span { font-size: 23px; letter-spacing: -5px; line-height: 1; }

.service-page-heading { padding: 26px 0 34px; }
.service-page-heading .services-kicker { margin-bottom: 8px; }
.service-page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(40px, 5.5vw, 68px); letter-spacing: -.05em; line-height: 1.05; }
.service-intro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(300px, auto)); gap: 24px; padding-bottom: 72px; }
.service-intro-grid > * { min-width: 0; }
.service-page-image { position: relative; overflow: hidden; margin: 0; min-height: 300px; background: linear-gradient(140deg, #c2d6de, #e8eff1 48%, #a4c3cf); }
.service-page-image img { display: block; width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.service-page-image figcaption { position: absolute; left: 18px; bottom: 16px; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-shadow: 0 1px 8px #183447; text-transform: uppercase; }
.service-sales, .service-description, .service-contact { padding: clamp(28px, 4vw, 54px); }
.service-sales { display: flex; flex-direction: column; justify-content: center; background: var(--navy); color: #fff; }
.service-sales h2, .service-description h2, .service-contact h2, .service-process-copy h2, .service-why h2 { margin: 0 0 16px; font-size: clamp(27px, 3.1vw, 40px); letter-spacing: -.035em; line-height: 1.15; }
.service-sales h2 { color: #fff; }
.service-sales .service-block-label { color: #f4bf67; }
.service-block-label { margin: 0 0 12px; color: var(--blue-dark); font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.service-page-copy, .service-description p, .service-contact p, .service-process-copy > p:not(.service-block-label), .service-why > p:not(.service-block-label) { color: #526976; font-size: 16px; line-height: 1.75; }
.service-sales .service-page-copy, .service-sales .service-page-copy p { margin: 0; color: rgb(255 255 255 / 90%); font-size: 17px; }
.service-description { background: var(--wash); }
.service-description h2, .service-contact h2, .service-process-copy h2, .service-why h2 { color: var(--navy); }
.service-description .entry-content { font-size: 16px; }
.service-description .entry-content p { margin: 0 0 14px; }
.service-contact { background: #e8f1f4; }
.service-contact p { margin: 0 0 15px; }
.service-contact-phone { font-size: 22px; font-weight: 700; }
.service-contact-button { display: inline-flex; min-height: 48px; align-items: center; margin-top: 8px; padding: 10px 22px; background: #ed8b00; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.service-contact-button:hover { background: #c66f00; color: #fff; }
.service-process-section { padding: 72px 0; background: var(--wash); }
.service-process { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 82px); }
.service-process-image, .service-process-image img { min-height: 400px; }
.service-process-copy { max-width: 550px; }
.service-process-copy p:not(.service-block-label) { margin: 0 0 15px; }
.service-why-section { padding: 72px 0 88px; }
.service-why { max-width: 900px; text-align: center; }
.service-why > p:not(.service-block-label) { max-width: 760px; margin: 0 auto 14px; }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; row-gap: 48px; padding: 20px 0 76px; }
.news-card { min-width: 0; }
.news-card-image { display: block; position: relative; overflow: hidden; margin-bottom: 19px; aspect-ratio: 1.59 / 1; background: linear-gradient(140deg, #c2d6de 0%, #e8eff1 48%, #a4c3cf 100%); }
.news-card-image::before { content: ""; position: absolute; width: 58%; height: 140%; right: -12%; top: -20%; transform: rotate(28deg); background: #ffffff38; }
.news-card-image::after { content: "HÅKANS"; position: absolute; right: 15px; bottom: 5px; color: #ffffffb5; font-size: 27px; font-weight: 800; letter-spacing: -.06em; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-card-image:hover img { transform: scale(1.035); }
.news-card-date { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.news-card h2 { margin: 0 0 9px; color: var(--navy); font-size: 22px; line-height: 1.32; letter-spacing: -.02em; }
.news-card h2 a { color: inherit; text-decoration: none; }
.news-card h2 a:hover { color: var(--blue); }
.news-card-excerpt { margin: 0; color: #536773; font-size: 15px; line-height: 1.65; }
.placeholder-caption { position: absolute; z-index: 1; left: 15px; bottom: 13px; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pagination { padding: 0 0 76px; text-align: center; }
.pagination .page-numbers { display: inline-block; margin: 0 4px; padding: 9px 14px; border: 1px solid var(--line); color: var(--navy); text-decoration: none; }
.pagination .current, .pagination a:hover { color: #fff; background: var(--blue); border-color: var(--blue); }
.no-posts { padding: 30px; background: var(--wash); }

.single-article { max-width: 820px; padding: 30px 0 84px; margin-inline: auto; }
.single-article .entry-title { font-size: clamp(34px, 5vw, 54px); }
.single-article .entry-meta { color: var(--muted); font-size: 14px; }
.single-article .featured-image { margin: 28px 0; }
.entry-content { font-size: 18px; line-height: 1.8; }
.entry-content h2, .entry-content h3 { color: var(--navy); line-height: 1.25; }
.entry-content img { height: auto; }
.about-intro { margin-bottom: 40px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; gap: 40px; padding-bottom: 84px; }
.about-grid .entry-content > :first-child { margin-top: 0; }
.about-grid .entry-content img { display: block; max-width: 100%; margin-bottom: 28px; }
.about-grid .service-contact h3 { margin-top: 32px; color: var(--navy); }
.about-grid .service-contact ul { padding-left: 20px; line-height: 1.8; }

@media (max-width: 760px) {
    .about-intro { margin-bottom: 28px; }
    .about-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 48px; }
}
.page-content { font-size: 17px; }

.site-footer { color: var(--on-primary); background: var(--primary); }
.footer-main { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 55px; padding-top: 58px; padding-bottom: 52px; }
.footer-brand { color: var(--on-primary); }
.site-footer h2 { margin: 0 0 17px; color: var(--on-primary); font-size: 17px; }
.site-footer p { margin: 0 0 7px; color: var(--on-primary); font-size: 14px; }
.site-footer a { color: var(--on-primary); }
.footer-services ul { list-style: none; margin: 0; padding: 0; }
.footer-services li { margin: 0 0 8px; font-size: 14px; }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom .wrap { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--on-primary); font-size: 12px; }
.footer-bottom a { color: var(--on-primary); }

@media (max-width: 940px) {
    .header-inner { min-height: 98px; justify-content: space-between; }
    .menu-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--on-primary); }
    .menu-toggle::after { content: "☰"; font-size: 20px; }
    .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; transform: none; padding: 18px 24px 25px; background: var(--primary); box-shadow: 0 16px 24px #0a2d4317; }
    .main-nav.is-open { display: block; }
    .main-nav ul { display: block; }
    .main-nav li { padding: 8px 0; }
    .main-nav .sub-menu { display: block; position: static; padding: 5px 0 0 18px; box-shadow: none; }
    .main-nav .sub-menu li { padding: 5px 0; }
    .main-nav a { white-space: normal; font-size: 17px; }
    .search-toggle { margin-top: 10px; }
    .site-search-form { top: auto; right: 20px; bottom: 15px; }
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .wrap { width: min(var(--content), calc(100% - 36px)); }
    .utility-inner { justify-content: center; gap: 20px; min-height: 35px; }
    .header-inner { min-height: 76px; gap: 12px; }
    .brand { padding: 7px; }
    .brand-logo { width: 170px; }
    .breadcrumbs { padding-top: 20px; }
    .page-intro { padding: 25px 0 20px; }
    .page-intro p { font-size: 16px; }
    .hero { min-height: 75svh; }
    .hero-inner { padding-block: 74px; }
    .hero-kicker { margin-bottom: 14px; font-size: 11px; letter-spacing: .15em; }
    .hero-title { margin-bottom: 18px; font-size: clamp(48px, 13vw, 72px); }
    .hero-description { font-size: 17px; }
    .hero-actions { gap: 10px; margin-top: 24px; }
    .hero-button { min-height: 48px; padding-inline: 17px; font-size: 14px; }
    .hero-scroll { bottom: 14px; }
    .service-grid { grid-template-columns: 1fr; gap: 16px; }
    .service-card { min-height: 360px; aspect-ratio: 1.05 / 1; }
    .service-page-heading { padding: 20px 0 25px; }
    .service-intro-grid { grid-template-columns: 1fr; grid-template-rows: auto; gap: 16px; padding-bottom: 46px; }
    .service-page-image, .service-page-image img { min-height: 250px; }
    .service-sales, .service-description, .service-contact { padding: 28px 24px; }
    .service-process-section, .service-why-section { padding: 48px 0 56px; }
    .service-process { grid-template-columns: 1fr; gap: 28px; }
    .service-process-image, .service-process-image img { min-height: 270px; }
    .service-why { text-align: left; }
    .services-kicker { font-size: 11px; }
    .news-grid { grid-template-columns: 1fr; row-gap: 34px; padding-top: 12px; }
    .news-card-image { margin-bottom: 15px; }
    .footer-main { grid-template-columns: 1fr; gap: 32px; padding-top: 42px; padding-bottom: 38px; }
    .footer-bottom .wrap { align-items: flex-start; justify-content: center; flex-direction: column; padding-block: 14px; }
}
