/* ============================================================
   assets/css/public.css — H-POOL public site styles
   (nav from header + home panel sections + footer)
   ============================================================ */

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-name {
  font-family: var(--font-serif);
  color: var(--text);
}

/* Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  padding: 9px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 20px 20px;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .nav-links a.active::after { display: none; }
  .nav-actions {
    margin-top: 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-actions .btn { width: 100%; }
  .site-header.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(56px, 10vw, 112px) 0 clamp(48px, 8vw, 88px);
  background:
    radial-gradient(ellipse 60% 55% at 85% 0%, rgba(122,31,43,0.28), transparent 70%),
    radial-gradient(ellipse 50% 50% at 0% 100%, rgba(59,130,246,0.08), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0c2c9;
  background: rgba(122,31,43,0.18);
  border: 1px solid rgba(122,31,43,0.45);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.h1-accent { color: var(--brand-hover); }

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-note {
  font-size: 0.875rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-note::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-hover);
}

/* ============================================================
   HERO ART — pool animation + status card
   ============================================================ */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pool-scene {
  position: relative;
  width: min(100%, 420px);
  height: auto;
  aspect-ratio: 420 / 300;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -24px rgba(0,0,0,0.8),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  transform: perspective(1000px) rotateY(-6deg) rotateX(4deg);
  transition: transform .4s ease;
}
.hero-art:hover .pool-scene {
  transform: perspective(1000px) rotateY(-2deg) rotateX(2deg);
}
.pool-svg { width: 100%; height: 100%; display: block; }

/* --- Cue ball: shoots into the rack --- */
.cue-ball {
  animation: cueShot 6s infinite cubic-bezier(.55,.05,.35,1);
}
@keyframes cueShot {
  0%,   18%  { transform: translate(0px, 0px); }
  28%        { transform: translate(4px, -2px); }
  55%, 100%  { transform: translate(200px, -50px); }
}

/* --- Cue stick: pulls back, strikes, retreats --- */
.cue-stick {
  transform: rotate(-32deg);
  transform-origin: 150px 205px;
  animation: cueStrike 6s infinite cubic-bezier(.55,.05,.35,1);
}
@keyframes cueStrike {
  0%,   18%  { transform: rotate(-32deg) translateX(0);     opacity: 1;   }
  24%        { transform: rotate(-32deg) translateX(-14px); opacity: 1;   }
  30%        { transform: rotate(-32deg) translateX(2px);   opacity: 1;   }
  55%, 100%  { transform: rotate(-32deg) translateX(-30px); opacity: 0.35;}
}

/* --- Status card floats over the table --- */
.preview-card {
  position: absolute;
  right: -8px;
  bottom: -16px;
  width: 260px;
  background: rgba(23, 26, 33, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 24px 48px -16px rgba(0,0,0,0.75);
  animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-live {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.preview-list { display: grid; gap: 8px; margin-bottom: 12px; }
.preview-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding: 6px 10px;
  background: rgba(30, 34, 43, 0.7);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill-available { background: rgba(34,197,94,0.15); color: var(--accent); }
.pill-busy      { background: rgba(122,31,43,0.22); color: #e58b96; }

.preview-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.preview-foot strong { color: var(--text); font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  .cue-ball, .cue-stick, .preview-card, .dot-live { animation: none; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }

.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto clamp(36px, 6vw, 64px);
}
.section-head h2 {
  font-family: var(--font-serif);
  margin-bottom: 12px;
}
.section-head p  { font-size: clamp(0.98rem, 1.4vw, 1.08rem); }

/* ============================================================
   FEATURES
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}
.feature-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(22px, 3vw, 32px);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover {
  border-color: rgba(122,31,43,0.55);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.7);
}
.feature-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(122,31,43,0.28), rgba(122,31,43,0.08));
  border: 1px solid rgba(122,31,43,0.35);
  color: #f0c2c9;
  margin-bottom: 18px;
}
.feature-card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.feature-card p  { font-size: 0.94rem; }

/* ============================================================
   STEPS
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}
.step {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 32px);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #4d121a);
  color: #fff;
  font-weight: 800;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px -6px rgba(122,31,43,0.7);
}
.step h3 { margin-bottom: 6px; font-size: 1.05rem; }
.step p  { font-size: 0.94rem; }

/* ============================================================
   PRICING STRIP
   ============================================================ */
.pricing-strip {
  background:
    radial-gradient(ellipse 60% 100% at 100% 50%, rgba(122,31,43,0.22), transparent 70%),
    var(--surface);
  border-block: 1px solid var(--border);
}
.pricing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.pricing-copy h2 { font-family: var(--font-serif); margin-bottom: 6px; }
.pricing-amount { display: flex; align-items: baseline; gap: 10px; }
.pricing-pct {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--brand-hover);
  line-height: 1;
}
.pricing-label { color: var(--text-dim); font-size: 0.95rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { max-width: 280px; font-size: 0.92rem; }
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a {
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { order: -1; flex-direction: column; }
  .pool-scene {
    transform: none;
    width: min(100%, 380px);
  }
  .preview-card {
    position: static;
    margin: 14px auto 0;
    width: min(340px, 100%);
    animation: none;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .hero-actions .btn { width: 100%; }
  .hero { padding: 44px 0 40px; }
  .section { padding: 48px 0; }
  .pricing-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .pricing-amount { justify-content: center; }
  .pricing-cta { width: 100%; }
  .preview-card { padding: 14px; }
  .preview-list li { font-size: 0.78rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (min-width: 1280px) {
  .hero-inner { gap: 96px; }
  .pool-scene { width: min(100%, 460px); }
}