/* ==========================================================================
   Landing page: formularz dla salonów beauty i klinik medycyny estetycznej
   Z design systemu „Mój system med&beauty” użyte są tylko kolory i krój Now.
   Układ: sekcje jako osobne płyty, powierzchnie w stylu liquid glass.
   ========================================================================== */

/* --- Krój Now (SIL OFL, licencja w fonts/OFL.txt) -------------------------- */
@font-face { font-family: "Now"; src: url("../fonts/Now-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Now"; src: url("../fonts/Now-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Now"; src: url("../fonts/Now-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Now"; src: url("../fonts/Now-Black.otf") format("opentype"); font-weight: 900; font-style: normal; font-display: swap; }

/* --- Kolory z design systemu ---------------------------------------------- */
:root {
  --bordo-deep: #4c010f;
  --bordo: #870018;
  --white: #ffffff;
  --black: #0a0a0a;

  /* Powierzchnie: delikatne odcienie bordo rozjaśnione bielą (bez nowych barw) */
  --page: #f3ecec;
  --tint: #f9f4f4;

  /* Trzy poziomy tekstu: 100% nagłówki, 88% kolejny poziom, 70% najniższy */
  --t1: rgba(10, 10, 10, 1);
  --t2: rgba(10, 10, 10, 0.88);
  --t3: rgba(10, 10, 10, 0.7);
  --hair: rgba(10, 10, 10, 0.1);

  --font-sans: "Now", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1200px;
  --gutter: 56px;
  --r-slab: 44px;
  --r-card: 32px;
  --r-field: 18px;
}

/* Tekst na ciemnych płytach: te same trzy poziomy, ale w bieli */
.on-dark {
  --t1: rgba(255, 255, 255, 1);
  --t2: rgba(255, 255, 255, 0.88);
  --t3: rgba(255, 255, 255, 0.7);
  --hair: rgba(255, 255, 255, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 20px 20px 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--t2);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 500; color: var(--t1); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 10; padding: 10px 18px; border-radius: 999px; background: var(--white); color: var(--black); font-weight: 500; text-decoration: none; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--bordo-deep); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--white); }

/* --- Płyty (sekcje) ---------------------------------------------------------
   Każda sekcja to osobna, zaokrąglona płyta z własnym tłem i odstępem od
   sąsiednich, dzięki czemu wyraźnie się od siebie odcinają. */
.slab { position: relative; overflow: hidden; isolation: isolate; margin: 0 auto 20px; border-radius: var(--r-slab); }
.slab-pad { padding-top: 136px; padding-bottom: 136px; }

.slab-white { background: var(--white); }
.slab-tint { background: var(--tint); }
.slab-dark { background: var(--bordo-deep); color: var(--t2); }

/* Miękkie poświaty za szkłem: to je „załamuje” szkło */
.slab::before, .slab::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.slab-white::before { width: 620px; height: 620px; right: -160px; top: 8%; background: radial-gradient(circle, rgba(135, 0, 24, 0.13), transparent 68%); }
.slab-tint::before { width: 760px; height: 760px; left: -220px; top: -120px; background: radial-gradient(circle, rgba(135, 0, 24, 0.2), transparent 68%); }
.slab-tint::after { width: 680px; height: 680px; right: -160px; bottom: -200px; background: radial-gradient(circle, rgba(135, 0, 24, 0.16), transparent 68%); }
.slab-dark::before { width: 900px; height: 900px; right: -220px; top: -320px; background: radial-gradient(circle, rgba(135, 0, 24, 0.55), transparent 66%); }
.slab-dark::after { width: 680px; height: 680px; left: -240px; bottom: -300px; background: radial-gradient(circle, rgba(135, 0, 24, 0.28), transparent 68%); }

/* --- Liquid glass ----------------------------------------------------------- */
.glass {
  position: relative;
  isolation: isolate;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34));
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -1px 2px rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(76, 1, 15, 0.05),
    0 30px 60px -20px rgba(76, 1, 15, 0.2);
}
/* połysk: jasna plama w rogu, jak odbicie światła na szkle */
.glass::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: radial-gradient(90% 60% at 8% 0%, rgba(255, 255, 255, 0.7), transparent 55%); opacity: 0.55; }

