/* Rehome Pets — design system.
   Mobile-first: base rules target phones, min-width queries scale up. 65% of this
   site's search impressions are mobile and they rank ~12 positions better than
   desktop, so the phone layout is the primary one, not a fallback.

   Palette is taken from the Pets Home app codebase (#06b6d4 / #0891b2) so the
   site chrome matches the app screenshots and video embedded throughout. */

:root {
  --brand: #06b6d4;
  --brand-600: #0891b2;
  --brand-700: #0e7490;
  --brand-wash: #ecfeff;

  --ink: #0f172a;
  --ink-soft: #334155;
  --ink-faint: #64748b;
  --line: #e2e8f0;
  --wash: #f8fafc;

  --good: #059669;
  --bad: #dc2626;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .1);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 10px 20px -5px rgba(15, 23, 42, .1);
  --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, .25);

  --header-h: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-700);
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
}

.container-narrow {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 18px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.header-nav {
  display: none;
  gap: 24px;
}

.header-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .94rem;
  font-weight: 500;
}

.header-nav a:hover {
  color: var(--brand-700);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  /* 48px keeps every CTA inside the tap-target guideline on phones */
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}

.btn-primary {
  background: var(--brand-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-700);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-700);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: .9rem;
}

.btn-block {
  width: 100%;
}

/* ---------- Store badges ---------- */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.store-badges img {
  width: 150px;
}

.store-badges.center {
  justify-content: center;
}

/* ---------- Hero ---------- */

.hero {
  padding: 32px 0 8px;
  background:
    radial-gradient(1100px 480px at 50% -10%, var(--brand-wash) 0%, rgba(255, 255, 255, 0) 70%);
}

.hero-grid {
  display: grid;
  gap: 30px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  margin-bottom: 15px;
  border-radius: 999px;
  background: var(--brand-wash);
  border: 1px solid #a5f3fc;
  color: var(--brand-700);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .01em;
}

h1,
.h1 {
  font-size: 2.05rem;
  line-height: 1.13;
  letter-spacing: -.03em;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.cta-note {
  font-size: .84rem;
  color: var(--ink-faint);
}

/* Phone frame — used for both the looping video and static screenshots */
.phone {
  position: relative;
  width: 250px;
  margin: 0 auto;
  border: 5px solid #111827;
  border-radius: 32px;
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow-lg);
}

.phone video,
.phone img {
  width: 100%;
  display: block;
  border-radius: 27px;
}

.phone-caption {
  margin-top: 12px;
  text-align: center;
  font-size: .82rem;
  color: var(--ink-faint);
}

/* ---------- Trust strip ---------- */

.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--wash);
  padding: 18px 0;
  margin-top: 30px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 10px;
  text-align: center;
}

.trust-item strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}

.trust-item span {
  font-size: .8rem;
  color: var(--ink-faint);
}

.stars {
  color: #f59e0b;
  letter-spacing: 1px;
}

/* ---------- Sections ---------- */

section {
  padding: 46px 0;
}

.section-wash {
  background: var(--wash);
}

.section-head {
  max-width: 620px;
  margin: 0 auto 30px;
  text-align: center;
}

h2,
.h2 {
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 800;
}

.section-head p {
  margin-top: 10px;
  color: var(--ink-soft);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: 28px;
}

.step-shot {
  margin-bottom: 16px;
}

/* Step screenshots are 1:2.16 portrait. At full .phone width three of them stack
   into ~1600px of scrolling on a phone, so they run smaller than the hero. */
.steps .phone {
  width: 168px;
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step p {
  color: var(--ink-soft);
  margin-top: 7px;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 14px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card p {
  color: var(--ink-soft);
  margin-top: 7px;
  font-size: .96rem;
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: block;
}

/* ---------- Species links ---------- */

.species-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.species-card {
  display: block;
  padding: 16px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .15s;
}

.species-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.species-card em {
  font-size: 1.5rem;
  font-style: normal;
  display: block;
  margin-bottom: 6px;
}

.species-card strong {
  display: block;
  font-size: .96rem;
}

.species-card span {
  font-size: .8rem;
  color: var(--ink-faint);
}

/* ---------- Proof (real listings) ---------- */

.proof-grid {
  display: grid;
  gap: 30px;
  justify-items: center;
}

.proof figcaption {
  margin-top: 14px;
  font-size: .88rem;
  color: var(--ink-soft);
  text-align: center;
  max-width: 300px;
}

.flag {
  font-size: 1rem;
  margin-right: 5px;
}

/* ---------- Download block ---------- */

.download {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 22px;
  text-align: center;
}

.download h2 {
  color: #fff;
}

.download p {
  color: rgba(255, 255, 255, .92);
  margin: 10px auto 20px;
  max-width: 460px;
}

.download .cta-note {
  color: rgba(255, 255, 255, .8);
  margin-top: 14px;
}

/* Desktop hand-off: a desktop visitor cannot install a phone app, so give them
   a route to their phone rather than a dead end. Hidden on touch layouts. */
.qr-handoff {
  display: none;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .25);
}

.qr-handoff img {
  width: 82px;
  height: 82px;
  background: #fff;
  padding: 6px;
  border-radius: 8px;
}

.qr-handoff div {
  text-align: left;
}

.qr-handoff strong {
  display: block;
  font-size: .92rem;
}

.qr-handoff span {
  font-size: .8rem;
  color: rgba(255, 255, 255, .82);
}

/* ---------- Guide article pages ---------- */

.breadcrumbs {
  font-size: .84rem;
  color: var(--ink-faint);
  padding: 16px 0 0;
}

.breadcrumbs a {
  color: var(--ink-faint);
}

.guide-hero {
  padding: 14px 0 26px;
  border-bottom: 1px solid var(--line);
}

.guide-hero h1 {
  font-size: 1.95rem;
}

.standfirst {
  font-size: 1.1rem;
  color: var(--ink-soft);
}

article {
  padding: 26px 0 40px;
}

article h2 {
  margin: 40px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

article h3 {
  margin: 26px 0 8px;
}

article p {
  margin-bottom: 16px;
  color: var(--ink-soft);
}

article ul,
article ol {
  margin: 0 0 20px 22px;
  color: var(--ink-soft);
}

article li {
  margin-bottom: 8px;
}

article strong {
  color: var(--ink);
}

.toc {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 26px 0;
}

.toc h2 {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-faint);
  margin: 0 0 10px;
}

.toc ol {
  margin: 0 0 0 18px;
}

.toc li {
  margin-bottom: 4px;
}

.callout {
  border-left: 4px solid var(--brand);
  background: var(--brand-wash);
  padding: 16px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 22px 0;
}

.callout.warn {
  border-left-color: var(--bad);
  background: #fef2f2;
}

.callout.tip {
  border-left-color: var(--good);
  background: #ecfdf5;
}

.callout p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: .93rem;
}

