/* Talk To Me! – Paulina Bartela
   Kolory marki z logo: niebieski #004AAD i czerwony #FF3131. */

:root {
  --blue: #004aad;
  --blue-dark: #003580;
  --ink: #0d2350;
  --ink-soft: #4a5a7a;
  --red: #ff3131;
  --sky: #e4ecfa;
  --paper: #f3f6fc;
  --white: #ffffff;
  --line: #d3ddef;
  --field-line: #7a8fb5; /* ≥3:1 względem białego tła (WCAG 1.4.11) */

  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* skala typograficzna ~1.25 */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5625rem;
  --fs-2xl: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  --fs-hero: clamp(4.5rem, 2.4rem + 10vw, 11rem);

  --bubble: 28px 28px 28px 6px;
  --bubble-out: 28px 28px 6px 28px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
}

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

html { scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--blue); color: var(--white); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }

.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 750;
  font-variation-settings: "wdth" 85;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--blue);
  margin: 0 0 0.5em;
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- Przyciski ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0 1.5em;
  border: 2px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

.btn-small { min-height: 42px; padding: 0 1.1em; font-size: 0.9375rem; }
.btn-block { width: 100%; }

/* ---------- Nagłówek ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 246, 252, .92); /* zapas dla starszych przeglądarek */
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--blue); text-decoration: none;
}
.brand-mark { width: 40px; height: 40px; color: var(--red); flex: none; }
.brand-word {
  font-family: "Montserrat", var(--font-body);
  font-weight: 500; font-size: 1.125rem; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.01em;
}
.brand-word b { font-weight: 800; }
.brand-word small {
  display: block; margin-top: 5px;
  font-size: 0.5625rem; font-weight: 500; letter-spacing: 0.42em;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 500;
  padding-block: 6px; border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { border-bottom-color: var(--red); }

.nav-toggle {
  display: none;
  width: 48px; height: 48px; border: 0; border-radius: 12px;
  background: var(--sky); cursor: pointer; position: relative;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute; left: 14px; width: 20px; height: 2px;
  background: var(--blue); border-radius: 2px; transition: transform .2s, opacity .2s;
}
.nav-toggle-bars { top: 23px; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(40px, 7vw, 96px) var(--section); overflow: hidden; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 800;
  font-variation-settings: "wdth" 88, "opsz" 96;
  line-height: 0.86;
  letter-spacing: -0.025em;
  color: var(--blue);
  margin: 0 0 0.28em;
}

.hero-lead { font-size: var(--fs-lg); line-height: 1.55; max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 20px; }

.hero-note { color: var(--ink-soft); font-size: var(--fs-sm); margin: 0; }

/* Rozmowa – jedyny animowany moment na stronie */
.chat {
  background: var(--white);
  border-radius: 32px;
  padding: 20px 20px 28px;
  box-shadow: 0 30px 60px -30px rgba(0, 53, 128, .35), 0 0 0 1px var(--line);
}

.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 4px 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.chat-head img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; object-position: 50% 18%;
}
.chat-head strong { display: block; line-height: 1.2; }
.chat-head span { color: var(--ink-soft); font-size: var(--fs-sm); }

.chat-thread {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}

.msg {
  max-width: 84%;
  padding: 12px 18px;
  font-size: 1rem; line-height: 1.45;
  animation: msg-in .45s cubic-bezier(.2, .8, .2, 1) both;
}
.msg-in { align-self: flex-start; background: var(--blue); color: var(--white); border-radius: var(--bubble); }
.msg-out { align-self: flex-end; background: var(--sky); color: var(--ink); border-radius: var(--bubble-out); }

.msg:nth-child(1) { animation-delay: .3s; }
.msg:nth-child(2) { animation-delay: 1.2s; }
.msg:nth-child(3) { animation-delay: 2.1s; }
.msg:nth-child(4) { animation-delay: 3s; position: relative; }

/* serduszko z logo jako reakcja na ostatnią wiadomość */
.msg:nth-child(4)::after {
  content: "";
  position: absolute; right: 10px; bottom: -14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--white) url("img/heart.svg") center / 16px no-repeat;
  box-shadow: 0 0 0 1px var(--line);
  animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) 3.7s both;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(.2); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- O mnie ---------- */

.about { background: var(--white); }

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}

.about-photo { margin: 0; }
.about-photo img {
  width: 100%; height: auto;
  aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: 40px 40px 40px 8px;
}

.about-copy { max-width: 38em; }
.about-copy p:not(.lead) { color: var(--ink); }

.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px; margin: 40px 0 0; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-xl); line-height: 1.1; color: var(--blue);
  font-variation-settings: "wdth" 85;
}
.facts dd { margin: 6px 0 0; color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.45; }

/* ---------- Oferta ---------- */

.section-head { max-width: 40em; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--ink-soft); font-size: var(--fs-lg); line-height: 1.55; }

.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--white);
  border-radius: 28px;
  box-shadow: 0 0 0 1px var(--line);
}

.plan h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl); font-weight: 700;
  font-variation-settings: "wdth" 90;
  line-height: 1.15; margin: 0 0 16px;
}

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em;
  width: 14px; height: 8px;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

.plan-bonus {
  display: inline-block; margin: 20px 0 0;
  padding: 8px 14px; border-radius: 14px 14px 14px 4px;
  background: var(--sky); color: var(--ink); font-size: var(--fs-sm); font-weight: 600;
}

