/* ============================================================
   TICK PING GO — Marketing Website
   Aesthetic: Precision Industrial — sport-tech, engineered
   Fonts: Syne (headings) + DM Sans (body) + Space Mono (accents)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=Space+Mono:wght@400;700&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark:    #0A0A0F;
  --dark2:   #111118;
  --accent:  #00B4D8;
  --accent2: #0096B8;
  --light:   #FFFFFF;
  --alt:     #F5F7F9;
  --text:    #1A1A24;
  --muted:   #6B7280;
  --footer:  #07070B;
  --border:  rgba(255,255,255,0.08);
  --placeholder: #D4D8DE;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --max-w: 1100px;
  --section-pad: 96px 24px;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── Typography ───────────────────────────────────────────── */
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--light);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2.on-dark { color: var(--light); }

p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--muted);
}

p.on-dark { color: rgba(255,255,255,0.65); }

.label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.8; }

.nav-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.nav-logo .wordmark {
  display: flex;
  align-items: baseline;
  gap: 0;
}
.nav-logo .tick  { color: var(--accent); }
.nav-logo .space { color: rgba(255,255,255,0.25); font-size: 0.85em; margin: 0 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--dark);
  padding: 10px 20px;
  font-weight: 600;
}
.btn-primary:hover {
  background: #29c6e6;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,180,216,0.35);
}

.btn-hero {
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
}

