/* ==========================================================================
   Sahaj — hand-written styles that sit on top of Tailwind (CDN)
   Organised by: base, motion/reveal, phone mockup, components
   ========================================================================== */

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: #FBF7F0; /* cream */
  color: #243D31; /* forest */
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: #C3B7D6; /* lavender */
  color: #1F3B3D;
}

/* Keep a visible, gentle focus ring for keyboard users without harsh outlines */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #92A889; /* sage */
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Scroll reveal (fade-up) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  will-change: opacity, transform;
}

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

/* Respect users who don't want motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .animate-floaty,
  .animate-floaty-slow {
    animation: none !important;
  }
}

/* ---------- Subtle floating phone ---------- */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-16px) rotate(-1.5deg); }
}

@keyframes floaty-slow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.animate-floaty {
  animation: floaty 7s ease-in-out infinite;
}

.animate-floaty-slow {
  animation: floaty-slow 8s ease-in-out infinite;
}

/* ---------- Phone frame (used in hero + screenshots) ---------- */
.phone-frame {
  position: relative;
  border-radius: 2.75rem;
  padding: 14px;
  background: linear-gradient(160deg, #24382d, #16241c);
  box-shadow:
    0 30px 60px -20px rgba(31, 59, 61, 0.35),
    0 10px 20px -10px rgba(31, 59, 61, 0.2);
}

.phone-frame__screen {
  position: relative;
  overflow: hidden;
  border-radius: 2.1rem;
  background: #FBF7F0;
  aspect-ratio: 9 / 19.5;
}

.phone-frame__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 18px;
  background: #16241c;
  border-radius: 999px;
  z-index: 10;
}

/* Soft ambient glow behind hero phone */
.hero-glow {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(closest-side, rgba(146, 168, 137, 0.45), transparent 70%),
    radial-gradient(closest-side, rgba(195, 183, 214, 0.35), transparent 65%);
  filter: blur(40px);
  z-index: 0;
}

/* ---------- Buttons ---------- */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}

.btn-store:hover {
  transform: translateY(-2px);
}

.btn-store--primary {
  background-color: #243D31;
  color: #FBF7F0;
  box-shadow: 0 12px 24px -12px rgba(36, 61, 49, 0.55);
}

.btn-store--primary:hover {
  background-color: #1c3128;
  box-shadow: 0 16px 30px -14px rgba(36, 61, 49, 0.6);
}

.btn-store--secondary {
  background-color: transparent;
  color: #243D31;
  border: 1.5px solid rgba(36, 61, 49, 0.35);
}

.btn-store--secondary:hover {
  border-color: rgba(36, 61, 49, 0.6);
  background-color: rgba(36, 61, 49, 0.05);
}

/* ---------- Nav underline ---------- */
.nav-link {
  position: relative;
  color: #243D31;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background-color: #92A889;
  transition: width 0.35s ease;
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

/* ---------- Screenshot placeholder frame ---------- */
.screenshot-slot {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  background: linear-gradient(155deg, #EFE4D2, #E4D6BE);
}

.screenshot-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gracefully hide the broken-image icon; the caption communicates intent instead */
.screenshot-slot img::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
}

/* ---------- Mobile menu ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

#mobile-menu.open {
  max-height: 320px;
}
