/* =========================================================
   MERIDIAN FITNESS — energetic, inclusive urban fitness
   Palette: deep teal, bright teal, vivid orange, aqua, charcoal
   Type: Oswald (display) + Nunito Sans (body)
   ========================================================= */

:root {
  --teal-deep: #04546B;
  --ocean: #063D51;
  --teal: #087D9B;
  --teal-light: #2AA7C7;
  --orange: #FF5A0A;
  --orange-light: #FF7D3D;
  --aqua: #EAF7F8;
  --white: #FFFFFF;
  --charcoal: #17242A;
  --ink: #17242A;
  --muted: rgba(23, 36, 42, .68);
  --rule: rgba(23, 36, 42, .1);

  --display: "Oswald", "Bebas Neue", Impact, sans-serif;
  --sans: "Nunito Sans", system-ui, "Segoe UI", sans-serif;

  --maxw: 1280px;
  --gut: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { font-family: var(--sans); font-weight: 400; font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; }
ul { list-style: none; padding: 0; }
input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.skip, .vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip:focus { top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--orange); color: var(--white); padding: 10px 16px; z-index: 200; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--charcoal); font-weight: 600; line-height: 1.02; text-transform: uppercase; letter-spacing: .005em; }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.accent { color: var(--orange); }
.eyebrow {
  display: inline-block; font-family: var(--sans); font-weight: 800;
  font-size: .74rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--teal-deep); margin-bottom: 1rem;
}
.eyebrow--orange { color: var(--orange); }
.lede { font-size: clamp(1.05rem, 1.3vw, 1.18rem); color: rgba(255,255,255,.85); max-width: 50ch; line-height: 1.55; }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 80; background: var(--teal-deep); color: var(--white); transition: background .3s var(--ease); }
.hdr.is-scrolled { background: rgba(4, 84, 107, .96); backdrop-filter: blur(10px); box-shadow: 0 8px 30px -10px rgba(0,0,0,.3); }
.hdr__inner { max-width: var(--maxw); margin: 0 auto; padding: 1rem var(--gut); display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--gut); }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--white); }
.brand__mark { width: 36px; height: 36px; color: var(--orange); }
.brand span { font-family: var(--display); font-size: 1.05rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em; font-weight: 400; }
.brand strong { color: var(--orange); font-weight: 700; }
.nav { display: flex; gap: clamp(1.2rem, 2vw, 2.4rem); justify-self: center; }
.nav a {
  position: relative; padding: .35rem 0;
  font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.85); transition: color .3s var(--ease);
}
.nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--orange); transition: width .35s var(--ease); }
.nav a:hover, .nav a.is-active { color: var(--white); }
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.cta-join {
  display: inline-block; padding: .75rem 1.6rem;
  background: var(--orange); color: var(--white);
  font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.cta-join:hover { background: var(--orange-light); transform: translateY(-1px); }
.cta-join--block { width: 80%; text-align: center; padding: 1rem; margin-top: 1rem; clip-path: none; border-radius: 0; }
.burger { display: none; width: 40px; height: 40px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.burger span { width: 22px; height: 2px; background: var(--white); }

/* ---------- Drawer ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(82vw, 340px); background: var(--ocean); padding: 2rem 1.5rem; transform: translateX(100%); transition: transform .4s var(--ease); display: flex; flex-direction: column; gap: 1rem; }
.drawer[data-open="true"] { transform: none; }
.drawer__close { position: absolute; top: 1rem; right: 1.2rem; font-size: 2rem; color: var(--white); }
.drawer a { font-family: var(--display); font-size: 1.4rem; text-transform: uppercase; color: var(--white); padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .35s var(--ease); }
.scrim.is-visible { opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 1rem 2rem; font-weight: 800; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  border: 0; cursor: pointer; transition: all .3s var(--ease);
}
.btn--block { width: 100%; }
.btn--teal { background: var(--teal); color: var(--white); }
.btn--teal:hover { background: var(--teal-deep); transform: translateY(-2px); }
.btn--teal.btn--ghost { background: transparent; color: var(--teal-deep); border: 2px solid var(--teal); }
.btn--teal.btn--ghost:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }
.btn--orange { background: var(--orange); color: var(--white); }
.btn--orange:hover { background: var(--orange-light); transform: translateY(-2px); }
.btn--white { background: var(--white); color: var(--teal-deep); }
.btn--white:hover { background: var(--aqua); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(580px, 90vh, 860px); overflow: hidden; background: var(--ocean); display: flex; align-items: center; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__left {
  position: relative; z-index: 2;
  background: linear-gradient(95deg, rgba(6, 61, 81, .96) 0%, rgba(6, 61, 81, .82) 45%, rgba(6, 61, 81, 0) 80%);
  padding: clamp(60px, 8vw, 120px) var(--gut);
  width: 100%; max-width: 800px;
}
.hero__pattern { position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(135deg, transparent 49%, rgba(255, 90, 10, .6) 49%, rgba(255, 90, 10, .6) 51%, transparent 51%); background-size: 32px 32px; pointer-events: none; }
.hero__left .eyebrow { color: var(--orange); }
.hero__left h1 { color: var(--white); max-width: 12ch; }
.hero__left .lede { margin-top: 1.2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero__stats { display: flex; gap: clamp(1.5rem, 3vw, 3rem); margin-top: 2.8rem; flex-wrap: wrap; }
.hero__stats li { color: rgba(255,255,255,.75); border-left: 3px solid var(--orange); padding-left: 1rem; }
.hero__stats strong { display: block; font-family: var(--display); font-size: 2rem; color: var(--white); line-height: 1; }
.hero__stats span { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.hero__accent { position: absolute; bottom: 0; left: 0; right: 0; height: 18px; background: var(--orange); clip-path: polygon(0 0, 100% 0, 100% 30%, 50% 100%, 0 30%); z-index: 3; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 9vw, 130px) var(--gut); }
.hd { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.hd--center { max-width: none; text-align: center; }
.hd--center > * { margin-left: auto; margin-right: auto; }
.hd--center p { color: var(--muted); margin-top: .8rem; max-width: 56ch; }
.hd--between { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }

/* ---------- Why ---------- */
.why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 1.5vw, 24px); }
.benefit {
  background: var(--white);
  padding: 2rem 1.6rem;
  border-top: 4px solid var(--teal);
  box-shadow: 0 18px 40px -28px rgba(6, 61, 81, .3);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.benefit:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -28px rgba(6, 61, 81, .45); }
