/* ===== ROOT COLORS ===== */
:root {
  --bg-light: #ffffff;
  --bg-dark: #0b0d10;
  --text-light: #111;
  --text-dark: #f5f5f7;
  --muted-light: #555;
  --muted-dark: #bbb;
  --accent: #007aff;
  --gray: #f5f5f7;
}

[data-theme="light"] {
  --bg: var(--bg-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
}

[data-theme="dark"] {
  --bg: var(--bg-dark);
  --text: var(--text-dark);
  --muted: var(--muted-dark);
}

/* ===== BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

html, body {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  transition: background 0.5s, color 0.5s;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  z-index: 100;
}
[data-theme="dark"] .nav {
  background: rgba(10, 10, 10, 0.7);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}
.nav .logo {
  font-weight: 800;
  font-size: 1.4rem;
}
.nav .logo span {
  color: var(--accent);
}
.nav nav a {
  margin-left: 25px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav nav a:hover {
  color: var(--accent);
}

/* ===== MOBILE NAV TOGGLE ===== */
.nav-toggle {
  display: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--accent);
  transition: transform 0.3s ease;
}
.nav-toggle:hover {
  transform: rotate(90deg);
}

/* ===== HERO ===== */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% -20%, #007aff25, transparent 60%),
              linear-gradient(180deg, var(--bg), #14161b 100%);
  transition: background 0.6s ease;
}
[data-theme="light"] .hero {
  background: radial-gradient(circle at 50% -20%, #007aff10, transparent 60%),
              linear-gradient(180deg, #ffffff 0%, #f1f3f5 100%);
}

/* subtle animated glow */
.hero::before {
  content: "";
  position: absolute;
  width: 1200px;
  height: 1200px;
  background: radial-gradient(circle at center, rgba(0, 122, 255, 0.18), transparent 70%);
  top: -350px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  animation: glowPulse 10s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glowPulse {
  0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

.hero .content {
  position: relative;
  z-index: 2;
  animation: fadeUp 1.2s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero h1 span {
  background: linear-gradient(90deg, #007aff, #00b7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  max-width: 600px;
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta {
  padding: 14px 38px;
  background: linear-gradient(90deg, #007aff, #00b7ff);
  color: #fff;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0, 122, 255, 0.3);
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 122, 255, 0.4);
}

/* ===== SCROLL DOWN ===== */
.scroll-down {
  position: absolute;
  bottom: 60px;
  text-align: center;
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 1s;
  opacity: 0;
}
@keyframes fadeIn {
  to { opacity: 1; }
}
.scroll-down span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.scroll-down .arrow {
  width: 2px;
  height: 25px;
  background: var(--accent);
  margin: 0 auto;
  animation: scrollAnim 1.3s infinite ease-in-out;
}
@keyframes scrollAnim {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* ===== SECTIONS ===== */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 140px 20px;
  text-align: center;
}
.section h2 {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.section p {
  color: var(--muted);
  line-height: 1.6;
}

/* ===== FEATURES ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
[data-theme="light"] .card {
  background: var(--bg);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* ===== GALLERY ===== */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 160px;
  padding: 120px 60px;
}
.block {
  display: flex;
  align-items: center;
  gap: 80px;
}
.block.left .image { order: 1; }
.block.left .text { order: 2; }
.block.right .text { order: 1; }
.block.right .image { order: 2; }
.image img {
  max-width: 500px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transition: transform 1s ease;
}
.image img:hover { transform: scale(1.05); }
.text h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}
.text p {
  color: var(--muted);
  line-height: 1.6;
}

/* ===== CONTACT ===== */
.btns {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 2rem;
}
.outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}
.outline:hover {
  background: var(--accent);
  color: #fff;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
footer a { color: var(--accent); }

/* ===== THEME BUTTON ===== */
#themeToggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease;
  z-index: 999;
}
#themeToggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ===== FADE ON SCROLL ===== */
.fade {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s ease-out;
}
.fade.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 950px) {
  .block {
    flex-direction: column;
    text-align: center;
  }
  .image img { max-width: 90%; }
  .gallery { padding: 80px 20px; gap: 100px; }
  .nav { padding: 20px 30px; }
  .nav-toggle { display: block; }
  .nav nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 30px;
    background: var(--bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }
  .nav.active nav { display: flex; }
}
