/*
Theme Name: North Wind
Theme URI: https://north-wind.be
Author: Simon Ferson
Author URI: https://north-wind.be
Description: Custom theme for North Wind (Simon Ferson): foiling Moth sailing, sailing coaching, carbon boat building and sailing apps. Successor of nort_wind_2 with the same look, rebuilt for SEO, speed and mobile.
Version: 2.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: north-wind
*/

/* ---------- basis (unchanged look from nort_wind_2) ---------- */
@font-face {
    font-family: "Raleway";
    src: url(assets/fonts/raleway-latin.woff2) format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Raleway";
    src: url(assets/fonts/raleway-italic-latin.woff2) format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}
:root {
    --northwindgrey: #2F4F4F;
    --northwinddark: #204040;
    --attention: #e00000;
    --fontcolor: white;
    --content: min(80%, 900px);
}

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

body, html {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: var(--fontcolor);
    background: var(--northwindgrey);
    line-height: 125%;
    font-family: Raleway, Arial, sans-serif;
}
p, h1, h2, h3, h4, td, ul, ol {
    line-height: 135%;
    font-family: Raleway, Arial, sans-serif;
    color: var(--fontcolor);
    font-size: 18px;
    width: var(--content);
    margin: 32px auto;
}
a, h4 { font-size: 16px; }
p {
    font-size: 22px;
    color: var(--fontcolor);
    border-left: 1px solid var(--attention);
    padding-left: 8px;
}
h1 { font-size: clamp(30px, 5vw, 48px); line-height: 115%; }
h2 { font-size: clamp(26px, 3.5vw, 32px); }
h3 { font-size: 24px; }
a {
    color: var(--fontcolor);
    font-family: Raleway, Arial, sans-serif;
    font-weight: bold;
    font-size: inherit;
}
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--attention);
    outline-offset: 3px;
}
iframe { width: 80%; margin: 32px auto auto 10%; }
img { max-width: 100%; height: auto; }

.screen-reader-text, .skip-link {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link:focus {
    clip: auto; width: auto; height: auto;
    z-index: 100; top: 8px; left: 8px;
    padding: 12px 16px;
    background: var(--attention);
}

/* ---------- top bar ---------- */
#top {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 10;
    padding: 8px 16px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1pt solid var(--northwindgrey);
    background: rgba(32, 64, 64, 0.75);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
body.admin-bar #top { top: 32px; }
@media (max-width: 782px) { body.admin-bar #top { top: 46px; } }

.site-logo { display: block; line-height: 0; }
.site-logo img { height: 64px; width: auto; max-width: 240px; }
.site-name { font-size: 24px; text-decoration: none; }

/* nav */
#nav ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    width: auto;
    list-style: none;
}
#nav ul li {
    list-style: none;
    border: 16px solid rgba(0, 0, 0, 0);
    transition: 0.5s;
    text-align: center;
}
#nav ul li:hover { transform: scale(1.25); }
#nav ul li a { text-decoration: none; font-weight: bold; }
#nav .current-menu-item > a { border-bottom: 2px solid var(--attention); }

.nav-toggle {
    display: none;
    background: var(--attention);
    color: var(--fontcolor);
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font: bold 16px Raleway, Arial, sans-serif;
    cursor: pointer;
}
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    #nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: rgba(32, 64, 64, 0.97);
        border-bottom: 4px solid var(--attention);
    }
    #nav.is-open { display: block; }
    #nav ul { flex-direction: column; padding: 8px 0; }
    #nav ul li { border-width: 10px 16px; }
    #nav ul li:hover { transform: none; }
}

