/* =========================================================================
   lek. stom. Danuta Sokołowska / Gabinet Stomatologiczny
   Concept: "fresh clinical calm" / eucalyptus-mint freshness + warm sand
   Display: Besley  Body: Public Sans
   ========================================================================= */

:root {
  --canvas:      #f6f8f6;
  --canvas-2:    #e8efe9;
  --ink:         #232826;
  --muted:       #566059;
  --primary:     #5e8f7e;
  --primary-deep:#46705f;
  --accent:      #cf9b5e;
  --accent-soft: #ecdcc4;
  --line:        #d8e2d8;

  --font-display: "Besley", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(35, 40, 38, .05), 0 4px 14px rgba(70, 112, 95, .05);
  --shadow-md: 0 8px 28px rgba(35, 40, 38, .07), 0 2px 8px rgba(70, 112, 95, .06);

  --ease: cubic-bezier(.4, .14, .3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.65;
  font-size: clamp(15.5px, 1.05vw, 17px);
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }

::selection { background: var(--primary); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--ink); color: var(--canvas);
  padding: .6rem 1rem; border-radius: 8px; font-size: .85rem;
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 3px; border-radius: 4px; }

/* ---------- reveal contract (.js-gated) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js [data-reveal].in { opacity: 1; transform: none; }

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 248, 246, .72);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(216, 226, 216, .6), 0 6px 24px rgba(35, 40, 38, .04);
}
.header-inner {
  display: flex; align-items: center; gap: 1.2rem;
  height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: .65rem; margin-right: auto; }
.brand-mark { color: var(--primary-deep); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: .01em; color: var(--ink); }
.brand-sub { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav a {
  font-size: .92rem; font-weight: 500; color: var(--muted);
  position: relative; padding: .3rem 0; transition: color .25s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 0;
  background: var(--primary); transition: width .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }
.nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"]::after { width: 100%; background: var(--accent); }

.header-actions { display: flex; align-items: center; gap: .85rem; }

.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .55);
}
.lang-toggle button {
  font-size: .76rem; font-weight: 600; letter-spacing: .04em;
  padding: .38rem .68rem; color: var(--muted); transition: color .2s, background .2s;
}
.lang-toggle button[aria-pressed="true"] { background: var(--primary); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .92rem; letter-spacing: .005em;
  padding: .72rem 1.3rem; border-radius: 999px;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn svg { flex: none; }
.btn-solid {
  background: var(--primary-deep); color: #fff;
  box-shadow: 0 4px 16px rgba(70, 112, 95, .28);
}
.btn-solid:hover { background: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(70, 112, 95, .34); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: rgba(255,255,255,.4); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-deep); transform: translateY(-2px); }
.btn-call { background: rgba(94, 143, 126, .12); color: var(--primary-deep); padding: .6rem 1rem; }
.btn-call:hover { background: rgba(94, 143, 126, .2); transform: translateY(-1px); }
.btn-block { width: 100%; margin-top: .35rem; }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); }
.nav-toggle span { width: 18px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative; overflow: hidden;
  padding-top: clamp(56px, 9vw, 110px);
  padding-bottom: clamp(60px, 9vw, 120px);
  background:
    radial-gradient(120% 80% at 50% -10%, var(--canvas-2) 0%, rgba(232,239,233,0) 60%),
    var(--canvas);
  text-align: center;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}
.hero-leaves {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  color: var(--primary); opacity: .1;
}
.hero-leaves svg { width: 100%; height: 100%; }
.hero-leaves .leaf-sprig { transform-origin: 120px 300px; animation: sway 9s var(--ease) infinite alternate; }
@keyframes sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
.hero-leaves .leaf-sprig:nth-child(1) { /* mirror via duplicate? single sprig */ }

.hero-inner { position: relative; z-index: 1; max-width: 760px; margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary-deep); margin-bottom: 1.5rem;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(207,155,94,.18); }

.hero-title { font-family: var(--font-display); line-height: .98; letter-spacing: -.015em; color: var(--ink); }
.hero-pre {
  display: block; font-size: clamp(.95rem, 2vw, 1.15rem); font-weight: 400; font-style: italic;
  letter-spacing: .04em; color: var(--muted); margin-bottom: .55rem;
}
.hero-name { display: block; font-weight: 600; font-size: clamp(3rem, 9vw, 6.2rem); }

