/* Shared theme for the app store and every app. Taken from the Aesthetic Dine marketing theme.
   Parts of the theme we don't use yet live in theme-kit/extras.css. */

/* ===== CSS Variables & Theming ===== */
:root {
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --transition-theme: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-primary: #f0eef5;
  --text-secondary: rgba(240, 238, 245, 0.65);
  --text-muted: rgba(240, 238, 245, 0.4);
  --accent-1: #c084fc;
  --accent-2: #f472b6;
  --accent-3: #818cf8;
  --gradient-hero: linear-gradient(135deg, #c084fc22, #f472b622, #818cf822);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(192, 132, 252, 0.15);
  --cursor-glow: rgba(192, 132, 252, 0.12);
  --orb-opacity: 0.5;
  /* Soft purple frost — readable if blur fails, not a solid black slab */
  --nav-bg-mobile: rgba(28, 18, 48, 0.42);
  --nav-bg-open: rgba(12, 10, 20, 0.94);
}

[data-theme='light'] {
  --bg-primary: #faf8fc;
  --bg-secondary: #f0ecf5;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-hover: rgba(255, 255, 255, 0.9);
  --border-glass: rgba(0, 0, 0, 0.06);
  --text-primary: #1a1520;
  --text-secondary: rgba(26, 21, 32, 0.65);
  --text-muted: rgba(26, 21, 32, 0.4);
  --accent-1: #9333ea;
  --accent-2: #db2777;
  --accent-3: #6366f1;
  --gradient-hero: linear-gradient(135deg, #9333ea18, #db277718, #6366f118);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 60px rgba(147, 51, 234, 0.1);
  --cursor-glow: rgba(147, 51, 234, 0.08);
  --orb-opacity: 0.35;
  --nav-bg-mobile: rgba(250, 248, 252, 0.72);
  --nav-bg-open: rgba(250, 248, 252, 0.96);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  /* Do not use overflow-x: hidden here — it disables backdrop-filter on mobile Safari. */
  transition:
    background var(--transition-theme),
    color var(--transition-theme);
}

[data-theme='dark'] body {
  background-color: var(--bg-primary);
  background-image: radial-gradient(
    ellipse 130% 55% at 50% -8%,
    rgba(140, 80, 200, 0.28),
    transparent 58%
  );
}

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

/* ===== Cursor Glow ===== */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cursor-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ===== Particle Canvas ===== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: var(--bg-glass);
  /* webkit first — LightningCSS sometimes drops the unprefixed twin */
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border-glass);
  transition:
    background var(--transition-theme),
    border-color var(--transition-theme);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  background: var(--bg-glass);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition:
    background var(--transition-theme),
    border-color var(--transition-theme),
    transform 0.3s,
    box-shadow 0.3s;
}

.theme-toggle:hover {
  background: var(--bg-glass-hover);
  transform: scale(1.08);
  box-shadow: var(--shadow-glow);
}

.theme-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  color: var(--text-primary);
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.5s;
}

.theme-icon svg {
  width: 100%;
  height: 100%;
}

[data-theme='dark'] .theme-icon.sun {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

[data-theme='dark'] .theme-icon.moon {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

[data-theme='light'] .theme-icon.sun {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

[data-theme='light'] .theme-icon.moon {
  transform: rotate(-90deg) scale(0);
  opacity: 0;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Bottom padding keeps the buttons clear of the scroll indicator (2rem + 60px line). */
  padding: 6rem 2rem 7.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--orb-opacity);
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-1);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-2);
  bottom: -10%;
  left: -5%;
  animation-delay: -3s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-3);
  top: 40%;
  left: 50%;
  animation-delay: -5s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

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

.hero-tag {
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.title-line {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--text-primary) 0%,
    var(--accent-1) 50%,
    var(--accent-2) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  /* Constant speed, reversing each way: ease-in-out crawled at the ends and moved in visible pixel steps. */
  animation: shimmer-text 3s linear infinite alternate;
  will-change: background-position;
}

@keyframes shimmer-text {
  from {
    background-position: 0% center;
  }
  to {
    background-position: 200% center;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(192, 132, 252, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(192, 132, 252, 0.45);
}

.btn-primary:disabled {
  transform: none;
  cursor: wait;
  opacity: 1;
}

.submit-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 3.25rem;
}

.submit-btn__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.32),
    rgba(255, 255, 255, 0.12)
  );
  background-size: 200% 100%;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 0;
}

.submit-btn.is-busy .submit-btn__fill {
  animation: submit-shimmer 1.4s linear infinite;
}

