/* ============================================================
   CHALK & FIRE — AI GYM Trainer
   style.css  |  Theme: White + Black + Red
   ============================================================ */

/* ── TOKENS ── */
:root {
  --bg:          #ffffff;
  --bg-off:      #f7f7f5;
  --bg-dark:     #111111;
  --surface:     #f2f2f0;
  --surface-dark:#1a1a1a;
  --border:      rgba(0,0,0,0.08);
  --border-dark: rgba(0,0,0,0.15);

  --red:         #ff3d00;
  --red-dim:     #cc3100;
  --red-light:   #fff0ec;
  --red-glow:    rgba(255,61,0,0.12);
  --red-glow-sm: rgba(255,61,0,0.08);

  --text:        #111111;
  --text-inv:    #ffffff;
  --muted:       #888888;
  --muted-light: #bbbbbb;

  --font-display: 'Instrument Serif', serif;
  --font-body:    'Ubuntu', sans-serif;

  --radius:   0px;
  --max-w:    1200px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ── GRID OVERLAY ── */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 40%, transparent 100%);
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--text);
}
.logo-bracket { color: var(--red); }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }

/* ── HERO ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
  background: var(--bg);
}

/* Red glow blob top */
.hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--red-glow) 0%, transparent 70%);
  top: 0; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  animation: blob-drift 8s ease-in-out infinite alternate;
}

/* Subtle noise texture overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

@keyframes blob-drift {
  from { transform: translateX(-50%) scale(1);   opacity: 0.5; }
  to   { transform: translateX(-50%) scale(1.15) translateY(-16px); opacity: 1; }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--red);
  border: 1px solid rgba(255,61,0,0.25);
  background: var(--red-light);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 40px;
  animation: fade-up 0.8s ease both;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.hero-title {
  font-family: var(--font-display);
  line-height: 0.88;
  letter-spacing: 0.01em;
  animation: fade-up 0.8s 0.1s ease both;
}
.line-one {
  display: block;
  font-size: clamp(56px, 8vw, 96px);
  color: var(--muted-light);
  font-style: italic;
}
.line-two {
  display: block;
  font-size: clamp(80px, 16vw, 200px);
  color: var(--text);
  min-width: 600px;
  position: relative;
}
/* Red underline accent on title */
.line-two::after {
  content: '';
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 4px;
  background: var(--red);
}

.hero-sub {
  max-width: 520px;
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
  margin-top: 32px;
  line-height: 1.8;
  animation: fade-up 0.8s 0.2s ease both;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  animation: fade-up 0.8s 0.3s ease both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s;
  box-shadow: 0 0 0 0 var(--red-glow);
}
.btn-primary:hover {
  background: var(--red-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--red-glow), 0 2px 8px rgba(255,61,0,0.2);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--border-dark);
  padding: 14px 24px;
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text);
  background: rgba(0,0,0,0.03);
}

/* ── METRICS STRIP ── */
.metrics-strip {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 72px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fade-up 0.8s 0.5s ease both;
  background: var(--bg);
  box-shadow: 0 2px 24px rgba(0,0,0,0.05);
}
.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 36px;
  gap: 4px;
  background: var(--bg);
  transition: background 0.2s;
}
.metric:hover { background: var(--red-light); }
.metric-val {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  color: var(--text);
}
.unit {
  font-size: 18px;
  color: var(--red);
}
.metric-label {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.metric-divider {
  width: 1px;
  height: 60px;
  background: var(--border-dark);
  flex-shrink: 0;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── VISUALS SECTION ── */
.visuals {
  position: relative;
  z-index: 1;
  padding: 120px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header { margin-bottom: 64px; }
.section-tag {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--red);
  display: block;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--text);
}
.section-title em {
  font-style: italic;
  color: var(--red);
  -webkit-text-fill-color: var(--red);
  background: none;
  background-clip: unset;
  -webkit-background-clip: unset;
}
.center-header { text-align: center; }
.section-desc {
  max-width: 480px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

/* ── CARD GRID ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 50px;
}

.img-card {
  position: relative;
  border-radius: var(--radius);
  cursor: default;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.img-card:hover { transform: translateY(-6px) rotate(0deg) !important; }

.card-tilt-left  { transform: rotate(-2.5deg); animation: float1 6s ease-in-out infinite; }
.card-center     { transform: rotate(0deg) translateY(-10px); animation: float2 7s ease-in-out infinite; }
.card-tilt-right { transform: rotate(2.5deg); animation: float3 5.5s ease-in-out infinite; }

@keyframes float1 {
  0%,100% { transform: rotate(-2.5deg) translateY(0); }
  50%     { transform: rotate(-2.5deg) translateY(-12px); }
}
@keyframes float2 {
  0%,100% { transform: rotate(0deg) translateY(-10px); }
  50%     { transform: rotate(0deg) translateY(-22px); }
}
@keyframes float3 {
  0%,100% { transform: rotate(2.5deg) translateY(0); }
  50%     { transform: rotate(2.5deg) translateY(-10px); }
}
@keyframes float4 {
  0%,100% { transform: rotate(-2.5deg) translateY(0); }
  50%     { transform: rotate(-2.5deg) translateY(-12px); }
}
@keyframes float5 {
  0%,100% { transform: rotate(0deg) translateY(-10px); }
  50%     { transform: rotate(0deg) translateY(-22px); }
}
@keyframes float6 {
  0%,100% { transform: rotate(2.5deg) translateY(0); }
  50%     { transform: rotate(2.5deg) translateY(-10px); }
}

.card-inner {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.img-card:hover .card-inner {
  border-color: rgba(255,61,0,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,61,0,0.15);
}

.card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--surface);
}
.card-img-wrap.img-placeholder::after {
  content: 'IMAGE PLACEHOLDER';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #ccc;
}
.img-placeholder {
  background-image:
    repeating-linear-gradient(45deg, #ebebeb 0, #ebebeb 1px, transparent 0, transparent 50%),
    repeating-linear-gradient(-45deg, #ebebeb 0, #ebebeb 1px, transparent 0, transparent 50%);
  background-size: 20px 20px;
  background-color: #f5f5f5;
}

/* Red scan line on cards */
.card-scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.6;
  animation: scan 3s linear infinite;
  top: 0;
}
@keyframes scan {
  from { top: 0; opacity: 0.6; }
  to   { top: 100%; opacity: 0; }
}

/* Corner brackets — red on hover */
.card-corner {
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--red);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.3s;
}
.img-card:hover .card-corner { opacity: 0.7; }
.card-corner.tl { top: 8px; left: 8px;  border-width: 1px 0 0 1px; }
.card-corner.tr { top: 8px; right: 8px; border-width: 1px 1px 0 0; }
.card-corner.bl { bottom: 8px; left: 8px;  border-width: 0 0 1px 1px; }
.card-corner.br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