.benefit__icon {
  width: 56px; height: 56px;
  background: var(--aqua); border-radius: 50%;
  display: grid; place-items: center;
  margin-bottom: 1.2rem;
}
.benefit__icon svg { width: 28px; height: 28px; color: var(--orange); }
.benefit:nth-child(2) .benefit__icon svg { color: var(--teal); }
.benefit:nth-child(3) .benefit__icon svg { color: var(--orange); }
.benefit:nth-child(4) .benefit__icon svg { color: var(--teal); }
.benefit h3 { font-size: 1.3rem; color: var(--charcoal); margin-bottom: .5rem; }
.benefit p { color: var(--muted); font-size: .92rem; }

/* ---------- Classes ---------- */
.classes { background: var(--aqua); padding: clamp(70px, 9vw, 120px) var(--gut); position: relative; }
.classes__inner { max-width: var(--maxw); margin: 0 auto; }
.classes__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 2vw, 30px); }
.class-card { background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px -28px rgba(6,61,81,.3); transition: transform .35s var(--ease); }
.class-card:hover { transform: translateY(-4px); }
.class-card__media { aspect-ratio: 16/10; overflow: hidden; }
.class-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.class-card:hover .class-card__media img { transform: scale(1.05); }
.class-card__body { padding: 1.5rem 1.8rem 1.8rem; position: relative; }
.class-card__body h3 { font-size: 1.5rem; color: var(--charcoal); margin-bottom: .5rem; }
.class-card__body p { color: var(--muted); font-size: .92rem; }
.class-card__tag { position: absolute; top: -14px; right: 1.5rem; background: var(--orange); color: var(--white); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: .35rem .8rem; font-weight: 700; }
.classes__cta { text-align: center; margin-top: 2.5rem; }
.schedule { background: var(--white); margin-top: 2rem; padding: 2rem; border-radius: 12px; box-shadow: 0 18px 40px -28px rgba(6,61,81,.3); position: relative; animation: drop .4s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.schedule__close { position: absolute; top: 1rem; right: 1.2rem; font-size: 1.8rem; color: var(--teal-deep); }
.schedule h3 { margin-bottom: 1rem; font-size: 1.4rem; }
.schedule__table { overflow-x: auto; }
.schedule table { width: 100%; border-collapse: collapse; min-width: 600px; }
.schedule th, .schedule td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--rule); font-size: .9rem; }
.schedule th { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--teal-deep); background: var(--aqua); }
.schedule td.time { color: var(--orange); font-weight: 700; }