/* szkło na ciemnym tle */
.glass-dark {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(255, 255, 255, 0.08),
    0 30px 60px -20px rgba(0, 0, 0, 0.45);
}
.glass-dark::before { background: radial-gradient(90% 60% at 8% 0%, rgba(255, 255, 255, 0.35), transparent 55%); opacity: 0.6; }

/* --- Przyciski --------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 14px 32px; border: 0; border-radius: 999px; background: var(--bordo-deep); color: var(--white); font-size: 16px; line-height: 1.2; font-weight: 500; text-decoration: none; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 30px -10px rgba(76, 1, 15, 0.5); transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
.btn:hover { background: #5d0113; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { cursor: progress; opacity: 0.75; transform: none; }
.btn-glass { background: rgba(255, 255, 255, 0.86); color: var(--bordo-deep); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 14px 30px -10px rgba(0, 0, 0, 0.4); }
.btn-glass:hover { background: var(--white); }
.btn-block { width: 100%; }
.link-back { padding: 12px 6px; border: 0; background: none; color: var(--t3); font-size: 15px; line-height: 1.2; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.link-back:hover { color: var(--t1); }
[hidden] { display: none !important; }

/* --- Hero ---------------------------------------------------------------------- */
.hero { color: var(--t2); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-top: 44px; }
.brand { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; color: var(--t1); text-decoration: none; }
.topbar-note { font-size: 14px; font-weight: 400; color: var(--t3); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 104px; align-items: center; padding-top: 104px; padding-bottom: 136px; }
.eyebrow { display: inline-block; padding: 9px 18px; border-radius: 999px; font-size: 14px; line-height: 1.2; font-weight: 400; color: var(--t2); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.24); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.hero h1 { margin-top: 36px; font-size: clamp(34px, 3.8vw, 50px); line-height: 1.12; font-weight: 500; letter-spacing: -0.03em; color: var(--t1); text-wrap: pretty; }
.hero-lead { margin-top: 28px; max-width: 28em; font-size: 17px; line-height: 1.7; font-weight: 400; color: var(--t2); }
.hero-lead b { color: var(--t1); }

/* --- Karta formularza ----------------------------------------------------------- */
.form-card { padding: 52px; border-radius: var(--r-card); background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)); scroll-margin-top: 24px; --t1: rgba(10, 10, 10, 1); --t2: rgba(10, 10, 10, 0.88); --t3: rgba(10, 10, 10, 0.7); --hair: rgba(10, 10, 10, 0.1); color: var(--t2); }
.form-card:focus { outline: none; }
.form-card h2 { font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; color: var(--t1); }
.form-card-sub { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--t3); }

.progress { margin: 36px 0 40px; }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; font-size: 14px; line-height: 1.2; font-weight: 400; color: var(--t3); }
.progress-meta strong { color: var(--t1); }
.progress-track { height: 8px; border-radius: 999px; background: rgba(10, 10, 10, 0.08); box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.08); overflow: hidden; }
.progress-fill { height: 100%; width: 33.333%; border-radius: 999px; background: linear-gradient(90deg, var(--bordo), var(--bordo-deep)); transition: width 0.5s ease; }

.form-step { display: none; flex-direction: column; gap: 30px; border: 0; margin: 0; padding: 0; min-width: 0; }
.form-step.is-active { display: flex; }
.form-step-title { padding: 0; margin: 0 0 28px; font-size: 18px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; color: var(--t1); }
.field { display: flex; flex-direction: column; gap: 10px; }
.field-label { font-size: 14px; line-height: 1.3; font-weight: 500; color: var(--t2); }
.input { width: 100%; min-height: 56px; padding: 15px 20px; border: 1px solid rgba(10, 10, 10, 0.14); border-radius: var(--r-field); background: rgba(255, 255, 255, 0.72); color: var(--t1); font-size: 16px; line-height: 1.4; font-weight: 400; box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.05); transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; -webkit-appearance: none; appearance: none; }
textarea.input { min-height: 160px; resize: vertical; }
.input::placeholder { color: var(--t3); opacity: 1; }
.input:hover { border-color: rgba(10, 10, 10, 0.32); }
.input:focus { outline: none; background: var(--white); border-color: var(--bordo-deep); box-shadow: 0 0 0 4px rgba(76, 1, 15, 0.12); }
.input[aria-invalid="true"] { border-color: var(--bordo); box-shadow: 0 0 0 3px rgba(135, 0, 24, 0.12); }
.field-error { display: none; font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--bordo); }
.field.has-error .field-error { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.suggest { display: flex; flex-direction: column; gap: 16px; }
.suggest-label { font-size: 14px; line-height: 1.5; font-weight: 400; color: var(--t3); }
.suggest-list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 10px 18px; border: 1px solid rgba(10, 10, 10, 0.14); border-radius: 999px; background: rgba(255, 255, 255, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--t2); font-size: 14px; line-height: 1.25; font-weight: 400; text-align: left; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9); transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.chip:hover { border-color: var(--bordo-deep); color: var(--t1); }
.chip[aria-pressed="true"] { background: var(--bordo-deep); border-color: var(--bordo-deep); color: var(--white); font-weight: 500; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }

