/* =========================================================
   components.css — Navbar, Hero, Feature Grid, Carousel,
                    Footer, Forms, Legal layout
   ========================================================= */

/* ---- NAVBAR ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.site-nav.scrolled {
  border-bottom-color: var(--md-divider);
  box-shadow: var(--shadow-1);
}
@media (prefers-color-scheme: dark) {
  .site-nav {
    background-color: rgba(26, 26, 46, 0.85);
  }
}

.site-nav .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--md-primary-700);
  text-decoration: none;
}
.site-nav .navbar-brand:hover { color: var(--md-primary-900); }

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  /* PLACEHOLDER: replace with actual icon */
  background: linear-gradient(135deg, var(--md-primary-500), var(--md-secondary-500));
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-nav .nav-link {
  color: var(--md-on-surface-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 14px !important;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: var(--md-primary-600);
  background-color: var(--md-primary-50);
}

.nav-back-link {
  color: var(--md-on-surface-muted) !important;
  font-size: 0.85rem !important;
  gap: 4px;
}
.nav-back-link:hover { color: var(--md-primary-600) !important; }

.navbar-toggler {
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--md-on-surface);
  background: transparent;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.navbar-toggler:focus-visible { outline: 3px solid var(--md-primary-500); }

/* ---- HERO ---- */
.hero-section {
  min-height: calc(100vh - 64px);
  background: linear-gradient(135deg,
    var(--md-primary-900) 0%,
    var(--md-primary-700) 40%,
    var(--md-primary-500) 70%,
    var(--md-secondary-500) 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-text { color: #fff; }
.hero-text .eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}
.hero-text h1 { color: #fff; margin-bottom: 20px; }
.hero-text .hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-mockup-wrapper {
  position: relative;
  width: 240px;
}

.phone-mockup-image {
  width: 240px;
  height: 480px;
  border-radius: 36px;
  object-fit: cover;
  border: 6px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow-3), 0 0 60px rgba(0,0,0,0.3);
}

.phone-mockup-placeholder {
  width: 240px;
  height: 480px;
  background: rgba(255,255,255,0.12);
  border-radius: 36px;
  border: 2px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-3), 0 0 60px rgba(0,0,0,0.3);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  text-align: center;
  padding: 24px;
}
/* PLACEHOLDER: replace .phone-mockup-placeholder with <img src="assets/images/hero.png"> */

@media (max-width: 767px) {
  .hero-section { min-height: auto; padding: 64px 0 80px; }
  .hero-visual { margin-top: 48px; }
  .phone-mockup-image { width: 180px; height: 360px; }
  .phone-mockup-placeholder { width: 180px; height: 360px; }
}

/* ---- FEATURE GRID ---- */
.features-section {
  background-color: var(--md-surface-variant);
}

.feature-card {
  background-color: var(--md-surface);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  height: 100%;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  border: 1px solid var(--md-divider);
}
.feature-card:hover {
  box-shadow: var(--shadow-3);
  transform: translateY(-4px);
}

.feature-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background-color: var(--md-primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.feature-icon-wrap svg { color: var(--md-primary-600); }

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--md-on-surface);
}
.feature-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0;
  color: var(--md-on-surface-muted);
}

@media (prefers-color-scheme: dark) {
  .feature-card { background-color: var(--md-surface-variant); border-color: var(--md-divider); }
  .feature-icon-wrap { background-color: rgba(103,58,183,0.15); }
}

/* ---- SCREENSHOTS CAROUSEL ---- */
.screenshots-section { background-color: var(--md-surface); }

.screenshots-track-wrapper {
  overflow: hidden;
  position: relative;
}
.screenshots-track-wrapper::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(to right, transparent, var(--md-surface));
  pointer-events: none;
}

.screenshots-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 16px 0 32px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--md-divider) transparent;
}
.screenshots-track::-webkit-scrollbar { height: 4px; }
.screenshots-track::-webkit-scrollbar-track { background: transparent; }
.screenshots-track::-webkit-scrollbar-thumb { background-color: var(--md-divider); border-radius: 4px; }

.screenshot-item {
  flex: 0 0 220px;
  scroll-snap-align: start;
}
.screenshot-item img,
.screenshot-placeholder {
  width: 220px;
  height: 440px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-2);
}
.screenshot-placeholder {
  background: linear-gradient(160deg, var(--md-primary-100), var(--md-primary-50));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-primary-500);
  font-size: 0.85rem;
  font-weight: 500;
}
/* PLACEHOLDER: replace .screenshot-placeholder with <img src="assets/images/screenshots/screen1.png"> */

