/* ============================================================
   CollaGO – Product Website Styles
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --color-primary:       #6B3FA0;
  --color-primary-dark:  #4A2472;
  --color-primary-light: #EDE7F6;
  --color-accent:        #FF6B6B;
  --color-accent-dark:   #E05555;
  --color-bg:            #FAFAFA;
  --color-bg-alt:        #F3F0F8;
  --color-surface:       #FFFFFF;
  --color-text:          #1A1A2E;
  --color-text-muted:    #5C5C7A;
  --color-border:        #E0D9EE;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                "Helvetica Neue", Arial, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;
  --text-hero: clamp(2.25rem, 5vw, 3.75rem);

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-pill: 9999px;

  --shadow-card: 0 2px 16px rgba(107, 63, 160, 0.10);
  --shadow-hero: 0 8px 48px rgba(107, 63, 160, 0.18);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-2xl);
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
}

.section-subtitle {
  font-size: var(--text-lg);
  text-align: center;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  max-width: 620px;
  margin-inline: auto;
}

/* ── Gradient Text ──────────────────────────────────────────── */
.gradient-text {
  color: var(--color-primary); /* fallback */
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Site Header / Nav ──────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
}

.nav-logo img {
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-switcher summary {
  cursor: pointer;
  list-style: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.lang-switcher summary::-webkit-details-marker {
  display: none;
}

.lang-switcher[open] summary,
.lang-switcher summary:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  min-width: 150px;
  padding: 0.4rem;
  z-index: 200;
}

.lang-menu li a,
.lang-menu li span {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: var(--text-sm);
}

.lang-menu li a {
  color: var(--color-text);
  text-decoration: none;
}

.lang-menu li a:hover {
  background: var(--color-bg-alt);
}

.lang-menu li span {
  color: var(--color-primary);
  font-weight: 700;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
  padding-block: var(--space-2xl);
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.hero-badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-pill);
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hero);
}

.hero-headline {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.hero-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.link-subtle {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-stack);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-store:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hero);
  text-decoration: none;
}

.btn-appstore {
  background: #000;
  color: #fff;
}

.btn-googleplay {
  background: var(--color-accent);
  color: #fff;
}

.btn-store small {
  display: block;
  font-size: var(--text-xs);
  font-weight: 400;
  opacity: 0.75;
  line-height: 1;
}

.btn-store span {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.3;
}

/* ── Features Grid ──────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hero);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── Shapes Showcase ────────────────────────────────────────── */
.shapes-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.shape-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.shape-item span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

.shape {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  transition: transform 0.2s ease;
}

.shape:hover {
  transform: scale(1.1);
}

.shape-rect {
  border-radius: 14px;
}

.shape-circle {
  border-radius: 50%;
}

.shape-diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.shape-star {
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2%  35%,
    39% 35%
  );
}

.shape-heart {
  clip-path: path("M 44 79 C 18 62 0 40 0 25 C 0 9 12 0 26 0 C 35 0 44 9 44 18 C 44 9 53 0 62 0 C 76 0 88 9 88 25 C 88 40 70 62 44 79 Z");
}

.shape-teardrop {
  clip-path: path("M 44 2 C 44 2 8 30 8 52 A 36 36 0 0 0 80 52 C 80 30 44 2 44 2 Z");
}

/* ── How It Works ───────────────────────────────────────────── */
.steps-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.step {
  flex: 1;
  text-align: center;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}

.step h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.step-arrow {
  font-size: 1.75rem;
  color: var(--color-border);
  margin-top: 14px;
  flex-shrink: 0;
  user-select: none;
}

/* ── Comparison Grid ────────────────────────────────────────── */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
  align-items: start;
}

.comparison-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  background: var(--color-surface);
}

.comparison-card--highlight {
  border-color: var(--color-primary);
  border-width: 2px;
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.comparison-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.check-list,
.x-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: 1.4rem;
}

.check-list li {
  position: relative;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: -1.4rem;
  color: var(--color-primary);
  font-weight: 700;
}

.x-list li {
  position: relative;
}
.x-list li::before {
  content: "✗";
  position: absolute;
  left: -1.4rem;
  color: var(--color-accent);
  font-weight: 700;
}

/* ── Download CTA ───────────────────────────────────────────── */
.section-cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  text-align: center;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.section-cta h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #fff;
}

.section-cta p {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
  margin-top: calc(-1 * var(--space-xs));
}

.section-cta .btn-appstore {
  background: #fff;
  color: #000;
}

.section-cta .btn-googleplay {
  background: var(--color-accent);
  color: #fff;
}

.section-cta .link-subtle {
  color: rgba(255, 255, 255, 0.65);
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding-block: var(--space-lg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-base);
  text-decoration: none;
}

.footer-brand img {
  border-radius: 6px;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-copy {
  font-size: var(--text-xs);
  width: 100%;
  text-align: center;
  margin-top: var(--space-xs);
}

/* ── Prose Pages (Privacy & FAQ) ────────────────────────────── */
.prose-page {
  padding-block: var(--space-2xl) var(--space-xl);
}

.prose-container {
  max-width: 720px;
}

.prose-container h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.prose-meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-xl);
}

.prose-container h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.prose-container p {
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.prose-container ul {
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
}

.prose-container ul li {
  list-style: disc;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.prose-container a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-container code {
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}

/* ── FAQ Accordion ──────────────────────────────────────────── */
.faq-list {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.faq-item[open] {
  box-shadow: var(--shadow-card);
}

.faq-item summary {
  padding: var(--space-md);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-primary);
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: '×';
}

.faq-item summary:hover {
  background: var(--color-bg-alt);
}

.faq-answer {
  padding: 0 var(--space-md) var(--space-md);
  color: var(--color-text-muted);
  line-height: 1.75;
  font-size: var(--text-base);
  border-top: 1px solid var(--color-border);
}

.faq-answer p {
  margin-top: var(--space-sm);
  margin-bottom: 0;
}

/* ── Responsive: Tablet ─────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .comparison-grid {
    grid-template-columns: 1fr 1fr;
  }

  .comparison-grid .comparison-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin-inline: auto;
  }
}

/* ── Responsive: Mobile ─────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    gap: var(--space-sm);
    z-index: 99;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    font-size: var(--text-base);
    padding: 0.5rem 0;
  }

  /* Hero */
  .hero-icon {
    width: 96px;
    height: 96px;
  }

  .hero-sub {
    font-size: var(--text-base);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Shapes */
  .shapes-row {
    gap: var(--space-md);
  }

  .shape {
    width: 72px;
    height: 72px;
  }

  /* Steps */
  .steps-row {
    flex-direction: column;
    align-items: center;
  }

  .step-arrow {
    transform: rotate(90deg);
    margin-top: 0;
    font-size: 1.25rem;
  }

  /* Comparison */
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  /* Prose */
  .prose-container h1 {
    font-size: var(--text-2xl);
  }
}

/* ── Reduced Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
