/* ============================================================
   Petsomo App — app.petsomo.com landing page
   Shares design tokens with petsomo.com main site
   ============================================================ */

:root {
  --bg: #edf4ff;
  --surface: #f8fbff;
  --surface-strong: #ffffff;
  --ink: #163152;
  --ink-soft: #1e3c6b;
  --muted: #4a6387;
  --line: #dfe8f7;
  --blue: #1857c9;
  --blue-deep: #0f3d8c;
  --teal: #3f75e6;
  --sand: #dce9ff;
  --danger: #b25546;

  --shadow-sm: 0 1px 2px rgba(22, 49, 82, 0.06);
  --shadow-md: 0 4px 16px rgba(22, 49, 82, 0.08);
  --shadow-lg: 0 16px 48px rgba(22, 49, 82, 0.14);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shell: 1160px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --trans: 180ms ease-out;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: petsomo-fade-in 260ms ease-out both;
}

@keyframes petsomo-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 32px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}

/* ======================= NAV ======================= */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--blue-deep); }
.brand__logo {
  display: block;
  /* PNG canvas is 1500x1500 square with ~35% transparent padding on each side,
     so we need a bigger bounding box to get readable text height.
     72px canvas → ~46px visible wordmark height, paired against the 28px App pill. */
  height: 72px;
  width: 72px;
  /* Pull the visual padding back in so logo + pill read as one tight unit. */
  margin: -20px -8px -20px -18px;
}
.brand__mark { display: inline-block; }
.brand__sub {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--sand);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
}
.nav__links {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.nav__links a {
  color: var(--ink-soft);
}
.nav__links a:hover {
  color: var(--blue);
  text-decoration: none;
}

/* ======================= HERO ======================= */
.hero {
  padding: 40px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -120px -5% auto auto;
  width: 640px; height: 640px;
  background: radial-gradient(closest-side, rgba(24, 87, 201, 0.16), transparent 70%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: center;
}
.hero__eyebrow {
  display: inline-block;
  background: var(--surface-strong);
  color: var(--blue);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(44px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin-bottom: 22px;
}
.hero__sub {
  font-size: 20px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 36px;
  line-height: 1.5;
}
.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero__note {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.hero__note a { color: var(--ink-soft); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #0c1e3a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 14px;
  min-width: 178px;
  line-height: 1.1;
  transition: transform var(--trans), background var(--trans);
  cursor: not-allowed;
}
.badge[aria-disabled="true"] { opacity: 0.9; }
.badge:hover { background: var(--ink); color: #fff; text-decoration: none; transform: translateY(-1px); }
.badge svg { flex-shrink: 0; }
.badge small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 500;
  margin-bottom: 2px;
}
.badge strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* iPhone screenshot carousel. Each slide is a transparent-PNG iPhone mockup
   (frame + screen baked in) so we don't need a CSS device frame — slides
   crossfade in place inside .phone-carousel__stage which keeps a fixed
   aspect-ratio so layout doesn't jump between slides. */
.hero__visual {
  display: flex;
  justify-content: center;
}
.phone-carousel {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  filter: drop-shadow(0 30px 50px rgba(22, 49, 82, 0.20));
  animation: phone-float 5s ease-in-out infinite alternate;
}
.phone-carousel__stage {
  position: relative;
  /* Average aspect of the 5 source slides ≈ 500:1080. Each slide uses
     object-fit:contain so any ±1% variance becomes invisible letterbox. */
  aspect-ratio: 500 / 1080;
}
.phone-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 700ms ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.phone-carousel__slide.is-active {
  opacity: 1;
}
.phone-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.phone-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 49, 82, 0.22);
  cursor: pointer;
  transition: background 200ms ease, width 200ms ease, border-radius 200ms ease;
}
.phone-carousel__dot:hover {
  background: rgba(22, 49, 82, 0.45);
}
.phone-carousel__dot:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.phone-carousel__dot.is-active {
  background: var(--blue);
  width: 22px;
  border-radius: 4px;
}
@keyframes phone-float {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

/* ======================= WHY BAND ======================= */
.band {
  background: var(--ink);
  color: #fff;
  padding: 72px 0;
}
.band__wrap {
  text-align: center;
}
.band__big {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: #fff;
  line-height: 1.2;
}
.band__sub {
  font-size: 18px;
  color: #b6c7e5;
  margin: 0;
}

/* ======================= FEATURES ======================= */
.features {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.eyebrow {
  display: inline-block;
  color: var(--blue);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.eyebrow--blue { color: var(--blue); }
.eyebrow--sand { color: var(--sand); }
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(24, 87, 201, 0.24);
}
.feature__icon {
  display: inline-flex;
  width: 52px; height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bg);
  color: var(--blue);
  margin-bottom: 18px;
}
.feature h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

/* ======================= AUDIENCES (split) ======================= */
.audiences {
  padding: 100px 0;
  background: var(--bg);
}
.audiences__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.audience {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
}
.audience h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 22px;
  line-height: 1.15;
}
.audience__list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 12px;
}
.audience__list li {
  position: relative;
  padding-left: 30px;
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.5;
}
.audience__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231857c9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/12px no-repeat;
}
.audience--dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.audience--dark h3 { color: #fff; }
.audience__list--light li { color: #c8d4ea; }
.audience__list--light li::before {
  background: rgba(255,255,255,0.08) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dce9ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/12px no-repeat;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform var(--trans), background var(--trans), color var(--trans);
  border: 1px solid transparent;
  cursor: pointer;
}
.button--primary {
  background: var(--blue);
  color: #fff;
}
.button--primary:hover {
  background: var(--blue-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.button--ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.button--ghost-light:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}
.button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}
.audience__ctas,
.notify__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ======================= HOW ======================= */
.how {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.how__steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.how__steps li {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 28px;
}
.how__n {
  display: inline-flex;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 16px;
}
.how__steps h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
}
.how__steps p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
  line-height: 1.55;
}

/* ======================= NOTIFY ======================= */
.notify {
  padding: 90px 0;
  background: linear-gradient(135deg, #1857c9 0%, #3f75e6 100%);
  color: #fff;
}
.notify__wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.notify h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.notify p {
  color: rgba(255,255,255,0.84);
  margin: 0;
  font-size: 16px;
  max-width: 500px;
}
.notify__form {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.notify__form input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  padding: 10px 18px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
}
.notify__form input::placeholder { color: rgba(255,255,255,0.55); }
.notify__form button {
  background: #fff;
  color: var(--blue);
  padding: 10px 22px;
}
.notify__form button:hover {
  background: var(--sand);
  color: var(--blue-deep);
  transform: none;
}

/* ======================= FOOTER ======================= */
.footer {
  background: var(--ink);
  color: #c8d4ea;
  padding: 48px 0 36px;
}
.footer__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}
.footer__logo {
  display: block;
  /* Same canvas-padding compensation as nav. 56px box → ~36px visible white wordmark. */
  height: 56px;
  width: 56px;
  margin: -16px -8px -16px -12px;
  /* Wordmark PNG is solid blue; flatten + invert to render as pure white on the dark footer. */
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.footer__links {
  display: inline-flex;
  gap: 24px;
  font-size: 14px;
  flex-wrap: wrap;
}
.footer__links a {
  color: #c8d4ea;
}
.footer__links a:hover {
  color: #fff;
  text-decoration: none;
}
.footer__copy {
  width: 100%;
  text-align: center;
  color: #8fa8d3;
  font-size: 13px;
  margin: 24px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ============================================================
   RESPONSIVE
   Matches main site's 8-level breakpoint philosophy, simplified.
   ============================================================ */
@media (max-width: 1024px) {
  .hero { padding: 24px 0 72px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { order: -1; }
  .phone-carousel { max-width: 280px; }
  .feature-grid,
  .how__steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .shell { padding: 0 24px; }
  .nav__links { gap: 16px; font-size: 14px; }
  .nav__links a[href*="petsomo.com/"] { display: none; }
  .hero h1 { font-size: clamp(36px, 9vw, 54px); }
  .hero__sub { font-size: 17px; }
  .audiences__grid { grid-template-columns: 1fr; }
  .audience { padding: 36px 28px; }
  .band { padding: 56px 0; }
  .features,
  .how,
  .audiences { padding: 72px 0; }
  .notify__wrap { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .feature-grid,
  .how__steps { grid-template-columns: 1fr; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .badge { min-width: 0; width: 100%; }
  .notify__form { flex-direction: column; border-radius: 18px; padding: 10px; }
  .notify__form button { width: 100%; }
  .hero { padding: 16px 0 56px; }
  .section-head { margin-bottom: 40px; }
  .footer__grid { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 375px) {
  .shell { padding: 0 18px; }
  .brand__sub { display: none; }
  .hero__eyebrow { font-size: 12px; padding: 6px 10px; }
  .feature { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .phone-carousel,
  .phone-carousel__slide,
  .phone-carousel__dot,
  .feature { animation: none !important; transition: none !important; }
}
