/* Garden Padel: the page's own layer over the kit (system.css, layout.css).
   Look: the client's DESIGN.md (Revolut layout: dark and light bands, pill buttons, big tight
   headings, 20px cards) in the club's own colours from KOLORY.jpg:
   szmaragd #003333, eukaliptus #39594D, pistacja #94B487, limonka #CCFF33. */

:root {
  --p-bg: #f4f3ee; --p-surface: #e8e7df; --p-ink: #0f201e; --p-muted: #4d5956;
  --p-accent: #003333; --p-accent-ink: #f4f3ee; --p-action: #003333; --p-action-ink: #f4f3ee;
  /* the dark bands: szmaragd, cards one step lighter, limonka as the one bright action */
  --p-inv-bg: #003333; --p-inv-surface: #0b4442; --p-inv-ink: #f4f3ee; --p-inv-muted: #b4c4bd;
  --p-inv-accent: #94b487; --p-inv-accent-ink: #003333; --p-inv-action: #ccff33; --p-inv-action-ink: #003333;
  --font-display: "Albert Sans", system-ui, sans-serif;
  --font-text: "Albert Sans", system-ui, sans-serif;
  --display-weight: 500;
  --display-tracking: -0.03em;
  --pistacja: #94b487;
}

/* DESIGN.md: rounded cards (20px), pill buttons, larger display type than the kit's place scale */
:root[data-type="place"] {
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-btn: 999px;
  --btn-h: 48px;
  --t-h1: clamp(34px, 2.86vw + 22.8px, 64px);
  --t-h2: clamp(28px, 1.14vw + 23.5px, 40px);
}
:root[data-type="place"] :is(h1, .t-h1) { line-height: 1.04; }
:root[data-type="place"] :is(h2, .t-h2) { line-height: 1.1; }
body { background: var(--p-bg); }

.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: static; width: auto; height: auto; clip-path: none; padding: var(--s-2) var(--s-4); background: var(--action); color: var(--action-ink); border-radius: var(--r-btn); }

/* the nav: szmaragd bar, the logo, the limonka button */
.nav--tone { --action: var(--p-inv-action); --action-ink: var(--p-inv-action-ink); }
.nav__logo img { display: block; width: auto; height: 42px; }
@media (max-width: 639px) { .nav__logo img { height: 34px; } }

/* the hero: the courts from above, the words on szmaragd under the photograph */
.hero--place.ground-inverse { background: var(--bg); color: var(--ink); }
@media (min-width: 1024px) { .hero--place { --photo: min(560px, 60svh); } }
.hero--place .hero-notice { color: var(--pistacja); }

/* buttons on a dark band: limonka with szmaragd text */
.ground-inverse .btn--primary { background: var(--action); color: var(--action-ink); }

/* the type moment: the street set large under the visit heading */
.type-moment { margin: var(--s-5) 0 var(--s-7); font: var(--display-weight) clamp(36px, 4.2vw, 64px)/1.02 var(--font-display); letter-spacing: -0.035em; }
.type-moment a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size var(--dur) var(--ease); }
.type-moment a:hover { background-size: 100% 2px; }

/* photographs that link: zoom inside the frame */
.photo-link, .pair__item, .strip__item { display: block; overflow: hidden; border-radius: var(--r-lg); }
.photo-link img, .pair__item img, .strip__item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
:is(.photo-link, .pair__item, .strip__item):hover img { transform: scale(1.03); }
.pl-photo .photo-link { height: 100%; }
.pl-photo > .photo-link > img { aspect-ratio: var(--pl-r, 1.3333); height: auto; }
.visit--card { border-radius: var(--r-lg); }

/* prices: plan cards on szmaragd, the featured one in pistacja */
#cennik .plans { align-items: stretch; }
#cennik .card--plan { background: var(--surface); border: 0; border-radius: var(--r-lg); padding: var(--s-6); display: grid; grid-template-rows: auto 48px 1fr auto; gap: var(--s-3); min-height: 400px; }
#cennik .card--plan.is-featured { background: var(--pistacja); --ink: #003333; --muted: #1f3d3a; color: #003333; box-shadow: none; }
#cennik .card--plan .price { align-self: end; margin: 0; color: inherit; }
#cennik .card--plan > :last-child { height: 48px; }
#cennik .card--plan .t-stat { font: var(--display-weight) 56px/1 var(--font-display); letter-spacing: -0.03em; }
#cennik .plan__when, #cennik .plan__note, #cennik .plan__lines { margin: 0; font-size: 16px; line-height: 24px; }
#cennik .plan__when { color: var(--muted); }
#cennik .plan__lines { list-style: none; padding: 0; }
#cennik .plans__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); margin-top: var(--s-7); }
#cennik .plans__foot p { margin: 0; max-width: 62ch; color: var(--muted); }

/* coaching: text beside the photograph */
#treningi .story .rows small { display: block; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--muted); }
#treningi .pl-photo > .photo-link > img { aspect-ratio: 1 / 1; }
#treningi .story > p { margin-top: var(--s-5); }

/* events: two photographs, 4:3, side by side */
.pair .pair__item img { aspect-ratio: 6 / 5; }

/* the club: four facts, then four square details */
.amenities { margin-bottom: var(--s-7); }
.amenity h3 { margin: 0 0 var(--s-2); }
.amenity p { margin: 0; font-size: 16px; line-height: 24px; color: var(--muted); }
.strip .strip__item img { aspect-ratio: 4 / 5; }
.faq__photo .photo-link > img { aspect-ratio: 4 / 5; }
.socials a { display: inline-flex; color: inherit; }
.socials svg { width: 20px; height: 20px; }