/* ---- DOWNLOAD CTA SECTION ---- */
.download-cta-section {
  background: linear-gradient(135deg, var(--md-primary-700), var(--md-primary-500));
  color: #fff;
  text-align: center;
}
.download-cta-section h2 { color: #fff; margin-bottom: 12px; }
.download-cta-section p  { color: rgba(255,255,255,0.8); margin-bottom: 36px; font-size: 1.05rem; }
.download-cta-badges { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.download-cta-section .store-badge {
  background-color: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  backdrop-filter: blur(4px);
}
.download-cta-section .store-badge:hover {
  background-color: rgba(255,255,255,0.25);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .download-cta-section .store-badge { background-color: rgba(255,255,255,0.15); color: #fff; }
  .download-cta-section .store-badge:hover { color: #fff; }
}

/* ---- FOOTER ---- */
.site-footer {
  background-color: var(--md-on-surface);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 32px;
}
.site-footer .footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 8px;
}
.site-footer .footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0;
}
.site-footer h6 {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: #fff; }

.footer-divider {
  border-color: rgba(255,255,255,0.1);
  margin: 40px 0 24px;
}
.footer-bottom {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: #fff; }

@media (prefers-color-scheme: dark) {
  .site-footer { background-color: #0f0f1a; }
}

/* ---- LEGAL PAGE LAYOUT ---- */
.legal-page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.legal-breadcrumb {
  font-size: 0.85rem;
  color: var(--md-on-surface-muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.legal-breadcrumb a { color: var(--md-primary-600); }

.legal-meta {
  background-color: var(--md-primary-50);
  border-left: 4px solid var(--md-primary-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 20px;
  margin-bottom: 40px;
  font-size: 0.9rem;
  color: var(--md-on-surface-muted);
}

.legal-page-wrap h1 { margin-bottom: 8px; }
.legal-page-wrap h2 {
  font-size: 1.3rem;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--md-divider);
  color: var(--md-on-surface);
}
.legal-page-wrap h3 {
  font-size: 1.05rem;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--md-on-surface);
}
.legal-page-wrap p, .legal-page-wrap li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--md-on-surface-muted);
}
.legal-page-wrap ul, .legal-page-wrap ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-page-wrap li { margin-bottom: 6px; }

@media (prefers-color-scheme: dark) {
  .legal-meta { background-color: rgba(103,58,183,0.15); }
}

/* ---- SUPPORT PAGE ---- */
.faq-item {
  border: 1px solid var(--md-divider);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}
.faq-item:hover { box-shadow: var(--shadow-1); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 20px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--md-on-surface);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  transition: background-color var(--transition-fast);
}
.faq-question:hover { background-color: var(--md-surface-variant); }
.faq-question[aria-expanded="true"] { color: var(--md-primary-600); }

.faq-chevron {
  flex-shrink: 0;
  transition: transform var(--transition-base);
  color: var(--md-on-surface-muted);
}
.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--md-primary-600);
}

.faq-answer {
  display: none;
  padding: 0 20px 18px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--md-on-surface-muted);
  border-top: 1px solid var(--md-divider);
  padding-top: 16px;
}
.faq-answer.open { display: block; }

/* ---- CONTACT / DELETE FORM ---- */
.form-card {
  background-color: var(--md-surface);
  border: 1px solid var(--md-divider);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-1);
}
@media (max-width: 575px) { .form-card { padding: 24px; } }

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-on-surface);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--md-on-surface);
  background-color: var(--md-surface);
  border: 1.5px solid var(--md-divider);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
  outline: none;
}
.form-control:focus {
  border-color: var(--md-primary-500);
  box-shadow: 0 0 0 3px rgba(103,58,183,0.12);
}
.form-control.error { border-color: #d32f2f; }

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control { appearance: none; cursor: pointer; }

.field-error {
  font-size: 0.8rem;
  color: #d32f2f;
  margin-top: 4px;
  display: none;
}
.field-error.visible { display: block; }

.form-notice {
  background-color: var(--md-primary-50);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--md-on-surface-muted);
  margin-bottom: 24px;
}

.page-hero {
  padding: 72px 0 32px;
}

.page-hero h1 {
  margin-bottom: 12px;
}

.page-hero p {
  max-width: 720px;
  font-size: 1rem;
}

.support-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.support-meta-item {
  background-color: var(--md-primary-50);
  color: var(--md-primary-700);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.detail-card {
  background-color: var(--md-surface);
  border: 1px solid var(--md-divider);
  border-radius: var(--radius-md);
  padding: 28px;
  height: 100%;
}

.detail-card h2,
.detail-card h3 {
  margin-top: 0;
}

.detail-card ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.detail-card li {
  color: var(--md-on-surface-muted);
  margin-bottom: 8px;
}

.form-success {
  text-align: center;
  padding: 40px 20px;
  display: none;
}
.form-success.visible { display: block; }
.form-success-icon {
  width: 64px;
  height: 64px;
  background-color: var(--md-primary-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.form-success h3 { color: var(--md-on-surface); margin-bottom: 8px; }

/* ---- DELETE ACCOUNT PAGE ---- */
.delete-steps {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.delete-steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--md-on-surface-muted);
}
.delete-steps li::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background-color: var(--md-primary-500);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}

.warning-box {
  background-color: #fff3e0;
  border-left: 4px solid #f57c00;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  font-size: 0.9rem;
  color: #5d4037;
  margin-bottom: 32px;
}

.legal-page-wrap code,
.detail-card code {
  background-color: var(--md-surface-variant);
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
  color: var(--md-on-surface);
}
@media (prefers-color-scheme: dark) {
  .warning-box {
    background-color: rgba(245,124,0,0.12);
    color: #ffcc80;
  }
}
