/* Gabinety Psychoterapii Światło-Cienie – style strony */

/* ============ Kolory i czcionki ============ */
:root {
  --bg: #fbf7f1;
  --surface: #fffdf9;
  --surface-2: #f5ebdd;
  --ink: #2f241a;
  --muted: #6c5c4c;
  --line: #eadccb;
  --forest: #6b4224;     /* główny kolor: głęboki miodowy brąz (ze zdjęcia) */
  --forest-2: #b0733a;   /* jaśniejszy bursztyn – druga strona gradientu */
  --glow: #f2b15f;       /* złoty blask słońca */
  --red: #a8504a;
  --gold: #8a6214;
  --purple: #7a5079;
  --shadow: 0 18px 40px -18px rgba(90, 55, 25, .4);

  --font-script: "Great Vibes", "Snell Roundhand", "Brush Script MT", cursive;
  --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: only light;   /* strona zawsze jasna, także gdy telefon ma tryb ciemny */
}

/* ============ Podstawy ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 4px; }
.container { width: min(1240px, 100% - 3rem); margin-inline: auto; }
.narrow { max-width: 62ch; }

/* ============ Nagłówek / logo / menu ============ */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: #fff;
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.site-header.solid {
  background: var(--surface);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--forest-2), var(--glow), var(--forest-2)) 1;
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 0;
}
.logo { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1; }
/* łuk nad nazwą – jak na tle strony; płaski, żeby nie podwyższał paska */
.logo-arc { display: block; width: 100%; height: 9px; margin-bottom: .15rem; overflow: visible; opacity: .75; }
.logo-arc path { fill: none; stroke: currentColor; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.logo-small {
  font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: 1.4rem; letter-spacing: .01em; padding-left: .15rem;
}
.logo-script {                                   /* ta sama szeryfowa czcionka co „Światło-Cienie” na tle */
  font-family: var(--font-head); font-weight: 500; font-size: 2.2rem; line-height: .95;
  letter-spacing: .005em; margin-top: .1rem;
}

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2rem; }
.nav a {                                        /* ta sama czcionka co „Gabinety Psychoterapii” w logo */
  text-decoration: none; font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: 1.4rem; letter-spacing: .01em;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav-toggle {
  display: none; background: none; border: 0; color: inherit;
  padding: .5rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; }

@media (max-width: 720px) {
  .logo-script { font-size: 1.8rem; }
  .logo-small { font-size: 1.15rem; }
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: .5rem 1.5rem 1rem; }
  .nav a { display: block; padding: .7rem 0; }
}

/* ============ Sekcja powitalna ============
   Dwa tła z content.js: poziome (hero.image) na ekrany poziome – komputer, tablet poziomo,
   pionowe (hero.imageMobile) na ekrany pionowe – telefon, tablet pionowo.
   Na obu tłach są już nazwa i hasło, więc zdjęcie nigdy nie jest przycinane z boku. */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background-color: var(--forest); background-repeat: no-repeat;
  background-image: linear-gradient(160deg, var(--forest-2), var(--forest) 70%);
  min-height: 70vh;
}
.hero.has-image {
  min-height: 0; height: auto;
  background: var(--forest);                       /* kolor paska z napisem pod zdjęciem */
  --band: 3.25rem;                                  /* wysokość paska z napisem (komputer) */
}
/* Zdjęcie: na komputerze całe w swoich proporcjach (1672×941), a razem z paskiem mieści się na jednym ekranie */
.hero-img {
  width: 100%;
  height: min(calc(100vh - var(--band)), 56.28vw);
  height: min(calc(100svh - var(--band)), 56.28vw);
  background-image:
    linear-gradient(180deg, rgba(70, 38, 14, .38) 0%, rgba(70, 38, 14, 0) 14%),
    linear-gradient(0deg, rgba(107, 66, 36, .55) 0%, rgba(107, 66, 36, 0) 9%),
    var(--hero-image);
  background-size: cover; background-position: center 40%; background-repeat: no-repeat;
}
.hero:not(.has-image) .hero-img { display: none; }
.hero-mark {
  position: absolute; right: -2vw; top: 50%; transform: translateY(-58%);
  font-family: var(--font-script); font-size: clamp(9rem, 26vw, 24rem);
  line-height: 1; color: rgba(255,255,255,.07);
  pointer-events: none; user-select: none; white-space: nowrap;
}
.hero.has-image .hero-mark { display: none; }
.hero-content { position: absolute; left: 0; right: 0; bottom: 10%; text-align: center; }
.hero.has-image .hero-content {                    /* pasek z napisem pod zdjęciem */
  position: static; min-height: var(--band);
  display: flex; flex-direction: column; justify-content: center; padding: .25rem 0;
}