.hero-lede {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--muted);
  max-width: 38ch; margin: 1.7rem auto 0; line-height: 1.62;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 2.3rem; }

.hero-phone { margin-top: 1.6rem; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .02em; }
.hero-phone a { color: var(--primary-deep); border-bottom: 1px solid var(--line); padding-bottom: 1px; transition: border-color .25s; }
.hero-phone a:hover { border-color: var(--primary); }

/* =========================================================================
   SECTIONS (shared)
   ========================================================================= */
.section { padding-block: clamp(64px, 10vw, 128px); position: relative; }
.section-index {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 1.1rem; color: var(--accent); letter-spacing: .02em;
}
.visit-card-eyebrow {
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.section-kicker {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 1.05rem; letter-spacing: .01em; color: var(--primary-deep);
}
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.85rem); line-height: 1.08; letter-spacing: -.01em;
  color: var(--ink); margin-top: .35rem;
}
.section-head { max-width: 640px; margin-bottom: clamp(2.6rem, 5vw, 4rem); }
.section-head .section-index { display: block; margin-bottom: .4rem; }
.section-note { color: var(--muted); margin-top: .9rem; font-size: 1.05rem; }

.lead { font-size: clamp(1.18rem, 2vw, 1.5rem); font-family: var(--font-display); font-weight: 400; line-height: 1.38; color: var(--ink); letter-spacing: -.005em; }
.muted-line { color: var(--muted); }

