/*
Theme Name: Elegant Fryzjer
Theme URI: https://elegantfryzjer.pl
Author: Custom build
Description: Lightweight, fast, accessible custom theme for the Elegant Fryzjer hair salon & barber (Warszawa, Białołęka). Mobile-first, no page builder, minimal JS.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: elegant-fryzjer
*/

/* =========================================================================
   DESIGN TOKENS
   Warm, elegant palette (cream + espresso + caramel/brass). System fonts only
   (no third-party font requests — fast LCP and RODO-friendly: no Google Fonts).
   ====================================================================== */
:root {
	/* Color */
	--ink:        #221C17; /* primary text / dark sections */
	--paper:      #FAF5EE; /* page background (warm cream) */
	--surface:    #FFFFFF;
	--panel:      #F2EADF; /* subtle warm panel */
	--line:       #E6DACB; /* hairline borders */
	--muted:      #5C5247; /* secondary text — AA on cream (~6.8:1) */
	--accent:     #8F5424; /* caramel/brass — buttons & links (white on it ~6:1) */
	--accent-dark:#6F3F18; /* hover */
	--accent-soft:#F3E7D6; /* light tint for chips/eyebrows */

	/* Type */
	--font-head: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
	--font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
	--fs-base: 1.0625rem;          /* 17px */
	--lh-base: 1.65;

	/* Spacing scale */
	--sp-1: .5rem; --sp-2: .75rem; --sp-3: 1rem; --sp-4: 1.5rem;
	--sp-5: 2rem;  --sp-6: 3rem;   --sp-7: 4.5rem; --sp-8: 6rem;

	/* Misc */
	--radius: 10px;
	--radius-lg: 18px;
	--shadow: 0 1px 2px rgba(34,28,23,.06), 0 8px 24px rgba(34,28,23,.07);
	--container: 1140px;
	--header-h: 68px;
}

/* =========================================================================
   RESET / BASE
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}
img, picture, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* =========================================================================
   LAYOUT
   ====================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.site-main { display: block; }
section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--panel { background: var(--panel); }
.section__head { max-width: 56ch; margin-bottom: var(--sp-5); }
.eyebrow {
	display: inline-block; font-family: var(--font-body); font-size: .8rem;
	letter-spacing: .14em; text-transform: uppercase; color: var(--accent-dark);
	background: var(--accent-soft); padding: .3rem .7rem; border-radius: 999px; margin-bottom: var(--sp-2);
}
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); }

/* =========================================================================
   ACCESSIBILITY HELPERS
   ====================================================================== */
.screen-reader-text, .skip-link {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important; top: 8px; left: 8px; width: auto; height: auto;
	clip: auto; z-index: 1000; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}

/* =========================================================================
   BUTTONS
   ====================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 48px; padding: .75rem 1.4rem; border-radius: var(--radius);
	font-weight: 600; text-decoration: none; cursor: pointer; border: 2px solid transparent;
	transition: background-color .15s ease, color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* =========================================================================
   HEADER / NAV  (mobile-first)
   ====================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 100; background: rgba(250,245,238,.92);
	backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.brand__sub  { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.brand__name--footer { color: var(--paper); font-size: 1.4rem; }

.nav-toggle {
	display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
	background: transparent; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	display: block; width: 22px; height: 2px; background: var(--ink); position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; } .nav-toggle__bars::after { top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after  { transform: translateY(-7px) rotate(-45deg); }

.primary-nav { display: none; }
.nav-open .primary-nav {
	display: block; position: absolute; left: 0; right: 0; top: 100%;
	background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: var(--sp-3) 0;
}
.primary-nav__list { list-style: none; margin: 0; padding: 0 clamp(1rem,4vw,2rem); display: flex; flex-direction: column; gap: .25rem; }
.primary-nav__list a { display: block; padding: .75rem .5rem; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: 8px; }
.primary-nav__list a:hover, .primary-nav__list .current-menu-item > a { background: var(--accent-soft); color: var(--accent-dark); }
.primary-nav__cta { padding: var(--sp-3) clamp(1rem,4vw,2rem) 0; }
.primary-nav__cta .btn { width: 100%; }

@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.primary-nav { display: flex !important; position: static; align-items: center; gap: var(--sp-4); background: none; box-shadow: none; border: 0; padding: 0; }
	.primary-nav__list { flex-direction: row; padding: 0; gap: .25rem; }
	.primary-nav__list a { padding: .5rem .75rem; }
	.primary-nav__cta { padding: 0; }
	.primary-nav__cta .btn { width: auto; }
}

/* =========================================================================
   HERO
   ====================================================================== */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; gap: var(--sp-5); align-items: center; }
