/* =========================================
   dvotn.com — main stylesheet
   Mobile-first, dark/light mode
   ========================================= */

/* --- Color tokens --- */
:root,
[data-theme="light"] {
  --bg: #f9f9fb;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --text: #111118;
  --text-muted: #5f6478;
  --border: #e2e2ea;
  --accent: #7c5cfc;
  --accent-hover: #6344e0;
  --accent-fg: #ffffff;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --hero-bg: linear-gradient(135deg, #f0ecff 0%, #f9f9fb 60%);
  --phone-bg: #e8e3ff;
  --phone-screen: #7c5cfc;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
}

[data-theme="dark"] {
  --bg: #0f0f17;
  --bg-alt: #161622;
  --bg-card: #1c1c2a;
  --text: #f0f0f8;
  --text-muted: #9898b8;
  --border: #2a2a3a;
  --accent: #9d7fff;
  --accent-hover: #b59fff;
  --accent-fg: #0f0f17;
  --discord: #5865f2;
  --discord-hover: #7289da;
  --hero-bg: linear-gradient(135deg, #1a1030 0%, #0f0f17 60%);
  --phone-bg: #1e1040;
  --phone-screen: #7c5cfc;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
}

/* Logo visibility based on theme */
:root [data-theme="light"] .logo-dark,
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: inline-block; }

[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: inline-block; }

/* Theme toggle icon visibility */
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: inline; }
[data-theme="light"] .icon-sun { display: inline; }
[data-theme="light"] .icon-moon { display: none; }

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.25s, color 0.25s;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo { border-radius: 8px; }
.logo-light { display: none; } /* will be shown by theme logic */
.logo-dark { display: inline-block; }

.site-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.site-nav {
  display: none;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--text); }

@media (min-width: 640px) {
  .site-nav { display: flex; }
}

.theme-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text);
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); }

@media (min-width: 640px) {
  .theme-toggle { margin-left: 0; }
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
  text-decoration: none;
}
.btn-primary {
  background-color: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  text-decoration: none;
}
.btn-ghost {
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover {
  background-color: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
}
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--discord);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s;
}
.btn-discord:hover {
  background-color: var(--discord-hover);
  text-decoration: none;
}
.discord-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* --- Section common --- */
section { padding: 72px 0; }
section:nth-child(even) { background-color: var(--bg-alt); }

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
  font-size: 1.05rem;
}

/* --- Hero --- */
.hero {
  background: var(--hero-bg);
  padding: 80px 0 64px;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}
@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
.hero-text { max-width: 520px; }
.hero-headline {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Phone mockup */
.hero-graphic {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}
.phone-mockup {
  width: 200px;
  height: 380px;
  background-color: var(--phone-bg);
  border-radius: 32px;
  border: 6px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background-color: var(--border);
  border-radius: 4px;
}
.phone-screen {
  width: 160px;
  height: 290px;
  background: linear-gradient(160deg, var(--accent) 0%, var(--bg) 100%);
  border-radius: 16px;
  margin-top: 16px;
  opacity: 0.5;
}
@media (min-width: 768px) {
  .phone-mockup { width: 240px; height: 460px; }
  .phone-screen { width: 190px; height: 350px; }
}

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 480px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --- Screenshots --- */
.screenshots-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.screenshot {
  height: 420px;
  width: auto;
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
@media (max-width: 600px) {
  .screenshot { height: 60vw; }
}

/* --- Community / Discord --- */
.community-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
@media (min-width: 768px) {
  .community-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.community-text { max-width: 440px; }
.community-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.community-text p {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.7;
}
.discord-widget {
  flex-shrink: 0;
}
.discord-widget iframe {
  border-radius: 14px;
  display: block;
  max-width: 100%;
}

/* --- Download --- */
.download { text-align: center; }
.download-inner h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.download-inner > p {
  color: var(--text-muted);
  margin-bottom: 36px;
}
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.store-btn { text-decoration: none; }
.store-btn img { display: block; }
.store-btn-placeholder {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.store-btn-placeholder:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  text-decoration: none;
}
.store-btn-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text);
}
.store-btn-inner svg { flex-shrink: 0; }
.store-btn-inner span {
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.3;
}
.store-btn-inner small { color: var(--text-muted); }
.store-btn-inner strong { font-size: 1rem; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background-color: var(--bg-alt);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text); }
