/* ============================================================
   Joanna Obidzińska — Medycyna Estetyczna
   Stylesheet
   ============================================================ */


/* ============ DESIGN TOKENS ============ */
:root {
  /* Backgrounds */
  --bg-primary: #FAF6F3;
  --bg-secondary: #F0E8E0;
  --bg-card: #FFFFFF;
  --bg-accent: #F3D8CF;

  /* Text */
  --text-primary: #1A1A1A;
  --text-secondary: #5C504A;
  --text-tertiary: #8A7A6E;

  /* Accents */
  --accent-taupe: #7A6358;
  --accent-dark: #3D2B23;
  --accent-rose: #C4A595;

  /* Borders */
  --border-soft: rgba(122, 99, 88, 0.18);
  --border-medium: rgba(122, 99, 88, 0.32);

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;

  /* Layout */
  --measure: 65ch;
  --max-width: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Motion */
  --transition-base: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 700ms cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}


/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 400;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 500;
}

h4 {
  font-size: 1.0625rem;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-taupe);
}

p {
  margin: 0 0 1.25em;
  max-width: var(--measure);
  font-size: 1rem;
  line-height: 1.7;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.eyebrow {
  font-size: 0.78125rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-taupe);
  margin: 0 0 1.25rem;
  display: block;
}

em {
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
}


/* ============ LAYOUT ============ */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section {
  padding: clamp(4rem, 10vh, 7rem) 0;
}

.section-tight {
  padding: clamp(2.5rem, 6vh, 4rem) 0;
}


/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand picture {
  display: contents;
}

.brand__logo {
  height: 150px;
  width: 150px;
  display: block;
  border-radius: 4px;
  transition: height 350ms cubic-bezier(0.4, 0, 0.2, 1), width 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.is-scrolled .brand__logo {
  height: 50px;
  width: 50px;
}

.site-header__inner {
  transition: padding 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.is-scrolled .site-header__inner {
  padding: 0.625rem 0;
}

.nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav--left {
  justify-content: flex-start;
}

.nav a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
}

.nav a:hover { color: var(--accent-dark); }

.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--accent-dark);
  transform: scaleX(0);
  transition: transform var(--transition-base);
  transform-origin: left;
}

.nav a:hover::after { transform: scaleX(1); }

.header-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.header-tel {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-tel svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}


/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.625rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 2px;
  transition: all var(--transition-base);
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent-dark);
  color: #FAF6F3;
}

.btn--primary:hover {
  background: #1F1612;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn--ghost:hover {
  background: var(--bg-accent);
  border-color: var(--accent-dark);
}

.btn--small {
  padding: 0.625rem 1.125rem;
  font-size: 0.8125rem;
}

.btn-arrow {
  display: inline-block;
  transition: transform var(--transition-base);
}

.btn:hover .btn-arrow { transform: translateX(3px); }


/* ============ HERO ============ */
.hero {
  position: relative;
  padding: clamp(4rem, 12vh, 7rem) 0 clamp(5rem, 14vh, 8rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; right: -10%;
  width: 55%;
  height: 100%;
  background: var(--bg-accent);
  opacity: 0.55;
  border-radius: 50% 50% 0 50% / 60% 50% 0 50%;
  z-index: 0;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__content { max-width: 640px; }

.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-accent);
}

.hero__visual::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(250, 246, 243, 0.35);
  z-index: 3;
  pointer-events: none;
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero h1 { margin: 0 0 1.75rem; }
.hero h1 em { color: var(--accent-dark); }

.hero__lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 620px;
  margin: 0 0 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero__meta {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: flex-start;
  flex-wrap: wrap;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-soft);
  max-width: 720px;
}

.hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero__meta-label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
}

.hero__meta-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  font-weight: 500;
}


/* ============ TRUST BAR ============ */
.trust {
  background: var(--bg-secondary);
  padding: 2.25rem 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.trust__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  flex-wrap: wrap;
  text-align: center;
}

.trust__label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-taupe);
  font-weight: 500;
  margin-right: 0.5rem;
}

.trust__brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-style: italic;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.trust__brand sup {
  font-size: 0.6em;
  font-style: normal;
  opacity: 0.6;
}