/* ---------- INTRO ---------- */
.section-intro { background: linear-gradient(180deg, var(--canvas) 0%, #fff 100%); }
.grid-intro { display: grid; grid-template-columns: 220px 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.intro-aside { display: flex; flex-direction: column; gap: .55rem; position: sticky; top: 100px; }
.intro-aside .section-index { font-size: 1.3rem; }
.intro-body p + p { margin-top: 1.2rem; }
.intro-body p:not(.lead) { color: var(--muted); }
.intro-body .lead { margin-bottom: 1.6rem; }

/* ---------- CARE ---------- */
.section-care { background: #fff; }
.care-grid {
  list-style: none; padding: 0; display: grid; gap: clamp(1rem, 2.4vw, 1.6rem);
  grid-template-columns: repeat(4, 1fr);
}
.care-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem 1.7rem; background: var(--canvas);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  position: relative; overflow: hidden;
}
.care-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.care-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.care-card:hover::before { transform: scaleX(1); }
.care-leaf { display: inline-flex; color: var(--primary); margin-bottom: 1.1rem; }
.care-card:hover .care-leaf { color: var(--primary-deep); }
.care-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.16rem; line-height: 1.2; margin-bottom: .55rem; letter-spacing: -.005em; }
.care-card p { font-size: .94rem; color: var(--muted); line-height: 1.58; }

.care-honest {
  margin-top: clamp(2.4rem, 4vw, 3.4rem); max-width: 70ch;
  font-size: .92rem; color: var(--muted); line-height: 1.6;
  padding-left: 1.1rem; border-left: 2px solid var(--accent-soft);
}

/* ---------- VISIT ---------- */
.section-visit { background: linear-gradient(180deg, #fff 0%, var(--canvas-2) 100%); }
.grid-visit { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.visit-text .section-index { display: block; margin-bottom: .35rem; }
.visit-text > p { color: var(--muted); margin-top: 1rem; max-width: 46ch; }

.visit-steps { list-style: none; padding: 0; margin: 2rem 0 2.2rem; display: flex; flex-direction: column; gap: 1.2rem; }
.visit-steps li { display: flex; gap: 1rem; align-items: flex-start; }
.step-no {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--primary-deep); background: rgba(94,143,126,.12);
  border: 1px solid var(--line);
}
.step-body { display: flex; flex-direction: column; gap: .15rem; padding-top: .3rem; }
.step-body strong { font-weight: 600; color: var(--ink); }
.step-body span { color: var(--muted); font-size: .94rem; }

.visit-card {
  background: var(--ink); color: var(--canvas);
  border-radius: var(--radius-lg); padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.visit-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  border-radius: 50%; background: radial-gradient(circle, rgba(94,143,126,.5), transparent 70%);
  pointer-events: none;
}
.visit-card-eyebrow { color: var(--accent); margin-bottom: .5rem; }
.visit-card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin-bottom: 1.4rem; color: #fff; }
.visit-card form { display: flex; flex-direction: column; gap: .95rem; }
.visit-card label { display: flex; flex-direction: column; gap: .35rem; font-size: .82rem; font-weight: 500; letter-spacing: .02em; color: rgba(246,248,246,.78); }
.visit-card input, .visit-card textarea {
  font: inherit; font-size: .95rem; color: var(--canvas);
  background: rgba(246,248,246,.06); border: 1px solid rgba(246,248,246,.18);
  border-radius: 10px; padding: .68rem .85rem; transition: border-color .25s, background .25s;
  resize: vertical;
}
.visit-card input::placeholder, .visit-card textarea::placeholder { color: rgba(246,248,246,.4); }
.visit-card input:focus, .visit-card textarea:focus { outline: none; border-color: var(--primary); background: rgba(246,248,246,.1); }
.visit-card .btn-solid { background: var(--primary); box-shadow: none; }
.visit-card .btn-solid:hover { background: var(--accent); color: var(--ink); }
.visit-card .btn-solid:disabled { opacity: .55; cursor: default; transform: none; }
.form-ok { font-size: .9rem; color: var(--accent-soft); background: rgba(94,143,126,.16); border-radius: 10px; padding: .8rem .9rem; line-height: 1.5; }
.form-fineprint { font-size: .75rem; color: rgba(246,248,246,.55); line-height: 1.45; }

/* ---------- CONTACT ---------- */
.section-contact { background: var(--canvas-2); }
.grid-contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.contact-info .section-index { display: block; margin-bottom: .35rem; }
.contact-info .section-title { margin-bottom: 1.8rem; }
.contact-list { margin: 0 0 1.8rem; }
.contact-row { display: grid; grid-template-columns: 100px 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 1px solid var(--line); }
.contact-row dt { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: .15rem; }
.contact-row dd { color: var(--ink); line-height: 1.55; }
.contact-row dd a { color: var(--primary-deep); border-bottom: 1px solid var(--line); transition: border-color .25s; }
.contact-row dd a:hover { border-color: var(--primary); }
.contact-row .muted-line { font-size: .9rem; }

.contact-map {
  border-radius: var(--radius-lg); overflow: hidden; min-height: 360px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--canvas);
}
.contact-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; filter: saturate(.92) contrast(1.02); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: var(--ink); color: rgba(246,248,246,.78); padding-block: clamp(3rem, 6vw, 4.5rem); }
.footer-inner {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem 3rem;
  align-items: start;
}
.footer-brand { display: flex; align-items: flex-start; gap: .8rem; }
.footer-brand .brand-mark { color: var(--primary); margin-top: 2px; }
.footer-name { font-family: var(--font-display); color: var(--canvas); font-size: 1.05rem; line-height: 1.35; font-weight: 500; }
.footer-name .muted-line { font-family: var(--font-body); font-size: .82rem; color: rgba(246,248,246,.55); font-weight: 400; }
.footer-contact { font-size: .92rem; line-height: 1.7; }
.footer-contact a { color: var(--accent-soft); border-bottom: 1px solid rgba(236,220,196,.25); transition: border-color .25s, color .25s; }
.footer-contact a:hover { color: var(--accent); border-color: var(--accent); }
.footer-disclaimer {
  grid-column: 1 / -1; margin-top: 1rem; padding-top: 1.6rem; border-top: 1px solid rgba(246,248,246,.12);
  font-size: .82rem; color: rgba(246,248,246,.6); line-height: 1.55; max-width: 70ch;
}
.footer-legal { grid-column: 1 / -1; font-size: .78rem; color: rgba(246,248,246,.45); display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 920px) {
  .nav {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--canvas); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.2rem;
    transform: translateY(-130%); transition: transform .35s var(--ease);
    box-shadow: var(--shadow-md);
  }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .btn-call span { display: none; }
  .btn-call { padding: .6rem; }

  .grid-intro { grid-template-columns: 1fr; gap: 1.4rem; }
  .intro-aside { position: static; flex-direction: row; align-items: baseline; gap: .8rem; }
  .care-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-visit { grid-template-columns: 1fr; }
  .grid-contact { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .care-grid { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr; gap: .25rem; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 auto; }
  .brand-sub { display: none; }
}

/* reduced motion: stop the sway */
@media (prefers-reduced-motion: reduce) {
  .hero-leaves .leaf-sprig { animation: none; }
  .btn:hover, .care-card:hover { transform: none; }
}
