/* Raf Gym - site de prezentare */

/* Fonturi self-hosted (fontsource, licență OFL): Oswald 700 (titluri), Inter 400/600 (text) */
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/oswald-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/oswald-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/inter-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Fonturi de rezerva cu metrici potrivite (size-adjust + overrides): cat timp fonturile web se incarca, textul din Arial are aproape aceeasi latime
   ca Oswald/Inter, deci titlurile nu isi schimba numarul de randuri la swap (font-display: swap ramane) si nu apare CLS.
   Valori masurate in Chrome (latimea textului paginii, Arial / font web): Oswald 700 = 79,7%; Inter 400 = 105,4%; Inter 600 (Arial Bold) = 101,1%;
   ascent/descent = metrica fontului web impartita la size-adjust. Daca Arial lipseste local, faptul e ignorat si se trece la urmatorul font din stiva. */
@font-face { font-family: "Oswald Fallback"; font-style: normal; font-weight: 700;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
  size-adjust: 79.7%; ascent-override: 149.7%; descent-override: 36.3%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; font-style: normal; font-weight: 400;
  src: local("Arial"), local("ArialMT");
  size-adjust: 105.4%; ascent-override: 91.9%; descent-override: 22.9%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; font-style: normal; font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 101.1%; ascent-override: 95.8%; descent-override: 23.8%; line-gap-override: 0%; }

:root {
  --yellow: #FFEF03;
  --black: #030303;
  --black-2: #111111;   /* fundal secundar închis */
  --line: #2b2b2b;
  --ink: #F5F5F5;       /* text principal pe negru (nu se folosește pe galben) */
  --muted: #C9C9C9;     /* text secundar pe negru */
  --paper: #FFFFFF;     /* fundal rânduri tabel (text negru pe el) */

  --font-head: "Oswald", "Oswald Fallback", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 16px;
  --radius: 10px;
  --sticky-h: 3.75rem; /* în rem: crește cu textul mărit (la 200% bara pe 2 rânduri ~102 px < 120 px) */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; scroll-padding-bottom: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 11vw, 5rem); }
h2 { font-size: clamp(1.9rem, 6.5vw, 3rem); }
h3 { font-size: 1.25rem; }
h1, h2, h3 { overflow-wrap: anywhere; } /* text mărit: cuvintele lungi se rup în loc să iasă din ecran */
p { margin: 0 0 1em; }
a { color: var(--yellow); }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.on-yellow :focus-visible { outline-color: var(--black); }

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--yellow); color: var(--black); padding: 12px 16px; font-weight: 600; border-radius: 6px;
}
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 56px 0; }
.section-head { margin-bottom: 28px; }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; color: var(--yellow); font-size: 1rem; margin: 0 0 8px; }
.on-yellow .eyebrow { color: var(--black); }

/* Butoane / CTA (țintă tactilă >= 44 px) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; min-width: 48px; padding: 12px 24px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.btn-primary:hover { background: var(--black); color: var(--yellow); }
.btn-secondary { background: transparent; color: var(--yellow); border-color: var(--yellow); }
.btn-secondary:hover { background: var(--yellow); color: var(--black); }
.on-yellow .btn-primary { background: var(--black); color: var(--yellow); border-color: var(--black); }
.on-yellow .btn-primary:hover { background: var(--yellow); color: var(--black); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); border-bottom: 2px solid var(--yellow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 48px; }
.brand-name { font-family: var(--font-head); text-transform: uppercase; font-size: 1.25rem; letter-spacing: .04em; }
.logo { width: 45px; height: auto; aspect-ratio: 182 / 196; clip-path: polygon(50% 0, 100% 22%, 100% 78%, 50% 100%, 0 78%, 0 22%); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-radius: 6px; }
.nav-list a:hover { color: var(--yellow); }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; background: transparent; color: var(--yellow); border: 2px solid var(--yellow); border-radius: 8px; cursor: pointer; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { display: block; width: 22px; height: 3px; background: currentColor; border-radius: 2px; position: relative; content: ""; margin: 0 auto; }
.menu-toggle .bars::before { position: absolute; top: -7px; left: 0; }
.menu-toggle .bars::after { position: absolute; top: 7px; left: 0; }

@media (max-width: 768px) {
  .js .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--black); border-bottom: 2px solid var(--yellow); padding: 8px var(--gutter) 16px; }
  .js .site-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; }
  .js .nav-list a { width: 100%; }
  /* Fără JS: nav-ul rămâne vizibil, trece sub logo (wrap); antetul nu mai e sticky ca să nu ocupe ecranul */
  .site-header { position: static; }
  .js .site-header { position: sticky; }
  .header-inner { position: relative; flex-wrap: wrap; }
  .site-nav { flex: 1 1 100%; }
  .nav-list a { padding: 0 8px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 48px 0 64px; background: var(--black); border-bottom: 2px solid var(--yellow); }
.hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; background: var(--yellow); transform: rotate(45deg); opacity: .12; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; gap: 28px; align-items: center; }
.hero-logo { width: 90px; height: auto; aspect-ratio: 182 / 196; clip-path: polygon(50% 0, 100% 22%, 100% 78%, 50% 100%, 0 78%, 0 22%); }
.hero-sub { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .14em; font-size: 1.15rem; color: var(--yellow); margin-bottom: 12px; }
.hero-tagline { font-size: 1.2rem; color: var(--ink); max-width: 34ch; margin-bottom: 28px; }

/* Despre */
.about { background: var(--black-2); }
.about-grid { display: grid; gap: 24px; }
.about p { max-width: 62ch; color: var(--ink); }
.fact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fact-list li { border-left: 4px solid var(--yellow); padding: 4px 0 4px 16px; }
.fact-list strong { display: block; font-family: var(--font-head); text-transform: uppercase; font-size: 1.15rem; color: var(--yellow); }

/* Abonamente (pe galben, text negru) */
.pricing { background: var(--yellow); color: var(--black); }
.pricing h2, .pricing p, .pricing .notes { color: var(--black); }
.price-table { width: 100%; border-collapse: collapse; background: var(--paper); color: var(--black); border-radius: var(--radius); overflow: hidden; border: 3px solid var(--black); }
.price-table caption { text-align: left; font-family: var(--font-head); text-transform: uppercase; font-size: 1.15rem; padding: 0 0 10px; color: var(--black); caption-side: top; }
.price-table thead th { background: var(--black); color: var(--yellow); text-align: left; padding: 12px 14px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; }
.price-table thead th:last-child { text-align: right; }
.price-table .group th { background: var(--black-2); color: var(--yellow); text-align: left; padding: 10px 14px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; font-size: 1rem; border-top: 3px solid var(--black); }
.price-table tbody tr:not(.group) th, .price-table tbody tr:not(.group) td { padding: 14px; border-top: 1px solid #d9d9d9; vertical-align: top; text-align: left; }
.price-table tbody tr:not(.group) th { font-weight: 600; }
.price-table tbody tr:not(.group) td { text-align: right; }
.price-table .price, .price-table .unit { white-space: nowrap; }
.price-table .cond { display: block; font-weight: 400; font-size: .9rem; color: #333; margin-top: 2px; }
.price-table .price { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.1; }
.price-table .unit { font-size: 1rem; font-family: var(--font-body); font-weight: 400; }
.price-table .split { display: block; }
.price-table .split + .split { margin-top: 6px; }
.price-table tbody tr:not(.group):hover th, .price-table tbody tr:not(.group):hover td { background: #f4f4f4; }
.notes { margin-top: 18px; font-size: .95rem; }
.notes p { margin-bottom: .5em; }
.pricing .btn-row { margin-top: 20px; }

/* Program */
.hours { background: var(--black); }
.hours-list { margin: 0 0 20px; padding: 0; display: grid; gap: 12px; max-width: 520px; }
.hours-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 16px; background: var(--black-2); border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: var(--radius); }
.hours-row dt { font-weight: 600; margin: 0; }
.hours-row dd { margin: 0; font-family: var(--font-head); font-size: 1.35rem; color: var(--yellow); }
.open-status { display: inline-block; padding: 8px 16px; border-radius: 999px; font-weight: 600; border: 2px solid var(--yellow); }
.open-status.is-open { background: var(--yellow); color: var(--black); }
.open-status.is-closed { background: var(--black); color: var(--ink); border-color: var(--muted); }
.open-status[hidden] { display: none; }
.small-note { color: var(--muted); font-size: .9rem; }

/* Galerie */
.gallery { background: var(--black-2); }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--black); }
.gallery-grid img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease; }
.gallery-grid figure:hover img { transform: scale(1.04); }
.gallery-note { color: var(--muted); font-size: .9rem; margin-top: 14px; }
/* Lightbox galerie: fiecare miniatură e un link către fișierul imaginii (fără JS deschide fișierul); main.js creează <dialog class="lightbox"> la primul click (nu există în HTML, deci nu ocupă loc și nu poate rămâne vizibil fără JS) */
.gallery-grid a { display: block; cursor: zoom-in; color: inherit; }
.gallery-grid a:focus-visible { outline-offset: -3px; } /* figure are overflow:hidden: conturul în interior */
html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: transparent; color: var(--ink); overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
.lightbox[open] { display: flex; flex-direction: column; gap: 8px; box-sizing: border-box; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.lightbox::backdrop { background: rgba(3, 3, 3, .95); }
.lb-top, .lb-bar { flex: none; display: flex; align-items: center; justify-content: center; gap: 16px; }
.lb-top { justify-content: flex-end; }
.lb-stage { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
/* --ar (raportul imaginii) e pus de main.js din miniatură: caseta se strânge pe imagine, mărită să umple ecranul (max 92vw x 86vh), fără limită la dimensiunea nativă */
.lb-img { display: block; width: min(92vw, 100cqw, calc(min(86vh, 100cqh) * var(--ar, 1.7778))); height: auto; max-width: 92vw; max-height: min(86vh, 100cqh); aspect-ratio: var(--ar, 1.7778); object-fit: contain; }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; background: var(--black); color: var(--yellow); border: 2px solid var(--yellow); border-radius: 8px; cursor: pointer; }
.lb-btn:hover { background: var(--yellow); color: var(--black); }
.lb-btn svg { width: 24px; height: 24px; display: block; pointer-events: none; }
.lb-count { margin: 0; min-width: 4.5em; padding: 2px 10px; background: var(--black); border-radius: 8px; text-align: center; font-family: var(--font-head); font-size: 1.15rem; letter-spacing: .06em; color: var(--ink); }
.lb-cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Locație / contact */
.contact { background: var(--black); }
.contact-grid { display: grid; gap: 28px; }
.contact address { font-style: normal; font-size: 1.1rem; margin-bottom: 16px; }
.contact-lines { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.contact-lines a { display: inline-flex; align-items: center; min-height: 44px; }
.map-frame { width: 100%; height: 320px; border: 2px solid var(--yellow); border-radius: var(--radius); background: var(--black-2); }
.map-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-size: .95rem; }
.map-links a { display: inline-flex; align-items: center; min-height: 44px; }
.social-title { margin-top: 28px; }
.social { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }

/* Footer */
.site-footer { background: var(--black); border-top: 2px solid var(--yellow); padding: 20px 0; color: var(--muted); font-size: .95rem; }
.site-footer a { color: var(--yellow); }
.footer-inner { display: grid; gap: 6px; }
.footer-inner p { margin: 0; }
.footer-legal { font-size: .875rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem 2.5rem; text-align: center; }

/* Bară sticky de telefon (doar mobil) */
.sticky-call { display: none; }
@media (max-width: 768px) {
  .sticky-call { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; min-height: var(--sticky-h); padding: 4px var(--gutter); flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 .5em; line-height: 1.3; text-align: center; background: var(--yellow); color: var(--black); font-weight: 600; font-size: 1.1rem; text-decoration: none; border-top: 3px solid var(--black); }
  .sticky-call:focus-visible { outline-color: var(--black); outline-offset: -6px; }
  body { padding-bottom: calc(var(--sticky-h) + 1.5rem); }
  html { scroll-padding-bottom: calc(var(--sticky-h) + 1.5rem); }
}

/* Layout mai larg */
@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 769px) {
  .section { padding: 88px 0; }
  .header-inner { min-height: 72px; }
  .logo { width: 52px; }
  .hero { padding: 88px 0 104px; }
  .hero-inner { grid-template-columns: auto 1fr; gap: 48px; }
  .hero-logo { width: 90px; }
  .about-grid { grid-template-columns: 1.3fr 1fr; gap: 48px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 48px; }
  .map-frame { height: 400px; }
  .price-table tbody tr:not(.group) th, .price-table tbody tr:not(.group) td { padding: 16px 20px; }
  .price-table .group th, .price-table thead th { padding-left: 20px; padding-right: 20px; }
}

