/* ============================================================
   philos.pet — shared stylesheet for the landing site +
   legal docs. Mirrors the React Native app's design system
   (see pet-app/lib/theme.ts) so the web touchpoint feels like
   the same product, not a separate marketing site.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --primary: #0f5f5c;
  --secondary: #148c8c;
  --accent: #ff8c7a;
  --dark-surface: #083d3d;

  /* Surfaces */
  --background: #f5faf9;
  --surface: #ffffff;
  --surface-alt: #eaf2f1;

  /* Text */
  --text-primary: #1b2b2b;
  --text-muted: #5b6e6e;
  --text-inverse: #ffffff;

  /* Borders */
  --border: #d9e5e4;
  --border-strong: #a8bfbe;

  /* Layout */
  --max-width: 1080px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-xxl: 28px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-subtle: 0 2px 8px rgba(8, 61, 61, 0.04);
  --shadow-card: 0 6px 18px rgba(8, 61, 61, 0.08);
  --shadow-lifted: 0 12px 30px rgba(8, 61, 61, 0.12);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.75;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

.muted {
  color: var(--text-muted);
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}

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

section {
  padding: 80px 0;
}

@media (max-width: 640px) {
  section {
    padding: 56px 0;
  }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 250, 249, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
}

.brand-wordmark {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 640px) {
  .nav-links {
    gap: 18px;
  }
  .nav-links a {
    font-size: 0.9rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(20, 140, 140, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(255, 140, 122, 0.06) 0%,
      transparent 50%
    );
  z-index: -1;
}

.hero-logo {
  /* Responsive logo sizing: small on phones (120 px floor), grows
     fluidly up to 152 px on desktop. Roughly 1.5× the old 96 px so
     it reads as a real "hero mark" rather than an inline icon. */
  width: clamp(120px, 13vw, 152px);
  height: clamp(120px, 13vw, 152px);
  margin: 0 auto 28px;
}

.hero h1 {
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

/* ---------- App store badges ---------- */
.coming-soon-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/**
 * Coming Soon badge — promoted from "floating eyebrow text" to a real label.
 * Coral fill + white type for contrast against the misty background, a soft
 * coral glow to lift it off the page, and a tiny pulsing dot on the left
 * to give it the feel of a live status indicator.
 */
.coming-soon-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-inverse);
  padding: 12px 24px;
  background: var(--accent);
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  box-shadow: 0 6px 18px rgba(255, 140, 122, 0.32);
}

.coming-soon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  animation: coming-soon-pulse 1.8s ease-in-out infinite;
}

@keyframes coming-soon-pulse {
  0%,
  100% {
    opacity: 0.95;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.7);
  }
}

.badge-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--text-primary);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.store-badge .store-icon {
  width: 28px;
  height: 28px;
}

.store-badge .store-text-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.store-badge .store-text-small {
  font-size: 0.7rem;
  opacity: 0.85;
}

.store-badge .store-text-large {
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- Feature grid ---------- */
.features {
  background: var(--surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.feature-card {
  background: var(--background);
  border-radius: var(--radius-xxl);
  padding: 36px 32px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lifted);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--text-inverse);
  stroke: var(--text-inverse);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- About / story section ---------- */
.about {
  background: var(--background);
  text-align: center;
}

.about-content {
  max-width: 720px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark-surface);
  color: var(--text-inverse);
  padding: 56px 0 32px;
}

/**
 * Footer is centered: brand block on top, links row below, copyright at
 * the bottom. Cleaner symmetry than the previous left/right split, and
 * reads better on narrow viewports where the right column was wrapping.
 */
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.footer-brand .brand-wordmark {
  color: var(--text-inverse);
}

.footer-brand-tag {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 8px;
  /* No left margin — the tag is centered with the rest of the column. */
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent);
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Legal-doc pages ---------- */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.legal-page h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
  color: var(--primary);
  background: none;
  -webkit-text-fill-color: var(--primary);
  letter-spacing: -0.02em;
}

.legal-page .last-updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-page h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--primary);
}