.plan-price {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding-left: 32px; border-left: 1px solid var(--line);
}
.plan-price .btn { margin-top: 20px; }

.price {
  display: flex; align-items: baseline; gap: 6px; margin: 0;
  font-family: var(--font-display); color: var(--blue); line-height: 1;
  font-variation-settings: "wdth" 80;
}
.price .amount { font-size: 4.5rem; font-weight: 800; letter-spacing: -0.03em; }
.price .unit { font-size: 1.75rem; font-weight: 700; }
.price .from { font-size: 1.25rem; font-weight: 600; margin-right: 2px; }
.price-text { font-size: 2rem; font-weight: 750; line-height: 1.05; }
.per { margin: 8px 0 0; color: var(--ink-soft); font-size: var(--fs-sm); }

.plan-featured { background: var(--blue); color: var(--white); box-shadow: none; }
.plan-featured .ticks li::before { border-color: var(--white); }
.plan-featured .plan-bonus { background: rgba(255, 255, 255, .16); color: var(--white); }
.plan-featured .plan-price { border-left-color: rgba(255, 255, 255, .28); }
.plan-featured .price { color: var(--white); }
.plan-featured .per { color: rgba(255, 255, 255, .8); }
.plan-featured .btn { background: var(--white); color: var(--blue); border-color: var(--white); }
.plan-featured .btn:hover { background: var(--sky); border-color: var(--sky); }
.plan-featured :focus-visible { outline-color: var(--white); }

/* ---------- Opinie ---------- */

.reviews { background: var(--white); }

.review-wall { columns: 3 300px; column-gap: 24px; }

.review { break-inside: avoid; margin: 0 0 32px; }
.review blockquote {
  margin: 0; padding: 24px 26px;
  background: var(--paper);
  border-radius: var(--bubble);
  font-size: 1rem; line-height: 1.6;
}
.review blockquote p { margin: 0; }
.review figcaption {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 0 4px; font-weight: 600;
}
.review figcaption::before {
  content: attr(data-initial);
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  font-size: 0.875rem; font-weight: 700;
}

/* ---------- Kontakt ---------- */

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}

.contact-list { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 22px; }
.contact-label { display: block; color: var(--ink-soft); font-size: var(--fs-sm); }
.contact-list a {
  font-family: var(--font-display); font-weight: 650;
  font-size: clamp(1.125rem, 1rem + .8vw, 1.5rem);
  font-variation-settings: "wdth" 90;
  text-decoration: none; word-break: break-word;
}
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--white);
  border-radius: 32px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 0 0 1px var(--line);
  display: grid; gap: 18px;
}

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  padding: 13px 16px;
  border: 1.5px solid var(--field-line); border-radius: 14px;
  background: var(--paper);
  transition: border-color .15s, background-color .15s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); background: var(--white);
  box-shadow: 0 0 0 3px rgba(0, 74, 173, .22);
}
.field [aria-invalid="true"] { border-color: #c4141a; }

[hidden] { display: none !important; }

.form-success {
  background: var(--blue); color: var(--white);
  border-radius: 32px; padding: clamp(28px, 4vw, 44px);
}
.form-success h3 {
  font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700;
  font-variation-settings: "wdth" 90; margin: 0 0 8px;
}
.form-success p { margin: 0; }

.form-error:empty { margin-top: -18px; } /* zostaje w drzewie dostępności, bez pustej przerwy */
.form-error { margin: 0; color: #c4141a; font-weight: 600; font-size: 0.9375rem; }
.form-hint { margin: 0; color: var(--ink-soft); font-size: var(--fs-sm); text-align: center; }

/* ---------- Stopka ---------- */

.legal-body { max-width: 42em; }
.legal-body h2 {
  font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700;
  font-variation-settings: "wdth" 90; line-height: 1.2;
  margin: 2em 0 0.5em; color: var(--ink);
}
.legal-body ul { padding-left: 1.25em; margin: 0 0 1em; }
.legal-body li { margin-bottom: 0.4em; }

a[href^="tel:"] { white-space: nowrap; }

.note { margin: 24px 0 0; max-width: 46em; color: var(--ink-soft); font-size: var(--fs-sm); }

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: var(--fs-sm); color: var(--ink-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 32px; }
.footer-inner p { margin: 0; }
.footer-inner p + p { margin-top: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Responsywność ---------- */

@media (max-width: 960px) {
  .hero-inner, .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .chat { max-width: 520px; }
  .about-photo { max-width: 440px; }
  .plan { grid-template-columns: 1fr; gap: 24px; }
  .plan-price {
    padding-left: 0; padding-top: 24px;
    border-left: 0; border-top: 1px solid var(--line);
  }
  .plan-featured .plan-price { border-top-color: rgba(255, 255, 255, .28); }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn):hover { border-bottom-color: var(--line); color: var(--blue); }
  .nav .btn { margin-top: 16px; min-height: 52px; }
}

@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; gap: 16px; }
  .hero-actions .btn { width: 100%; }
  .price .amount { font-size: 3.75rem; }
  .brand-word small { letter-spacing: 0.3em; }
}

@media (prefers-reduced-motion: reduce) {
  .msg, .msg:nth-child(4)::after { animation: none; }
}