@media (max-aspect-ratio: 1/1) {
  /* ekran pionowy (telefon): pionowe zdjęcie w całości na szerokość ekranu */
  .hero-img {
    height: calc(100vw * 1536 / 1024);             /* proporcje pionowego tła (1024×1536) */
    max-height: calc(100vh - 8.5rem); max-height: calc(100svh - 8.5rem);   /* tablet w pionie: całość na jednym ekranie (ucina się tylko podłoga) */
    background-image:
      linear-gradient(180deg, rgba(70, 38, 14, .35) 0, rgba(70, 38, 14, 0) 70px),
      var(--hero-image-mobile, var(--hero-image));
    background-size: 100% auto; background-position: top center;
  }
  .hero.has-image .hero-content { padding: 1.3rem 0 1.5rem; }
}

/* Menu na zdjęciu (ekran poziomy): w jednym rzędzie przy prawej krawędzi, nad łukiem z obrazka */
@media (min-aspect-ratio: 1/1) and (min-width: 721px) {
  .site-header:not(.solid) .nav { position: absolute; right: 50px; top: 1.1rem; }   /* jeden rząd, ok. 50 px od prawej krawędzi */
}

/* Na zdjęciu jest już nazwa gabinetu – logo w pasku pokazuje się dopiero po przewinięciu */
.site-header:not(.solid) .logo { opacity: 0; visibility: hidden; }
.site-header .logo { transition: opacity .35s, visibility .35s; }

/* Nagłówek pochyłą szeryfową czcionką, jak „Gabinety Psychoterapii” w logo */
.hero h1 {
  text-shadow: 0 2px 18px rgba(60, 30, 8, .6);
  font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: clamp(1.45rem, 2.6vw, 2.3rem); line-height: 1.25;
  margin: 0; letter-spacing: .01em;
}
@media (min-width: 900px) { .hero h1 { white-space: nowrap; } }
@media (min-aspect-ratio: 1/1) { .hero.has-image .hero-line { font-size: clamp(1.2rem, 1.9vw, 1.8rem); } }