.form-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 44px; }
.form-nav-end { margin-left: auto; }
.form-send { margin-top: 44px; display: flex; flex-direction: column; gap: 24px; }
.form-send .link-back { align-self: flex-start; }
.privacy { font-size: 13px; line-height: 1.6; color: var(--t3); }
.privacy a { color: var(--t1); font-weight: 500; text-underline-offset: 3px; }
.form-status { display: none; margin-top: 28px; padding: 14px 20px; border: 1px solid var(--bordo); border-radius: var(--r-field); font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--bordo); }
.form-status.is-visible { display: block; }

.thanks { display: none; flex-direction: column; gap: 22px; padding: 12px 0; }
.thanks.is-visible { display: flex; }
.thanks:focus { outline: none; }
.thanks-mark { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: var(--bordo-deep); color: var(--white); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.thanks-mark .icon { width: 26px; height: 26px; }
.thanks h3 { font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; color: var(--t1); }
.thanks p { font-size: 16px; }

/* --- Nagłówki sekcji ------------------------------------------------------------ */
.section-head { max-width: 640px; margin-bottom: 72px; }.section-head h2, .about-text h2, .band h2 { font-size: clamp(28px, 2.9vw, 38px); line-height: 1.18; font-weight: 500; letter-spacing: -0.025em; color: var(--t1); text-wrap: balance; }
.section-lead { margin-top: 20px; font-size: 17px; line-height: 1.7; font-weight: 400; color: var(--t2); }

/* --- Kroki ------------------------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { padding: 44px 40px 48px; border-radius: var(--r-card); }
.step .num { display: block; margin-bottom: 48px; font-size: 44px; line-height: 1; font-weight: 500; letter-spacing: -0.03em; color: var(--t3); }
.step h3 { font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: var(--t1); }
.step p { margin-top: 12px; font-size: 15px; line-height: 1.7; color: var(--t2); }

/* --- O mnie ------------------------------------------------------------------------ */
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 112px; align-items: start; }
.about-side { position: sticky; top: 48px; }
.about-photo { aspect-ratio: 4 / 5; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: var(--r-card); background: radial-gradient(ellipse 85% 65% at 50% 60%, rgba(135, 0, 24, 0.9) 0%, var(--bordo-deep) 100%); box-shadow: 0 40px 70px -30px rgba(76, 1, 15, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.3); }
.about-photo img { display: block; height: 96%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom center; }
.about-person { margin-top: 32px; padding: 22px 28px; border-radius: 24px; display: flex; flex-direction: column; gap: 4px; }
.about-person strong { font-size: 18px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; color: var(--t1); }
.about-person span { font-size: 14px; font-weight: 400; color: var(--t3); }
.about-text { display: flex; flex-direction: column; gap: 24px; max-width: 600px; margin: 0; padding: 4px 0 4px 36px; border-left: 2px solid var(--hair); font-size: 16px; line-height: 1.8; color: var(--t2); }
/* cudzysłów: otwarcie na początku pierwszego akapitu, zamknięcie na końcu ostatniego */
.q-open::before { content: "„"; }
.q-close::after { content: "”"; }
.about-text .about-lead { font-size: 18px; line-height: 1.7; font-weight: 400; color: var(--t1); }
.about-text h3 { margin-top: 28px; font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: var(--t1); }

