/* ===========================
   StudyRot — Shared Stylesheet
   =========================== */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #05070a;
  --bg-card: #0d111c;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dark-muted: #475569;
  --purple-accent: #a855f7;
  --indigo-accent: #6366f1;
  --discord-blue: #5865F2;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.3);
  --border-btn: rgba(255, 255, 255, 0.15);
  --font-family: 'Inter', sans-serif;
  --max-width: 80rem; /* 1280px */
  --radius-xl: 1rem;
  --radius-2xl: 2.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: rgba(168, 85, 247, 0.3);
}

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

ul {
  list-style: none;
}

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

main {
  flex-grow: 1;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.gradient-text {
  background: linear-gradient(135deg, var(--purple-accent) 0%, var(--indigo-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Cut Logo Effect ---------- */
.cut-logo {
  position: relative;
  display: inline-block;
}
.cut-logo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--bg-primary);
  transform: translateY(-50%);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}
.cut-logo img {
  height: 100%;
  object-fit: contain;
  filter: brightness(2);
}

/* =============================
   NAVBAR
   ============================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 10, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.navbar-logo .cut-logo {
  height: 2rem;
}
@media (min-width: 768px) {
  .navbar-logo .cut-logo {
    height: 2.5rem;
  }
}

.navbar-logo-fallback {
  font-size: 1.25rem;
  font-weight: 900;
  color: white;
  font-style: italic;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar-privacy-link {
  display: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.navbar-privacy-link:hover {
  color: white;
}
@media (min-width: 768px) {
  .navbar-privacy-link {
    display: block;
  }
}

.btn-discord {
  background: var(--discord-blue);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
  border: none;
  cursor: pointer;
}
.btn-discord:hover {
  filter: brightness(1.1);
}
.btn-discord:active {
  transform: scale(0.95);
}
.btn-discord i {
  font-size: 1rem;
}

/* =============================
   HERO
   ============================= */
.hero {
  position: relative;
  padding-top: 3rem;
  padding-bottom: 6rem;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(139, 92, 246, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
}

/* Hero Logo */
.hero-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
}
.hero-logo .cut-logo {
  padding: 0.5rem;
  height: 5rem;
}
@media (min-width: 768px) {
  .hero-logo .cut-logo {
    height: 7rem;
  }
}

/* Hero Headline */
.hero-headline {
  font-size: 2.25rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  line-height: 1.1;
}
@media (min-width: 1024px) {
  .hero-headline {
    font-size: 4.5rem;
  }
}

.hero-tagline {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
@media (min-width: 1024px) {
  .hero-tagline {
    font-size: 1.5rem;
  }
}

/* App Store Buttons */
.hero-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 1rem;
  margin-bottom: 4rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    max-width: none;
  }
}

.app-btn {
  background: black;
  border: 1px solid var(--border-btn);
  border-radius: 1rem;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  gap: 1rem;
  width: 100%;
  cursor: pointer;
  color: white;
}
@media (min-width: 640px) {
  .app-btn {
    width: auto;
    min-width: 220px;
  }
}
.app-btn:hover {
  background: #111;
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.app-btn:active {
  transform: scale(0.97);
}

.app-btn .icon-apple {
  font-size: 42px;
}
@media (min-width: 640px) {
  .app-btn .icon-apple {
    font-size: 36px;
  }
}

.app-btn .icon-play {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .app-btn .icon-play {
    width: 2.25rem;
    height: 2.25rem;
  }
}
.app-btn .icon-play svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.app-btn-text {
  text-align: left;
  line-height: 1.2;
}
.app-btn-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 2px;
  opacity: 0.9;
  text-transform: uppercase;
}
@media (min-width: 640px) {
  .app-btn-label {
    font-size: 10px;
  }
}
.app-btn-store {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.05em;
}
@media (min-width: 640px) {
  .app-btn-store {
    font-size: 20px;
  }
}

/* Hero Description */
.hero-description {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 42rem;
  margin: 0 auto 5rem;
  font-weight: 500;
  padding: 0 1rem;
  line-height: 1.7;
}
@media (min-width: 768px) {
  .hero-description {
    font-size: 1.25rem;
  }
}

/* =============================
   FOOTER
   ============================= */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 5rem 0;
  margin-top: 3rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand {
  text-align: center;
}
@media (min-width: 768px) {
  .footer-brand {
    text-align: left;
  }
}
.footer-brand h4 {
  color: white;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.footer-brand p {
  color: var(--text-dark-muted);
  font-size: 0.875rem;
  max-width: 20rem;
  font-weight: 500;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .footer-links {
    gap: 2.5rem;
  }
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.2s;
  text-decoration: underline;
  text-decoration-color: rgba(168, 85, 247, 0.2);
  text-underline-offset: 4px;
}
.footer-link:hover {
  color: var(--purple-accent);
  text-decoration-color: var(--purple-accent);
}

.footer-bottom {
  padding-top: 3rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copyright {
  color: var(--text-dark-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 900;
}

.footer-socials {
  display: flex;
  gap: 2rem;
}
.footer-socials a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: all 0.2s;
}
.footer-socials a:hover {
  color: white;
  transform: scale(1.1);
}

/* =============================
   LEGAL PAGES
   ============================= */
.legal-wrapper {
  padding: 6rem 0;
  min-height: 70vh;
}

.legal-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--text-dark-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}
.legal-back:hover {
  color: white;
}

.legal-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-2xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
}
@media (min-width: 768px) {
  .legal-card {
    padding: 4rem;
  }
}

.legal-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: white;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  font-style: italic;
  text-transform: uppercase;
}

.legal-date {
  color: var(--text-dark-muted);
  margin-bottom: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
}

.legal-content {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.875rem;
}
@media (min-width: 768px) {
  .legal-content {
    font-size: 1rem;
  }
}

.legal-content section {
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.125rem;
  font-weight: 900;
  color: white;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.legal-content p {
  margin-bottom: 0.75rem;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 1rem;
}
.legal-content li {
  margin-bottom: 0.75rem;
}
.legal-content li strong {
  color: white;
}

.legal-content .section-divider {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.legal-content a {
  color: var(--purple-accent);
  text-decoration: underline;
  text-decoration-color: rgba(168, 85, 247, 0.3);
  text-underline-offset: 4px;
  font-weight: 700;
  transition: color 0.2s;
}
.legal-content a:hover {
  color: #c084fc;
}

.legal-content code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: white;
  font-family: monospace;
  font-size: 0.875em;
}

.legal-content .highlight-not {
  color: white;
  text-decoration: underline;
  text-decoration-color: rgba(239, 68, 68, 0.5);
}
