/*
Theme Name: Morskie Oko Sport
Theme URI: https://kortymorskieoko.pl/
Author: Centrum Sportowe Morskie Oko
Author URI: https://kortymorskieoko.pl/
Description: Nowoczesny, premium motyw one-page dla klubu sportowego — padel, tenis, nowa hala i strefa saunowa. Ciemna baza, limonkowy akcent, pełnoekranowy hero ze slideshow.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: morskie-oko
Tags: one-page, custom-logo, custom-colors, full-width-template, sports, dark
*/

/* ==========================================================================
   1. Zmienne / design tokens
   ========================================================================== */

:root {
  --mo-bg: #22271f;
  --mo-surface: #262c23;
  --mo-surface-strong: #1a1e18;
  --mo-fg: #f3f6f1;
  --mo-muted: #b6bfb1;
  --mo-primary: #c6e34a;
  --mo-primary-fg: #1a1e18;
  --mo-border: rgba(255, 255, 255, 0.14);
  --mo-radius: 4px;
  --mo-container: 80rem;
  --mo-font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --mo-font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

/* ==========================================================================
   2. Reset / baza
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--mo-bg);
  color: var(--mo-fg);
  font-family: var(--mo-font-sans);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--mo-font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 999;
  clip: auto;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: var(--mo-primary);
  color: var(--mo-primary-fg);
  border-radius: var(--mo-radius);
}

/* ==========================================================================
   3. Layout
   ========================================================================== */

.mo-container {
  width: 100%;
  max-width: var(--mo-container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .mo-container {
    padding-inline: 2.5rem;
  }
}

.mo-section {
  padding-block: 5rem;
  scroll-margin-top: 5rem;
}

@media (min-width: 768px) {
  .mo-section {
    padding-block: 7.5rem;
  }
}

.mo-section--alt {
  background: var(--mo-surface-strong);
}

.mo-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .mo-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mo-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mo-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ==========================================================================
   4. Typografia pomocnicza
   ========================================================================== */

.mo-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mo-primary);
}

.mo-title-display {
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.mo-title-section {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  letter-spacing: -0.035em;
}

.mo-lead {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--mo-muted);
}

/* ==========================================================================
   5. Przyciski
   ========================================================================== */

.mo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding-inline: 1.75rem;
  border: 0;
  border-radius: var(--mo-radius);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.mo-btn:hover {
  transform: translateY(-2px);
}

.mo-btn--primary {
  background: var(--mo-primary);
  color: var(--mo-primary-fg);
}

.mo-btn--ghost {
  background: transparent;
  border: 1px solid rgba(243, 246, 241, 0.35);
  color: var(--mo-fg);
}

.mo-btn--ghost:hover {
  border-color: var(--mo-fg);
  background: rgba(243, 246, 241, 0.08);
}

/* ==========================================================================
   6. Header / nawigacja
   ========================================================================== */

.mo-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(26, 30, 24, 0.7), transparent);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.mo-header.is-scrolled,
.mo-header.is-open {
  background: rgba(26, 30, 24, 0.96);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--mo-border);
}

.mo-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 5rem;
}

.mo-logo img {
  height: 2.75rem;
  width: auto;
  object-fit: contain;
}

.mo-logo__text {
  font-family: var(--mo-font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.mo-nav {
  display: none;
  gap: 2rem;
}

.mo-nav a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mo-muted);
  transition: color 0.2s ease;
}

.mo-nav a:hover,
.mo-nav .current-menu-item > a {
  color: var(--mo-primary);
}

.mo-header__cta {
  display: none;
}

@media (min-width: 1024px) {
  .mo-nav,
  .mo-header__cta {
    display: flex;
  }
  .mo-toggle {
    display: none;
  }
}

.mo-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 1px solid var(--mo-border);
  border-radius: var(--mo-radius);
  cursor: pointer;
}

.mo-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--mo-fg);
  margin: 3px 0;
}

.mo-mobile-nav {
  display: none;
  border-top: 1px solid var(--mo-border);
  background: var(--mo-surface-strong);
}

.mo-header.is-open .mo-mobile-nav {
  display: block;
}