th,
td {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--wash);
  font-weight: 700;
  white-space: nowrap;
}

td.yes {
  color: var(--good);
  font-weight: 700;
}

td.no {
  color: var(--bad);
  font-weight: 700;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin-bottom: 10px;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  float: right;
  color: var(--brand-600);
  font-size: 1.25rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '\2013';
}

.faq details p {
  margin: 12px 0 0;
}

.related {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  margin-top: 34px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.related-grid a {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
}

.related-grid a:hover {
  border-color: var(--brand);
}

/* Inline app CTA inside guide pages */
.app-cta {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin: 34px 0;
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
}

.app-cta h2 {
  margin: 0;
  font-size: 1.3rem;
}

.app-cta p {
  color: var(--ink-soft);
  margin: 8px 0 0;
}

.app-cta .phone {
  width: 165px;
}

/* Framed screenshots carry ~6% transparent margin, so they run a little wider than .phone. */
.app-cta .shot {
  width: 175px;
}

.steps .shot {
  width: 178px;
}

.proof .shot {
  width: 260px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 34px 0 100px;
  /* bottom padding clears the sticky mobile install bar */
  font-size: .88rem;
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 18px;
}

.footer-note {
  border-top: 1px solid #1e293b;
  padding-top: 16px;
  line-height: 1.6;
}

/* ---------- Sticky mobile install bar ---------- */

.install-bar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: calc(100% - 20px);
  max-width: 440px;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .3);
}

.install-bar img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.install-bar .ib-copy {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.install-bar .ib-title {
  font-weight: 700;
  font-size: .86rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.install-bar .ib-sub {
  font-size: .74rem;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.install-bar .btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: .86rem;
  flex: 0 0 auto;
}

/* ---------- Hero store badges ---------- */

/* The download is the main action, so the badges sit in the hero above the fold. */
.hero-badges {
  margin-bottom: 12px;
}

.hero-badges img {
  width: 160px;
}

.hero-links {
  margin-top: 14px;
  font-size: .92rem;
  font-weight: 600;
}

/* site.v1.js tags <html> with the visitor's phone OS; show only the store they can use. */
.is-ios .badge-play,
.is-android .badge-apple {
  display: none;
}

/* Screenshots from the Next.js site already have a phone frame baked in — no .phone wrapper. */
.shot {
  width: 190px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, .18));
}

/* ---------- Answer-first summary (featured snippets, AI answers) ---------- */

.quick-answer {
  margin: 24px 0 8px;
  padding: 18px 22px;
  border: 1px solid #a5f3fc;
  border-left: 4px solid var(--brand-600);
  border-radius: var(--radius);
  background: var(--brand-wash);
}

.quick-answer h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--brand-700);
}

.quick-answer p,
.quick-answer ol,
.quick-answer ul {
  margin-bottom: 8px;
}

.quick-answer > :last-child {
  margin-bottom: 0;
}

.updated {
  margin-top: 10px;
  font-size: .82rem;
  color: var(--ink-faint);
}

/* ---------- Home: short answer + comparison ---------- */

.short-steps {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 22px;
  color: var(--ink-soft);
}

.short-steps li {
  margin-bottom: 10px;
}

.short-steps strong {
  color: var(--ink);
}

.compare-wrap {
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- Breakpoints ---------- */

@media (min-width: 600px) {
  .hero-cta {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .species-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-cta {
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
    padding: 28px;
  }

  .app-cta .store-badges {
    justify-content: flex-start;
  }
}

@media (min-width: 900px) {
  body {
    font-size: 18px;
  }

  h1,
  .h1 {
    font-size: 3.1rem;
  }

  h2,
  .h2 {
    font-size: 2rem;
  }

  .guide-hero h1 {
    font-size: 2.6rem;
  }

  section {
    padding: 68px 0;
  }

  .hero {
    padding: 60px 0 20px;
  }

  .hero-grid {
    grid-template-columns: 1.05fr .95fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 540px;
  }

  .header-nav {
    display: flex;
  }

  .phone {
    width: 290px;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 34px;
  }

  .steps .phone {
    width: 208px;
  }

  .steps .shot {
    width: 218px;
  }

  .proof .shot {
    width: 300px;
  }

  .species-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .qr-handoff {
    display: flex;
  }

  /* Desktop cannot install a phone app — the QR block replaces this. */
  .install-bar {
    display: none;
  }

  .site-footer {
    padding-bottom: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
