/* ==========================================================================
   KodeshMode Website — Premium Dark Theme
   ========================================================================== */

/* --- Design Tokens --- */
:root {
  /* Background */
  --bg-deep: #050a18;
  --bg-primary: #0a1128;
  --bg-card: #0f1a35;
  --bg-card-hover: #142040;
  --bg-elevated: #111d3a;

  /* Text */
  --text-primary: #f0f4fc;
  --text-secondary: #8896b8;
  --text-muted: #5a6a8a;

  /* Accent */
  --accent-start: #6366f1;
  --accent-end: #06b6d4;
  --accent-mid: #818cf8;
  --gradient: linear-gradient(135deg, var(--accent-start), var(--accent-end));

  /* Borders */
  --border: rgba(99, 102, 241, 0.12);
  --border-hover: rgba(99, 102, 241, 0.3);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.25);

  /* Typography */
  --font: 'Inter', 'Assistant', system-ui, -apple-system, sans-serif;

  /* Transition */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.5s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

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

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

/* --- Utilities --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

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

.section {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-mid);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-hover);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--accent-mid);
  transform: translateY(-3px);
  color: var(--text-primary);
}

/* ======================================================================
   NAVBAR
   ====================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.4s var(--ease);
}

.navbar.scrolled {
  background: rgba(5, 10, 24, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

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

.nav-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
  transition: width 0.4s var(--ease);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link-github {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
  transition: all var(--duration) var(--ease);
}

.btn-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
  color: #fff;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ======================================================================
   HERO
   ====================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.06) 40%, transparent 70%);
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.25rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-mid);
  border: 1px solid var(--border-hover);
  background: rgba(99, 102, 241, 0.06);
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

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

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero Showcase */
.hero-showcase {
  position: relative;
  margin-top: 4rem;
  z-index: 2;
}

.showcase-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0.4;
  animation: ringPulse 4s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.5; }
}

.showcase-devices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  perspective: 800px;
}

.showcase-img {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}

.showcase-left {
  transform: rotateY(8deg) scale(0.85);
}

.showcase-center {
  transform: scale(1.05);
  filter: drop-shadow(0 0 20px rgba(79, 134, 247, 0.4)) drop-shadow(0 15px 35px rgba(0, 0, 0, 0.6));
  z-index: 1;
}

.showcase-right {
  transform: rotateY(-8deg) scale(0.85);
}

.showcase-devices:hover .showcase-left { transform: rotateY(4deg) scale(0.9) translateX(-10px); }
.showcase-devices:hover .showcase-center { transform: scale(1.1); }
.showcase-devices:hover .showcase-right { transform: rotateY(-4deg) scale(0.9) translateX(10px); }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 1s 1.5s both;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 0.5; }
}

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  padding: 2.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-mid);
  transition: all var(--duration) var(--ease);
}

.feature-card:hover .feature-icon {
  background: rgba(99, 102, 241, 0.18);
  transform: scale(1.08);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

/* ======================================================================
   GALLERY
   ====================================================================== */
.gallery-section {
  background: var(--bg-deep);
}

.gallery-showcase {
  overflow: hidden;
}

.gallery-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.gallery-item img {
  width: 100%;
  max-width: 180px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  transition: all var(--duration) var(--ease), filter var(--duration) var(--ease);
}

.gallery-item:hover img {
  transform: translateY(-8px) scale(1.03);
  filter: drop-shadow(0 0 15px rgba(79, 134, 247, 0.3)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
}

.gallery-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ======================================================================
   DEVICES
   ====================================================================== */
.devices-section {
  background: var(--bg-primary);
  overflow: hidden;
}

.devices-marquee-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 1rem 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.devices-marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scrollMarquee 35s linear infinite;
}

.devices-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 0.75rem)); }
}

.device-family {
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
  text-align: center;
  width: 300px;
  flex-shrink: 0;
}