.legal-page h3 {
  font-size: 1.125rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-page p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.legal-page ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-page li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.legal-page strong {
  color: var(--primary);
}

.disclaimer {
  background: var(--surface-alt);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.disclaimer strong {
  color: var(--text-primary);
}

/* ============================================================
   Scroll-triggered animations
   ============================================================ */

/* Elements start invisible + offset; revealed when they enter viewport
   (via IntersectionObserver toggling the `.in-view` class). */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children by setting `style="--reveal-delay: 100ms"` etc. */
.reveal[style*='--reveal-delay'] {
  transition-delay: var(--reveal-delay);
}

/* ============================================================
   Hero — premium treatment
   ============================================================ */

/* ============================================================
   Hero-logo animation system
   ------------------------------------------------------------
   Two phases:
     1) ENTRANCE (~1.4s, one-shot on page load): each piece of the
        logo pops in sequentially — center toe, then left + right
        toes, then the heart pad rises from below, then the coral
        dot lands with a small overshoot.
     2) STEADY STATE (loops forever): the whole logo gently floats,
        and the coral dot keeps a real heartbeat going (thump-thump,
        rest), echoing the "heart at the center of the paw" idea.
   ============================================================ */

/* Each child of .hero-logo transforms relative to its own bounding
   box, so `transform-origin: center` actually centers on the
   element (not on the SVG's 0,0 corner). */
.hero-logo .logo-toe,
.hero-logo .logo-pad,
.hero-logo .logo-dot {
  transform-box: fill-box;
  transform-origin: center;
}

/* Subtle floating breath on the whole logo. Stays running while
   the per-piece entrance + heartbeat animations layer on top of
   it — they compose, since the parent translates and children
   scale independently. */
@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero-logo {
  animation: hero-float 4s ease-in-out infinite;
}

/* Entrance keyframes. The cubic-bezier curve overshoots slightly
   on the way in (the 1.56 in the y-component) which gives each
   piece a satisfying "pop". */
@keyframes hero-logo-toe-pop {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  60% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hero-logo-pad-rise {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-logo-dot-land {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  55% {
    opacity: 1;
    transform: scale(1.4);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Heartbeat — thump (10%), recover (20%), softer thump (30%),
   recover (40%), then 60% of the cycle is rest. This is the same
   rhythm we use on the Matches empty-state illustration in the
   mobile app, so the two surfaces share a heartbeat. */
@keyframes hero-logo-heartbeat {
  0%,
  60%,
  100% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.35);
  }
  20% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.2);
  }
  40% {
    transform: scale(1);
  }
}

/* Staggered entrance — the center toe goes first because it sits
   at the apex of the paw, then the side toes "catch up". Durations
   and delays are ~10% slower than the initial v1; gives the build
   a slightly more deliberate feel without dragging. */
.hero-logo .logo-toe-center {
  animation: hero-logo-toe-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.06s
    both;
}
.hero-logo .logo-toe-left {
  animation: hero-logo-toe-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
.hero-logo .logo-toe-right {
  animation: hero-logo-toe-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.33s
    both;
}
.hero-logo .logo-pad {
  animation: hero-logo-pad-rise 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s
    both;
}
/* Coral dot: pops in once (entrance ~10% slower), then keeps the
   1.8 s heartbeat going forever — heartbeat speed is unchanged. */
.hero-logo .logo-dot {
  animation: hero-logo-dot-land 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.94s
      both,
    hero-logo-heartbeat 1.8s ease-in-out 1.76s infinite;
}

/* Accessibility: users who prefer reduced motion get a still logo. */
@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .hero-logo .logo-toe,
  .hero-logo .logo-pad,
  .hero-logo .logo-dot {
    animation: none !important;
  }
}

/* Decorative blurred orbs in the hero background — adds depth without
   the cost of an image. */
.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}

.hero-orb-1 {
  width: 360px;
  height: 360px;
  background: var(--secondary);
  top: -120px;
  left: -80px;
}

.hero-orb-2 {
  width: 280px;
  height: 280px;
  background: var(--accent);
  bottom: -100px;
  right: -60px;
  opacity: 0.35;
}

/* ============================================================
   Phone mockup section — "see what it looks like"
   ============================================================ */

.showcase {
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 880px) {
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.showcase-copy h2 {
  margin-bottom: 16px;
}

.showcase-copy p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 460px;
}

/* The phone — pure CSS, no image. Width is intrinsic so we can size up. */
.phone-frame-wrap {
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: 280px;
  height: 568px;
  background: #1b2b2b;
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 30px 60px rgba(8, 61, 61, 0.18),
    0 12px 24px rgba(8, 61, 61, 0.08);
  transform: rotate(-2deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.phone-frame:hover {
  transform: rotate(0deg) translateY(-4px);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--background);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}

/* Top notch */
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 22px;
  background: #1b2b2b;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

/* The fake swipe card inside the phone */
.phone-card {
  position: absolute;
  top: 56px;
  left: 16px;
  right: 16px;
  bottom: 96px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--secondary) 100%
  );
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(8, 61, 61, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Decorative paw at top of card */
.phone-card-paw {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  opacity: 0.18;
}

.phone-card-info {
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  margin: 12px;
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.phone-card-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.phone-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.phone-card-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.phone-card-tag {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--secondary);
  background: var(--surface-alt);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

/* Fake action buttons at the bottom of the phone */
.phone-actions {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.phone-action-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(8, 61, 61, 0.18);
}

.phone-action-pass {
  background: var(--surface);
  border: 2px solid #d96c6c;
}

.phone-action-like {
  background: var(--accent);
}

/* ============================================================
   Trust strip — used between sections to add weight
   ============================================================ */
.trust-strip {
  padding: 36px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trust-item-value {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.trust-item-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}
