/* ==========================================================================
   Elżbieta Kanarecka-Pawlak — Specjalistyczny Gabinet Psychiatryczny
   ========================================================================== */

@font-face {
  font-family: "DejaVu Sans";
  src: url("../fonts/DejaVuSans.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DejaVu Sans";
  src: url("../fonts/DejaVuSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-accent: #D08A55;
  --color-dark: #2a2a2a;
  --color-dark-85: rgba(42, 42, 42, 0.92);
  --color-text: #222;
  --color-text-light: #fff;
  --font-base: "DejaVu Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-height: 80px;
  --max-width: 1140px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  overflow-x: hidden;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-base); font-weight: 700; margin: 0; }

section { scroll-margin-top: var(--header-height); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
  transition: background-color 0.4s linear;
}

.site-header.is-scrolled {
  background-color: var(--color-dark-85);
  background-image: none;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
}

.logo {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.logo:hover,
.logo:focus-visible {
  color: var(--color-accent);
}

.logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #fff;
}

.nav-list {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: color 0.3s linear;
  position: relative;
}

.nav-list li:not(:first-child):not(.nav-phone-item) a::before {
  content: "|";
  position: absolute;
  left: -4px;
  color: #fff;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-accent);
}

.nav-list a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-phone-item {
  margin-left: 8px;
}

.nav-phone-item a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 1rem;
  white-space: nowrap;
  transition: border-color 0.3s linear, color 0.3s linear;
}

.nav-phone-item a svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}

.nav-phone-item a:hover,
.nav-phone-item a:focus-visible {
  border-color: var(--color-accent);
}

@media (max-width: 749px) {
  .nav-phone-item { margin-left: 0; }
  .nav-phone-item a { justify-content: center; }
}

@media (max-width: 749px) {
  .site-header { background-color: var(--color-dark-85); background-image: none; }
  .nav-toggle { display: flex; }
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-dark-85);
    text-align: center;
    padding: 10px 0;
  }
  .nav-list.is-open { display: flex; }
  .nav-list li:not(:first-child) a::before { content: none; }
}

/* ==========================================================================
   Hero / welcome
   ========================================================================== */
#welcome {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("../img/gabinet-psychiatryczny-poznan-hero.jpg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  padding: 120px 24px 80px;
}

@media (max-width: 480px) {
  #welcome { background-attachment: scroll; }
}

.hero-content h1 {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-content p.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-top: 16px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.scroll-indicator {
  margin-top: 80px;
}

.scroll-indicator a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transition: border-color 0.5s linear, background-color 0.5s linear;
}

.scroll-indicator a:hover,
.scroll-indicator a:focus-visible {
  border-color: var(--color-accent);
}

.scroll-indicator a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.scroll-indicator svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  transition: stroke 0.5s linear;
}

.scroll-indicator a:hover svg,
.scroll-indicator a:focus-visible svg {
  stroke: var(--color-accent);
}

/* ==========================================================================
   About
   ========================================================================== */
#about {
  background: #fff;
  padding: 90px 0;
}

#about h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 40px;
}

#about .lead-text {
  max-width: 760px;
  margin: 0 auto;
}

#about p {
  font-size: 1.15rem;
  letter-spacing: 0.2px;
  margin: 0 0 24px;
  text-align: justify;
  text-align-last: center;
}

/* ==========================================================================
   Stats / "Inside" banner
   ========================================================================== */
#experience-banner {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url("../img/gabinet-wnetrze-poznan.jpg") no-repeat center;
  background-size: cover;
}

#experience-banner h2 {
  font-size: clamp(1.8rem, 6vw, 3rem);
  letter-spacing: 1px;
  padding: 24px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Offer
   ========================================================================== */
#offer {
  background: #fff;
  padding: 90px 0 60px;
  position: relative;
}

#offer h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 16px;
}

#offer .offer-intro {
  text-align: center;
  font-size: 1.3rem;
  margin: 0 0 40px;
}

.service-grid-wrap {
  position: relative;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: start;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 1.15rem;
}

.service-list li {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.brain-sketch-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 260px;
  pointer-events: none;
}

.brain-sketch-wrap svg {
  width: 100%;
  height: auto;
}

.brain-sketch-wrap path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--path-length, 0);
  stroke-dashoffset: var(--path-length, 0);
  transition: stroke-dashoffset 2.4s ease-out;
}

.brain-sketch-wrap.is-visible path {
  stroke-dashoffset: 0;
}

@media (max-width: 991px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .brain-sketch-wrap { display: none; }
}

@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
}

.service-meanings {
  margin-top: 60px;
  text-align: center;
}

.service-meanings h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-meanings ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 40px;
  padding: 0;
  margin: 0;
  font-size: 1.1rem;
}

/* ==========================================================================
   Contact
   ========================================================================== */
#contact {
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("../img/gabinet-wnetrze-poznan.jpg") no-repeat top left;
  background-size: cover;
  color: #fff;
  text-align: center;
  padding: 90px 24px;
}

#contact h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 32px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

#contact h3,
#contact .contact-details,
#contact .contact-note {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.contact-details {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  font-size: 1.3rem;
  letter-spacing: 1px;
  line-height: 2.2;
}

.contact-details li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact-details svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-accent);
  flex-shrink: 0;
}

.contact-details a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.contact-details a:hover,
.contact-details a:focus-visible {
  color: var(--color-accent);
  text-decoration-color: currentColor;
}

.contact-details a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

#contact h3 {
  font-size: 1.4rem;
  margin-top: 16px;
}

#contact .contact-note {
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  margin-top: 8px;
  opacity: 0.9;
}

/* ==========================================================================
   Map
   ========================================================================== */
#map {
  line-height: 0;
}

#map iframe {
  width: 100%;
  height: 420px;
  border: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #fff;
  padding: 24px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 1px;
  color: #444;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brain-sketch-wrap path { transition: none; stroke-dashoffset: 0; }
  #welcome { background-attachment: scroll; }
}