/* ── DEMO SECTION ── */
.demo {
  position: relative;
  z-index: 1;
  padding: 120px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Dark band behind demo for contrast */
.demo {
  background: var(--bg);
}

.video-wrapper {
  position: relative;
  margin-top: 56px;
}
.video-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--red-glow-sm), transparent 70%);
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite alternate;
}
@keyframes glow-pulse {
  from { opacity: 0.4; transform: scale(0.95); }
  to   { opacity: 1;   transform: scale(1.05); }
}

.video-container {
  position: relative;
  border-radius: 0px;
  border: 1px solid rgba(255,61,0,0.25);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.5);
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-container video,
.video-container iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  border: none;
  display: block;
}
.video-corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--red);
  border-style: solid;
  z-index: 2;
}
.video-corner.tl { top: 12px; left: 12px;  border-width: 2px 0 0 2px; }
.video-corner.tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; }
.video-corner.bl { bottom: 12px; left: 12px;  border-width: 0 0 2px 2px; }
.video-corner.br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; }

.video-status {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--red);
  z-index: 2;
}
.pulse-dot {
  animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,61,0,0.6); }
  50%     { box-shadow: 0 0 0 6px rgba(255,61,0,0); }
}

/* ── FEATURE ROW ── */
.feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 40px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border-dark);
}
.feature {
  background: var(--bg);
  padding: 28px 24px;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature:hover { background: var(--red-light); }
.feature-icon {
  font-size: 32px;
  color: var(--red);
  line-height: 1;
}
.feature strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

/* ── CONTACT SECTION ── */
.contact {
  position: relative;
  z-index: 1;
  padding: 120px 48px 60px;
  border-top: 1px solid var(--border-dark);
  text-align: center;
  background: var(--bg-dark);
  color: var(--text-inv);
}
.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 40% at 50% 0%, rgba(255,61,0,0.1), transparent 70%);
  pointer-events: none;
}
/* Override section tag color inside dark contact */
.contact .section-tag { color: var(--red); }

.contact-inner {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 16px 0 20px;
  color: var(--text-inv);
}
.contact-title em {
  font-style: italic;
  color: var(--red);
  background: none;
  -webkit-text-fill-color: var(--red);
  background-clip: unset;
  -webkit-background-clip: unset;
}
.contact-desc {
  font-size: 15px;
  color: #888;
  line-height: 1.8;
  margin-bottom: 52px;
}

/* ── SOCIAL BUTTONS (on dark bg) ── */
.social-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  color: #888;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.social-btn:hover {
  color: var(--text-inv);
  border-color: rgba(255,61,0,0.5);
  background: rgba(255,61,0,0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255,61,0,0.15);
}
.social-icon {
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.social-btn:hover .social-icon { opacity: 1; }
.social-label { opacity: 0.7; }

/* ── FOOTER ── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 12px;
  color: #444;
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .nav { padding: 16px 24px; }
  .nav-links { gap: 20px; }
  .visuals, .demo { padding: 80px 24px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .feature-row { grid-template-columns: repeat(2, 1fr); }
  .metrics-strip { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 100px 20px 60px; }
  .line-two { min-width: unset; }
  .hero-cta-row { flex-direction: column; }
  .metrics-strip { flex-direction: column; gap: 0; }
  .metric-divider { width: 60px; height: 1px; }
  .card-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .contact { padding: 80px 24px 40px; }
  .footer { flex-direction: column; gap: 8px; text-align: center; }
  .video-container { min-height: 300px; }
  .video-container video,
  .video-container iframe { min-height: 300px; }
}