/* Nextyde Squash Court — lightweight homepage */
:root {
  --bg: #0c0e10;
  --bg-elev: #14181c;
  --bg-panel: #1a2026;
  --line: rgba(232, 240, 244, 0.1);
  --text: #e8f0f4;
  --muted: #8a9aa6;
  --glass: #7ec8d8;
  --glass-dim: rgba(126, 200, 216, 0.18);
  --glass-deep: #3a8fa0;
  --court: #c4a574;
  --ink: #041014;
  --nav-bg: rgba(12, 14, 16, 0.72);
  --nav-bg-strong: rgba(12, 14, 16, 0.9);
  --drawer-bg: rgba(12, 14, 16, 0.96);
  --hero-scrim: linear-gradient(180deg, rgba(12, 14, 16, 0.55) 0%, rgba(12, 14, 16, 0.25) 40%, rgba(12, 14, 16, 0.88) 100%),
    radial-gradient(ellipse 80% 50% at 70% 30%, rgba(126, 200, 216, 0.12), transparent 55%);
  --media-fade: linear-gradient(transparent, rgba(12, 14, 16, 0.55));
  --dot-border: rgba(232, 240, 244, 0.45);
  --product-hover: rgba(126, 200, 216, 0.03);
  --logo-filter: none;
  --font-display: "Barlow Condensed", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1120px;
  --nav-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light scheme — cool court glass on paper */
html[data-theme="light"] {
  --bg: #f2f5f7;
  --bg-elev: #ffffff;
  --bg-panel: #e8eef1;
  --line: rgba(18, 32, 40, 0.1);
  --text: #152028;
  --muted: #5c6d78;
  --glass: #1f8fa3;
  --glass-dim: rgba(31, 143, 163, 0.12);
  --glass-deep: #167a8c;
  --court: #9a7a4a;
  --ink: #ffffff;
  --nav-bg: rgba(242, 245, 247, 0.78);
  --nav-bg-strong: rgba(255, 255, 255, 0.92);
  --drawer-bg: rgba(255, 255, 255, 0.98);
  --hero-scrim: linear-gradient(180deg, rgba(242, 245, 247, 0.35) 0%, rgba(18, 32, 40, 0.2) 38%, rgba(18, 32, 40, 0.78) 100%),
    radial-gradient(ellipse 80% 50% at 70% 30%, rgba(31, 143, 163, 0.18), transparent 55%);
  --media-fade: linear-gradient(transparent, rgba(242, 245, 247, 0.55));
  --dot-border: rgba(255, 255, 255, 0.65);
  --product-hover: rgba(31, 143, 163, 0.04);
  --logo-filter: brightness(0) saturate(100%);
  color-scheme: light;
}

:root {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--glass);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* —— Nav —— */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: var(--nav-bg-strong);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.nav-brand img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: var(--logo-filter);
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.nav-brand-text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-brand-text span {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: none;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--glass);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav.is-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.is-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav.is-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--glass);
  color: var(--glass);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

.nav-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 auto;
  background: var(--drawer-bg);
  border-bottom: 1px solid var(--line);
  padding: 1rem var(--pad) 1.5rem;
  z-index: 49;
}

.nav.is-open + .nav-drawer {
  display: block;
}

.nav-drawer a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 1.05rem;
}

@media (min-width: 880px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle,
  .nav-drawer {
    display: none !important;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 2rem) var(--pad) clamp(3rem, 8vh, 5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s var(--ease), transform 6s linear;
  will-change: opacity, transform;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-scrim);
  pointer-events: none;
}

html[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] .nav.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 var(--line);
}

html[data-theme="light"] .nav-drawer {
  box-shadow: 0 12px 28px rgba(18, 32, 40, 0.08);
}

html[data-theme="light"] .hero-brand,
html[data-theme="light"] .hero-title {
  color: #fff;
  text-shadow: 0 1px 18px rgba(12, 14, 16, 0.35);
}

html[data-theme="light"] .hero-brand em,
html[data-theme="light"] .hero-lead {
  color: rgba(232, 240, 244, 0.88);
}

html[data-theme="light"] .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

html[data-theme="light"] .btn-ghost:hover,
html[data-theme="light"] .btn-ghost:focus-visible {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero-content {
  max-width: 40rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.15s forwards;
}

.hero-brand em {
  font-style: normal;
  color: var(--glass);
  display: block;
  font-weight: 500;
  font-size: 0.38em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.45rem;
  color: var(--muted);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.45rem, 3.8vw, 2.15rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 1.1rem 0 0.65rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.35s forwards;
}

.hero-lead {
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  max-width: 28rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.5s forwards;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.65s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--glass);
  color: var(--ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #a5dde8;
  color: #041014;
}

html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .btn-primary:focus-visible {
  background: #167a8c;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--glass);
  color: var(--glass);
}

.hero-dots {
  position: absolute;
  right: var(--pad);
  bottom: clamp(2rem, 6vh, 4rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--dot-border);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}

.hero-dots button.is-active {
  background: var(--glass);
  border-color: var(--glass);
  transform: scale(1.15);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Sections —— */
.section {
  padding: clamp(3.5rem, 9vw, 6.5rem) var(--pad);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-kicker {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--glass);
  margin-bottom: 0.55rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.section-lead {
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.02rem;
}

/* Feature */
.feature {
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 100%);
}

.feature-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }
}

.feature-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-panel);
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.feature-media:hover img {
  transform: scale(1.03);
}

.feature-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: var(--media-fade);
  pointer-events: none;
}

.feature-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.feature-list .num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--glass);
  line-height: 1;
  padding-top: 0.15rem;
}

.feature-list p {
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-list strong {
  display: block;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

/* Products — editorial rows, not card stack */
.products {
  background: var(--bg);
}

.product-list {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.product {
  display: grid;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  transition: background 0.25s;
}

.product:hover {
  background: var(--product-hover);
}

@media (min-width: 720px) {
  .product {
    grid-template-columns: 120px 1fr;
    gap: 1.75rem;
    padding: 2rem 0.5rem;
  }
}

.product-thumb {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: var(--bg-panel);
}

.product h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.product .tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--court);
  margin-bottom: 0.55rem;
}

.product p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 42rem;
}

/* Services */
.services {
  background:
    radial-gradient(ellipse 70% 60% at 10% 0%, var(--glass-dim), transparent 50%),
    var(--bg-elev);
}

.service-grid {
  margin-top: 2.25rem;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service {
  background: var(--bg-elev);
  padding: 1.75rem 1.4rem 2rem;
  transition: background 0.25s;
}

.service:hover {
  background: var(--bg-panel);
}

.service-index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--glass-deep);
  margin-bottom: 1rem;
}

.service h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.65rem;
}

.service p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Contact */
.contact {
  background: var(--bg);
}

.contact-panel {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 700px) {
  .contact-panel {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.contact-item dt {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-item dd {
  font-size: 1.15rem;
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--glass);
}

.contact-note {
  color: var(--muted);
  font-size: 0.95rem;
  align-self: end;
}

/* Footer */
.footer {
  padding: 1.5rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-brand,
  .hero-title,
  .hero-lead,
  .hero-cta,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .hero-slide {
    transition: opacity 0.4s;
    transform: none !important;
  }
}