/* Wskaźnik przewijania po obu stronach nagłówka */
.hero-line {
  display: flex; align-items: center; justify-content: center; gap: .9em;
  font-size: clamp(1.45rem, 2.6vw, 2.3rem);
}
.hero-line h1 { font-size: 1em; }
.scroll-cue {
  position: relative; flex: none; display: block;
  width: 1.1em; height: 1.5em; text-decoration: none;
  filter: drop-shadow(0 1px 3px rgba(60, 30, 8, .6));
}
.scroll-cue i {
  position: absolute; left: 50%; width: .62em; height: .62em; margin-left: -.31em;
  border: solid #faebd7; border-width: 0 .11em .11em 0;
  opacity: 0; transform: translateY(0) rotate(45deg);
  animation: scrolldown 1.2s ease-in-out infinite;
}
.scroll-cue i:nth-child(1) { top: .05em; }
.scroll-cue i:nth-child(2) { top: .5em; animation-delay: .15s; }
@keyframes scrolldown {
  0%   { transform: translateY(20%) rotate(45deg); opacity: .7; }
  50%  { transform: translateY(0%)  rotate(45deg); opacity: .2; }
  100% { transform: translateY(20%) rotate(45deg); opacity: .7; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue i { animation: none; opacity: .7; }
}
@media (max-width: 600px) { .hero-line { gap: .5em; } }

/* Strzałki „w górę” na końcu profili i kontaktu – prowadzą do sekcji „Nasz zespół” */
.back-up { display: flex; justify-content: center; margin-top: 3.5rem; font-size: 1.9rem; }
.back-up .scroll-cue { filter: none; }
.back-up .scroll-cue i { border-color: var(--cue, var(--forest-2)); }
.contact .back-up { --cue: #faebd7; }
.scroll-cue.up i { animation-name: scrollup; transform: translateY(0) rotate(-135deg); }
.scroll-cue.up i:nth-child(1) { top: .25em; animation-delay: .15s; }
.scroll-cue.up i:nth-child(2) { top: .7em;  animation-delay: 0s; }
@keyframes scrollup {
  0%   { transform: translateY(-20%) rotate(-135deg); opacity: .7; }
  50%  { transform: translateY(0%)   rotate(-135deg); opacity: .2; }
  100% { transform: translateY(-20%) rotate(-135deg); opacity: .7; }
}
.hero p { font-size: 1.2rem; max-width: 46ch; margin: 0 0 2.25rem; opacity: .9; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: .9rem 1.8rem; border-radius: 999px;
  background: #fffaf2; color: #6b4224;
  transition: background-color .2s;
}
.btn:hover { background: #fde7c6; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--surface); }

/* ============ Nagłówki sekcji ============ */
.section-head { text-align: center; margin: 0 auto 4rem; }
.section-head h2 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem); line-height: 1.1; margin: 0 0 1rem;
}
.section-head p { color: var(--muted); margin: 0 auto; }

/* ============ Nasz zespół ============ */
.team { padding: 3.25rem 0 6rem; }   /* nagłówek „Nasz zespół” o jedną linię wyżej */
.team .section-head { max-width: 80ch; } /* opis w 3 liniach na komputerze */
.team-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem;
}
.member { display: flex; flex-direction: column; align-items: center; text-align: center; }
.member-link { display: block; text-decoration: none; }
.avatar {
  display: block; width: 176px; height: 176px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 1.4rem;
  border: 5px solid var(--bg);
  box-shadow: 0 0 0 2px var(--pc);
  transition: box-shadow .3s;
}
/* przybliżenie zdjęcia w kółku – ustawiane w content.js (avatarZoom, avatarFocus) */
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-link:hover .avatar { box-shadow: 0 0 0 6px var(--pc); }
.member h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.75rem; line-height: 1.2; margin: 0; }
.member .role { font-family: var(--font-head); font-style: italic; font-size: 1.15rem; color: var(--muted); margin: .2rem 0 .8rem; }
.member .more { color: var(--pc); font-weight: 700; font-size: .95rem; text-decoration: none; border-bottom: 1.5px solid currentColor; margin-top: 1.1rem; }
.member-actions { display: flex; flex-direction: column; gap: .65rem; width: min(100%, 320px); margin-top: .4rem; }
.member-actions a {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .75rem 1.2rem; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 1.02rem;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.member-actions svg { width: 18px; height: 18px; flex: none; }
.btn-phone {
  color: var(--ink); background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--pc);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.btn-phone svg { color: var(--pc); }
.btn-phone span { font-size: 1.2rem; }   /* większy numer telefonu */
.btn-phone:hover { box-shadow: inset 0 0 0 2.5px var(--pc); }
/* Formularz „Zostaw numer telefonu” (Web3Forms)
   układ: [pole +48 …][drobna informacja] / pod spodem przycisk w kształcie przycisku telefonu.
   Szerokość bloku = szerokość przycisku z numerem telefonu powyżej. */
.callback { width: min(100%, 320px); margin-top: .65rem; text-align: left; }
.callback h4 { font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; line-height: 1.2; margin: 0 0 .5rem; }
.callback .cb-lead { color: var(--muted); font-size: .95rem; margin: 0 0 .8rem; }
.cb-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .55rem; }   /* w wąskiej karcie tekst schodzi pod pole */
.cb-field {
  flex: 1 1 140px; display: flex; align-items: center; min-height: 3rem;   /* pole zajmuje miejsce, którego nie potrzebuje tekst obok */
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 0 .55rem; transition: border-color .2s, box-shadow .2s;
}
.cb-field:focus-within { border-color: var(--pc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 22%, transparent); }
.cb-field.invalid { border-color: #b3261e; }
.cb-prefix { color: var(--ink); font-weight: 600; font-size: 1.12rem; margin-right: .3rem; font-variant-numeric: tabular-nums; }
.cb-field input {
  width: 100%; min-width: 9.3ch; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 1.12rem; letter-spacing: 0; font-variant-numeric: tabular-nums; padding: .6rem 0;
}
.cb-field input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.cb-note {                                     /* drobny tekst obok pola, łamie się do prawej krawędzi */
  flex: 0 0 auto; margin: 0; white-space: nowrap; text-align: center;   /* linie łamane w content.js */
  font-size: .72rem; line-height: 1.15; color: var(--muted);
}
.cb-btn {                                      /* ten sam kształt co przycisk z numerem telefonu */
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  width: 100%; margin-top: .65rem; min-height: 0; padding: .75rem 1.2rem;
  border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1.02rem; color: #fff;
  background: linear-gradient(135deg, var(--forest-2), var(--forest));
}
.cb-btn:hover { background: linear-gradient(135deg, var(--glow), var(--forest-2)); }
.cb-btn:disabled { opacity: .65; cursor: wait; }
.cb-msg { font-size: .85rem; margin: .4rem 0 0; line-height: 1.3; }
.cb-msg:empty { display: none; }
.cb-msg.err { color: #b3261e; }
.cb-done { background: var(--surface); border: 1.5px solid var(--pc); border-radius: 12px; padding: .9rem 1rem; font-weight: 600; text-align: center; }
.cb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) {
  .team-grid { grid-template-columns: 1fr; gap: 3rem; }
}

/* ============ Profile ============ */
.profile { padding: 7rem 0; border-top: 1px solid var(--line); }
.profile.alt { background: linear-gradient(180deg, var(--surface-2), var(--bg)); }
.profile-grid {
  display: grid; grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 5rem; align-items: start;
}
.profile.reverse .profile-grid { grid-template-columns: 1fr minmax(240px, 360px); }
.profile.reverse .profile-photo { order: 2; }
.profile-photo { position: sticky; top: 112px; }
/* Zdjęcie w ornamentowym passe-partout (img/ramka-N.png).
   Ramka zanika łagodnie przy zdjęciu i na zewnątrz. Proporcje dopasowane do ramki – nie zmieniać. */
.photo-pp { position: relative; padding: 10%; }
.photo-pp .photo {
  position: relative; z-index: 1; display: block; width: 100%; height: auto;   /* height: auto – inaczej działa atrybut height="1000" */
  aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 16px; box-shadow: var(--shadow);
}
.photo-pp .frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; user-select: none;
}
.profile-text { position: relative; z-index: 1; }
.profile-text .role {
  font-family: var(--font-head); font-style: italic; font-size: 1.3rem;
  color: var(--pc); margin: 0 0 .5rem; line-height: 1.35;
}
.profile-text h2 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.5rem, 4.5vw, 3.6rem); line-height: 1.05; margin: 0 0 2.75rem;
}
.block { margin-bottom: 2.5rem; }   /* tekst na całą szerokość kolumny – do krawędzi zdjęcia w sekcji obok */
/* opisy wyjustowane; dzielenie wyrazów zapobiega dużym przerwom między słowami */
.block p, .block li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.block:last-child { margin-bottom: 0; }
.block h3 {
  font-family: var(--font-head); font-weight: 600; font-size: 1.6rem; line-height: 1.2;
  margin: 0 0 .8rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.block p { margin: 0 0 1rem; }
.block p:last-child { margin-bottom: 0; }
.block ul { list-style: none; padding: 0; margin: .25rem 0 0; }
.block li { position: relative; padding-left: 1.6rem; margin-bottom: .55rem; }
.block li::before {
  content: ""; position: absolute; left: .1rem; top: .72em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--pc);
}
@media (max-width: 880px) {
  .profile { padding: 5rem 0; }
  .profile-grid, .profile.reverse .profile-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .profile.reverse .profile-photo { order: 0; }
  .profile-photo { position: static; width: min(320px, 82%); margin: 0 auto; }
  .profile-text { text-align: left; }
}

