/* CNC Fitness — single-page theme
   Brand: black / white / CNC red. Athletic, geometric, high-contrast. */

:root {
  --bg: #070707;
  --bg-elevated: #101010;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --red: #c8102e;
  --red-deep: #8f0c21;
  --red-soft: rgba(200, 16, 46, 0.16);
  --ink: #f4f4f4;
  --ink-soft: #d4d4d4;
  --muted: #8d8d8d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, sans-serif;
  --container: 1160px;
  --gutter: clamp(1.1rem, 3vw, 2rem);
  --header-h: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--red);
  color: #fff;
  padding: 0.6rem 1rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  position: relative;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-kicker::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--red);
}

.section-title {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  max-width: 16ch;
  margin-bottom: 1.2rem;
}

.section-lead {
  color: var(--ink-soft);
  max-width: 62ch;
  font-size: 1.08rem;
}

.eyebrow {
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.4rem;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

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

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #de1636;
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: #070707;
  border-bottom-color: var(--line);
}

.site-header__inner {
  width: min(1240px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.18em;
}

.brand-text span {
  color: var(--red);
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: #fff;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  font-size: 0.76rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* Hero */
.hero {
  height: 100svh;
  min-height: 640px;
  max-height: 100svh;
  display: grid;
  place-items: end stretch;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--header-h) + 1.4rem) 0 2.2rem;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.08);
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 7, 0.35) 0%, rgba(7, 7, 7, 0.2) 35%, rgba(7, 7, 7, 0.88) 100%),
    linear-gradient(90deg, rgba(7, 7, 7, 0.72) 0%, rgba(7, 7, 7, 0.18) 58%, rgba(7, 7, 7, 0.55) 100%);
}

.hero__watermark {
  position: absolute;
  right: -6vw;
  top: 12vh;
  width: min(46vw, 560px);
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
}

.hero__content {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 5.7rem);
  max-width: 13ch;
  margin: 0.4rem 0 1.1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--red);
}

.hero__sub {
  max-width: min(46ch, 100%);
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  margin-bottom: 1.5rem;
}

.hero__meta {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__meta strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

/* Marquee */
.marquee {
  border-block: 1px solid var(--line);
  background: #0b0b0b;
  overflow: hidden;
  padding: 0.9rem 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: 2.4rem;
  animation: marquee 32s linear infinite;
  font-family: var(--font-display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--muted);
}

.marquee__track span {
  white-space: nowrap;
}

.marquee__track b {
  color: var(--red);
  font-weight: 600;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Philosophy */
.philosophy {
  background:
    radial-gradient(ellipse at top left, rgba(200, 16, 46, 0.08), transparent 42%),
    var(--bg);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.philosophy blockquote {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.25;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #fff;
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 2.4rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(200, 16, 46, 0.45);
}

.service-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.service-card:hover .service-card__media img {
  transform: scale(1.05);
}

.service-card__body {
  padding: 1.35rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.service-card h3 {
  font-size: 1.45rem;
}

.service-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.chip {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--red);
  color: #fff;
  background: var(--red-soft);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  font-weight: 600;
}

/* About */
.about {
  background: #0a0a0a;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
}

.about__media {
  position: relative;
}

.about__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: contrast(1.05);
}

.about__media::after {
  content: "";
  position: absolute;
  inset: auto 8% -12px -12px;
  height: 42%;
  border: 1px solid var(--red);
  z-index: -1;
}

.credential-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.credential-list li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.96rem;
}

.credential-list b {
  color: var(--red);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* Packages */
.package-intro {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.package-card {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 1.6rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.package-card.is-featured {
  border-color: var(--red);
  background:
    linear-gradient(180deg, rgba(200, 16, 46, 0.14), transparent 42%),
    var(--bg-card);
}

.package-card h3 {
  font-size: 2.1rem;
  margin: 0.4rem 0 0.7rem;
}

.package-card ul {
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  flex: 1;
}

.package-card li {
  padding: 0.45rem 0 0.45rem 1.1rem;
  position: relative;
}

.package-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--red);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.price-band {
  margin-top: 1.6rem;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: #0c0c0c;
}

.price-band strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.04em;
}

.price-band span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.focus-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.focus-pills span {
  border: 1px solid var(--line-strong);
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* Gallery */
.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

.gallery-grid a {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #111;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
  filter: saturate(0.9);
}

.gallery-grid a:hover img,
.gallery-grid a:focus-visible img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

.gallery-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.45));
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-grid a:hover::after,
.gallery-grid a:focus-visible::after {
  opacity: 1;
}

/* Contact */
.contact {
  background:
    linear-gradient(180deg, #0a0a0a, #070707);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.contact-card,
.form-card {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 1.5rem;
}

.contact-list {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.contact-list a {
  color: #fff;
  border-bottom: 1px solid transparent;
}

.contact-list a:hover {
  border-bottom-color: var(--red);
}

.contact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.map-wrap {
  margin-top: 1rem;
  border: 1px solid var(--line);
  min-height: 220px;
}

.map-wrap iframe {
  width: 100%;
  height: 220px;
  border: 0;
  filter: grayscale(1) contrast(1.15) brightness(0.8);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  background: #0b0b0b;
  border: 1px solid var(--line-strong);
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border-radius: 2px;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.form-note,
.form-status {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-status.is-success {
  color: #9be7b0;
}

.form-status.is-error {
  color: #ff8a8a;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer a:hover {
  color: #fff;
}

.float-wa {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #062;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.float-wa.is-instagram {
  background: radial-gradient(circle at 30% 30%, #feda75, #d62976 55%, #4f5bd5);
  color: #fff;
}

.float-wa:hover {
  transform: translateY(-2px);
}

.float-wa svg {
  width: 28px;
  height: 28px;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s var(--ease) forwards;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track,
  .reveal,
  .service-card,
  .gallery-grid img {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    background: #070707;
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.2rem 1.2rem;
    gap: 0.4rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle {
    display: grid;
  }

  .nav-cta {
    width: 100%;
    margin-top: 0.4rem;
  }

  .philosophy-grid,
  .about-grid,
  .contact-grid,
  .package-intro {
    grid-template-columns: 1fr;
    display: grid;
  }

  .service-grid,
  .package-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    max-width: 11ch;
  }

  .about__media img {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 640px) {
  .stat-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .brand-text {
    display: none;
  }

  .price-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    height: 100svh;
    min-height: 0;
  }

  .hero__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.2rem;
  }

  .hero__meta > :last-child {
    grid-column: 1 / -1;
  }
}
