/* ========================================
   muddermis — App Developer Promo Site
   style.css
   ======================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Light theme (default) */
  --color-bg: #f5f5f7;
  --color-bg-secondary: #ffffff;
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-accent: #0071e3;
  --color-accent-hover: #0077ed;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-card-bg: rgba(255, 255, 255, 0.72);
  --color-card-border: rgba(255, 255, 255, 0.5);
  --color-card-shadow: rgba(0, 0, 0, 0.06);
  --color-hero-gradient-start: #e8ecf4;
  --color-hero-gradient-end: #f5f5f7;
  --color-badge-bg: rgba(0, 113, 227, 0.08);
  --color-badge-text: #0071e3;
  --color-footer-bg: #1d1d1f;
  --color-footer-text: #d2d2d7;

  /* Palette colors (overridden by data-palette) */
  --blob-1: #4FC3F7;
  --blob-2: #FF8A65;
  --blob-3: #CE93D8;
  --blob-4: #81C784;
  --shape-frzr-circle: #4FC3F7;
  --shape-frzr-ring: #0277BD;
  --shape-df-circle: #FFD54F;
  --shape-df-ring: #E57373;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --font-stack: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --max-width: 1080px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* ---------- Color Palettes (applied randomly on page load) ---------- */

/* Palette 1 — Ocean (default, also the fallback) */
[data-palette="1"] {
  --blob-1: #4FC3F7; --blob-2: #FF8A65; --blob-3: #CE93D8; --blob-4: #81C784;
  --shape-frzr-circle: #4FC3F7; --shape-frzr-ring: #0277BD;
  --shape-df-circle: #FFD54F; --shape-df-ring: #E57373;
}

/* Palette 2 — Sunset */
[data-palette="2"] {
  --blob-1: #FF6B6B; --blob-2: #FFA07A; --blob-3: #FFD93D; --blob-4: #C084FC;
  --shape-frzr-circle: #FF6B6B; --shape-frzr-ring: #C084FC;
  --shape-df-circle: #FFA07A; --shape-df-ring: #FFD93D;
}

/* Palette 3 — Forest */
[data-palette="3"] {
  --blob-1: #10B981; --blob-2: #6EE7B7; --blob-3: #F59E0B; --blob-4: #34D399;
  --shape-frzr-circle: #10B981; --shape-frzr-ring: #047857;
  --shape-df-circle: #F59E0B; --shape-df-ring: #34D399;
}

/* Palette 4 — Neon */
[data-palette="4"] {
  --blob-1: #F472B6; --blob-2: #818CF8; --blob-3: #22D3EE; --blob-4: #A78BFA;
  --shape-frzr-circle: #818CF8; --shape-frzr-ring: #6366F1;
  --shape-df-circle: #F472B6; --shape-df-ring: #22D3EE;
}

/* Palette 5 — Berry */
[data-palette="5"] {
  --blob-1: #8B5CF6; --blob-2: #EC4899; --blob-3: #F43F5E; --blob-4: #6366F1;
  --shape-frzr-circle: #8B5CF6; --shape-frzr-ring: #7C3AED;
  --shape-df-circle: #EC4899; --shape-df-ring: #F43F5E;
}

/* ---------- Dark Theme ---------- */
[data-theme="dark"] {
  --color-bg: #000000;
  --color-bg-secondary: #1c1c1e;
  --color-text: #f5f5f7;
  --color-text-secondary: #a1a1a6;
  --color-accent: #2997ff;
  --color-accent-hover: #40a9ff;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-card-bg: rgba(28, 28, 30, 0.72);
  --color-card-border: rgba(255, 255, 255, 0.08);
  --color-card-shadow: rgba(0, 0, 0, 0.3);
  --color-hero-gradient-start: #111114;
  --color-hero-gradient-end: #000000;
  --color-badge-bg: rgba(41, 151, 255, 0.12);
  --color-badge-text: #2997ff;
  --color-footer-bg: #000000;
  --color-footer-text: #86868b;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #000000;
    --color-bg-secondary: #1c1c1e;
    --color-text: #f5f5f7;
    --color-text-secondary: #a1a1a6;
    --color-accent: #2997ff;
    --color-accent-hover: #40a9ff;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-card-bg: rgba(28, 28, 30, 0.72);
    --color-card-border: rgba(255, 255, 255, 0.08);
    --color-card-shadow: rgba(0, 0, 0, 0.3);
    --color-hero-gradient-start: #111114;
    --color-hero-gradient-end: #000000;
    --color-badge-bg: rgba(41, 151, 255, 0.12);
    --color-badge-text: #2997ff;
    --color-footer-bg: #000000;
    --color-footer-text: #86868b;
  }
}

/* ---------- 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);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

a:hover {
  color: var(--color-accent-hover);
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p {
  color: var(--color-text-secondary);
  line-height: 1.65;
}

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

.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-card-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

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

.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  padding: 4px;
  border-radius: 50%;
  transition: color var(--transition-fast), background var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-border);
}

/* Mobile nav */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  font-size: 1.5rem;
  padding: 4px;
}