.submit-btn__label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.submit-btn__spinner {
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: submit-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes submit-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-ghost {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: var(--bg-glass-hover);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent-1), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.6);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ===== Sections Shared ===== */
section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
}

/* ===== Features ===== */
.features {
  max-width: 1100px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(20px);
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s,
    border-color 0.5s,
    background var(--transition-theme);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(192, 132, 252, 0.2);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  color: var(--accent-1);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(5deg);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 300;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: border-color var(--transition-theme);
}

.footer strong {
  color: var(--accent-1);
  font-weight: 500;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 1.5rem;
  margin-top: 0.85rem;
  font-size: 0.8125rem;
}

.footer-links a {
  color: var(--accent-1);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.75;
}

.footer-ornament {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.footer-ornament span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-1);
  animation: dot-pulse 2s ease-in-out infinite;
}

.footer-ornament span:nth-child(2) {
  animation-delay: 0.3s;
}
.footer-ornament span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes dot-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* ===== Scroll Animations ===== */
[data-animate] {
  opacity: 0;
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate='fade-up'] {
  transform: translateY(40px);
}

[data-animate='fade-down'] {
  transform: translateY(-30px);
}

[data-animate='fade-right'] {
  transform: translateX(-40px);
}

[data-animate='fade-left'] {
  transform: translateX(40px);
}

[data-animate='scale-in'] {
  transform: scale(0.9);
}

[data-animate].visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

[data-delay='1'] {
  transition-delay: 0.1s;
}
[data-delay='2'] {
  transition-delay: 0.2s;
}
[data-delay='3'] {
  transition-delay: 0.3s;
}
[data-delay='4'] {
  transition-delay: 0.4s;
}
[data-delay='5'] {
  transition-delay: 0.5s;
}
[data-delay='6'] {
  transition-delay: 0.6s;
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ===== Nav extras ===== */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  background: var(--bg-glass);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-open .nav-toggle span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.nav-mobile-cta {
  display: none;
}

.nav-cta-desktop {
  margin-right: 0.75rem;
  padding: 0.6rem 1.25rem;
}

body.nav-locked {
  overflow: hidden;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    padding: 0.85rem 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: var(--nav-bg-mobile);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
  }

  .nav.nav-open {
    background: var(--nav-bg-open);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
  }

  .logo {
    font-size: 1.4rem;
    margin-right: auto;
  }

  .nav-toggle {
    display: inline-flex;
    order: 2;
  }

  .theme-toggle {
    order: 3;
    width: 44px;
    height: 44px;
  }

  .nav-cta-desktop {
    display: none;
  }

  .nav-links {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid var(--border-glass);
    margin-top: 0.5rem;
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0.25rem;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0.02em;
  }

  .nav-mobile-cta {
    display: block;
    padding: 0.75rem 0 0.5rem;
  }

  .nav-mobile-cta .btn {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0.875rem 2rem;
  }

  .hero {
    min-height: 100svh;
    padding: 6.5rem 1.25rem 7rem;
  }

  .hero-title {
    font-size: clamp(2.75rem, 16vw, 4.5rem);
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .orb-1,
  .orb-2,
  .orb-3 {
    filter: blur(60px);
  }

  section {
    padding: 4rem 1.25rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-label,
  .hero-tag {
    font-size: 0.875rem;
    letter-spacing: 0.16em;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card {
    padding: 1.75rem 1.35rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-visual {
    height: 300px;
    max-width: 340px;
    margin: 0 auto;
  }

  .floating-card {
    min-width: 10.25rem;
    padding: 1.15rem 1.25rem;
  }

  .card-1 {
    top: 4%;
    left: 2%;
  }

  .card-2 {
    top: 36%;
    right: 0;
  }

  .card-3 {
    bottom: 4%;
    left: 14%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-item.wide {
    grid-column: span 1;
    aspect-ratio: 4/3;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .pricing-card {
    padding: 1.75rem 1.35rem;
  }

  .pricing-intro {
    font-size: 1rem;
    padding: 0 0.25rem;
  }

  .intake-form {
    margin-bottom: 3rem;
    padding: 0 0.25rem;
  }

  .page-hero {
    padding: 7rem 1.25rem 2.5rem;
  }

  /* Avoid off-screen sideways reveals on narrow screens */
  [data-animate='fade-right'],
  [data-animate='fade-left'] {
    transform: translateY(28px);
  }

  [data-animate].visible {
    transform: translate(0) scale(1);
  }

  .cursor-glow {
    display: none;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 1.2rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }
}