/* Pojawianie się sekcji przy przewijaniu */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s ease, transform 1s ease; }
.reveal.delay { transition-delay: .18s; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Kontakt ============ */
.contact {
  padding: 7rem 0; color: #fff;
  background:
    radial-gradient(ellipse 55% 70% at 95% 0%, rgba(242, 177, 95, .35), transparent 70%),
    linear-gradient(125deg, var(--forest) 0%, #8a5529 55%, var(--forest-2) 100%);
}
.contact .section-head p { color: rgba(255,255,255,.8); }
.contact .section-head { max-width: none; }
@media (min-width: 1000px) { .contact .section-head p { white-space: nowrap; } }   /* opis w jednej linii */
.contact-grid {
  display: grid; grid-template-columns: minmax(260px, 1fr) 1.6fr; gap: 3rem; align-items: stretch;
}
.contact-info { display: flex; flex-direction: column; gap: 1.75rem; }
.contact-info dt { font-family: var(--font-head); font-style: italic; font-size: 1.2rem; opacity: .8; }
.contact-info dd { margin: 0; font-size: 1.25rem; line-height: 1.5; }
.contact-info dd a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.5); }
.contact .btn { align-self: flex-start; margin-top: .5rem; }
.map {
  min-height: 400px; border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,.08);
}
.map iframe { display: block; width: 100%; height: 100%; min-height: 400px; border: 0; }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .map, .map iframe { min-height: 320px; }
}

.site-footer { padding: 2rem 0; text-align: center; color: var(--muted); font-size: .95rem; }
.site-footer address { display: inline; font-style: normal; }