/* ---------- Trainers ---------- */
.trainers__rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 1.6vw, 24px); overflow: hidden; }
.trainer {
  background: var(--white); border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 40px -28px rgba(6,61,81,.3);
  transition: transform .35s var(--ease);
}
.trainer:hover { transform: translateY(-4px); }
.trainer__media { aspect-ratio: 3/4; overflow: hidden; position: relative; }
.trainer__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.trainer:hover .trainer__media img { transform: scale(1.04); }
.trainer__specialty { position: absolute; top: 1rem; left: 1rem; background: var(--orange); color: var(--white); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; padding: .3rem .7rem; font-weight: 700; }
.trainer__body { padding: 1.4rem 1.4rem 1.6rem; }
.trainer__body h3 { font-size: 1.3rem; color: var(--charcoal); margin-bottom: .2rem; }
.trainer__cert { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); font-weight: 700; }
.trainer__bio { color: var(--muted); font-size: .88rem; margin-top: .7rem; }
.carousel__nav { display: flex; gap: .4rem; }
.nav-btn { width: 44px; height: 44px; border: 2px solid var(--rule); border-radius: 50%; font-size: 1.2rem; color: var(--teal-deep); transition: all .3s var(--ease); }
.nav-btn:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }
.trainers__foot { text-align: center; margin-top: 2.5rem; }

/* ---------- Pricing ---------- */
.pricing { background: linear-gradient(135deg, var(--teal-deep) 0%, var(--ocean) 100%); padding: clamp(80px, 10vw, 140px) var(--gut); position: relative; }
.pricing__inner { max-width: var(--maxw); margin: 0 auto; }
.pricing .hd h2, .pricing .hd .eyebrow, .pricing .hd p { color: var(--white); }
.pricing .hd .eyebrow { color: var(--orange); }
.pricing__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2vw, 30px); }
.plan {
  background: var(--white); padding: 2.4rem 2rem;
  border-radius: 16px;
  position: relative;
  transition: transform .35s var(--ease);
}
.plan:hover { transform: translateY(-4px); }
.plan--featured { background: var(--white); transform: scale(1.04); box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.plan--featured:hover { transform: scale(1.04) translateY(-4px); }
.plan__header { padding: 1rem 1.5rem; margin: -2.4rem -2rem 1.5rem; background: var(--teal); color: var(--white); border-radius: 16px 16px 0 0; }
.plan--featured .plan__header { background: var(--orange); }
.plan__header h3 { color: var(--white); font-size: 1.4rem; }
.plan__price { font-family: var(--display); font-size: 3rem; font-weight: 700; color: var(--charcoal); line-height: 1; }
.plan__price small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.plan__features { margin: 1.4rem 0; padding: 0; list-style: none; }
.plan__features li { padding: .5rem 0 .5rem 1.8rem; position: relative; color: var(--ink); font-size: .92rem; border-bottom: 1px solid var(--rule); }
.plan__features li::before { content: "✓"; position: absolute; left: 0; top: .5rem; color: var(--orange); font-weight: 800; }
.plan__features li.off { color: var(--muted); }
.plan__features li.off::before { content: "—"; color: var(--muted); }
.plan .btn { width: 100%; margin-top: .5rem; }
.plan .btn--teal { background: var(--teal-deep); }
.plan--featured .btn { background: var(--orange); }

/* ---------- Stories ---------- */
.stories__rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2vw, 28px); }
.story { background: var(--aqua); padding: 2rem; border-radius: 14px; position: relative; }
.story__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.story__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.story__name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--charcoal); text-transform: uppercase; }
.story__ach { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); font-weight: 800; }
.story__quote { color: var(--charcoal); font-size: 1rem; line-height: 1.55; font-style: italic; }
.stories__dots { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.stories__dots button { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); transition: all .3s var(--ease); }
.stories__dots button.is-active { background: var(--orange); transform: scale(1.3); }

