/* ============================================================
   Rhythm Minder — Static Website Styles
   ============================================================ */

/* --- Design Tokens ----------------------------------------- */
:root {
  --primary: #FF6F00;
  --primary-light: #FFA040;
  --primary-hover: #E66500;
  --bg: #FFFDE7;
  --bg-alt: #FFF8E1;
  --text: #1C1B1F;
  --text-muted: #5C5B5F;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1A18;
    --bg-alt: #242220;
    --text: #E6E1E5;
    --text-muted: #A9A5A8;
    --surface: #2C2A28;
    --surface-raised: #363432;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.20);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.36);
  }
}

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

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

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

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

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

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

/* --- Utility ----------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 48px;
}

/* --- Navigation -------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}

.navbar-brand:hover {
  color: var(--text);
}

.navbar-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

.navbar-links a:hover {
  color: var(--primary);
}

/* Mobile hamburger toggle */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.navbar-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

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

  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }

  .navbar-links.open {
    display: flex;
  }
}

/* --- Buttons ----------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-disabled {
  background: var(--text-secondary);
  color: var(--bg);
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(255, 111, 0, 0.30);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 111, 0, 0.40);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

/* --- Hero -------------------------------------------------- */
.hero {
  text-align: center;
  padding: 80px 24px 64px;
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg-alt) 100%
  );
}

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

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p.tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.store-badge:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}

.store-badge .badge-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.store-badge .badge-icon-svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.store-badge.disabled {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.store-badge .badge-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1;
}

.store-badge .badge-text span {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

/* --- Features ---------------------------------------------- */
.features {
  padding: 80px 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 600px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  display: block;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

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

/* --- Pricing ----------------------------------------------- */
.pricing {
  padding: 80px 24px;
  background: var(--bg-alt);
}

.pricing-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (min-width: 600px) {
  .pricing-table {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .pricing-table {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .pricing-table {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Allow horizontal scroll on very small screens */
@media (max-width: 599px) {
  .pricing-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .pricing-table-scroll .pricing-table {
    grid-template-columns: repeat(5, 260px);
    min-width: max-content;
  }
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

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

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(255, 111, 0, 0.15);
}

.pricing-card.popular::before {
  /* decorative top accent */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.popular-badge {
  position: absolute;
  top: 12px;
  right: -8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 4px 0 0 4px;
  box-shadow: 0 2px 6px rgba(255, 111, 0, 0.3);
  z-index: 1;
}

.pricing-card .tier-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-card .price {
  font-size: 2rem;
  font-weight: 800;
  margin: 8px 0 2px;
}

.pricing-card .price-period {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.pricing-card .price-annual {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 20px;
}

.pricing-card .feature-list {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
}

.pricing-card .feature-list li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pricing-card .feature-list li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card .btn-primary,
.pricing-card .btn-secondary {
  width: 100%;
  text-align: center;
  margin-top: auto;
}

/* --- FAQ --------------------------------------------------- */
.faq-section {
  padding: 80px 24px;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 20px 0;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color var(--transition);
}

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

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--transition);
}

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

.faq-item summary:hover {
  color: var(--primary);
}

.faq-item .faq-answer {
  padding: 0 0 20px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* --- Support Form ----------------------------------------- */
.support-form-container {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.support-form-container iframe {
  display: block;
  width: 100%;
  min-height: 1200px;
  border: none;
}

/* --- Legal Content (Privacy, Terms) ------------------------ */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.legal-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 8px;
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 28px;
  margin-bottom: 8px;
}

.legal-content p,
.legal-content li {
  line-height: 1.8;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content strong {
  color: var(--text);
}

/* --- Footer ------------------------------------------------ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}

@media (prefers-color-scheme: dark) {
  .footer {
    background: #1A1817;
  }
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  list-style: none;
}

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

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

.footer-contact {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-contact a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* --- Misc -------------------------------------------------- */
::selection {
  background: rgba(255, 111, 0, 0.2);
  color: var(--text);
}

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