/*
Theme Name: Hair Akademia Matulis
Theme URI: https://hairakademia.pl
Author: Hexify
Description: Premium, ręcznie kodowany motyw dla Hair Akademia Matulis — szkolenia fryzjerskie i koloryzacja. Bez wtyczek ACF, treści edytowalne przez metaboxy.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: hairacademy
*/

/* ════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ════════════════════════════════════════════════════════════ */

:root {
    --beige:        #ECE7E3;
    --white:        #FFFFFF;
    --black:        #000000;

    --ink:          #111111;      /* tekst główny, miękka czerń */
    --ink-soft:     #555555;      /* tekst pomocniczy */
    --line:         rgba(0,0,0,.18);

    --font-head:    "Marcellus", Georgia, "Times New Roman", serif;
    --font-body:    "Inter", -apple-system, system-ui, sans-serif;

    --maxw:         1600px;
    --gutter:       clamp(20px, 5vw, 80px);

    --header-h:     92px;

    --ease:         cubic-bezier(.22, 1, .36, 1);
}

/* ════════════════════════════════════════════════════════════
   RESET / BASE
   ════════════════════════════════════════════════════════════ */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: .01em;
    margin: 0;
}

p { margin: 0 0 1em; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

/* utility: eyebrow / nadtytuł */
.eyebrow {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin: 0;
}
.eyebrow::before {
    content: "";
    width: 42px;
    height: 1px;
    background: currentColor;
    opacity: .6;
}

/* ════════════════════════════════════════════════════════════
   BUTTONS — kwadratowe, luksusowy efekt rysowanej ramki 1px
   ════════════════════════════════════════════════════════════ */

.btn-line {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 17px 38px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: color .4s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease);
}
.btn-line span { position: relative; z-index: 2; }

/* Outline Out — cienka ramka 1px wysuwająca się na zewnątrz na hover */
.btn-line::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border: 1px solid transparent;
    pointer-events: none;
    transition: top .35s var(--ease), right .35s var(--ease),
                bottom .35s var(--ease), left .35s var(--ease),
                border-color .35s var(--ease);
}
.btn-line:hover,
.btn-line:focus-visible { border-color: var(--ink); }
.btn-line:hover::before,
.btn-line:focus-visible::before {
    top: -7px; right: -7px; bottom: -7px; left: -7px;
    border-color: var(--ink);
}

/* wariant wypełniony (na jasnym tle) — czarne tło, ta sama ramka na zewnątrz */
.btn-fill {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}
.btn-fill:hover,
.btn-fill:focus-visible { border-color: var(--ink); }
.btn-fill:hover::before,
.btn-fill:focus-visible::before { border-color: var(--ink); }

/* ════════════════════════════════════════════════════════════
   HEADER — przezroczysty, na scroll półprzezroczysta biel
   ════════════════════════════════════════════════════════════ */

.site-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color .4s var(--ease), backdrop-filter .4s var(--ease);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
    gap: 32px;
}

.site-logo img { max-height: 46px; width: auto; }
.site-logo-text {
    font-family: var(--font-head);
    font-size: 22px;
    letter-spacing: .04em;
    color: var(--ink);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-left: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 36px;
    margin: 0;
    padding: 0;
}
.main-nav a {
    position: relative;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .04em;
    color: var(--ink);
    padding: 6px 0;
    transition: opacity .3s var(--ease);
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 1px;
    background: currentColor;
    transition: width .35s var(--ease);
}
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

/* stan po scrollu */
.site-header.scrolled {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* mobile toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}
.menu-toggle span {
    display: block;
    width: 26px; height: 1px;
    background: var(--ink);
    transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.menu-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════
   HERO — 100vh, edytowalne tło + beżowa nakładka
   ════════════════════════════════════════════════════════════ */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--beige);
    isolation: isolate;   /* blend nakładki działa tylko w obrębie hero */
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* kolor + krycie ustawiane inline z metaboxa */
}

.hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-block: calc(var(--header-h) + 40px) 80px;
}

.hero__content {
    max-width: 760px;
    text-align: left;
}

.hero__eyebrow { margin-bottom: 30px; }

.hero__heading {
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    line-height: 1.05;
    margin-bottom: 28px;
}