/* ---------- Final CTA ---------- */
.final { position: relative; min-height: 540px; display: grid; place-items: center; overflow: hidden; text-align: center; padding: clamp(80px, 11vw, 150px) var(--gut); background: var(--ocean); }
.final__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,61,81,.7) 0%, rgba(6,61,81,.85) 100%); }
.final__accent { position: absolute; width: 200px; height: 200px; background: var(--orange); opacity: .9; }
.final__accent--tl { top: -80px; left: -80px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.final__accent--br { bottom: -80px; right: -80px; clip-path: polygon(100% 100%, 100% 0, 0 100%); }
.final__body { position: relative; z-index: 2; max-width: 760px; }
.final__body h2 { color: var(--white); }
.final__body p { color: rgba(255,255,255,.85); margin: 1rem 0 2rem; font-size: 1.1rem; }
.final__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 1.5rem; background: rgba(6,61,81,.7); backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s var(--ease); }
.modal[data-open="true"] { opacity: 1; }
.modal__card { background: var(--white); padding: 2.5rem; max-width: 580px; width: 100%; border-radius: 14px; position: relative; animation: pop .35s var(--ease); }
@keyframes pop { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__close { position: absolute; top: 1rem; right: 1.2rem; font-size: 2rem; color: var(--teal-deep); }
.modal__card h3 { font-size: 1.8rem; margin-bottom: .5rem; }
.modal__card > p { color: var(--muted); margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-field { display: grid; gap: .4rem; }
.form-field label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-deep); font-weight: 700; }
.form-field input, .form-field select { padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: 8px; font-size: .95rem; }
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--orange); }
.form-field input.invalid, .form-field select.invalid { border-color: #d77b5a; }
.form-msg { margin-top: 1rem; font-size: .9rem; }
.form-msg.ok { color: var(--teal-deep); }
.form-msg.err { color: #d77b5a; }

/* ---------- Footer ---------- */
.ft { background: var(--ocean); color: rgba(255,255,255,.8); padding: clamp(60px, 7vw, 100px) var(--gut) 1.5rem; }
.ft__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 50px); padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.ft .brand { color: var(--white); margin-bottom: 1.2rem; }
.ft__brand p { font-size: .9rem; margin-bottom: .8rem; line-height: 1.6; }
.ft__brand a { color: var(--orange); }
.ft__social { display: flex; gap: .4rem; margin-top: .8rem; }
.ft__social a { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; display: grid; place-items: center; color: var(--white); transition: all .3s var(--ease); }
.ft__social a:hover { background: var(--orange); border-color: var(--orange); }
.ft__social svg { width: 16px; height: 16px; }
.ft__col h3 { color: var(--orange); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1rem; font-family: var(--sans); font-weight: 800; }
.ft__col a { display: block; font-size: .92rem; padding: .25rem 0; color: rgba(255,255,255,.8); transition: color .3s var(--ease); }
.ft__col a:hover { color: var(--white); }
.ft__legal { max-width: var(--maxw); margin: 1.5rem auto 0; font-size: .82rem; color: rgba(255,255,255,.55); text-align: center; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 30px); background: var(--teal-deep); color: var(--white); padding: .9rem 1.6rem; font-size: .85rem; font-weight: 600; z-index: 200; opacity: 0; transition: all .35s var(--ease); border-left: 4px solid var(--orange); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .why__grid { grid-template-columns: repeat(2, 1fr); }
  .trainers__rail { grid-template-columns: repeat(2, 1fr); }
  .ft__inner { grid-template-columns: 1fr 1fr 1fr; }
  .ft__brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .cta-join { display: none; }
  .burger { display: flex; }
  .pricing__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .plan--featured { transform: none; }
  .plan--featured:hover { transform: translateY(-4px); }
  .stories__rail { grid-template-columns: 1fr; max-width: 580px; margin: 0 auto; }
}
@media (max-width: 620px) {
  :root { --gut: 20px; }
  .classes__grid { grid-template-columns: 1fr; }
  .trainers__rail { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hd--between { flex-direction: column; align-items: flex-start; }
  .ft__inner { grid-template-columns: 1fr 1fr; }
  .ft__brand { grid-column: 1 / -1; }
  .hero__stats { gap: 1rem 1.5rem; }
  .hero__stats strong { font-size: 1.5rem; }
  .final__cta .btn { width: 100%; }
}