.mo-mobile-nav a {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--mo-border);
  font-family: var(--mo-font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

/* ==========================================================================
   7. Hero + slideshow (Ken Burns)
   ========================================================================== */

.mo-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.mo-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.mo-hero__slide.is-active {
  opacity: 1;
}

.mo-hero__slide img,
.mo-hero__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mo-hero__slide.is-active img {
  animation: mo-kenburns 9s linear forwards;
}

@keyframes mo-kenburns {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1.18) translate3d(-1.5%, -1.5%, 0);
  }
}

.mo-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 30, 24, 0.92) 0%,
    rgba(26, 30, 24, 0.55) 45%,
    rgba(26, 30, 24, 0.35) 100%
  );
}

.mo-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: 9rem 5rem;
}

.mo-hero__content > * {
  opacity: 0;
  animation: mo-in 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mo-hero__content > *:nth-child(2) {
  animation-delay: 0.12s;
}
.mo-hero__content > *:nth-child(3) {
  animation-delay: 0.24s;
}
.mo-hero__content > *:nth-child(4) {
  animation-delay: 0.36s;
}

@keyframes mo-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mo-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.mo-hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.75rem;
  z-index: 3;
  display: flex;
  gap: 0.75rem;
}

.mo-hero__dot {
  flex: 1;
  height: 2px;
  padding: 0;
  border: 0;
  background: rgba(243, 246, 241, 0.25);
  cursor: pointer;
  overflow: hidden;
}

.mo-hero__dot span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--mo-primary);
  transform: scaleX(0);
  transform-origin: left;
}

.mo-hero__dot.is-active span {
  animation: mo-bar 6.5s linear forwards;
}

@keyframes mo-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ==========================================================================
   8. Karty / galeria / statystyki
   ========================================================================== */

.mo-card {
  background: var(--mo-surface);
  border: 1px solid var(--mo-border);
  border-radius: var(--mo-radius);
  padding: 2rem;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease;
}

.mo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(198, 227, 74, 0.55);
}

.mo-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.mo-media {
  overflow: hidden;
  border-radius: var(--mo-radius);
}

.mo-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.mo-media:hover img {
  transform: scale(1.05);
}

.mo-stat__number {
  font-family: var(--mo-font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--mo-primary);
}

.mo-stat__label {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mo-muted);
}

/* ==========================================================================
   9. Reveal on scroll
   ========================================================================== */

.mo-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.mo-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   10. Formularz kontaktowy
   ========================================================================== */

.mo-form {
  display: grid;
  gap: 1rem;
}

.mo-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mo-muted);
  margin-bottom: 0.5rem;
}

.mo-form input,
.mo-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--mo-surface);
  border: 1px solid var(--mo-border);
  border-radius: var(--mo-radius);
  color: var(--mo-fg);
  font: inherit;
}

.mo-form input:focus,
.mo-form textarea:focus {
  outline: 2px solid var(--mo-primary);
  outline-offset: 2px;
}

.mo-form__notice {
  padding: 0.9rem 1rem;
  border-radius: var(--mo-radius);
  border: 1px solid var(--mo-primary);
  color: var(--mo-primary);
  font-size: 0.9375rem;
}

.mo-form__notice--error {
  border-color: #e5715f;
  color: #e5715f;
}

/* ==========================================================================
   11. Mapa / lokalizacja
   ========================================================================== */

.mo-map {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--mo-border);
  border-radius: var(--mo-radius);
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

.mo-footer {
  border-top: 1px solid var(--mo-border);
  background: var(--mo-surface-strong);
}

.mo-footer__top {
  display: grid;
  gap: 2.5rem;
  padding-block: 4rem;
}

@media (min-width: 768px) {
  .mo-footer__top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mo-footer a:hover {
  color: var(--mo-primary);
}

.mo-footer__bottom {
  border-top: 1px solid var(--mo-border);
  padding-block: 1.5rem;
  font-size: 0.8125rem;
  color: var(--mo-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .mo-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ==========================================================================
   13. WordPress core classes
   ========================================================================== */

.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}
.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}
.aligncenter {
  margin-inline: auto;
}
.wp-caption-text {
  font-size: 0.875rem;
  color: var(--mo-muted);
}
.sticky,
.gallery-caption,
.bypostauthor {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
