/* ============================================================
   MTGBuilder Marketing Site — Shared Stylesheet
   Dark theme, responsive, clean/modern design
   ============================================================ */

/* --- Reset / Normalize --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #e4e4e7;
  background-color: #0f0f14;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: #7c6bf5;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: #a78bfa;
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #f4f4f5;
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* --- Layout Container --- */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Header --- */
.site-header {
  background-color: #18181b;
  border-bottom: 1px solid #27272a;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: #f4f4f5;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-header .brand:hover {
  color: #a78bfa;
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

/* --- Navigation --- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: #a1a1aa;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a.active {
  color: #f4f4f5;
  text-decoration: none;
}

/* --- Main Content --- */
main {
  flex: 1;
  padding: 2.5rem 0;
}

/* --- Footer --- */
.site-footer {
  background-color: #18181b;
  border-top: 1px solid #27272a;
  padding: 1.5rem 0;
  margin-top: auto;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer .brand {
  font-weight: 700;
  color: #f4f4f5;
  font-size: 1.1rem;
}

.site-footer .contact {
  color: #a1a1aa;
  font-size: 0.9rem;
}

.site-footer .contact a {
  color: #7c6bf5;
}

/* --- Hero Section (Landing Page) --- */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 32px rgba(124, 107, 245, 0.3);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #7c6bf5 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.hero .tagline {
  font-size: 1.2rem;
  color: #a1a1aa;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* --- Buttons / CTAs --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.btn-primary {
  background-color: #7c6bf5;
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #6d5ce7;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* --- Legal / Content Pages (Privacy, Terms) --- */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.legal-content .effective-date {
  color: #71717a;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #27272a;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #d4d4d8;
}

.legal-content p,
.legal-content li {
  color: #d4d4d8;
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-content ul,
.legal-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.legal-content ul {
  list-style: disc;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

/* --- Responsive Design --- */

/* Ensure no horizontal overflow at any width */
html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Mobile first: stack everything vertically below 768px */
@media (max-width: 767px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  main {
    padding: 1.5rem 0;
  }
}

/* Wider layout above 768px */
@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }

  .site-header .container {
    flex-direction: row;
    align-items: center;
  }

  .site-footer .container {
    flex-direction: row;
    align-items: center;
  }
}