/* footer */
.footer__address a { color: inherit; text-decoration: none; }
.footer__address a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.footer__contact { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; }
.footer__legal > span { display: inline-flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.footer__legal a { color: inherit; }

/* the legal pages read as one long document, not as screens */
main.legal > .legal__body { height: auto; padding-top: calc(var(--nav) + var(--s-8)); padding-bottom: var(--s-9); }
.legal__body h1 { font-size: var(--t-h2); margin: 0 0 var(--s-6); }
.legal__body h2 { font-size: var(--t-h3); margin: var(--s-7) 0 var(--s-4); }
.legal__body ol { max-width: 72ch; padding-left: 1.2em; display: grid; gap: var(--s-3); line-height: 1.6; }
.legal__body p { max-width: 72ch; line-height: 1.6; }

@media (max-width: 1023px) {
  #cennik .plans > .span-3 { grid-column: span 6; }
  #cennik .card--plan { min-height: 0; }
  .amenities > .span-3, .strip > .span-3 { grid-column: span 6; }
  .faq__photo { display: none; }
  #faq .faq.span-4 { grid-column: span 6; }
}
@media (max-width: 639px) {
  #cennik .plans > .span-3 { grid-column: 1 / -1; }
  #cennik .card--plan .t-stat { font-size: 40px; }
  #cennik .plans__foot { flex-direction: column; align-items: stretch; }
  .pair > .span-6 { grid-column: 1 / -1; }
}

/* --- round 2: checker fixes --- */
#cennik .card--plan .t-stat { font-size: var(--t-h2); }
#cennik .plan__when { white-space: pre-line; }
#cennik .card--gear { grid-template-rows: auto auto 1fr auto; }
.gear__photo { margin: calc(-1 * var(--s-3)) calc(-1 * var(--s-3)) var(--s-2); border-radius: var(--r-md); overflow: hidden; }
.gear__photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 60%; }
#cennik .plans__foot { justify-content: flex-start; }
.type-moment a { display: block; }
.faq--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
.faq--grid > .faq__item:nth-child(-n+2) { padding-top: 0; }
.footer__docs { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: 0; }
@media (min-width: 1024px) and (max-width: 1279px) {
  #dojazd .visit__cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .faq--grid { grid-template-columns: minmax(0, 1fr); }
  .faq--grid > .faq__item:nth-child(2) { padding-top: var(--s-5); }
}

/* --- round 3 --- */
.type-moment a { background: none; }
.type-moment a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 10px; }
/* head rows: the heading on the left line, the side line from the split line */
.section-head.section-head--row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.section-head.section-head--row > h2 { grid-column: 1 / span 6; }
.section-head.section-head--row > p { grid-column: 7 / span 6; margin: 0; text-align: left; }
#cennik .plans__foot { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
#cennik .card--plan > :last-child { height: auto; min-height: 48px; }
.faq__photo .photo-link > img { aspect-ratio: 5 / 4; }
@media (min-width: 1024px) and (max-width: 1279px) {
  #cennik .plans > .span-3 { grid-column: span 6; }
  #cennik .card--plan { min-height: 0; grid-template-rows: auto auto 1fr auto; }
  #cennik .card--gear { display: none; }
}
/* under 1024 a section is as tall as its content: no overlap on tablets and phones */
@media (max-width: 1023px) {
  main > section.section, footer.closing { height: auto !important; }
  main > section.section > .wrap, footer.closing > .wrap { height: auto; }
  .section-head.section-head--row { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-3); }
  .section-head.section-head--row > :is(h2, p) { grid-column: 1; }
  #faq .faq--grid, .faq__photo { grid-column: 1 / -1; }
  .faq__photo { display: block; order: 2; margin-top: var(--s-6); }
}
.footer__contact { margin-top: var(--s-4); }

main.legal ~ footer.closing { height: auto !important; }
main.legal ~ footer.closing > .wrap { height: auto; }

/* the hero lead is the club's longer welcome text: a lower photograph keeps the button on the first screen */
@media (min-width: 1024px) { .hero--place { --photo: min(500px, 50svh); } }
@media (min-width: 1024px) and (max-width: 1279px) { .hero--place { --photo: 45svh; } }

/* opening hours: each season on its own, the months above the hours, the same in the visit card and the footer */
.hours { grid-template-columns: minmax(0, 1fr); gap: 0; }
.hours dt { font-weight: 500; }
.hours dd { margin: var(--s-1) 0 0; color: var(--muted); }
.hours dd + dt { margin-top: var(--s-4); }

/* under 1024 the footer is as tall as its content: no half-screen rows, the photograph keeps its own shape */
@media (max-width: 1023px) {
  footer.closing > .wrap,
  footer.closing:has(> .wrap > .closing__cta > .close__media) > .wrap { grid-template-rows: auto auto; row-gap: var(--s-8); }
  .closing__cta > .close__media { flex: none; aspect-ratio: 16 / 10; }
}

/* photographs that are not links (the club strip, the FAQ) stay still under the pointer */
:is(.photo-link, .strip__item):not(a):hover img { transform: none; }

/* the line above the slogan: what the club is and where, part of the h1 for search engines */
.hero__eyebrow { display: block; margin-bottom: var(--s-4); font: 500 18px/1.4 var(--font-text); letter-spacing: 0; color: var(--pistacja); }
@media (max-width: 639px) { .hero__eyebrow { font-size: 16px; margin-bottom: var(--s-3); } }
