<?php
require_once 'includes/config.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tutorial — <?= SITE_NAME ?></title>
<link rel="icon" type="image/png" href="https://studytrack.edurx.icu/studytrack/images/studytrack.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800;900&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080812;
  --bg2:       #0e0e1a;
  --bg3:       #14142a;
  --card:      #111120;
  --border:    rgba(255,255,255,.07);
  --border2:   rgba(255,255,255,.12);
  --ink:       #f0f0ff;
  --ink2:      #a0a0c8;
  --ink3:      #5a5a80;
  --accent:    #6366f1;
  --accent2:   #8b5cf6;
  --accent3:   #06b6d4;
  --glow:      rgba(99,102,241,.3);
  --success:   #10b981;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ── NAVBAR ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(8,8,18,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.3px;
  background: linear-gradient(135deg, #e0e7ff, #a5b4fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-logo img { width: 34px; height: 34px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.nav-btn-ghost {
  background: transparent;
  color: var(--ink2);
  border: 1px solid var(--border2);
}
.nav-btn-ghost:hover { color: var(--ink); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.05); }
.nav-btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}
.nav-btn-primary:hover { background: #5254d4; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.4); }

/* ── HERO ── */
.hero {
  position: relative;
  padding: 80px 40px 60px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 65%);
  top: -200px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid rgba(99,102,241,.35);
  background: rgba(99,102,241,.08);
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-badge span { width: 6px; height: 6px; border-radius: 50%; background: #6366f1; display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }

.hero-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
.hero-title .grad {
  background: linear-gradient(135deg, #818cf8, #c084fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--ink2);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 40px;
}

/* ── VIDEO SECTION ── */
.video-section {
  max-width: 900px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.video-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(99,102,241,.25);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 24px 80px rgba(99,102,241,.2);
  background: var(--bg2);
}
.video-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(139,92,246,.15), rgba(6,182,212,.2));
  z-index: 0;
  pointer-events: none;
}
.video-wrap iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}
.video-caption {
  text-align: center;
  margin-top: 16px;
  color: var(--ink3);
  font-size: 13px;
}

/* ── STEPS SECTION ── */
.steps-section {
  max-width: 960px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.section-label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 12px;
}
.section-title {
  text-align: center;
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--ink2);
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.step-card:hover {
  border-color: rgba(99,102,241,.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99,102,241,.15);
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity .25s;
}
.step-card:hover::before { opacity: 1; }
.step-num {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.25);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #818cf8;
  margin-bottom: 16px;
}
.step-icon {
  font-size: 22px;
  margin-bottom: 12px;
}
.step-title {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}
.step-desc {
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.65;
}

/* ── FEATURES SECTION ── */
.features-section {
  max-width: 960px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feature-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s, background .2s;
}
.feature-pill:hover { border-color: rgba(99,102,241,.35); background: rgba(99,102,241,.05); }
.feature-pill-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.feature-pill-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink2);
}

/* ── CTA SECTION ── */
.cta-section {
  max-width: 700px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.cta-box {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.08));
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.15), transparent 65%);
  top: -80px; right: -80px;
  pointer-events: none;
}
.cta-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}
.cta-sub {
  color: var(--ink2);
  margin-bottom: 32px;
  font-size: 15px;
}
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: all .2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: #5254d4; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,.4); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--ink2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: all .2s;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--ink); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); }

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  text-align: center;
  color: var(--ink3);
  font-size: 13px;
}
.footer a { color: var(--ink2); transition: color .2s; }
.footer a:hover { color: var(--ink); }

/* Grid dots background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,.2) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .08;
  pointer-events: none;
  z-index: 0;
}

/* Ensure content is above bg */
nav, .hero, .video-section, .steps-section, .features-section, .cta-section, .footer {
  position: relative;
  z-index: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .nav { padding: 0 20px; }
  .hero { padding: 60px 20px 40px; }
  .cta-box { padding: 40px 24px; }
  .footer { padding: 24px 20px; }
  .nav-links .nav-btn-ghost { display: none; }
}
</style>
</head>
<body>

<!-- NAV -->
<nav class="nav">
  <a class="nav-logo" href="<?= SITE_URL ?>/">
    <img src="https://studytrack.edurx.icu/studytrack/images/studytrack.png" alt="StudyTrack">
    StudyTrack
  </a>
  <div class="nav-links">
    <a class="nav-btn nav-btn-ghost" href="<?= SITE_URL ?>/home.php">← Home</a>
    <a class="nav-btn nav-btn-primary" href="<?= SITE_URL ?>/register.php">Get Started Free</a>
  </div>