@media (max-width: 640px) {
  .nav-hamburger {
    display: flex;
    align-items: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--color-card-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }

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

/* ---------- Hero (visual-first) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: blobFloat 18s ease-in-out infinite alternate;
}

[data-theme="dark"] .blob { opacity: 0.25; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .blob { opacity: 0.25; } }

.blob-1 {
  width: 420px; height: 420px;
  background: var(--blob-1);
  top: -10%; left: -5%;
  animation-duration: 20s;
}

.blob-2 {
  width: 350px; height: 350px;
  background: var(--blob-2);
  top: 20%; right: -8%;
  animation-duration: 16s;
  animation-delay: -4s;
}

.blob-3 {
  width: 300px; height: 300px;
  background: var(--blob-3);
  bottom: -5%; left: 30%;
  animation-duration: 22s;
  animation-delay: -8s;
}

.blob-4 {
  width: 250px; height: 250px;
  background: var(--blob-4);
  bottom: 20%; right: 25%;
  animation-duration: 17s;
  animation-delay: -2s;
}

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.08); }
  66%  { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(30px, -10px) scale(1.04); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

@media (max-width: 480px) {
  .hero-icons { gap: 24px; }
}

.hero-icon-link {
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-icon-link:hover {
  transform: scale(1.08);
}

.hero-app-icon {
  width: 140px;
  height: 140px;
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: iconFloat 6s ease-in-out infinite;
  object-fit: cover;
}

[data-theme="dark"] .hero-app-icon { border-color: rgba(255, 255, 255, 0.1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-app-icon { border-color: rgba(255, 255, 255, 0.1); } }

@media (max-width: 480px) {
  .hero-app-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
  }
}

.hero-icon-1 { animation-delay: 0s; }
.hero-icon-2 { animation-delay: -3s; }

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* ---------- App Showcase Sections ---------- */
.app-showcase {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .app-showcase { padding: 72px 0; }
}

.app-showcase-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.app-showcase-bg .shape {
  position: absolute;
  border-radius: 50%;
}

.app-showcase-bg .shape-circle {
  width: 500px; height: 500px;
  opacity: 0.06;
}

.app-showcase-bg .shape-ring {
  width: 300px; height: 300px;
  border: 2px solid;
  opacity: 0.08;
}

/* FRZR colors */
.app-showcase--frzr { background: var(--color-bg); }
.app-showcase--frzr .shape-circle {
  background: var(--shape-frzr-circle);
  top: -15%; right: -10%;
}
.app-showcase--frzr .shape-ring {
  border-color: var(--shape-frzr-ring);
  bottom: -10%; left: -5%;
}

/* DailyFeels colors */
.app-showcase--dailyfeels { background: var(--color-bg-secondary); }
.app-showcase--dailyfeels .shape-circle {
  background: var(--shape-df-circle);
  bottom: -20%; left: -10%;
}
.app-showcase--dailyfeels .shape-ring {
  border-color: var(--shape-df-ring);
  top: -10%; right: -5%;
}

.app-showcase-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 64px;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .app-showcase-inner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }
}

.app-showcase-icon {
  flex-shrink: 0;
}

.app-icon-large {
  width: 160px;
  height: 160px;
  border-radius: 36px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.15);
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .app-icon-large { border-color: rgba(255, 255, 255, 0.1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-icon-large { border-color: rgba(255, 255, 255, 0.1); } }

.app-icon-large:hover {
  transform: scale(1.05) rotate(-2deg);
}

@media (max-width: 480px) {
  .app-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 28px;
  }
}

.app-showcase-info h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.app-showcase-tagline {
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  color: var(--color-text-secondary);
  margin-bottom: 28px;
}

.app-showcase-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .app-showcase-actions { justify-content: center; }
}

.app-store-badge {
  height: 40px;
  width: auto;
  transition: opacity var(--transition-fast);
}

.app-store-badge:hover {
  opacity: 0.8;
}

.support-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.support-link::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.support-link:hover::after {
  transform: translateX(3px);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 40px 0;
  font-size: 0.8125rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

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

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

.footer-links a:hover {
  color: #f5f5f7;
}

.footer-copy {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
}

/* ========================================
   Support / Sub-page Styles
   ======================================== */

/* ---------- Support Hub Layout ---------- */
.support-hero {
  padding: 120px 0 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-hero-gradient-start), var(--color-hero-gradient-end));
}

.support-hero .app-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: var(--radius-lg);
}

.support-hero h1 {
  margin-bottom: 8px;
}

.support-hero p {
  max-width: 480px;
  margin: 0 auto 24px;
}

.support-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.support-nav-link {
  display: inline-block;
  padding: 10px 24px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.support-nav-link:hover,
.support-nav-link.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ---------- Content Pages (Privacy, Terms, FAQ) ---------- */
.content-page {
  padding: 100px 0 60px;
}

.content-page .container {
  max-width: 720px;
}

.content-header {
  margin-bottom: 40px;
}

.content-header .breadcrumb {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.content-header .breadcrumb a {
  color: var(--color-accent);
}

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

.content-header .last-updated {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.content-body h2 {
  font-size: 1.375rem;
  margin: 32px 0 12px;
  padding-top: 16px;
}

.content-body h3 {
  font-size: 1.125rem;
  margin: 24px 0 8px;
}

.content-body p {
  margin-bottom: 16px;
}

.content-body ul,
.content-body ol {
  margin: 0 0 16px 20px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.content-body li {
  margin-bottom: 6px;
}

.content-body strong {
  color: var(--color-text);
  font-weight: 600;
}

.content-body a {
  color: var(--color-accent);
}

/* ---------- FAQ Styles ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0;
  font-family: inherit;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--color-text-secondary);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 12px;
}

.faq-answer p {
  font-size: 0.9375rem;
}

/* ---------- Contact Page ---------- */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.contact-card {
  background: var(--color-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}

.contact-card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.contact-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.contact-card a.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition-fast);
}

.contact-card a.btn:hover {
  background: var(--color-accent-hover);
}

/* ---------- 404 Page ---------- */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.page-404 h1 {
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--color-accent), #bf5af2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-404 p {
  font-size: 1.125rem;
  margin-bottom: 24px;
}

.page-404 a.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background var(--transition-fast);
}

.page-404 a.btn:hover {
  background: var(--color-accent-hover);
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