/* --- Sytuacje ------------------------------------------------------------------------- */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.cases > li { display: flex; }
.case { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; width: 100%; padding: 40px 40px 40px 44px; border-radius: var(--r-card); color: var(--t2); text-align: left; cursor: pointer; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.case:hover { transform: translateY(-4px); }
.case-title { display: block; font-size: 19px; line-height: 1.3; font-weight: 500; letter-spacing: -0.015em; color: var(--t1); }
.case-text { display: block; margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--t3); }
.case-arrow { flex-shrink: 0; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--bordo-deep); color: var(--white); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); transition: transform 0.25s ease; }
.case:hover .case-arrow { transform: translateX(4px); }

/* --- Pas końcowy ---------------------------------------------------------------------- */
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 64px; }
.band h2 { max-width: 15em; }

/* --- Stopka ----------------------------------------------------------------------------- */
.footer { color: var(--t3); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 44px; padding-bottom: 56px; font-size: 14px; line-height: 1.5; font-weight: 400; }
.footer a { color: var(--t2); font-weight: 500; text-underline-offset: 3px; }

/* --- Przyklejony przycisk na telefonie ------------------------------------------------------- */
.sticky-cta { display: none; }
@media (max-width: 960px) {
  body { padding-bottom: 92px; }
  .sticky-cta {
    display: flex;
    position: fixed;
    z-index: 20;
    left: 16px;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: auto;
    max-width: 480px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 16px 36px -8px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
  }
  /* ukrywamy go, gdy formularz albo przycisk w pasie końcowym są już na ekranie */
  .sticky-cta.is-hidden { transform: translateY(140%); opacity: 0; visibility: hidden; pointer-events: none; }
}

/* --- Ruch ----------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chip, .case, .case-arrow, .input, .progress-fill, .sticky-cta { transition: none; }
  .btn:hover, .case:hover, .case:hover .case-arrow { transform: none; }
}

/* Gdy przeglądarka nie zna backdrop-filter, szkło dostaje bardziej kryjące tło */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, 0.9); }
  .glass-dark { background: rgba(255, 255, 255, 0.14); }
}

/* --- Tablet ------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .hero-grid { gap: 72px; }
  .about-grid { gap: 72px; }
  .form-card { padding: 44px; }
}

@media (max-width: 960px) {
  .slab-pad { padding-top: 104px; padding-bottom: 104px; }
  .hero-grid { grid-template-columns: 1fr; gap: 72px; padding-top: 72px; padding-bottom: 104px; }
  .form-card { max-width: 660px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .step .num { margin-bottom: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 64px; }
  .about-side { position: static; max-width: 440px; }
  .cases { grid-template-columns: 1fr; gap: 24px; }
  .band .wrap { flex-direction: column; align-items: flex-start; gap: 48px; }
}

/* --- Telefon -------------------------------------------------------------------------------- */
@media (max-width: 640px) {
  :root { --gutter: 24px; --r-slab: 32px; --r-card: 26px; }
  body { padding: 10px 10px 0; }
  .slab { margin-bottom: 10px; }
  .slab-pad { padding-top: 72px; padding-bottom: 72px; }
  .topbar { padding-top: 28px; }
  .eyebrow { border-radius: 22px; }
  .topbar-note { display: none; }
  .hero-grid { gap: 56px; padding-top: 56px; padding-bottom: 72px; }
  .hero h1 { margin-top: 32px; }
  .form-card { padding: 32px 24px; }
  .progress { margin: 32px 0 36px; }
  .section-head { margin-bottom: 48px; }
  .step { padding: 36px 30px 40px; }
  .step .num { font-size: 38px; margin-bottom: 28px; }
  .about-grid { gap: 48px; }
  .about-text { gap: 22px; padding-left: 20px; }
  .about-text h3 { margin-top: 20px; }
  .case { padding: 32px 28px; gap: 20px; }
  .case-arrow { width: 48px; height: 48px; }
  .band .wrap { gap: 40px; }
  .band .btn { width: 100%; }
  .form-nav { flex-wrap: wrap; margin-top: 36px; }
  .form-nav-end { margin-left: 0; width: 100%; }
  .form-nav .btn { width: 100%; }
  .link-back { order: 2; }
  .footer .wrap { padding-top: 32px; padding-bottom: 40px; }
}
