/* ════════════════════════════════════════════════════════════════
   Desty AI — Shared site chrome
   Used by: index.html, privacy.html, terms.html
   ════════════════════════════════════════════════════════════════ */

:root {
  --persimmon: #FF5A3C;
  --persimmon-dark: #E8401E;
  --coral: #FF8866;
  --coral-light: #FF9970;
  --navy: #0F0A2A;
  --navy-mid: #1A0F3A;
  --cream: #FDF4F0;
  --ink: #1A0805;
  --ink-soft: #6C6C70;
  --ink-mute: #AEAEB2;
  --line: #EBEBEB;
  --accent-soft: #FFF0EB;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* ── Site Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: transparent;
  transition: background 0.25s ease, backdrop-filter 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

body.scrolled .site-nav {
  background: rgba(15, 10, 42, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* When the nav sits over a light section (e.g. legal page hero) */
body.nav-light .site-nav {
  background: rgba(253, 244, 240, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
body.nav-light .site-nav .nav-link,
body.nav-light .site-nav .nav-brand-text { color: var(--ink); }
body.nav-light .site-nav .nav-link:hover { color: var(--persimmon); }
body.nav-light .site-nav .nav-logo-mark { background: rgba(255, 90, 60, 0.12); border-color: rgba(255, 90, 60, 0.18); }
body.nav-light .site-nav .nav-logo-mark svg { fill: var(--persimmon); }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s;
}
.nav-logo-mark svg { width: 18px; height: 18px; fill: #fff; transition: fill 0.2s; }

.nav-brand-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  transition: color 0.2s;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.nav-cta {
  flex-shrink: 0;
}

/* Compact App Store button used in the nav */
.nav-cta .app-store-btn {
  padding: 8px 14px;
  border-radius: 10px;
  gap: 8px;
}
.nav-cta .app-store-btn .btn-label small { font-size: 9px; }
.nav-cta .app-store-btn .btn-label strong { font-size: 13px; }

/* ── Hamburger button ── */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  border-radius: 8px;
  color: #fff;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.nav-menu-btn:hover { background: rgba(255,255,255,0.1); }
.nav-menu-btn .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), opacity 0.2s ease;
}
/* Morph into X when menu is open */
body.menu-open .nav-menu-btn .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-menu-btn .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.menu-open .nav-menu-btn .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

body.nav-light .nav-menu-btn { color: var(--ink); }
body.nav-light .nav-menu-btn:hover { background: rgba(0,0,0,0.06); }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
}

@media (max-width: 600px) {
  /* Hamburger menu already has the App Store CTA — hide the nav copy */
  .nav-cta { display: none; }
}

@media (max-width: 480px) {
  .site-nav { padding: 12px 18px; }
}

/* ── Mobile menu overlay ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(9, 6, 24, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  padding: 80px 32px 48px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16,1,0.3,1);
}

body.menu-open .mobile-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.menu-open { overflow: hidden; }

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.mobile-nav-link {
  font-family: var(--serif);
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 800;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  padding: 16px 0;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-link:hover,
.mobile-nav-link:active { color: var(--coral); }
.mobile-nav-chevron {
  font-size: 24px;
  opacity: 0.3;
  font-family: var(--sans);
  font-weight: 300;
  transition: opacity 0.2s, transform 0.2s;
}
.mobile-nav-link:hover .mobile-nav-chevron { opacity: 0.7; transform: translateX(3px); }

.mobile-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 20px 0 4px;
}

.mobile-legal-links {
  display: flex;
  flex-direction: column;
  margin-bottom: auto;
  padding-bottom: 32px;
}

.mobile-legal-link {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-legal-link:hover,
.mobile-legal-link:active { color: rgba(255,255,255,0.75); }

.mobile-menu-footer {
  padding-top: 28px;
}

.mobile-menu-footer .app-store-btn {
  width: 100%;
  justify-content: center;
  padding: 17px 24px;
  border-radius: 16px;
  background: var(--persimmon);
  gap: 12px;
}
.mobile-menu-footer .app-store-btn:hover { opacity: 0.9; }
.mobile-menu-footer .apple-icon { width: 24px; height: 24px; }
.mobile-menu-footer .btn-label small { font-size: 12px; }
.mobile-menu-footer .btn-label strong { font-size: 20px; }

/* ── Apple icon SVG ── */
.apple-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}
.nav-cta .apple-icon { width: 15px; height: 15px; }

/* ── App Store Button (shared) ── */
.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #111;
  color: #fff;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 14px;
  transition: opacity 0.2s, transform 0.15s;
  width: fit-content;
}
.app-store-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.app-store-btn .btn-label { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.app-store-btn .btn-label small { font-size: 11px; font-weight: 400; opacity: 0.8; letter-spacing: 0.02em; }
.app-store-btn .btn-label strong { font-size: 18px; font-weight: 600; letter-spacing: -0.2px; }

/* ── Eyebrow & Chip (shared) ── */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 7px 15px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 28px;
  width: fit-content;
}
.chip-star { font-size: 11px; color: #9B6FFF; }

/* ── Footer (shared) ── */
.site-footer {
  background: var(--navy);
  padding: 44px 28px 36px;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 20px;
}

.footer-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 3px;
}
.footer-tagline { font-size: 13px; color: rgba(255, 255, 255, 0.35); }

.footer-links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255, 255, 255, 0.85); }

.footer-socials {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.footer-socials a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}
.footer-socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.22);
}

@media (min-width: 768px) {
  .site-footer { padding: 52px; }
}

/* ════════════════════════════════════════════════════════════════
   Scroll-reveal animations
   JS adds .is-visible via IntersectionObserver; hero uses CSS
   keyframes directly (no observer needed — already in view).
   ════════════════════════════════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Scroll-reveal base states */
.anim {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-scale {
  opacity: 0;
  transform: scale(0.93) translateY(10px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-left {
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-right {
  opacity: 0;
  transform: translateX(22px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-pop {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.anim.is-visible,
.anim-scale.is-visible,
.anim-left.is-visible,
.anim-right.is-visible,
.anim-pop.is-visible {
  opacity: 1;
  transform: none;
}

/* Honour reduced-motion preference — skip all animations */
@media (prefers-reduced-motion: reduce) {
  .anim, .anim-scale, .anim-left, .anim-right, .anim-pop {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}
