/* ========================================
   TiiHub Marketing Site — style.css
   ======================================== */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0A0A0A;
  --bg-secondary: #141414;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.06);

  --text-primary: #F5F5F5;
  --text-secondary: #A0A0A0;
  --text-tertiary: #666;

  --brand-start: #6ECFB8;
  --brand-end: #1AAB8A;
  --brand-gradient: linear-gradient(135deg, var(--brand-start), var(--brand-end));

  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);

  --nav-height: 72px;
  --section-padding: 120px;
  --container-max: 1200px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-padding) 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  white-space: nowrap;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 171, 138, 0.35);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-white {
  background: #fff;
  color: #1AAB8A;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links .nav-cta {
  padding: 8px 20px;
  border-radius: 100px;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-links .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(26, 171, 138, 0.3);
}

/* Mobile menu button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(110, 207, 184, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-logo {
  width: 140px;
  height: 140px;
  margin: 0 auto 48px;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(26, 171, 138, 0.2));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-start);
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 16px;
  line-height: 1.7;
}

/* --- Features Grid --- */
.features {
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(110, 207, 184, 0.15);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
  stroke: #fff;
  fill: none;
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Platform Showcase --- */
.platform-panel {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-bottom: 100px;
}

.platform-panel:last-child {
  margin-bottom: 0;
}

.platform-panel.reversed {
  flex-direction: row-reverse;
}

.platform-info {
  flex: 1;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-start);
  margin-bottom: 24px;
}

.platform-info h2 {
  margin-bottom: 16px;
}

.platform-info > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Device mockup */
.platform-visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

.device-frame {
  position: relative;
  border-radius: var(--radius-xl);
  border: 2px solid var(--border-subtle);
  background: var(--bg-secondary);
  overflow: hidden;
}

.device-frame.phone {
  width: 280px;
  height: 560px;
  border-radius: 40px;
}

.device-frame.vision {
  width: 480px;
  height: 300px;
  border-radius: 36px;
}

.device-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.device-placeholder svg {
  width: 40px;
  height: 40px;
  opacity: 0.4;
}

/* --- CTA Band --- */
.cta-band {
  background: var(--brand-gradient);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
  opacity: 0.9;
  filter: brightness(10);
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-brand span {
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-about p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-in:nth-child(2) { transition-delay: 0.08s; }
.stagger > .fade-in:nth-child(3) { transition-delay: 0.16s; }
.stagger > .fade-in:nth-child(4) { transition-delay: 0.24s; }
.stagger > .fade-in:nth-child(5) { transition-delay: 0.32s; }
.stagger > .fade-in:nth-child(6) { transition-delay: 0.40s; }
.stagger > .fade-in:nth-child(7) { transition-delay: 0.48s; }
.stagger > .fade-in:nth-child(8) { transition-delay: 0.56s; }

/* --- Mobile Menu --- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--text-primary);
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2rem;
  color: var(--text-primary);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .platform-panel,
  .platform-panel.reversed {
    flex-direction: column;
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
    --nav-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-logo {
    width: 110px;
    height: 110px;
    margin-bottom: 36px;
  }

  .hero-subtitle {
    margin-bottom: 36px;
  }

  .features-grid {
    gap: 16px;
  }

  .feature-card {
    padding: 28px 22px;
  }

  .device-frame.vision {
    width: 340px;
    height: 210px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-about {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  :root {
    --section-padding: 64px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons,
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .device-frame.phone {
    width: 240px;
    height: 480px;
  }

  .device-frame.vision {
    width: 300px;
    height: 186px;
  }
}