.hero__text {
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.75;
    color: var(--ink-soft);
    max-width: 540px;
    margin-bottom: 44px;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

/* delikatny scroll-cue na dole hero */
.hero__cue {
    position: absolute;
    left: var(--gutter);
    bottom: 36px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.hero__cue::after {
    content: "";
    width: 60px; height: 1px;
    background: currentColor;
    transform-origin: left;
    animation: ha-cue 2.4s var(--ease) infinite;
}
@keyframes ha-cue {
    0%, 100% { transform: scaleX(.4); opacity: .4; }
    50%      { transform: scaleX(1);  opacity: 1; }
}

/* ════════════════════════════════════════════════════════════
   OZDOBNIK NAGŁÓWKA (eyebrow z cienką linią + ikoną)
   ════════════════════════════════════════════════════════════ */

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.section-eyebrow__label { line-height: 1; }
.section-eyebrow svg { width: 18px; height: 18px; flex-shrink: 0; }
.section-eyebrow::after {
    content: "";
    width: 40px; height: 1px;
    background: currentColor;
    opacity: .5;
}
.section-eyebrow--center { justify-content: center; }
.section-eyebrow--center::before {
    content: "";
    width: 40px; height: 1px;
    background: currentColor;
    opacity: .5;
}

/* ════════════════════════════════════════════════════════════
   O MNIE
   ════════════════════════════════════════════════════════════ */

.about {
    padding-block: clamp(80px, 12vh, 160px);
    background: var(--white);
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 100px);
    align-items: center;
}

.about__eyebrow { margin-bottom: 26px; }

.about__heading {
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    margin-bottom: 30px;
}

.about__body {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.85;
}
.about__body p { margin: 0 0 1.2em; }
.about__body p:last-child { margin-bottom: 0; }
.about__body strong { color: var(--ink); font-weight: 500; }

.about__btn { margin-top: 34px; }

.about__media { position: relative; }

/* dekoracyjna ramka 1px wysunięta w górę-lewo — efekt premium */
.about__media::after {
    content: "";
    position: absolute;
    top: -20px; left: -20px;
    right: 30px; bottom: 30px;
    border: 1px solid var(--line);
    z-index: 0;
    pointer-events: none;
}

.about__media-inner {
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: var(--beige);
    display: flex;
    align-items: center;
    justify-content: center;
}
.about__media-inner img {
    width: 100%;
    height: 700px;                  /* okładka na 700px */
    object-fit: cover;
    object-position: top center;    /* równanie od góry — przycina dół */
    display: block;
    transition: transform 1.1s var(--ease);
}
.about__media:hover .about__media-inner img { transform: scale(1.045); }

.about__media-placeholder {
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: var(--ink-soft);
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .about__grid { grid-template-columns: 1fr; gap: 44px; }
    .about__media::after { display: none; }
    .about__media-inner img,
    .about__media-placeholder { height: 460px; }
}

/* ════════════════════════════════════════════════════════════
   MISJA / NASZ CEL
   ════════════════════════════════════════════════════════════ */

.mission {
    padding-block: clamp(80px, 12vh, 160px);
    background: var(--white);
}

.mission__head {
    max-width: 720px;
    margin: 0 auto clamp(48px, 6vw, 72px);
    text-align: center;
}
.mission__head .section-eyebrow { margin-bottom: 26px; }

.mission__heading {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    margin-bottom: 26px;
}

.mission__desc {
    color: var(--ink-soft);
    font-size: 1.08rem;
    line-height: 1.8;
}
.mission__desc p:last-child { margin-bottom: 0; }
.mission__desc strong { color: var(--ink); font-weight: 500; }

.mission__tiles {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.mission__tile {
    position: relative;
    background: rgba(236, 231, 227, .5);   /* lżejszy beż */
    padding: 44px 36px;
}
/* Outline Out — cienka ramka 1px wysuwana na zewnątrz, jak w guzikach */
.mission__tile::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border: 1px solid transparent;
    pointer-events: none;
    transition: top .35s var(--ease), right .35s var(--ease),
                bottom .35s var(--ease), left .35s var(--ease),
                border-color .35s var(--ease);
}
.mission__tile:hover::before {
    top: -8px; right: -8px; bottom: -8px; left: -8px;
    border-color: var(--beige);
}

.mission__tile-icon {
    display: block;
    width: 40px; height: 40px;
    color: var(--ink);
    margin-bottom: 22px;
}
.mission__tile-icon svg { width: 100%; height: 100%; display: block; }

/* ikony zawsze z linią 1px (niezależnie od rozmiaru) */
.ha-icon path, .ha-icon circle, .ha-icon line, .ha-icon polyline, .ha-icon rect {
    vector-effect: non-scaling-stroke;
}

.mission__tile-body h3 {
    font-size: 1.5rem;
    margin: 0 0 10px;
}
.mission__tile-body p {
    margin: 0;
    color: var(--ink-soft);
}

.mission__cta {
    text-align: center;
    margin-top: clamp(40px, 5vw, 60px);
}

@media (max-width: 900px) {
    .mission__tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .mission__tiles { grid-template-columns: 1fr; }
    .mission__tile { padding: 34px 28px; }
    .mission__tile-icon { width: 34px; height: 34px; }
    .mission__tile-body h3 { font-size: 1.3rem; }
}

/* ════════════════════════════════════════════════════════════
   OFERTA SZKOLENIOWA
   ════════════════════════════════════════════════════════════ */

.offer {
    padding-block: clamp(80px, 12vh, 160px);
    background: rgba(236, 231, 227, .4);   /* lekki beż, minimalne krycie */
}

.offer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 100px);
    align-items: stretch;
}

