/* ============================================================
   Synaptio Design System — merged from all page templates
   All custom classes: display, editorial, paper-card, btn,
   ulink, section-label, blob, portrait, marquee, etc.
   Tailwind CDN handles utility classes; this file handles
   the design-system classes that Tailwind cannot generate.
   ============================================================ */

:root { color-scheme: light; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, #DCD3B3 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #D6E2D0 0%, transparent 55%),
    #F4EFE0;
  color: #0F2419;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  overflow-x: clip;
}

section, header, footer { overflow-x: clip; }

/* Paper grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* ── Typography ── */
.display {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  letter-spacing: -0.02em;
}
.display-tight {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.035em;
}
.editorial {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  letter-spacing: -0.01em;
}
.mono-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── Lines ── */
.hairline { border-color: rgba(15,36,25,.18); }
.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(25,71,48,.45), transparent);
}

/* ── Cards ── */
.paper-card {
  background: linear-gradient(180deg, #F8F2DF 0%, #ECE0BE 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.5) inset,
    0 24px 50px -30px rgba(15,36,25,.45),
    0 2px 8px -4px rgba(15,36,25,.18);
}
.ink-card {
  background: linear-gradient(180deg, #194730 0%, #0E2C1E 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.06) inset,
    0 24px 50px -30px rgba(15,36,25,.65);
}

/* ── Animations ── */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.d-1 { animation-delay: .05s; }
.d-2 { animation-delay: .18s; }
.d-3 { animation-delay: .32s; }
.d-4 { animation-delay: .46s; }
.d-5 { animation-delay: .6s;  }
.d-6 { animation-delay: .74s; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: drift 70s linear infinite;
}

/* ── Links ── */
.ulink {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size .35s ease;
}
.ulink:hover {
  background-size: 0 1px;
  background-position: 100% 100%;
}

/* ── Therapist cards ── */
.therapist {
  transition: transform .6s cubic-bezier(.2,.7,.2,1), box-shadow .6s ease;
}
.therapist:hover { transform: translateY(-6px) rotate(0deg) !important; }
.therapist .reveal {
  max-height: 600px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .6s ease, opacity .35s ease .15s;
}
.therapist:hover .reveal { max-height: 360px; opacity: 1; }

/* ── Decorative ── */
.blob {
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
  position: absolute;
  border-radius: 999px;
}

/* ── Portrait placeholders ── */
.portrait {
  aspect-ratio: 4/5;
  background: radial-gradient(120% 90% at 30% 20%, #E9D8B8 0%, #2F5D44 55%, #0E2C1E 110%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.portrait-wide { aspect-ratio: 5/4; }
@media (min-width: 768px) {
  .portrait-wide { aspect-ratio: 4/5; height: 100%; }
}
.portrait.var-2 { background: radial-gradient(120% 90% at 70% 30%, #F4E5C5 0%, #B69026 50%, #194730 110%); }
.portrait.var-3 { background: radial-gradient(120% 90% at 50% 30%, #F1DCBC 0%, #2F5D44 50%, #194730 110%); }
.portrait.var-4 { background: radial-gradient(120% 90% at 35% 25%, #EFE0BC 0%, #194730 55%, #0E2C1E 110%); }
.portrait.var-5 { background: radial-gradient(120% 90% at 65% 25%, #F4E5C5 0%, #7A8A6E 50%, #2F5D44 110%); }
.portrait.var-6 { background: radial-gradient(120% 90% at 40% 30%, #F1DCBC 0%, #B69026 45%, #7A2E1B 115%); }
.portrait.var-7 { background: radial-gradient(120% 90% at 60% 25%, #E9D8B8 0%, #194730 50%, #0F2419 110%); }
.portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: .5;
}
.portrait svg.fig { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait img.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  z-index: 2;
  filter: contrast(1.02) saturate(.95);
}
.portrait.has-photo svg.fig { display: none; }
.portrait.has-photo::after { opacity: .25; }
.portrait .stamp {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 46px;
  height: 24px;
  opacity: .7;
  z-index: 3;
  mix-blend-mode: screen;
}

/* ── Labels ── */
.section-label {
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .68rem;
  font-weight: 500;
  color: #194730;
}
.section-label-light {
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .68rem;
  font-weight: 500;
  color: #E8DEC4;
}
.asterism::before {
  content: '✻';
  font-family: 'Instrument Serif', serif;
  font-style: italic;
}

/* ── Form fields ── */
.field {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(15,36,25,.25);
  padding: 12px 0;
  font: 400 1rem/1.4 'Instrument Sans', sans-serif;
  color: #0F2419;
  width: 100%;
  transition: border-color .3s;
}
.field:focus { outline: none; border-color: #B69026; }
.field::placeholder { color: rgba(15,36,25,.45); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  background: #194730;
  color: #F4EFE0;
  font-weight: 500;
  letter-spacing: .02em;
  transition: background .35s, transform .35s, box-shadow .35s;
  box-shadow: 0 12px 30px -16px rgba(15,36,25,.7);
}
.btn:hover { background: #B69026; color: #0F2419; transform: translateY(-1px); }
.btn .arrow { transition: transform .35s; }
.btn:hover .arrow { transform: translate(4px,-4px) rotate(-12deg); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.3rem;
  border: 1px solid rgba(15,36,25,.35);
  border-radius: 999px;
  color: #0F2419;
  transition: background .35s, color .35s, border-color .35s;
}
.btn-ghost:hover { background: #194730; color: #F4EFE0; border-color: #194730; }

/* ── Misc layout helpers ── */
.vert { writing-mode: vertical-rl; transform: rotate(180deg); }

.squiggle { display: inline-block; vertical-align: middle; }

@keyframes float-soft {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%       { transform: translateY(-8px) rotate(4deg); }
}
.float-soft {
  animation: float-soft 7s ease-in-out infinite;
  transform-origin: center;
}

.age-pill {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .3rem .7rem;
  border: 1px solid rgba(25,71,48,.4);
  border-radius: 999px;
}

.crayon {
  background-image: linear-gradient(transparent 75%, rgba(182,144,38,.45) 75%);
  padding: 0 .15em;
}

/* ── Full-bleed photo sections ── */
.photo-break { position: relative; overflow: hidden; }
.photo-break img { width: 100%; display: block; filter: contrast(1.03) saturate(.92); }
.photo-break .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 48px;
  background: linear-gradient(0deg, rgba(14,44,30,.75) 0%, rgba(14,44,30,.3) 60%, transparent 100%);
  color: #F4EFE0;
}

/* ── Photo gallery ── */
.photo-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 767px) {
  .photo-gallery { grid-template-columns: 1fr; }
  .photo-gallery .tall { grid-row: auto; }
}
.photo-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
  filter: contrast(1.02) saturate(.95);
  border-radius: 4px;
}
.photo-gallery .tall { grid-row: span 2; min-height: 420px; }

/* ── Per-page unique classes ── */

/* diagnoza-adhd.php */
.tool-card { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease; }
.tool-card:hover { transform: translateY(-4px); }
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(15,36,25,.1);
}
.step-row:last-child { border-bottom: none; }
.outcome-card { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.outcome-card:hover { transform: translateY(-3px); }

/* akademia-rodzica.php, tus.php, psychoterapia.php */
.topic-card { transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease; }
.topic-card:hover { transform: translateY(-4px); }
