:root {
  --bg: #0d1f17;
  --bg-soft: #163428;
  --bg-hover: #1f3d30;
  --accent: #d8c7a1;
  --text: #f7f3ea;
  --text-muted: rgba(247, 243, 234, 0.8);
  --border: rgba(216, 199, 161, 0.2);
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  --content-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 25px;
  font-size: clamp(2rem, 5vw, 2.5rem);
  line-height: 1.2;
}

h3 {
  line-height: 1.35;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  display: flex;
  min-height: 100vh;
  align-items: center;
  padding: 64px 24px;
  background:
    linear-gradient(rgba(13, 31, 23, 0.75), rgba(13, 31, 23, 0.92)),
    url("../assets/gym-background.jpg") center / cover;
}

.hero-content {
  display: grid;
  width: min(100%, var(--content-width));
  margin: 0 auto;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
}

.trainer-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  border: 3px solid var(--accent);
  border-radius: 24px;
  background: #234336;
  box-shadow: var(--shadow);
  animation: hero-photo-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.trainer-photo picture {
  display: block;
}

.hero-text {
  min-width: 0;
}

.hero-text > * {
  animation: hero-copy-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-text > :nth-child(1) { animation-delay: 0.08s; }
.hero-text > :nth-child(2) { animation-delay: 0.16s; }
.hero-text > :nth-child(3) { animation-delay: 0.24s; }
.hero-text > :nth-child(4) { animation-delay: 0.32s; }
.hero-text > :nth-child(5) { animation-delay: 0.4s; }

@keyframes hero-photo-in {
  from {
    opacity: 0;
    transform: translateX(-28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text > p:not(.tag, .micro-hook) {
  max-width: 680px;
}

.tag {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.micro-hook {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

#hookText {
  transition: opacity 0.3s ease;
}

.ui-icon {
  display: block;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  color: var(--accent);
}

.hook-icon {
  width: 20px;
  height: 20px;
  transition: opacity 0.3s ease;
}

.cta {
  position: relative;
  display: inline-block;
  overflow: hidden;
  margin-top: 8px;
  padding: 15px 28px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #102017;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(216, 199, 161, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta::after {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  content: "";
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.cta:hover {
  box-shadow: 0 14px 34px rgba(216, 199, 161, 0.2);
  transform: translateY(-3px);
}

.cta:hover::after {
  left: 140%;
}

.cta:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.section {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 64px 20px;
}

.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-item.reveal-from-left {
  transform: translateX(-28px);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

.card.reveal-item.is-visible:hover,
.contact-card.reveal-item.is-visible:hover {
  transform: translateY(-5px);
}

.section-label {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.location-label {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}

.location-label::after {
  width: 84px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  content: "";
}

.section-intro {
  max-width: 780px;
  margin-bottom: 26px;
  color: var(--text-muted);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.about-copy {
  padding-block: 14px;
}

.about-copy p:not(.section-label) {
  max-width: 680px;
}

.about-values {
  display: grid;
  align-content: center;
}

.credentials-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--border);
}

.credential {
  display: flex;
  min-width: 0;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border: 0;
  background: rgba(22, 52, 40, 0.96);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.credential:hover {
  background: rgba(29, 67, 51, 0.98);
}

.credential:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.credential > .ui-icon {
  width: 30px;
  height: 30px;
}

.credential h3,
.credential p {
  margin-bottom: 0;
}

.credential h3 {
  font-size: 1rem;
}

.credential p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

body.is-modal-open {
  overflow: hidden;
}

.certificate-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.certificate-modal[hidden] {
  display: none;
}

.certificate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 12, 8, 0.86);
  backdrop-filter: blur(5px);
}

.certificate-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  gap: 16px;
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #10291f;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.certificate-dialog h2 {
  margin: 0;
  padding-right: 48px;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

.certificate-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.certificate-close:hover,
.certificate-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.certificate-viewer {
  display: grid;
  min-height: 220px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #081a12;
}

.certificate-viewer img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
}

.certificate-status {
  max-width: 42ch;
  margin: 0;
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
}

.cards,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card,
.contact-form-card,
.booking {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  background: var(--bg-hover);
  transform: translateY(-5px);
}

.card > :last-child,
.booking > :last-child,
.contact-form-card > :last-child {
  margin-bottom: 0;
}

.contact-form-card {
  margin-top: 20px;
}

.card-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
}

.small-note {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

.promo-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 30px;
}

.feature-list li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "→";
  font-weight: 700;
}

.process {
  display: flex;
  flex-direction: column;
}

.process-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.process-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.process-step h3 {
  margin-bottom: 0;
  color: var(--accent);
}

.process-step p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.process-icon {
  display: flex;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--bg-soft);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.process-icon .ui-icon {
  width: 25px;
  height: 25px;
}

.process-step:hover .process-icon {
  background: var(--bg-hover);
  transform: scale(1.08) rotate(-3deg);
}

.process-line {
  width: 2px;
  height: 30px;
  margin-left: 25px;
  background: linear-gradient(var(--accent), transparent);
  opacity: 0.4;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s ease;
}

.process-line.is-visible {
  transform: scaleY(1);
}

.price,
.old-price {
  margin-bottom: 6px;
}

.price {
  color: var(--accent);
  font-size: clamp(1.8rem, 5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
}

.old-price {
  color: var(--text-muted);
  text-decoration: line-through;
}

.old-price-placeholder {
  visibility: hidden;
}

.packages .card {
  text-align: center;
}

.service-card {
  display: flex;
  flex-direction: column;
}

.service-card .text-link {
  margin-top: auto;
  padding-top: 12px;
}

.subsection-title {
  margin: 38px 0 18px;
  font-size: 1.45rem;
}

.first-meeting-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.5fr);
  gap: 30px;
  align-items: center;
  margin-top: 30px;
}

.first-meeting-summary h3 {
  margin-bottom: 10px;
  color: var(--accent);
}

.session-prep {
  padding: 20px;
  border-radius: 14px;
  background: rgba(216, 199, 161, 0.1);
}

.session-prep strong,
.session-prep span {
  display: block;
}

.session-prep strong {
  margin-bottom: 6px;
  color: var(--accent);
}

.location-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 1.1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.location-panel-item {
  position: relative;
  min-width: 0;
  padding: 24px;
  overflow-wrap: anywhere;
}

.location-panel-item + .location-panel-item {
  border-left: 1px solid var(--border);
}

.location-panel-item > :last-child {
  margin-bottom: 0;
}

.location-promo {
  background: linear-gradient(145deg, #1b4534, var(--bg-soft));
}

.booking {
  padding: 30px;
  text-align: center;
}

.booking-lead {
  max-width: 720px;
  margin-inline: auto;
}

.calendly-embed {
  width: 100%;
  min-width: 0;
  height: 650px;
  margin: 8px 0 18px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.calendly-embed iframe {
  width: 100% !important;
  min-width: 0 !important;
}

.calendly-embed.is-unavailable {
  display: none;
}

.contact-card {
  display: flex;
  min-width: 0;
  gap: 14px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-card:hover {
  background: var(--bg-hover);
  transform: translateY(-5px);
}

.card.reveal-item,
.contact-card.reveal-item {
  transition:
    background-color 0.2s ease,
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-icon {
  width: 28px;
  height: 28px;
}

.contact-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--accent);
}

.contact-form-card {
  padding: 24px;
}

.form-field {
  margin-top: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: #102017;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(216, 199, 161, 0.22);
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.cta-full {
  width: 100%;
  margin-top: 20px;
}

.status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.status.is-error {
  color: #ffb7b7;
}

.status.is-success {
  color: #c8f7d5;
}

.footer {
  padding: 26px 20px calc(100px + env(safe-area-inset-bottom));
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer p {
  margin: 0;
}

.sticky-cta {
  position: fixed;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sticky-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sticky-cta a {
  display: block;
  padding: 13px 20px;
  border-radius: 14px;
  background: var(--accent);
  color: #102017;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(216, 199, 161, 0.35);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(216, 199, 161, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(216, 199, 161, 0);
  }
}

@media (max-width: 960px) and (min-width: 769px) {
  .about-grid,
  .first-meeting-summary,
  .location-panel {
    grid-template-columns: 1fr;
  }

  .service-cards,
  .packages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card:last-child {
    grid-column: 1 / -1;
  }

  .packages .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .location-panel-item + .location-panel-item {
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: auto;
    padding: 44px 20px 60px;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .first-meeting-summary,
  .location-panel {
    grid-template-columns: 1fr;
  }

  .credentials-strip {
    grid-template-columns: 1fr;
  }

  .trainer-photo {
    width: min(100%, 320px);
    margin: 0 auto;
  }

  .section {
    padding-block: 48px;
  }

  .cards,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .booking {
    padding: 20px 12px;
  }

  .location-panel-item + .location-panel-item {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .calendly-embed {
    height: 620px;
  }
}

@media (max-width: 480px) {
  .section {
    padding-inline: 16px;
  }

  #rezerwacja {
    padding-inline: 0;
  }

  #rezerwacja > .section-label,
  #rezerwacja > h2 {
    margin-inline: 16px;
  }

  #rezerwacja .booking {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .booking-lead {
    padding-inline: 8px;
  }

  .location-label {
    font-size: 0.86rem;
  }

  .location-label::after {
    width: 64px;
  }

  .sticky-cta {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .certificate-modal {
    padding: 10px;
  }

  .certificate-dialog {
    max-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 16px;
  }

  .certificate-viewer img {
    max-height: calc(100vh - 145px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
