/*
Theme Name: Gelindo Alessandria
Template: twentytwentyfive
Version: 1.1.0
Text Domain: gelindo
*/

@font-face {
    font-family: Gelindo Manrope;
    src: url('assets/fonts/Manrope-VariableFont_wght.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: Gelindo Platypi;
    src: url('assets/fonts/Platypi-VariableFont_wght.woff2') format('woff2');
    font-weight: 300 800;
    font-display: swap;
}

:root {
    --gelindo-ink: #172941;
    --gelindo-stage: #101c2c;
    --gelindo-paper: #faf6ef;
    --gelindo-panel: #f0e9dd;
    --gelindo-accent: #883e30;
    --gelindo-line: #d7c9b8;
    --gelindo-gold: #efc88b;
    --gelindo-gutter: clamp(1.25rem, 5vw, 4.5rem);
    --gelindo-display: 'Gelindo Platypi', Georgia, serif;
    --gelindo-text: 'Gelindo Manrope', system-ui, sans-serif;
}

html { color: var(--gelindo-ink); background: var(--gelindo-paper); }
body { margin: 0; color: var(--gelindo-ink); font-family: var(--gelindo-text); font-size: 1rem; line-height: 1.75; }
h1, h2, h3, .wp-block-post-title { font-family: var(--gelindo-display); font-weight: 550; line-height: 1.12; text-wrap: balance; }
h2 { font-size: clamp(1.85rem, 4vw, 3.2rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
a { text-underline-offset: .2em; }
:where(a, button, input, textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.gelindo-header { border-bottom: 1px solid var(--gelindo-line); }
.gelindo-header .gelindo-header-row {
    max-width: 84rem;
    min-height: 5rem;
    margin-inline: auto;
    padding-inline: var(--gelindo-gutter);
    box-sizing: border-box;
    gap: 1rem;
}
.gelindo-brand { display: inline-flex; gap: .55rem; align-items: center; min-height: 44px; color: var(--gelindo-ink); text-decoration: none; }
.gelindo-brand:hover { color: var(--gelindo-accent); }
.gelindo-brand img { display: block; width: 62px; height: 62px; object-fit: contain; }
.gelindo-brand span { font: 650 1.65rem/.92 var(--gelindo-display); letter-spacing: -.05em; }
.gelindo-brand small { display: block; margin-top: .38rem; font: 800 .59rem/1 var(--gelindo-text); letter-spacing: .16em; text-transform: uppercase; }
.gelindo-header .wp-block-navigation { font-size: .88rem; font-weight: 750; }
.gelindo-header .wp-block-navigation__container { gap: clamp(.85rem, 2vw, 2rem); }
.gelindo-header .wp-block-navigation-item__content { min-height: 44px; display: flex; align-items: center; }
.gelindo-header .wp-block-navigation-item__content:hover,
.gelindo-header .current-menu-item > a { color: var(--gelindo-accent); text-decoration: underline; }
.gelindo-header .wp-block-navigation__responsive-container-open,
.gelindo-header .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; place-content: center; }

.gelindo-main { min-height: 45vh; padding-inline: var(--gelindo-gutter); overflow-wrap: anywhere; }
.gelindo-main > .wp-block-post-content > h1:first-child,
.gelindo-main .gelindo-title {
    margin-block: 0 clamp(1.8rem, 4vw, 3.3rem);
    padding-block-end: 1.15rem;
    border-bottom: 1px solid var(--gelindo-line);
    font-size: clamp(2.4rem, 6vw, 4.9rem);
    letter-spacing: -.045em;
}
.gelindo-main:not(.gelindo-home) .wp-block-post-content > :where(figure, iframe) { margin-block: 1.7rem; }
.gelindo-main .wp-block-post-content > h2:not(:first-child) { margin-top: 2.8rem; }
.gelindo-main .wp-block-separator { border-color: var(--gelindo-line); }
.gelindo-main .wp-block-post-featured-image img { display: block; }

.gelindo-home { padding: 0; }
.gelindo-home > .wp-block-post-content { max-width: none; }
.gelindo-stage { margin: 0; background: var(--gelindo-stage); color: var(--gelindo-paper); }
.gelindo-stage-inner {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    min-height: clamp(30rem, 41vw, 39rem);
    max-width: 105rem;
    margin: 0 auto;
}
.gelindo-stage-copy {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: clamp(2.65rem, 6vw, 6.5rem) 1.5rem clamp(2.65rem, 6vw, 6.5rem) max(var(--gelindo-gutter), calc((100vw - 75rem) / 2));
}
.gelindo-stage-copy > * { margin: 0; }
.gelindo-stage-copy > * + * { margin-top: 1.2rem; }
.gelindo-stage-kicker {
    color: var(--gelindo-gold);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.gelindo-stage h1 {
    color: var(--gelindo-paper);
    overflow-wrap: normal;
    font-size: clamp(2.6rem, 5.3vw, 5.05rem);
    letter-spacing: -.055em;
    line-height: .99;
    text-wrap: balance;
}
.gelindo-stage-lead { color: #e0dcd5; max-width: 30ch; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.gelindo-stage .wp-block-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.8rem; }
.gelindo-main .wp-block-button__link,
.gelindo-footer .wp-block-search__button,
.wpcf7 [type="submit"] {
    box-sizing: border-box;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: .65rem 1.1rem;
    border: 1px solid var(--gelindo-ink);
    border-radius: 2px;
    background: var(--gelindo-ink);
    color: white;
    font: 800 .85rem/1.35 var(--gelindo-text);
    text-decoration: none;
    cursor: pointer;
}
.gelindo-main .wp-block-button__link:hover, .wpcf7 [type="submit"]:hover { background: var(--gelindo-accent); border-color: var(--gelindo-accent); }
.gelindo-stage .wp-block-button__link { background: var(--gelindo-gold); border-color: var(--gelindo-gold); color: var(--gelindo-stage); }
.gelindo-stage .wp-block-button__link:hover { background: var(--gelindo-paper); border-color: var(--gelindo-paper); }
.gelindo-stage .is-style-outline > .wp-block-button__link { background: transparent; border: 1px solid #ffffff60; color: white; }
.gelindo-stage .is-style-outline > .wp-block-button__link:hover { background: #ffffff19; }
.gelindo-stage .wp-block-button__link:focus-visible { outline-color: var(--gelindo-paper); }
.gelindo-stage-image { position: relative; min-width: 0; margin: 0; overflow: hidden; }
.gelindo-stage-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
.gelindo-stage-image::after { position: absolute; inset: 0; background: linear-gradient(90deg, var(--gelindo-stage), transparent 22%); content: ''; pointer-events: none; }

.gelindo-home .gelindo-section { box-sizing: border-box; padding: clamp(2.75rem, 6.5vw, 6rem) var(--gelindo-gutter); margin-block: 0; }
.gelindo-home .gelindo-section > :first-child { margin-block-start: 0; }
.gelindo-home .gelindo-section > :last-child { margin-block-end: 0; }
.gelindo-home .gelindo-section h2:first-child { margin-block-start: 0; }
.gelindo-home .gelindo-section p { max-width: 65ch; }
.gelindo-home .gelindo-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    align-items: center;
    gap: clamp(1.5rem, 7vw, 7rem);
    width: min(100%, 73rem);
    margin-inline: auto;
}
.gelindo-home .gelindo-columns > * { min-width: 0; margin-block: 0; }
.gelindo-home .gelindo-columns figure { margin-block: 0; }
.gelindo-home .gelindo-columns figure img { display: block; width: 100%; max-height: 32rem; object-fit: cover; object-position: 50% 35%; }
.gelindo-home .gelindo-intro .gelindo-columns figure img { aspect-ratio: 4 / 4.3; }
.gelindo-home .gelindo-intro p:first-of-type { color: var(--gelindo-accent); font: italic 1.16rem/1.5 var(--gelindo-display); }
.gelindo-home .gelindo-benefit { background: var(--gelindo-panel); }
.gelindo-home .gelindo-benefit .gelindo-columns { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.gelindo-home .gelindo-benefit .gelindo-columns figure img { aspect-ratio: 4 / 3; }
.gelindo-home .gelindo-film-section { background: var(--gelindo-stage); color: var(--gelindo-paper); }
.gelindo-home .gelindo-film-section > * { width: min(100%, 58rem); margin-inline: auto; }
.gelindo-home .gelindo-news > *, .gelindo-home .gelindo-social > * { width: min(100%, 73rem); margin-inline: auto; }
.gelindo-home .gelindo-social { border-top: 1px solid var(--gelindo-line); }
.gelindo-home .gelindo-social a { font-weight: 750; }

.gelindo-home .wp-block-latest-posts.is-grid,
.gelindo-blog .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: clamp(1rem, 3vw, 2.25rem);
    padding: 0;
    list-style: none;
}
.gelindo-home .wp-block-latest-posts.is-grid > li,
.gelindo-blog .wp-block-post-template > li {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    margin: 0;
    border-bottom: 1px solid var(--gelindo-line);
    padding-block-end: 1.25rem;
}
.gelindo-blog .wp-block-post-template { max-width: 74rem; margin-inline: auto; }
.gelindo-blog .wp-block-query, .gelindo-blog .gelindo-title { max-width: 74rem; }
.gelindo-home .wp-block-latest-posts__featured-image > a,
.gelindo-blog .wp-block-post-featured-image > a { display: block; }
.gelindo-home .wp-block-latest-posts__featured-image img,
.gelindo-blog .wp-block-post-featured-image img { display: block; width: 100%; aspect-ratio: 5 / 3; height: auto; object-fit: cover; }
.gelindo-home .wp-block-latest-posts__post-title,
.gelindo-blog .wp-block-post-title { display: block; margin-block: .8rem .35rem; color: var(--gelindo-ink); font: 600 clamp(1.15rem, 2vw, 1.5rem)/1.22 var(--gelindo-display); text-decoration: none; }
.gelindo-home .wp-block-latest-posts__post-title:hover,
.gelindo-blog .wp-block-post-title a:hover { color: var(--gelindo-accent); text-decoration: underline; }
.gelindo-blog .wp-block-post-title a { color: inherit; text-decoration: none; }
.gelindo-home .wp-block-latest-posts__post-date,
.gelindo-blog .wp-block-post-date { color: #66544a; font-size: .82rem; }
.gelindo-blog .wp-block-post-excerpt { font-size: .95rem; }
.gelindo-blog .wp-block-post-excerpt__excerpt { margin-block: .45rem .7rem; }

.gelindo-copy { line-height: 1.7; }
.gelindo-list ul { padding-inline-start: 1.3rem; }
.gelindo-film { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.gelindo-map { display: block; width: 100%; height: clamp(220px, 42vw, 380px); border: 1px solid var(--gelindo-line); box-sizing: border-box; }
.gelindo-timeline { margin-block: 2rem; padding-inline-start: clamp(1.25rem, 4vw, 3rem); border-inline-start: 2px solid var(--gelindo-line); }
.gelindo-timeline .wp-block-heading { position: relative; color: var(--gelindo-accent); }
.gelindo-timeline .wp-block-heading::before { position: absolute; top: .36em; left: calc(-1 * clamp(1.25rem, 4vw, 3rem) - 6px); width: 10px; height: 10px; border-radius: 50%; background: var(--gelindo-accent); content: ''; }
.gelindo-timeline .wp-block-image img { max-height: 360px; width: auto; }
.gelindo-gallery .wp-block-gallery.has-nested-images figure.wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.gelindo-gallery [hidden] { display: none !important; }
.gelindo-gallery.gelindo-gallery-carousel .wp-block-gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(75%, 360px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-block: .25rem .75rem;
}
.gelindo-gallery.gelindo-gallery-carousel .wp-block-gallery figure.wp-block-image { width: 100% !important; scroll-snap-align: start; }
.gelindo-gallery-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem; }
.gelindo-gallery-controls button { border: 1px solid var(--gelindo-line); color: var(--gelindo-ink); font: inherit; background: transparent; padding: .5rem 1rem; cursor: pointer; min-height: 44px; }
.gelindo-gallery-controls button[aria-pressed="true"] { background: var(--gelindo-ink); color: var(--gelindo-paper); border-color: var(--gelindo-ink); }

.gelindo-footer { margin-block-start: 0; background: var(--gelindo-stage); color: var(--gelindo-paper); }
.gelindo-footer-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); padding: clamp(2.5rem, 5vw, 4.5rem) var(--gelindo-gutter); }
.gelindo-footer-row > * { min-width: 0; margin: 0; }
.gelindo-footer .wp-block-heading { color: var(--gelindo-paper); font-size: clamp(1.35rem, 3vw, 1.95rem); margin: 0; }
.gelindo-footer p { margin-block: .7rem 0; font-size: .92rem; }
.gelindo-footer a { color: var(--gelindo-gold); overflow-wrap: anywhere; }
.gelindo-footer .wp-block-search { max-width: 28rem; }
.gelindo-footer .wp-block-search__label { color: var(--gelindo-paper); font-size: .88rem; }
.gelindo-footer .wp-block-search__input { box-sizing: border-box; min-width: 0; border: 1px solid #ffffff70; background: white; padding: .65rem .8rem; color: var(--gelindo-ink); }
.gelindo-footer .wp-block-search__button { color: var(--gelindo-stage); background: var(--gelindo-gold); border-color: var(--gelindo-gold); }
.gelindo-footer .wp-block-search__button:hover { background: var(--gelindo-paper); border-color: var(--gelindo-paper); }
.gelindo-footer .wp-block-search__button:focus-visible { outline-color: var(--gelindo-paper); }

.wpcf7 { border: 1px solid var(--gelindo-line); padding: clamp(1rem, 4vw, 2rem); margin-block: 2rem; background: #fffaf3; }
.wpcf7 label { font-weight: 650; }
.wpcf7 :is(input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), textarea) { width: 100%; box-sizing: border-box; padding: .65rem; border: 1px solid #a79888; background: white; color: var(--gelindo-ink); font: inherit; }
.wpcf7 :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--gelindo-accent); }
.wpcf7 .wpcf7-list-item { margin-inline-start: 0; }

@media (max-width: 950px) {
    .gelindo-header .gelindo-header-row { padding-inline: max(1.15rem, 3vw); }
    .gelindo-home .wp-block-latest-posts.is-grid, .gelindo-blog .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 600px) and (max-width: 780px) {
    .gelindo-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: grid; }
    .gelindo-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
}

@media (max-width: 720px) {
    .gelindo-header-row { min-height: 3.8rem; }
    .gelindo-brand img { width: 50px; height: 50px; }
    .gelindo-stage-inner { grid-template-columns: minmax(0,1fr); min-height: auto; }
    .gelindo-stage-copy { box-sizing: border-box; padding: 2.35rem var(--gelindo-gutter) 1.75rem; }
    .gelindo-stage h1 { font-size: clamp(2.35rem, 10.3vw, 4.25rem); }
    .gelindo-stage-image { min-height: clamp(14rem, 58vw, 23rem); }
    .gelindo-stage-image::after { background: linear-gradient(180deg,var(--gelindo-stage),transparent 14%); }
    .gelindo-home .gelindo-columns, .gelindo-home .gelindo-benefit .gelindo-columns { grid-template-columns: minmax(0,1fr); }
    .gelindo-home .gelindo-columns figure img { max-height: 25rem; }
    .gelindo-home .gelindo-benefit .gelindo-columns figure { order: 2; }
    .gelindo-footer-row { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 470px) {
    .gelindo-main > .wp-block-post-content > h1:first-child,
    .gelindo-main .gelindo-title { font-size: clamp(1.95rem, 9.5vw, 2.7rem); }
    .gelindo-home .wp-block-latest-posts.is-grid, .gelindo-blog .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
    .gelindo-gallery .wp-block-gallery.has-nested-images figure.wp-block-image { flex-basis: calc(50% - .5rem); }
}