/* Apple-style badge look */
.btn-store {
  background: var(--light);
  color: var(--dark);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.8125rem;
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-store:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.btn-store .store-icon { font-size: 1.1rem; }

.appstore-link {
  display: inline-block;
  transition: opacity 0.18s, transform 0.18s;
}
.appstore-link:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
.appstore-link img { display: block; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: var(--dark);
  position: relative;
  overflow: hidden;
  padding: 80px 24px 100px;
}

/* Subtle noise grain overlay */
.hero::before {
  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.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* Radial glow */
.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,180,216,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-image-wrap {
  display: flex;
  justify-content: center;
}

.hero-image-wrap img,
.hero-placeholder {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9/19;
  border-radius: 32px;
  object-fit: cover;
}

.hero-placeholder {
  background: linear-gradient(145deg, #1c1c2a, #0f1520);
  border: 1px solid rgba(0,180,216,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow:
    0 0 0 1px rgba(0,180,216,0.08),
    0 32px 80px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.hero-placeholder .ph-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0,180,216,0.15);
  border: 1px solid rgba(0,180,216,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.hero-placeholder .ph-text {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: rgba(0,180,216,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 440px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Feature Sections ─────────────────────────────────────── */
.feature {
  padding: var(--section-pad);
}

.feature:nth-child(odd)  { background: var(--light); }
.feature:nth-child(even) { background: var(--alt); }

.feature-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

/* Even features: image on right (reverse order) */
.feature:nth-child(even) .feature-inner {
  direction: rtl;
}
.feature:nth-child(even) .feature-inner > * {
  direction: ltr;
}

.feature-image-wrap {
  display: flex;
  justify-content: center;
}

.feature-img,
.feature-placeholder {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9/19;
  border-radius: 28px;
  object-fit: cover;
}

.feature-placeholder {
  background: linear-gradient(145deg, #e8ecf0, #d8dde4);
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 20px 60px rgba(0,0,0,0.08);
}

.feature-placeholder .ph-icon {
  font-size: 2rem;
  opacity: 0.35;
}

.feature-placeholder .ph-text {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 16px;
}

/* ── Feature 3: Dual Image (Portrait + Landscape overlay) ─── */
.feature-dual-image {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 540px;
  flex-shrink: 0;
}

/* Override default feature-placeholder sizing for dual-image children */
.feature-dual-image .feature-portrait,
.feature-dual-image .feature-landscape {
  position: absolute;
  width: 200px;
  max-width: 200px;
  aspect-ratio: 9/19;
  border-radius: 24px;
}

/* Portrait phone: back layer, top-left of wrapper */
.feature-dual-image .feature-portrait {
  top: 0;
  left: 20px;
  z-index: 1;
}

/* Landscape phone: front layer, rotated -90° so it appears as a phone on its side */
/* CSS box: 200w × ~422h. After rotate(-90°): visual 422w × 200h              */
/* Positioned so the visual overlaps the lower-right portion of the portrait    */
.feature-dual-image .feature-landscape {
  top: 200px;
  left: 50px;
  z-index: 2;
  transform: rotate(-90deg);
  transform-origin: center center;
  box-shadow:
    0 16px 48px rgba(0,0,0,0.20),
    0 4px 12px rgba(0,0,0,0.12),
    0 0 0 1px rgba(0,0,0,0.04);
}

/* Counter-rotate children so placeholder text/icon remain readable */
.feature-dual-image .feature-landscape > * {
  transform: rotate(90deg);
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-number {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.feature-text h2 {
  margin-top: 4px;
}

.feature-text p {
  max-width: 440px;
}

/* ── Divider ──────────────────────────────────────────────── */
.section-divider {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.07), transparent);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--footer);
  padding: 56px 24px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,180,216,0.3), transparent);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.footer-logo img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.18s;
}
.footer-links a:hover { color: var(--accent); }

.footer-divider {
  color: rgba(255,255,255,0.12);
  font-size: 0.75rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.25);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* ── Legal Pages ──────────────────────────────────────────── */
.legal-hero {
  background: var(--dark);
  padding: 64px 24px 56px;
  position: relative;
  overflow: hidden;
}

.legal-hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,180,216,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.legal-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.legal-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.4);
  font-size: 0.875rem;
  margin-bottom: 24px;
  transition: color 0.18s;
}
.legal-hero .back-link:hover { color: var(--accent); }
.legal-hero .back-link .arrow { font-size: 1rem; }

.legal-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.legal-hero .updated {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
}

.legal-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.legal-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 40px 0 12px;
  color: var(--text);
}

.legal-body h2:first-child { margin-top: 0; }

.legal-body p {
  color: #4B5563;
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.legal-body ul li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: #4B5563;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.legal-body ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8em;
}

.legal-body a {
  color: var(--accent2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body a:hover { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-pad: 64px 20px; }

  .hero { padding: 56px 20px 72px; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-text { align-items: center; }
  .hero-sub  { max-width: 100%; }

  .hero-eyebrow { justify-content: center; }

  .hero-image-wrap { order: -1; }
  .hero-image-wrap img,
  .hero-placeholder { max-width: 240px; }

  .feature-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .feature:nth-child(even) .feature-inner {
    direction: ltr;
  }

  .feature-text p  { max-width: 100%; }
  .feature-text    { align-items: center; }

  .feature-image-wrap { justify-content: center; }
  .feature-img,
  .feature-placeholder { max-width: 240px; }

  .footer-links { gap: 20px; }

  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }

  /* Dual-image: compact layout on mobile */
  .feature-dual-image {
    height: 460px;
    max-width: 280px;
  }
  .feature-dual-image .feature-portrait {
    width: 170px;
    max-width: 170px;
    left: 10px;
  }
  .feature-dual-image .feature-landscape {
    width: 170px;
    max-width: 170px;
    top: 170px;
    left: 40px;
  }
}

@media (max-width: 480px) {
  .nav-logo .wordmark span:not(.tick) { font-size: 0.9rem; }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-hero {
    text-align: center;
    justify-content: center;
  }
}

/* ── Fade-in on scroll (CSS only, no JS needed) ───────────── */
@media (prefers-reduced-motion: no-preference) {
  .feature-inner {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.6s ease forwards;
  }

  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }

  /* Stagger each feature */
  .feature:nth-child(1) .feature-inner { animation-delay: 0.05s; }
  .feature:nth-child(2) .feature-inner { animation-delay: 0.1s; }
  .feature:nth-child(3) .feature-inner { animation-delay: 0.15s; }
  .feature:nth-child(4) .feature-inner { animation-delay: 0.2s; }
  .feature:nth-child(5) .feature-inner { animation-delay: 0.25s; }
}
