/* ==========================================================================
   Sylwia Kowalenko — landing page
   Fluid values interpolate between the mobile (390px) and desktop (1440px)
   Figma frames.
   ========================================================================== */

:root {
  --c-bg: #faf8f5;
  --c-burgundy: #470c0c;
  --c-terracotta: #ae5b3e;
  --c-rust: #a75d43;
  --c-ink: #403b31;
  --c-muted: #736e67;
  --c-line: #e3ddd3;
  --c-divider: #debdb0;
  --c-white: #ffffff;

  --f-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-h1: clamp(46px, 30.4px + 4vw, 88px);
  --fs-h2: clamp(38px, 29.8px + 2.1vw, 60px);
  --fs-h3: clamp(28px, 24.3px + 0.95vw, 38px);
  --fs-h4: clamp(22px, 19.8px + 0.57vw, 28px);
  --fs-quote: clamp(22px, 18.3px + 0.95vw, 32px);
  --fs-numeral: clamp(40px, 37px + 0.76vw, 48px);
  --fs-lead: clamp(17px, 16.3px + 0.19vw, 19px);
  --fs-body: clamp(16px, 15.3px + 0.19vw, 18px);
  --fs-small: 16px;

  --pad-x: clamp(20px, -2.3px + 5.71vw, 80px);
  --pad-y: clamp(48px, 36.1px + 3.05vw, 80px); /* section top/bottom: 96px between sections on phones, 160px on desktop */
  --gap-section: clamp(40px, 25.1px + 3.81vw, 80px);
  --indent: clamp(24px, 6.9px + 4.38vw, 70px);

  --radius: 16px;
  --radius-btn: 8px;
  --container: 1280px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h, 80px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-muted);
  font-family: var(--f-sans);
  font-variation-settings: "opsz" 14;
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-btn);
  background: var(--c-burgundy); color: var(--c-white);
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--c-terracotta); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--pad-x));
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

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

.media {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  background: #e9e4dc;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: 1px solid var(--c-terracotta);
  border-radius: var(--radius-btn);
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.33;
  letter-spacing: 0.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--c-terracotta); color: var(--c-white); }
.btn--primary:hover { background: #974b30; border-color: #974b30; }
.btn--outline { background: transparent; color: var(--c-terracotta); padding-inline: 24px; letter-spacing: 0; }
.btn--outline:hover { background: var(--c-terracotta); color: var(--c-white); }
.btn--lg { font-size: var(--fs-lead); }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  line-height: normal;
}
.brand__name {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: clamp(28px, 23.9px + 1.05vw, 39px);
  font-variant-caps: small-caps;
  letter-spacing: -0.5px;
  color: var(--c-burgundy);
  line-height: 1.2;
}
.brand__tagline {
  font-weight: 600;
  font-size: clamp(10px, 8.5px + 0.38vw, 14px);
  letter-spacing: 0.2em; /* keeps the tagline within the name; refined by brand-fit.js */
  margin-right: -0.2em;
  text-transform: uppercase;
  color: var(--c-terracotta);
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), box-shadow .35s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(71, 12, 12, .35); }
.site-header.is-hidden { transform: translateY(-100%); box-shadow: none; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: calc(var(--container) + 2 * var(--pad-x));
  margin-inline: auto;
  padding: clamp(16px, 13.8px + 0.57vw, 24px) var(--pad-x);
}

.site-nav { display: flex; align-items: center; gap: 40px; }
.site-nav__links { display: flex; gap: 20px; }
.site-nav__links a {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-ink);
  white-space: nowrap;
  transition: color .2s ease;
}
.site-nav__links a:hover { color: var(--c-terracotta); }
.btn--nav {
  padding: 12px 24px;
  font-size: 14px;
  line-height: 1.4;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  padding: 6px;
  margin: -6px;
  border: 0;
  background: none;
  color: var(--c-burgundy);
  cursor: pointer;
}
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: inline; }

@media (max-width: 1199px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px var(--pad-x) 32px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    box-shadow: 0 16px 24px -16px rgba(71, 12, 12, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav__links { flex-direction: column; gap: 0; }
  .site-nav__links a {
    display: block;
    padding: 14px 0;
    font-size: 20px;
    border-bottom: 1px solid var(--c-line);
  }
  .btn--nav { padding: 14px 24px; }
}

/* ---------- Section heading (title + rule) ---------- */
.stack-section { display: flex; flex-direction: column; gap: var(--gap-section); }

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--c-burgundy);
}
.section-title::after {
  content: "";
  width: 100px;
  height: 2px;
  background: url("/assets/line.svg") center / 100% 100% no-repeat;
}
.section-intro { max-width: 960px; font-size: var(--fs-body); line-height: 1.7; }
.section-intro--quote,
.closing-quote,
.quote,
.contact__lead,
.bio__lead {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-quote);
  line-height: 1.4;
  color: var(--c-rust);
}

.indent { text-indent: var(--indent); }