.hero__title { margin-bottom: var(--sp-3); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.hero__media { position: relative; }
.hero__media picture, .hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }
.hero__badge {
	position: absolute; bottom: -14px; left: 16px; background: var(--ink); color: var(--paper);
	font-size: .8rem; letter-spacing: .04em; padding: .5rem .9rem; border-radius: 999px;
}
@media (min-width: 860px) {
	.hero__grid { grid-template-columns: 1.05fr .95fr; gap: var(--sp-6); }
}

/* =========================================================================
   FEATURE / SERVICE CARDS
   ====================================================================== */
.grid { display: grid; gap: var(--sp-4); }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-4); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card__icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: var(--sp-2); }

/* Price list (Usługi/cennik) */
.pricelist { display: grid; gap: var(--sp-5); }
.price-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem,3vw,2rem); box-shadow: var(--shadow); }
.price-group__lead { color: var(--muted); margin-bottom: var(--sp-3); }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.price-table td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--accent-dark); font-weight: 600; }
.price-table th { font-weight: 500; font-family: var(--font-body); }

/* =========================================================================
   GALLERY  (CSS columns masonry) + accessible lightbox
   ====================================================================== */
.gallery { columns: 2 160px; column-gap: var(--sp-3); }
@media (min-width: 700px) { .gallery { columns: 3 220px; column-gap: var(--sp-4); } }
.gallery__item { break-inside: avoid; margin-bottom: var(--sp-3); padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; border-radius: var(--radius); overflow: hidden; }
.gallery__item picture, .gallery__item img { border-radius: var(--radius); transition: transform .25s ease; }
.gallery__item:hover img { transform: scale(1.03); }

.lightbox { position: fixed; inset: 0; background: rgba(20,15,11,.92); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 4vw; }
.lightbox[open], .lightbox.is-open { display: flex; }
.lightbox__img { max-width: 92vw; max-height: 86vh; width: auto; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.5rem; cursor: pointer; }
.lightbox__close:hover { background: rgba(255,255,255,.25); }

/* =========================================================================
   CONTACT / FORM
   ====================================================================== */
.contact-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: var(--sp-3); }
.field label { font-weight: 600; }
.field input, .field textarea {
	font: inherit; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--surface); color: var(--ink);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; } /* honeypot */
.form-note { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: var(--sp-3); }
.form-note--ok  { background: #E7F2E7; color: #1E5128; border: 1px solid #BCD9BC; }
.form-note--err { background: #FBE7E7; color: #7A1F1F; border: 1px solid #E4B7B7; }

.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.info-list li { display: flex; gap: .6rem; }
.info-list .k { font-weight: 600; min-width: 7.5rem; }

/* Hours table (footer + contact) */
.hours { width: 100%; border-collapse: collapse; max-width: 320px; }
.hours th { text-align: left; font-weight: 500; padding: .25rem 0; }
.hours td { text-align: right; padding: .25rem 0; font-variant-numeric: tabular-nums; }

/* Privacy-friendly map: load Google embed only on click (no third-party call until consent) */
.map-consent { border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: var(--sp-5); text-align: center; background: var(--panel); }
.map-embed { position: relative; padding-top: 56%; border-radius: var(--radius-lg); overflow: hidden; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.badge-todo { font-size: .7rem; color: var(--accent-dark); background: var(--accent-soft); padding: .1rem .4rem; border-radius: 6px; font-weight: 600; }
.phone-placeholder { color: var(--muted); font-style: italic; }
.phone-link { font-weight: 600; text-decoration: none; }

/* =========================================================================
   CTA BAND + FOOTER
   ====================================================================== */
.cta-band { background: var(--ink); color: var(--paper); text-align: center; }
.cta-band__title { color: var(--paper); }
.cta-band__text { color: #D9CDBE; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-4); }
.cta-band .btn--ghost { color: var(--paper); border-color: var(--paper); }
.cta-band .btn--ghost:hover { background: var(--paper); color: var(--ink); }

.site-footer { background: #1A1511; color: #D9CDBE; padding-top: var(--sp-6); }
.site-footer a { color: #E9DDCB; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer__h { font-weight: 600; color: #fff; margin-bottom: var(--sp-2); }
.site-footer address { font-style: normal; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,.1); margin-top: var(--sp-5); padding-block: var(--sp-3); }
.site-footer__bar .muted { color: #9A8E7E; }
.social { display: flex; gap: var(--sp-3); }