.device-family:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.device-family h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.device-models {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.device-models span {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}

.device-family:hover .device-models span {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

/* ======================================================================
   TESTIMONIALS
   ====================================================================== */
.testimonials-section {
  background: var(--bg-deep);
}

.testimonials-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 1rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.testimonials-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scrollMarquee 30s linear infinite;
}

.testimonials-track.no-marquee {
  animation: none;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.testimonials-track:hover {
  animation-play-state: paused;
}

.review-card {
  width: 380px;
  flex-shrink: 0;
  background: var(--bg-card);
  padding: 2.25rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

.stars {
  display: flex;
  gap: 0.25rem;
  color: #fbbf24; /* Amber/Gold color for stars */
}

.stars svg {
  width: 20px;
  height: 20px;
}

.review-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-primary);
  flex-grow: 1;
  font-style: italic;
}

.review-text[dir="rtl"] {
  text-align: right;
  font-family: 'Assistant', sans-serif;
}

.review-author {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: auto;
}



/* ======================================================================
   PRIVACY
   ====================================================================== */
.privacy-section {
  background: var(--bg-deep);
}

.privacy-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  background: var(--bg-card);
  padding: clamp(2.5rem, 5vw, 4rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.privacy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
}

.privacy-content .section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.privacy-points {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.privacy-point {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.privacy-check {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-mid);
}

.privacy-point p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.privacy-point p strong {
  color: var(--text-primary);
}

.privacy-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
}

.shield-icon {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.25));
}

/* ======================================================================
   CTA
   ====================================================================== */
.cta-section {
  background: var(--bg-primary);
}

.cta-card {
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--bg-card), var(--bg-deep));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.cta-card p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ======================================================================
   FOOTER
   ====================================================================== */
.footer {
  background: var(--bg-deep);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* ======================================================================
   CONTRIBUTORS
   ====================================================================== */
.contributors-section {
  background: var(--bg-deep);
}

.contributors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.contributor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 130px;
  text-align: center;
  transition: all var(--duration) var(--ease);
}

.contributor-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

.contributor-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  transition: all var(--duration) var(--ease);
}

.contributor-card:hover .contributor-avatar {
  border-color: var(--accent-mid);
}

.contributor-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

/* ======================================================================
   RELEASES
   ====================================================================== */
.releases-feed {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.release-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--duration) var(--ease);
}

.release-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.release-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.release-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.release-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.release-title a:hover {
  color: var(--accent-mid);
}

.release-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.release-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-mid);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

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

.release-body {
  color: var(--text-secondary);
  line-height: 1.7;
}

.release-body h1, .release-body h2, .release-body h3, .release-body h4, .release-body h5, .release-body h6 {
  color: var(--text-primary);
  margin: 1.5rem 0 1rem;
}

.release-body h1:first-child, .release-body h2:first-child, .release-body h3:first-child {
  margin-top: 0;
}

.release-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.release-body li {
  margin-bottom: 0.5rem;
}

.release-body p {
  margin-bottom: 1rem;
}

.release-body a {
  color: var(--accent-mid);
  text-decoration: none;
}

.release-body a:hover {
  text-decoration: underline;
}

.release-body blockquote {
  border-left: 4px solid var(--accent-mid);
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-style: italic;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.release-body pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto; /* Critical for mobile responsiveness */
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.release-body code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.release-body pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.95em;
  color: var(--text-primary);
}

.release-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .release-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .release-meta {
    align-items: flex-start;
    flex-direction: row;
    align-items: center;
  }
}

/* ======================================================================
   REVEAL ANIMATIONS
   ====================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.features-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.features-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.2s; }
.features-grid .reveal:nth-child(5) { transition-delay: 0.25s; }
.features-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

.gallery-track .reveal:nth-child(1) { transition-delay: 0.05s; }
.gallery-track .reveal:nth-child(2) { transition-delay: 0.1s; }
.gallery-track .reveal:nth-child(3) { transition-delay: 0.15s; }
.gallery-track .reveal:nth-child(4) { transition-delay: 0.2s; }
.gallery-track .reveal:nth-child(5) { transition-delay: 0.25s; }
.gallery-track .reveal:nth-child(6) { transition-delay: 0.3s; }

.devices-grid .device-family:nth-child(1) { transition-delay: 0.05s; }
.devices-grid .device-family:nth-child(2) { transition-delay: 0.1s; }
.devices-grid .device-family:nth-child(3) { transition-delay: 0.15s; }
.devices-grid .device-family:nth-child(4) { transition-delay: 0.2s; }
.devices-grid .device-family:nth-child(5) { transition-delay: 0.25s; }
.devices-grid .device-family:nth-child(6) { transition-delay: 0.3s; }
.devices-grid .device-family:nth-child(7) { transition-delay: 0.35s; }
.devices-grid .device-family:nth-child(8) { transition-delay: 0.4s; }

/* Fade-in-up for hero content */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content .hero-badge { animation: fadeInUp 0.8s 0.2s var(--ease) both; }
.hero-content .hero-title { animation: fadeInUp 0.8s 0.35s var(--ease) both; }
.hero-content .hero-subtitle { animation: fadeInUp 0.8s 0.5s var(--ease) both; }
.hero-content .hero-actions { animation: fadeInUp 0.8s 0.65s var(--ease) both; }
.hero-showcase { animation: fadeInUp 1s 0.85s var(--ease) both; }