/* ---------- hero ---------- */
.imgani {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 420px;
    max-height: 820px;
    overflow: hidden;
    text-align: center;
}
.imgani.is-small { height: 48vh; min-height: 340px; }
.imgani img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transform: scale(1.2);
    transition: 3s;
}
.imgani:hover img {
    transform: scale(1);
    filter: grayscale(100%);
}
.imgani::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(32,64,64,0) 45%, rgba(32,64,64,0.85) 100%);
    pointer-events: none;
}
.hero-text {
    position: absolute;
    left: 0; right: 0;
    bottom: 8%;
    z-index: 2;
}
.hero-text h1 {
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
    max-width: 1100px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.hero-text .hero-sub {
    border: none;
    margin: 12px auto 0;
    padding: 0 16px;
    width: 100%;
    max-width: 900px;
    font-size: clamp(17px, 2.2vw, 22px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.no-hero { height: 110px; }
.photo-credit {
    position: absolute;
    right: 10px; bottom: 6px;
    z-index: 2;
    font-size: 12px;
    opacity: 0.8;
    border: 0; margin: 0; padding: 0; width: auto;
}

/* ---------- jumpbox tiles (home) ---------- */
.jumpcontainer {
    width: 100%;
    max-width: 1300px;
    margin: 25px auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
    list-style: none;
}
@media (min-width: 600px) { .jumpcontainer { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .jumpcontainer { grid-template-columns: repeat(4, 1fr); } }
.jumpcontainer li { list-style: none; }
.jumpcontainer a { text-decoration: none; display: block; }
.jumpingbox {
    padding: 60px 0 40px;
    transition: 0.75s;
}
.jumpimg img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
}
.jumph { margin-top: 36px; }
.jumpbutton {
    display: inline-block;
    background: var(--attention);
    color: var(--fontcolor);
    padding: 20px 28px;
    border-radius: 8px;
    font-size: 150%;
}
.jumpbox:hover .jumpingbox,
.jumpbox:focus-within .jumpingbox { transform: translate(0, -40px); }

/* ---------- content ---------- */
#longpage { padding-bottom: 32px; }
#longpage > *:first-child { margin-top: 48px; }

.wp-block-list, #longpage ul, #longpage ol { font-size: 20px; padding-left: 28px; }
#longpage li { margin: 10px 0; }

.nw-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 !important;
    list-style: none;
}
@media (min-width: 768px) { .nw-highlights { grid-template-columns: 1fr 1fr; } }
.nw-highlights li {
    list-style: none;
    margin: 0 !important;
    padding: 18px 20px;
    background: var(--northwinddark);
    border-left: 4px solid var(--attention);
    border-radius: 4px;
}
.nw-highlights strong { display: block; font-size: 120%; margin-bottom: 4px; }

.wp-block-buttons {
    width: var(--content);
    margin: 32px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.wp-block-button__link, .nw-button {
    display: inline-block;
    background: var(--attention);
    color: var(--fontcolor);
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 18px;
    border: 0;
    transition: transform 0.3s;
}
.wp-block-button__link:hover, .nw-button:hover { transform: scale(1.05); }
.is-style-outline .wp-block-button__link {
    background: transparent;
    border: 2px solid var(--attention);
}

.wp-block-image, .wp-block-gallery, figure {
    width: var(--content);
    margin: 32px auto;
}
.wp-block-image img { display: block; border-radius: 4px; }
figcaption, .wp-element-caption {
    font-size: 14px;
    opacity: 0.85;
    margin-top: 8px;
}
.wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.wp-block-gallery figure { width: 100%; margin: 0; }
.wp-block-gallery img { width: 100%; height: 260px; object-fit: cover; border-radius: 4px; }

.wp-block-separator {
    width: var(--content);
    border: 0;
    border-top: 1px solid var(--attention);
    margin: 48px auto;
}

.nw-contact-card {
    width: var(--content);
    margin: 32px auto;
    padding: 20px 24px;
    background: var(--northwinddark);
    border-left: 4px solid var(--attention);
}
.nw-contact-card p { border: 0; padding: 0; margin: 8px 0; width: auto; }

/* photos */
#photos { width: 90%; margin: 0 auto; }
.photos_title { width: 100%; }
.photos_description { border-bottom: 1px solid var(--attention); padding-bottom: 32px; }

/* projects / posts */
.post { border-bottom: 1px solid var(--attention); padding-bottom: 16px; }
.entry-meta { border: 0; font-size: 15px; opacity: 0.8; margin-top: -16px; }

/* ---------- footer ---------- */
#footer {
    margin-top: 8px;
    padding: 8px 0 0;
    background: var(--northwindgrey);
    border-top: 4px solid var(--attention);
    border-bottom: 4px solid var(--attention);
    display: grid;
    grid-template-columns: 1fr;
    text-align: center;
}
@media (min-width: 768px) { #footer { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
footer a { font-weight: normal; }
footer ul { padding: 0; width: auto; margin: 16px auto; }
footer ul li { list-style: none; padding: 4px; }
footer p { border: 0; padding: 0; font-size: 16px; width: auto; margin: 8px auto; }
#menu-social-media li { display: inline; margin: auto; padding: 0 8px; }
#creator {
    text-align: center;
    padding: 8px 16px;
    background: var(--attention);
}
#creator p, #creator a {
    border: none;
    margin: 0 auto;
    padding: 0;
    font-size: 100%;
    width: auto;
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .imgani img { transform: none; }
}

.footer_title { font-size: 16px; margin: 16px auto 0; width: auto; }
