/*
Theme Name:  System Kwalifikowanego Pacjenta
Theme URI:   https://kacper-jasinski.pl
Author:      Kacper Jasiński / Greenhouse Studio
Author URI:  https://greenhousestudio.pl
Description: Landing page dla marketingu gabinetów medycyny estetycznej — System Kwalifikowanego Pacjenta™
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kwalifikowany-pacjent
Tags:        one-page, landing-page, medical, polish
*/

:root {
  --bg:        oklch(95% 0.013 80);
  --bg-warm:   oklch(93% 0.018 78);
  --card:      oklch(91% 0.020 78);
  --ink:       oklch(18% 0.008 70);
  --ink-soft:  oklch(38% 0.012 75);
  --ink-mute:  oklch(56% 0.015 75);
  --line:      oklch(86% 0.018 78);
  --rose:      oklch(52% 0.085 265);
  --rose-deep: oklch(42% 0.09 265);
  --rose-soft: oklch(91% 0.025 265);
  --gold:      oklch(52% 0.085 265);
  --gold-grad: oklch(52% 0.085 265);
  --serif: "DM Serif Display", "Times New Roman", serif;
  --sans:  "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.05; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
em, .italic { font-style: italic; font-family: var(--serif); font-weight: 400; }
a { color: inherit; text-decoration: none; }
p { color: var(--ink-soft); text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--rose-deep); font-weight: 500;
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }

/* ── NAV ───────────────────────────────────────────────────── */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
nav.top .inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-logo { display: block; height: 46px; width: auto; }
@media (max-width: 600px) { .brand-logo { height: 38px; } }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--rose-soft), var(--rose) 130%);
  display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  color: white; font-size: .95rem; flex-shrink: 0;
}
.brand-name { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .02em; }
.brand-name small {
  font-family: var(--sans); font-size: .68rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-mute); display: block; margin-top: 2px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: .88rem; color: var(--ink-soft); }
.nav-links a:hover { color: var(--rose-deep); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* Custom logo from WP */
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { height: 46px; width: auto; }
@media (max-width: 600px) { .custom-logo { height: 38px; } }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 16px 28px; border-radius: 999px;
  font-family: var(--sans); font-size: .78rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; border: none; transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--rose); color: white;
  border: 1px solid color-mix(in oklab, var(--rose-deep) 40%, transparent);
  box-shadow: 0 6px 20px -10px color-mix(in oklab, var(--rose-deep) 50%, transparent);
}
.btn-primary:hover {
  background: var(--rose-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -10px color-mix(in oklab, var(--rose-deep) 65%, transparent);
}
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: oklch(12% 0.01 40); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── HERO ──────────────────────────────────────────────────── */
.hero { padding: 72px 0 100px; position: relative; overflow: hidden; }
.hero .grid { display: grid; grid-template-columns: 1fr; gap: 64px; align-items: center; }
@media (max-width: 860px) { .hero .grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 40px 0 60px; } }
.hero h1 .accent { font-style: italic; color: var(--rose); font-weight: 400; }
.hero-lede { margin-top: 24px; font-size: 1.08rem; max-width: 50ch; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 36px; }
.pill {
  background: var(--bg-warm); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; font-size: .83rem; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 8px;
}
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ── SECTIONS ──────────────────────────────────────────────── */
section { padding: 96px 0; }
@media (max-width: 860px) { section { padding: 64px 0; } }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-top: 16px; }
.section-head p { margin-top: 18px; font-size: 1.05rem; }