/* lewa kolumna — zdjęcie */
.offer__media {
    position: relative;
    min-height: 540px;
}
.offer__media::after {            /* dekoracyjna ramka 1px (góra-lewo) */
    content: "";
    position: absolute;
    top: -20px; left: -20px;
    right: 30px; bottom: 30px;
    border: 1px solid var(--line);
    z-index: 0;
    pointer-events: none;
}
.offer__media-inner {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: var(--beige);
    display: flex;
    align-items: center;
    justify-content: center;
}
.offer__media-inner img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 1.1s var(--ease);
}
.offer__media:hover .offer__media-inner img { transform: scale(1.045); }
.offer__media-placeholder {
    color: var(--ink-soft);
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* prawa kolumna — treść */
.offer__eyebrow { margin-bottom: 26px; }
.offer__heading {
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    margin-bottom: 24px;
}
.offer__text {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 560px;
    margin-bottom: 38px;
}
.offer__text p:last-child { margin-bottom: 0; }
.offer__text strong { color: var(--ink); font-weight: 500; }

.offer__cards {
    display: flex;
    flex-direction: column;
}
.offer__card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 26px 0;
}
/* cienka linia oddzielająca między pozycjami */
.offer__card:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: rgba(0, 0, 0, .12);
}
/* numer na beżowym kwadracie */
.offer__card-num {
    flex-shrink: 0;
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--beige);
    font-family: var(--font-head);
    font-size: 1.35rem;
    color: var(--ink);
    transition: background-color .35s var(--ease), color .35s var(--ease);
}
.offer__card:hover .offer__card-num {
    background: var(--ink);
    color: var(--beige);
}
.offer__card-body { padding-top: 3px; }
.offer__card-body h3 {
    font-size: 1.4rem;
    margin: 0 0 8px;
    transition: transform .35s var(--ease);
}
.offer__card:hover .offer__card-body h3 { transform: translateX(5px); }
.offer__card-body p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .98rem;
    line-height: 1.7;
}

.offer__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 40px;
}
@media (max-width: 600px) {
    .offer__cta { flex-direction: column; align-items: stretch; }
    .offer__cta .btn-line { width: 100%; }
}

@media (max-width: 900px) {
    .offer__grid { grid-template-columns: 1fr; gap: 44px; }
    .offer__media { min-height: 420px; }
    .offer__media::after { display: none; }
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */

.site-footer {
    background: var(--ink);
    color: var(--beige);
    padding-block: clamp(60px, 8vw, 96px) 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: clamp(36px, 5vw, 64px);
}
.footer-brand img { max-height: 48px; width: auto; filter: brightness(0) invert(1); }
.footer-logo-text { font-family: var(--font-head); font-size: 24px; letter-spacing: .04em; color: #fff; }
.footer-tagline {
    margin: 22px 0 0;
    max-width: 300px;
    color: rgba(236, 231, 227, .6);
    font-size: .95rem;
    line-height: 1.7;
}

.footer-heading {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(236, 231, 227, .55);
    margin: 0 0 22px;
}

.footer-links,
.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-links a,
.footer-contact a {
    color: var(--beige);
    font-size: .98rem;
    transition: color .3s var(--ease);
}
.footer-links a:hover,
.footer-contact a:hover { color: #fff; }
.footer-company {
    font-family: var(--font-head);
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 4px;
}

.footer-social {
    display: flex;
    gap: 14px;
    margin-top: 26px;
}
.footer-social a {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(236, 231, 227, .3);
    color: var(--beige);
    transition: border-color .3s var(--ease), color .3s var(--ease), background-color .3s var(--ease);
}
.footer-social a:hover { border-color: var(--beige); color: var(--ink); background: var(--beige); }
.footer-social svg { width: 18px; height: 18px; }

.footer-bottom {
    margin-top: clamp(48px, 6vw, 72px);
    padding-top: 28px;
    border-top: 1px solid rgba(236, 231, 227, .14);
}
.footer-copy {
    margin: 0;
    font-size: 13px;
    color: rgba(236, 231, 227, .5);
    letter-spacing: .03em;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   ANIMACJE WEJŚCIA (vanilla JS + IntersectionObserver)
   ════════════════════════════════════════════════════════════ */

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .hero__cue::after { animation: none; }
    html { scroll-behavior: auto; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSYWNOŚĆ
   ════════════════════════════════════════════════════════════ */

@media (max-width: 980px) {
    .menu-toggle { display: flex; }

    .nav-wrapper {
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        gap: 44px;
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        transform: translateX(100%);
        transition: transform .5s var(--ease);
        margin: 0;
    }
    .nav-wrapper.open { transform: none; }

    .main-nav ul { flex-direction: column; gap: 28px; text-align: center; }
    .main-nav a { font-size: 20px; }
    .header-cta { font-size: 14px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .hero__content { max-width: 100%; }
    .hero__cta { flex-direction: column; align-items: stretch; }
    .hero__cta .btn-line { width: 100%; }
    .hero__cue { display: none; }
}