/* ======================================================================
   RESPONSIVE
   ====================================================================== */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-track { grid-template-columns: repeat(3, 1fr); }
  .devices-grid { grid-template-columns: repeat(3, 1fr); }
  .privacy-card { grid-template-columns: 1fr; }
  .privacy-illustration { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.4s var(--ease);
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
  }

  .nav-links.open {
    right: 0;
  }

  .hero { min-height: auto; padding: 6rem 1rem 3rem; }
  .hero-title { font-size: clamp(2.2rem, 8vw, 3rem); }

  /* Simplified Mobile Hero Showcase */
  .showcase-ring { width: 250px; height: 250px; }
  .showcase-devices { gap: 0; margin-top: 2rem; justify-content: center; }
  .showcase-left, .showcase-right { display: none; } /* Hide side watches on mobile to reduce clutter */
  .showcase-center { transform: scale(1.3); margin-top: 1rem; width: 140px; } /* Focus on center watch */

  /* Mobile-Native Horizontal Scrolling Carousels */
  .features-grid, .gallery-track, .devices-grid { 
    display: flex; 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem; 
    margin: 0 -1rem; /* Pull out to screen edges */
    padding: 1rem 1rem 2rem 1rem;
    gap: 1rem;
  }

  /* Hide scrollbars for cleaner look */
  .features-grid::-webkit-scrollbar, 
  .gallery-track::-webkit-scrollbar, 
  .devices-grid::-webkit-scrollbar {
    display: none;
  }
  .features-grid { -ms-overflow-style: none; scrollbar-width: none; }
  .gallery-track { -ms-overflow-style: none; scrollbar-width: none; }
  .devices-grid { -ms-overflow-style: none; scrollbar-width: none; }

  /* Size cards for mobile carousel */
  .feature-card, .gallery-item, .device-family {
    min-width: 85vw; /* Show peek of next card */
    scroll-snap-align: center;
    flex: 0 0 auto;
  }
  
  .gallery-item img { height: 180px; } /* Slightly smaller images on mobile gallery */

  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  
  .hero-scroll-hint { display: none; } /* Hide on mobile to save space */
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; gap: 1rem; }
  .hero-actions .btn { width: 100%; justify-content: center; padding: 1rem; }
  .cta-actions { flex-direction: column; width: 100%; gap: 1rem; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .privacy-card { padding: 2rem 1.5rem; }
}

/* ======================================================================
   RTL SUPPORT
   ====================================================================== */
[dir="rtl"] .feature-card,
[dir="rtl"] .privacy-point {
  text-align: right;
}

[dir="rtl"] .nav-links {
  right: auto;
  left: -100%;
  border-left: none;
  border-right: 1px solid var(--border);
  box-shadow: 5px 0 20px rgba(0,0,0,0.5);
}

[dir="rtl"] .nav-links.open {
  left: 0;
  right: auto;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.text-left { text-align: left; }
.mt-1 { margin-top: 1rem; }
.center-mt-3 { text-align: center; margin-top: 3rem; }
.latest-version-badge-style { font-size: 0.85em; opacity: 0.7; margin-left: 0.4rem; font-weight: normal; }
.releases-hero { min-height: auto; padding: 10rem 1.25rem 4rem; }
.max-w-800 { max-width: 800px; margin: 0 auto; }
.mb-1-5 { margin-bottom: 1.5rem; }
.hero-subtitle-releases { margin: 0 auto; max-width: 600px; }
.pt-2 { padding-top: 2rem; }
.loading-releases { text-align: center; color: var(--text-muted); padding: 4rem 0; }

/* ======================================================================
   SECURITY-HARDENED JS STATE CLASSES
   ====================================================================== */
body.nav-open {
  overflow: hidden;
}

.device-family-staggered {
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              background var(--duration) var(--ease);
}

.device-family-staggered:not(.device-family-visible) {
  opacity: 0;
  transform: translateY(20px);
}

.fetch-status {
  width: 100%;
  padding: 2rem 1rem;
  color: var(--text-muted);
  text-align: center;
}

.fetch-status-error {
  color: #ef4444;
}