/* ── PAIN POINTS ───────────────────────────────────────────── */
.painpoints { background: var(--bg-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pain-intro { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.pain-intro h2 { margin-top: 12px; }
.pain-intro p { margin-top: 14px; font-size: 1.05rem; }
.pain-tags { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 32px 0 40px; }
.pain-tag {
  background: var(--bg); border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 999px; font-size: .85rem; color: var(--ink); font-weight: 500;
}
.pain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .pain-grid { grid-template-columns: 1fr; } }
.pain-item {
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px; transition: all .25s ease;
}
.pain-item:hover { border-color: var(--rose); transform: translateY(-3px); box-shadow: 0 30px 60px -25px oklch(30% 0.05 40 / .2); }
.pain-item .num { font-family: var(--serif); font-style: italic; color: var(--rose-deep); font-size: 1rem; letter-spacing: .1em; }
.pain-item h3 { font-size: 1.4rem; margin: 12px 0 12px; }
.pain-item p { font-size: .94rem; }

/* ── TRANSFORMATION ────────────────────────────────────────── */
.transformation { background: var(--bg-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.transform-grid { display: grid; gap: 24px; margin-top: 48px; }
.transform-item {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; display: flex; gap: 20px; align-items: flex-start;
}
.transform-check {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--rose-soft); color: var(--rose-deep);
  display: grid; place-items: center; font-size: 1.2rem; margin-top: 2px;
}
.transform-item h3 { font-size: 1.2rem; margin-bottom: 8px; }
.transform-item p { font-size: .95rem; }

/* ── CASE STUDY ────────────────────────────────────────────── */
.case-intro { max-width: 720px; margin-bottom: 48px; }
.case-intro h2 { margin-top: 16px; }
.case-intro p { margin-top: 16px; font-size: 1rem; }
.case-box {
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px;
  padding: 48px; margin-top: 40px;
}
@media (max-width: 640px) { .case-box { padding: 28px; } }
.case-section { margin-bottom: 32px; }
.case-section h3 { font-size: 1.3rem; color: var(--rose-deep); margin-bottom: 12px; }
.case-section p { font-size: .98rem; line-height: 1.7; color: var(--ink-soft); }
.case-section p + p { margin-top: 14px; }
.case-results {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  background: var(--rose-soft); border-radius: 14px; padding: 28px; margin-top: 28px;
}
@media (max-width: 640px) { .case-results { grid-template-columns: 1fr; } }
.result-item .num { font-family: var(--serif); font-size: 2rem; color: var(--rose-deep); line-height: 1; }
.result-item .label { font-size: .82rem; color: var(--ink-mute); margin-top: 8px; letter-spacing: .08em; }
.case-quote {
  background: color-mix(in oklab, var(--ink) 3%, transparent);
  border-left: 3px solid var(--rose);
  padding: 24px; margin-top: 28px; border-radius: 8px;
  font-style: italic; font-size: 1.05rem; color: var(--ink); line-height: 1.6;
}

/* ── WHY SYSTEM ────────────────────────────────────────────── */
.why-system { background: var(--bg-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
@media (max-width: 980px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .why-grid { grid-template-columns: 1fr; } }
.why-item {
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 32px;
}
.why-item .num { font-family: var(--serif); font-style: italic; color: var(--rose-deep); font-size: .95rem; letter-spacing: .1em; margin-bottom: 16px; }
.why-item h3 { font-size: 1.35rem; margin-bottom: 14px; }
.why-item p { font-size: .94rem; line-height: 1.6; }

/* ── HOW IT WORKS ──────────────────────────────────────────── */
.howitworks-grid { display: grid; gap: 32px; margin-top: 48px; }
.howitworks-step {
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 36px;
}
.howitworks-step .num {
  font-family: var(--serif); font-style: italic; color: var(--rose-deep);
  font-size: 2rem; line-height: 1; margin-bottom: 12px;
}
.howitworks-step h3 { font-size: 1.4rem; margin-bottom: 14px; }
.howitworks-step p { font-size: .96rem; line-height: 1.6; }

/* ── GALLERY ───────────────────────────────────────────────── */
.gallery { background: var(--bg-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery .section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 40px;
  max-width: none; margin-bottom: 48px;
}
.gallery .section-head .head-text { max-width: 560px; }
.gallery .section-head .head-meta {
  font-size: .82rem; color: var(--ink-mute); letter-spacing: .14em;
  text-transform: uppercase; padding-bottom: 8px; white-space: nowrap;
}
@media (max-width: 720px) {
  .gallery .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .gallery .section-head .head-meta { padding-bottom: 0; }
}
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid .tile {
  position: relative; overflow: hidden; border-radius: 12px;
  background: var(--card); display: block; cursor: zoom-in;
  box-shadow: 0 18px 40px -28px oklch(30% 0.05 40 / .35);
  aspect-ratio: 4/5; transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-grid .tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s ease;
}
.gallery-grid .tile:hover img { transform: scale(1.04); }
.gallery-grid .tile:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -25px oklch(30% 0.05 40 / .2); }
.tile-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #f5f3f0, #e8ddd6);
  display: grid; place-items: center;
  color: var(--ink-mute); font-size: .85rem; text-align: center; padding: 20px;
}

/* Grid — każde zdjęcie w osobnej komórce, naturalna wysokość, bez przycinania */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1100px) { .gallery-masonry { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .gallery-masonry { grid-template-columns: 1fr; } }

.gallery-masonry .tile,
.gallery-duo .tile {
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--card);
  box-shadow: 0 8px 24px -12px oklch(30% 0.05 40 / .25);
  transition: transform .25s ease, box-shadow .25s ease;
}
.gallery-masonry .tile img,
.gallery-duo .tile img {
  width: 100%; height: auto; display: block;
  transition: transform .5s ease;
}
.gallery-masonry .tile:hover,
.gallery-duo .tile:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -18px oklch(30% 0.05 40 / .3); }
.gallery-masonry .tile:hover img,
.gallery-duo .tile:hover img { transform: scale(1.02); }

/* Duo — 2 kafelki obok siebie, każdy w naturalnej wysokości */
.gallery-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
  align-items: start;
}
@media (max-width: 640px) { .gallery-duo { grid-template-columns: 1fr; } }

/* ── LIGHTBOX ──────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in oklab, oklch(8% 0.01 40) 92%, transparent);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 32px; opacity: 0; transition: opacity .2s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lb-stage {
  position: relative; max-width: min(1200px, 100%); max-height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.lb-img {
  max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 30px 80px -20px oklch(0% 0 0 / .6);
  display: block; object-fit: contain;
}
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: color-mix(in oklab, var(--bg) 12%, transparent);
  color: var(--bg);
  border: 1px solid color-mix(in oklab, var(--bg) 22%, transparent);
  display: grid; place-items: center; cursor: pointer;
  font-size: 24px; font-weight: 300;
  transition: background .15s ease, transform .15s ease;
  backdrop-filter: blur(8px); user-select: none;
}
.lb-btn:hover { background: color-mix(in oklab, var(--bg) 22%, transparent); transform: translateY(-50%) scale(1.05); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in oklab, var(--bg) 12%, transparent);
  color: var(--bg); border: 1px solid color-mix(in oklab, var(--bg) 22%, transparent);
  display: grid; place-items: center; cursor: pointer;
  font-size: 20px; font-weight: 300; backdrop-filter: blur(8px);
}
.lb-close:hover { background: color-mix(in oklab, var(--bg) 22%, transparent); }
.lb-counter {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  color: color-mix(in oklab, var(--bg) 70%, transparent);
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
}
@media (max-width: 640px) {
  .lightbox { padding: 12px; }
  .lb-btn { width: 44px; height: 44px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-img { max-height: calc(100vh - 100px); }
}

/* ── BOOKING / TIDYCAL ─────────────────────────────────────── */
.quick { padding: 56px 0 96px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .quick { padding: 40px 0 64px; } }
.quick-intro { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.quick-intro h2 { margin-top: 12px; color: var(--ink); }
.quick-intro p { margin-top: 14px; }
.tidycal-embed {
  max-width: 820px; margin: 32px auto;
  border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 40px -15px oklch(30% 0.05 40 / .2);
  background: white; min-height: 1200px;
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-list { max-width: 820px; margin: 40px auto 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: transparent; border: none; padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--serif); font-size: 1.3rem; color: var(--ink);
  cursor: pointer; text-align: left; transition: color .2s;
}
.faq-q:hover { color: var(--rose-deep); }
.faq-toggle {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  transition: transform .3s, background .2s, color .2s;
  color: var(--ink); font-size: 1rem;
}
.faq-item.open .faq-toggle {
  background: var(--gold-grad); color: #fff;
  border-color: color-mix(in oklab, var(--rose-deep) 30%, transparent);
  transform: rotate(45deg);
}
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding-bottom: 24px; font-size: 1rem; line-height: 1.6; }
.faq-item.open .faq-a { max-height: 900px; }

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  color: color-mix(in oklab, var(--bg) 75%, transparent);
  padding: 72px 0 32px;
}
footer a { color: color-mix(in oklab, var(--bg) 80%, transparent); }
footer a:hover { color: var(--rose); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid color-mix(in oklab, var(--bg) 15%, transparent);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
footer h4 {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--bg); font-weight: 500; margin-bottom: 18px;
}
footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: .92rem; }
.foot-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  padding-top: 28px; font-size: .82rem;
  color: color-mix(in oklab, var(--bg) 55%, transparent);
}