/* ============ ABOUT ============ */
.about { background: var(--bg-primary); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.about__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-accent);
  border-radius: 2px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.about__visual::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(61, 43, 35, 0.18);
  pointer-events: none;
}

.about__visual picture {
  display: contents;
}

.about__visual-logo {
  width: 100%;
  height: auto;
  max-width: 320px;
  display: block;
  position: relative;
  z-index: 1;
}

.about__body p {
  color: var(--text-primary);
}


/* ============ TREATMENTS ============ */
.treatments { background: var(--bg-secondary); }

.treatments__head {
  text-align: center;
  margin: 0 auto 4.5rem;
  max-width: 720px;
}

.treatments__head .lead {
  margin: 1.5rem auto 0;
}

.treatments__list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.treatment {
  background: var(--bg-card);
  padding: clamp(2rem, 4vw, 3.25rem);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  transition: border-color var(--transition-base);
}

.treatment:hover { border-color: var(--border-medium); }

.treatment__head {
  position: sticky;
  top: 100px;
}

.treatment__num {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent-taupe);
  letter-spacing: 0.18em;
  margin-bottom: 1.25rem;
  display: block;
}

.treatment__title {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  margin-bottom: 1rem;
}

.treatment__device {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-taupe);
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  background: var(--bg-accent);
  display: inline-block;
  border-radius: 2px;
}

.treatment__body {
  font-size: 1rem;
  line-height: 1.7;
}

.treatment__intro {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.65;
}

.treatment__details {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.25rem;
  margin: 2rem 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.treatment__details > div {
  min-width: 180px;
}

.treatment__detail-label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.treatment__detail-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
}

.treatment__cta { margin-top: 1.5rem; }


/* ============ CONTACT ============ */
.contact { background: var(--bg-primary); }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.contact__head .lead { margin-top: 1.5rem; }

.contact__details {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact__detail-label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-taupe);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.contact__detail-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

.contact__detail-value a:hover { color: var(--accent-dark); }

.contact__socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.contact__social {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all var(--transition-base);
}

.contact__social svg { width: 18px; height: 18px; }

.contact__social:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--bg-primary);
}

.contact__map {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  aspect-ratio: 4 / 5;
  min-height: 420px;
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}


/* ============ FOOTER ============ */
.site-footer {
  background: var(--accent-dark);
  color: rgba(250, 246, 243, 0.85);
  padding: 3.5rem 0 2rem;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(250, 246, 243, 0.12);
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #FAF6F3;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.site-footer__tagline {
  font-size: 0.9375rem;
  color: rgba(250, 246, 243, 0.7);
  max-width: 320px;
  line-height: 1.6;
}

.site-footer__title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 246, 243, 0.6);
  margin: 0 0 1rem;
  font-weight: 500;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.site-footer ul a {
  font-size: 0.9375rem;
  color: rgba(250, 246, 243, 0.85);
}

.site-footer ul a:hover { color: #FAF6F3; }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.75rem;
  font-size: 0.8125rem;
  color: rgba(250, 246, 243, 0.55);
}

.site-footer__bottom a:hover { color: #FAF6F3; }


/* ============ MOBILE ============ */
@media (max-width: 880px) {
  .site-header__inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .nav, .header-tel, .header-cta { display: none; }
  .brand__logo { height: 100px; width: 100px; }
  .site-header.is-scrolled .brand__logo { height: 44px; width: 44px; }

  .hero::before {
    width: 70%;
    right: -25%;
    opacity: 0.4;
  }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero__visual {
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 4 / 4;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about__visual {
    max-width: 380px;
    aspect-ratio: 4 / 4;
  }

  .treatment {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .treatment__head { position: static; }

  .contact__grid { grid-template-columns: 1fr; }
  .contact__map {
    aspect-ratio: 1 / 1;
    min-height: 320px;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__actions .btn { justify-content: center; }
  .hero__meta { gap: 1.5rem; }
  .trust__inner { gap: 1.25rem; }
  .trust__brand { font-size: 1.125rem; }
}


/* ============ MOTION ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
  }
  .reveal.is-inview {
    opacity: 1;
    transform: none;
  }
}
