/* Calories X-Track — Promo Website Styles */
/* Design: Tech/Gaming Dark Theme with App-Extracted Palette */

:root {
  --color-primary: #2196F3;
  --color-primary-dark: #1565C0;
  --color-secondary: #1976D2;
  --color-light-blue: #00B0FF;
  --color-cyan: #00E5FF;
  --color-green: #4CAF50;
  --color-error: #EF0D00;
  --color-bg: #0A1628;
  --color-bg-lighter: #0D1E34;
  --color-surface: #0F2035;
  --color-surface-medium: #152A45;
  --color-border: #1E3A5F;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #8EACC8;
  --color-text-muted: #5A7A96;
  --gradient-btn: linear-gradient(177deg, #2196F3 8%, #1565C0 88%);
  --gradient-hero: linear-gradient(160deg, #0A1628 0%, #0F2035 50%, #0A1628 100%);
  --gradient-card: linear-gradient(164deg, #0A1628 8%, #0F2035 88%);
  --border-radius: 20px;
  --border-radius-lg: 28px;
  --border-radius-pill: 50px;
  --font-family: 'Montserrat', sans-serif;
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(33,150,243,0.15);
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-light-blue); }

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

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.nav-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-btn);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius-pill);
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-primary);
  background: var(--color-surface-medium);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* ===== LAYOUT ===== */
.page-content { padding-top: 64px; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

/* ===== HERO ===== */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(33,150,243,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,176,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content { max-width: 520px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface-medium);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-pill);
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--color-light-blue);
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #FFFFFF 0%, #8EACC8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-light-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

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

.hero-device {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Device Mockup */
.device-mockup {
  position: relative;
  max-width: 280px;
  width: 100%;
}

.device-frame {
  position: relative;
  background: #1a1a2e;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(33,150,243,0.1);
  border: 2px solid var(--color-border);
}

.device-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: var(--color-surface-medium);
  border-radius: 10px;
  z-index: 2;
}

.device-frame img {
  border-radius: 24px;
  width: 100%;
  display: block;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--border-radius-pill);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  line-height: 1.2;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 20px rgba(33,150,243,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(33,150,243,0.4);
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface-medium);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
  transform: translateY(-2px);
  color: var(--color-text-primary);
}

.btn-icon { font-size: 1.2rem; }

/* ===== FEATURES ===== */
.features-section {
  background: var(--color-bg);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 60px;
}

.feature-row:last-child { margin-bottom: 0; }

.feature-row.reverse { flex-direction: row-reverse; }

.feature-icon-box {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-glow);
}

.feature-text { flex: 1; text-align: left; }

.feature-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-text p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 32px 24px;
  text-align: left;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(33,150,243,0.3);
}

.feature-card .card-icon {
  width: 56px;
  height: 56px;
  background: var(--color-surface-medium);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

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

/* ===== SCREENSHOTS CAROUSEL ===== */
.screenshots-section {
  background: var(--color-bg-lighter);
  padding: 80px 0;
  overflow: hidden;
}

.carousel-wrapper {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  height: 420px;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-slide img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 20px;
  cursor: pointer;
  filter: blur(5px);
  transition: filter 0.4s ease;
}

.carousel-slide img.loaded {
  filter: blur(0);
}

.carousel-device {
  position: relative;
  max-width: 240px;
  margin: 0 auto;
}

.carousel-device-frame {
  background: #111827;
  border-radius: 28px;
  padding: 10px;
  border: 2px solid var(--color-border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.carousel-device-frame::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 5px;
  background: var(--color-surface-medium);
  border-radius: 10px;
  z-index: 2;
}

.carousel-device-frame img {
  border-radius: 18px;
  width: 100%;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface-medium);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.carousel-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-surface-medium);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s;
}

.carousel-dot.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(33,150,243,0.5);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--gradient-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 24px;
}

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

.footer-brand h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

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

/* ===== LEGAL PAGES (Privacy, Terms) ===== */
.legal-page {
  padding: 40px 0 80px;
}

.legal-page .container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal-date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.legal-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page li {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  text-align: left;
}

.legal-page ul {
  list-style: disc;
  padding-left: 24px;
  margin: 12px 0;
}

.legal-page li { margin-bottom: 6px; }

.legal-page a { color: var(--color-light-blue); }
.legal-page a:hover { text-decoration: underline; }

/* ===== CONTACT PAGE ===== */
.contact-section {
  padding: 40px 0 80px;
  min-height: calc(100vh - 64px - 96px);
  display: flex;
  align-items: center;
}

.contact-section > .container { width: 100%; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 32px;
  text-align: left;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  background: var(--color-surface-medium);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-detail-text {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.contact-detail-text strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.contact-form-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  text-align: left;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--color-surface-medium);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 14px 18px;
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--color-text-primary);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(33,150,243,0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input[type="file"] {
  padding: 10px 18px;
  cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 6px 16px;
  font-family: var(--font-family);
  font-size: 0.8rem;
  cursor: pointer;
  margin-right: 12px;
  transition: all 0.2s;
}

.form-group input[type="file"]::file-selector-button:hover {
  background: var(--color-surface-medium);
}

.form-submit {
  width: 100%;
  padding: 16px;
}

.form-success {
  display: none;
  text-align: center;
  padding: 24px;
}

.form-success.active { display: block; }

.form-success .check-icon {
  width: 56px;
  height: 56px;
  background: rgba(76,175,80,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px;
}

.form-success h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* ===== PRIVACY ACCEPTANCE BUTTON ===== */
.privacy-accept-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  padding: 20px 24px 28px;
  background: linear-gradient(to top, var(--color-bg) 60%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.privacy-accept-btn.hidden { display: none; }

.accept-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 48px;
  background: var(--gradient-btn);
  color: #fff;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(33,150,243,0.4);
  transition: all 0.25s ease;
  min-width: 240px;
  text-align: center;
}

.accept-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(33,150,243,0.5);
}

/* ===== 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);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-content { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero h1 { font-size: 2.4rem; }
  .device-mockup { max-width: 220px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row,
  .feature-row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .feature-text { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, 0.98);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 24px;
    gap: 4px;
  }
  .nav-links.open a {
    display: block;
    padding: 12px 16px;
    width: 100%;
  }
  .nav-hamburger { display: block; }
  .hero { min-height: auto; padding: 60px 0; }
  .hero h1 { font-size: 2rem; }
  .hero-description { font-size: 0.95rem; }
  .features-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .section-header h2 { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .carousel-wrapper { height: 360px; }
  .carousel-track { height: 320px; }
  .carousel-device { max-width: 200px; }
  .contact-form-card { padding: 24px; }
  .legal-page h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; }
  .carousel-wrapper { height: 320px; }
  .carousel-track { height: 280px; }
  .carousel-device { max-width: 170px; }
}

/* Orientation change */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: auto; padding: 40px 0; }
  .hero h1 { font-size: 1.6rem; }
  .section { padding: 40px 0; }
  .carousel-wrapper { height: 260px; }
  .carousel-track { height: 230px; }
}
