/* ===== Custom properties ===== */
:root {
  --cream: #FAF6EE;
  --cream-deep: #F0E7D6;
  --cream-card: #FFFDF8;
  --sage-pale: #DCE7D2;
  --sage: #A9C69C;
  --sage-mid: #7E9A72;
  --sage-deep: #4C6349;
  --ink: #2B3327;

  --font-heading: "Fraunces", serif;
  --font-body: "Outfit", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius-organic: 120px 24px 120px 24px;
  --shadow-soft: 0 20px 40px -20px rgba(76, 99, 73, 0.35);
  --transition: 0.3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sage-deep);
  color: var(--cream);
  padding: 12px 20px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--sage-deep);
  line-height: 1.15;
  margin: 0 0 16px;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; margin-bottom: 8px; }
em {
  font-style: italic;
  font-weight: 500;
  color: var(--sage-mid);
}
p { margin: 0 0 16px; color: var(--ink); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-mid);
  margin: 0 0 12px;
}

.section-lead {
  max-width: 60ch;
  color: var(--ink);
  opacity: 0.85;
}

/* ===== Breath line SVG ===== */
.breath-line {
  width: 180px;
  height: 20px;
  display: block;
  margin: 0 0 20px;
}
.center .breath-line { margin-left: auto; margin-right: auto; }
.breath-line path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 1.4s ease;
}
.breath-line.drawn path {
  stroke-dashoffset: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--sage-deep);
  color: var(--cream);
}
.btn-primary:hover { background: var(--sage-mid); }
.btn-outline {
  background: transparent;
  color: var(--sage-deep);
  border-color: var(--sage-mid);
}
.btn-outline:hover { background: var(--sage-pale); }

/* ===== Organic frames ===== */
.frame {
  border-radius: var(--radius-organic);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 6px solid var(--cream-card);
  background: var(--sage-pale);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame-lg { aspect-ratio: 4/3; }
.frame-md { aspect-ratio: 5/4; }
.frame-sm { aspect-ratio: 1/1; width: 46%; }
.frame-card { aspect-ratio: 4/3; border-width: 4px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sage-pale);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  display: flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.logo-script {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--sage-deep);
  white-space: nowrap;
}

.main-nav ul {
  display: flex;
  gap: 28px;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 2px;
  background: var(--sage-mid);
  transition: width var(--transition);
}
.main-nav a:hover::after { width: 100%; }

.nav-cta { flex-shrink: 0; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sage-deep);
  margin: 0 auto;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  max-height: 0;
  overflow: hidden;
  background: var(--cream-card);
  transition: max-height var(--transition);
}
.mobile-nav.open {
  max-height: 500px;
}
.mobile-nav ul {
  padding: 8px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  border-bottom: 1px solid var(--sage-pale);
}
.mobile-nav li:last-child a {
  border-bottom: none;
  margin-top: 8px;
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Sections ===== */
.section {
  padding: 96px 0;
}
.section-heading {
  margin-bottom: 56px;
}
.section-heading.center {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Hero ===== */
.hero {
  padding: 64px 0 96px;
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, var(--sage-pale) 0%, transparent 60%),
    var(--cream);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-desc {
  max-width: 52ch;
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.hero-media {
  position: relative;
}
.badge {
  position: absolute;
  bottom: -24px;
  left: -24px;
  background: var(--cream-card);
  border: 1px solid var(--sage-pale);
  border-radius: 20px;
  padding: 14px 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.badge-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-mid);
}
.badge-value {
  font-weight: 600;
  color: var(--sage-deep);
}

/* ===== O nas ===== */
.o-nas {
  background: var(--cream-deep);
}
.o-nas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.o-nas-media {
  position: relative;
  display: flex;
  justify-content: flex-start;
}
.accent-frame {
  position: absolute;
  bottom: -32px;
  right: -20px;
  border-color: var(--cream-deep);
}
.o-nas-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.o-nas-stats li {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--sage-deep);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage-mid);
}