/* Animații la scroll */
/* Ascunse abia după ce main.js a pus `js-ready` (nu de la `js`): dacă main.js lipsește/întârzie/pică, conținutul rămâne vizibil. */
.js-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-ready .reveal { opacity: 1; transform: none; }
  .btn:hover, .gallery-grid figure:hover img { transform: none; }
}

/* Buton cu telefon: două segmente, fără spații în textul linkului (tel-non-breaking); fac wrap între ele */
.tel-btn { flex-wrap: wrap; column-gap: .4em; }
.sticky-call span + span, .tel-btn span + span { white-space: nowrap; }

/* Tabel de prețuri: când coloana e îngustă în raport cu textul (ecran mic sau text mărit), rândurile se așază
   una sub alta (preț sub nume). Pragul e în em, deci se declanșează la text mărit, nu la font implicit. */
.price-wrap { container-type: inline-size; }
@container (max-width: 17em) {
  .price-table tbody tr:not(.group), .price-table tbody tr:not(.group) th, .price-table tbody tr:not(.group) td { display: block; }
  .price-table tbody tr:not(.group) th { padding-bottom: 2px; overflow-wrap: anywhere; }
  .price-table tbody tr:not(.group) td { text-align: left; padding-top: 0; border-top: 0; }
  .price-table tbody, .price-table .group, .price-table .group th { display: block; }
  .price-table { table-layout: fixed; }
  /* antetul de coloane devine redundant când rândurile sunt stivuite: rămâne pentru cititoarele de ecran */
  .price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .price-table .group th { padding-left: 10px; padding-right: 10px; letter-spacing: 0; overflow-wrap: anywhere; }
}

/* Imprimare: conținutul animat la scroll trebuie să fie vizibil (fără scroll, elementele de sub viewport ar rămâne la opacity 0) */
@media print {
  .reveal, .js-ready .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .lightbox, .lightbox::backdrop { display: none !important; }
  html.lb-open { overflow: visible !important; padding-right: 0 !important; }
}