/* ---------- Hero ---------- */
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}
.hero__content { display: flex; flex-direction: column; gap: 48px; }
.hero__title {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: -1px;
  color: var(--c-burgundy);
}
.hero__lead { font-size: var(--fs-lead); line-height: 1.7; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero__image { height: 680px; object-position: 47% center; }

/* ---------- Czym się zajmuję ---------- */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}
.about-split__image { height: 918px; }
.process__image { display: none; } /* shown on phones/tablets only, see below */
.about-split__content { display: flex; flex-direction: column; gap: 68px; }
.quote { display: flex; flex-direction: column; gap: 1.4em; }
.offer-list { display: flex; flex-direction: column; gap: 20px; }
.offer-list li { display: flex; flex-direction: column; gap: 10px; }
.offer-list__title {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.2;
  color: var(--c-burgundy);
}
.offer-list p { line-height: 1.8; }

.therapy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  /* Separate the psychotherapy block as much as two sections are separated. */
  margin-top: calc(2 * var(--pad-y) - var(--gap-section));
}
/* The photo follows the text column's height instead of its own aspect ratio. */
.therapy picture { display: block; position: relative; }
.therapy__content { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.therapy__body { display: flex; flex-direction: column; gap: 1.8em; line-height: 1.8; }
.therapy__image { position: absolute; inset: 0; height: 100%; }

/* ---------- W czym mogę pomóc ---------- */
.areas {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  gap: 40px;
}
.areas__divider { background: var(--c-divider); }
.area { display: flex; flex-direction: column; gap: 40px; }
.area__title {
  min-height: 140px;
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.2;
  color: var(--c-burgundy);
}
.area__items { display: flex; flex-direction: column; gap: 52px; }
.area__items li { display: flex; flex-direction: column; gap: 12px; }
.area__items h4,
.step__title {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: 1.3;
  color: var(--c-ink);
}
.area__items p,
.step p { font-size: var(--fs-small); line-height: 1.7; }

/* ---------- Droga do porozumienia ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.step { display: flex; flex-direction: column; gap: 24px; }
.step__num {
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: var(--fs-numeral);
  line-height: 1.2;
  color: var(--c-rust);
}
.closing-quote { text-align: center; }
/* Small superscript © that does not stretch the line height. */
.copy { font-size: 0.5em; line-height: 0; vertical-align: 0.9em; }

/* ---------- Poznajmy się ---------- */
.bio {
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
  width: 100%;
  max-width: 907px;
  margin-inline: auto;
}
.bio__image { aspect-ratio: 907 / 604; }
.bio__text { display: flex; flex-direction: column; align-items: center; gap: 48px; }
.bio__body { display: flex; flex-direction: column; gap: 1.8em; line-height: 1.8; }
.bio__lead,
.bio__body { width: 100%; }
.bio__logo { width: clamp(220px, 190.5px + 7.62vw, 320px); }

/* ---------- Kontakt ---------- */
.contact__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  text-align: center;
}
.contact__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.contact__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  line-height: normal;
  color: var(--c-ink);
}
.contact__list a { text-decoration: none; }
.contact__list a:hover { color: var(--c-terracotta); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--c-line); }
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 18px + 1.52vw, 40px);
  padding-top: clamp(40px, 32.6px + 1.9vw, 60px);
  padding-bottom: 40px;
}
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  width: 100%;
  font-size: 12px;
  line-height: 1.33;
}
.site-footer__bottom a { text-decoration: none; }
.site-footer__bottom a:hover { color: var(--c-terracotta); }

/* ==========================================================================
   Breakpoints
   ========================================================================== */

@media (max-width: 1199px) {
  .areas { grid-template-columns: 1fr; gap: 40px; }
  .areas__divider { height: 1px; }
  .area__title { min-height: 0; }
  .area__items { gap: 36px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 48px 40px; }
}

@media (max-width: 1023px) {
  .hero__grid,
  .about-split { grid-template-columns: 1fr; gap: 40px; }
  .hero__content { gap: 32px; }
  .hero__image { height: auto; aspect-ratio: 350 / 440; max-height: 720px; }
  /* Spread the photos more evenly through the long single-column page: the
     "Czym się zajmuję" portrait moves below the psychotherapy text (via <picture>),
     and the session photo opens "Droga do porozumienia". */
  .about-split__image { display: none; }
  .process__image { display: block; height: auto; aspect-ratio: 350 / 300; max-height: 640px; object-position: 50% 45%; }
  .about-split__content { gap: 40px; }
  .therapy { grid-template-columns: 1fr; gap: 40px; }
  .therapy__image { position: static; height: auto; aspect-ratio: 350 / 460; max-height: 900px; }
}

@media (max-width: 767px) {
  .hero__actions { flex-direction: column; gap: 12px; }
  .hero__actions .btn { width: 100%; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .bio__image { aspect-ratio: 350 / 240; }
  .site-footer__bottom { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   Motion
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance on page load */
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes fade-in-scale {
    from { opacity: 0; transform: scale(1.03); }
    to { opacity: 1; transform: none; }
  }
  .hero__content > * { animation: fade-up .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__content > :nth-child(2) { animation-delay: .12s; }
  .hero__content > :nth-child(3) { animation-delay: .24s; }
  .hero__image { animation: fade-in-scale 1.1s cubic-bezier(.2, .7, .2, 1) .1s both; }

  /* Reveal on scroll (classes toggled in main.js) */
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity .8s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms),
      transform .8s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }

  /* Subtle hover feedback */
  .btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(174, 91, 62, .6); }
  .btn:active { transform: none; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