/* ===== Cards grid (generic) ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.instruktorzy-grid,
.cennik-grid {
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: var(--cream-card);
  border-radius: 28px;
  padding: 20px;
  border: 1px solid var(--sage-pale);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}
.card-body { padding-top: 16px; flex: 1; display: flex; flex-direction: column; }
.instruktor-card .card-body { padding-top: 0; }
.card-body p { flex: 1; }
.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--sage-pale);
  color: var(--sage-deep);
  padding: 6px 12px;
  border-radius: 100px;
}
.specjalizacja {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sage-mid);
}

/* ===== Grafik table ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: 24px;
  border: 1px solid var(--sage-pale);
  background: var(--cream-card);
}
.grafik-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-width: 640px;
}
.grafik-table th,
.grafik-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--sage-pale);
  white-space: nowrap;
}
.grafik-table thead th {
  background: var(--sage-pale);
  color: var(--sage-deep);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}
.grafik-table tbody th {
  color: var(--sage-mid);
  font-weight: 500;
}
.grafik-table tbody tr:last-child td,
.grafik-table tbody tr:last-child th {
  border-bottom: none;
}
.grafik-table tbody tr:hover {
  background: var(--cream-deep);
}

/* ===== Cennik ===== */
.cennik-card {
  text-align: center;
  align-items: center;
  position: relative;
}
.cennik-highlight {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  transform: scale(1.04);
}
.cennik-highlight h3,
.cennik-highlight .cena,
.cennik-highlight .cena-opis {
  color: var(--cream);
}
.cennik-highlight .cennik-lista li {
  color: var(--cream);
}
.cennik-highlight:hover { transform: scale(1.04) translateY(-6px); }
.cennik-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--sage);
  color: var(--sage-deep);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.cena {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--sage-deep);
  margin-bottom: 0;
}
.cena-opis {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sage-mid);
  margin-bottom: 20px;
}
.cennik-lista {
  margin-bottom: 24px;
  width: 100%;
}
.cennik-lista li {
  padding: 8px 0;
  border-top: 1px solid var(--sage-pale);
  font-size: 0.92rem;
}
.cennik-highlight .cennik-lista li {
  border-top-color: rgba(250,246,238,0.2);
}
.cennik-card .btn { width: 100%; }

/* ===== Opinie ===== */
.opinie {
  background: var(--cream-deep);
}
.opinie-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.cytat {
  margin: 0 0 28px;
  padding-left: 24px;
  border-left: 3px solid var(--sage);
}
.cytat p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.cytat cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.75rem;
  color: var(--sage-mid);
}

/* ===== Kontakt ===== */
.kontakt-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
}
.kontakt-lista {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}
.kontakt-lista li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kontakt-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage-mid);
}
.kontakt-lista a:hover { color: var(--sage-deep); text-decoration: underline; }
.social-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social-links {
  display: flex;
  gap: 16px;
}
.social-links a {
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--sage);
}
.social-links a:hover { color: var(--sage-deep); border-color: var(--sage-deep); }

.kontakt-form {
  background: var(--cream-card);
  border: 1px solid var(--sage-pale);
  border-radius: 28px;
  padding: 32px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-row label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-deep);
}
.form-row input,
.form-row select,
.form-row textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--sage-pale);
  background: var(--cream);
  color: var(--ink);
  transition: border-color var(--transition);
  resize: vertical;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--sage-mid);
  outline: none;
}
.form-submit { width: 100%; margin-top: 8px; }
.form-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--sage-deep);
  text-align: center;
  margin: 12px 0 0;
  min-height: 1.2em;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--sage-deep);
  color: var(--cream);
  padding: 64px 0 24px;
}
.site-footer .logo-script { color: var(--cream); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(250,246,238,0.15);
}
.footer-brand p {
  color: var(--sage-pale);
  max-width: 40ch;
  margin-top: 16px;
}
.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 12px 40px;
}
.footer-nav a {
  color: var(--cream);
  opacity: 0.85;
}
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
  padding-top: 24px;
}
.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sage-pale);
  margin: 0;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .breath-line path {
    stroke-dashoffset: 0;
  }
}

/* ===== Breakpoints ===== */
@media (max-width: 1000px) {
  .hero-inner,
  .o-nas-grid,
  .opinie-grid,
  .kontakt-grid {
    grid-template-columns: 1fr;
  }
  .hero-media { order: -1; }
  .badge { left: 16px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .main-nav, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .section { padding: 72px 0; }
  .cennik-highlight { transform: none; }
  .cennik-highlight:hover { transform: translateY(-6px); }
}

@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .instruktorzy-grid, .cennik-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .o-nas-stats { gap: 24px; }
  .frame-sm { width: 55%; }
  .badge { position: static; margin-top: 20px; align-self: flex-start; }
  .accent-frame { position: static; margin-top: 16px; }
  .o-nas-media { flex-direction: column; }
  .section-heading { margin-bottom: 40px; }
  .kontakt-form { padding: 24px; }
  .footer-nav ul { grid-template-columns: 1fr; }
}