</nav>

<!-- HERO -->
<section class="hero">
  <div class="hero-badge"><span></span> Video Tutorial</div>
  <h1 class="hero-title">
    Learn <span class="grad">StudyTrack</span><br>in Minutes
  </h1>
  <p class="hero-sub">
    Watch the full walkthrough video and discover how to track your A/L studies, hit your goals, and stay ahead — all in one place.
  </p>
</section>

<!-- VIDEO -->
<section class="video-section">
  <div class="video-wrap">
    <iframe
      src="https://www.youtube.com/embed/bJo9-UP6Fqg?si=Xm89cclcNRzflwF1"
      title="StudyTrack Tutorial"
      allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
      allowfullscreen
    ></iframe>
  </div>
  <p class="video-caption">🎬 Full tutorial walkthrough — watch, learn, and start tracking smarter</p>
</section>

<!-- STEPS -->
<section class="steps-section">
  <p class="section-label">How It Works</p>
  <h2 class="section-title">Start in 4 Simple Steps</h2>
  <p class="section-sub">Set up your account and get studying in under 5 minutes.</p>

  <div class="steps-grid">
    <div class="step-card">
      <div class="step-num">01</div>
      <div class="step-icon">📝</div>
      <div class="step-title">Create Your Account</div>
      <div class="step-desc">Sign up for free with your email. Verify your account via OTP and you're in — no credit card needed.</div>
    </div>
    <div class="step-card">
      <div class="step-num">02</div>
      <div class="step-icon">📚</div>
      <div class="step-title">Add Your Subjects</div>
      <div class="step-desc">Add your A/L subjects with color codes. Set daily study goals and target marks for each subject.</div>
    </div>
    <div class="step-card">
      <div class="step-num">03</div>
      <div class="step-icon">⏱️</div>
      <div class="step-title">Log Study Sessions</div>
      <div class="step-desc">Log every study session with duration, subject, and notes. Watch your heatmap grow as consistency builds.</div>
    </div>
    <div class="step-card">
      <div class="step-num">04</div>
      <div class="step-icon">📊</div>
      <div class="step-title">Track Your Progress</div>
      <div class="step-desc">View weekly and monthly analysis charts. Monitor your marks, tasks, and countdown to A/L exam day.</div>
    </div>
  </div>
</section>

<!-- FEATURES -->
<section class="features-section">
  <p class="section-label">Features</p>
  <h2 class="section-title">Everything You Need</h2>
  <p class="section-sub">Built specifically for Sri Lankan A/L students.</p>

  <div class="features-grid">
    <div class="feature-pill"><span class="feature-pill-icon">📅</span><span class="feature-pill-text">A/L Exam Countdown</span></div>
    <div class="feature-pill"><span class="feature-pill-icon">🔥</span><span class="feature-pill-text">Study Heatmap</span></div>
    <div class="feature-pill"><span class="feature-pill-icon">📈</span><span class="feature-pill-text">Marks & Grades Tracker</span></div>
    <div class="feature-pill"><span class="feature-pill-icon">✅</span><span class="feature-pill-text">Tasks & To-Dos</span></div>
    <div class="feature-pill"><span class="feature-pill-icon">🎯</span><span class="feature-pill-text">Daily Study Goals</span></div>
    <div class="feature-pill"><span class="feature-pill-icon">📊</span><span class="feature-pill-text">Weekly / Monthly Charts</span></div>
    <div class="feature-pill"><span class="feature-pill-icon">📚</span><span class="feature-pill-text">Resource Library</span></div>
    <div class="feature-pill"><span class="feature-pill-icon">🔔</span><span class="feature-pill-text">Smart Notifications</span></div>
  </div>
</section>

<!-- CTA -->
<section class="cta-section">
  <div class="cta-box">
    <h2 class="cta-title">Ready to Start?</h2>
    <p class="cta-sub">Join students already using StudyTrack to ace their A/Ls.</p>
    <div class="cta-btns">
      <a class="btn-primary" href="<?= SITE_URL ?>/register.php">🚀 Get Started</a>
      <a class="btn-ghost" href="<?= SITE_URL ?>/home.php">← Back to Home</a>
    </div>
  </div>
</section>

<!-- FOOTER -->
<footer class="footer">
  <p>© <?= date('Y') ?> StudyTrack — Built for A/L students in Sri Lanka &nbsp;·&nbsp; <a href="<?= SITE_URL ?>/terms.php">Terms</a></p>
</footer>

</body>
</html>
