/* ==========================================================================
   Pets On The Run — site stylesheet
   Mobile-first. No frameworks, no external fonts (privacy + speed).
   Palette meets WCAG AA contrast on all text/background pairings used.
   ========================================================================== */

:root {
  --green-900: #1f4038;   /* deep forest — headings, footer */
  --green-700: #2f5d50;   /* primary brand green */
  --green-600: #3a7263;   /* hover */
  --green-050: #e9f2ee;   /* soft tint backgrounds */
  --amber-500: #e8a13a;   /* accent (decorative / large elements only) */
  --amber-100: #fdf3e3;   /* warm tint */
  --cream:     #faf7f2;   /* page background */
  --white:     #ffffff;
  --ink:       #26312e;   /* body text on light (contrast > 12:1 on cream) */
  --ink-soft:  #51605b;   /* secondary text (contrast > 6:1 on cream) */
  --line:      #e3ddd3;

  --radius: 14px;
  --shadow: 0 2px 6px rgba(31, 64, 56, .08), 0 12px 32px rgba(31, 64, 56, .07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, sans-serif;
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { color: var(--green-900); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--green-700); }
a:hover { color: var(--green-600); }

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

.container { width: min(100% - 2.5rem, 1080px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green-900); color: var(--white);
  padding: .75rem 1.25rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .75rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 800; font-size: 1.15rem; color: var(--green-900);
  text-decoration: none; letter-spacing: -.01em;
}
.brand svg { width: 34px; height: 34px; flex: none; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; color: var(--green-900);
}
.site-nav { display: none; }
.site-nav.open {
  display: block;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow); padding: .75rem 1.25rem 1.25rem;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .7rem .5rem;
  text-decoration: none; font-weight: 600; color: var(--green-900);
  border-radius: 8px;
}
.site-nav a:hover { background: var(--green-050); }
.site-nav a[aria-current="page"] { color: var(--green-700); }
.nav-cta { margin-top: .5rem; }
/* The generic .site-nav a colour (green-900) outranks .btn-primary's white
   text by specificity, which made the nav CTA dark-on-dark-green. These
   higher-specificity rules restore readable white text in every state. */
.site-nav a.btn-primary,
.site-nav a.btn-primary[aria-current="page"] { color: var(--white); background: var(--green-700); }
.site-nav a.btn-primary:hover { color: var(--white); background: var(--green-600); }

@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; position: static; }
  .site-nav ul { display: flex; align-items: center; gap: .25rem; }
  .site-nav a { padding: .5rem .8rem; }
  .nav-cta { margin: 0 0 0 .5rem; }
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-block; padding: .8rem 1.5rem;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  text-align: center; cursor: pointer; transition: background .15s, color .15s;
}
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-600); color: var(--white); }
.btn-secondary {
  background: var(--white); color: var(--green-900);
  border-color: var(--green-700);
}
.btn-secondary:hover { background: var(--green-050); color: var(--green-900); }
.btn-lg { padding: 1.1rem 2.2rem; font-size: 1.1rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ----------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--amber-100), transparent 60%),
    linear-gradient(180deg, var(--green-050), var(--cream) 85%);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}
.hero .eyebrow {
  display: inline-block; margin-bottom: 1rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: .35rem 1rem;
  font-size: .85rem; font-weight: 700; color: var(--green-700);
}
.hero p.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 56ch; }
.hero .btn-group { margin-top: 1.75rem; }
.hero-note { margin-top: 1rem; font-size: .9rem; color: var(--ink-soft); }

/* ------------------------------------------------------------- sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head p { color: var(--ink-soft); }

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow);
}
.section-alt .card { background: var(--cream); box-shadow: none; }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--green-050); color: var(--green-700);
  margin-bottom: 1rem;
}
.card .icon svg { width: 28px; height: 28px; }
.card p { color: var(--ink-soft); font-size: .98rem; }
.card .card-link { font-weight: 700; text-decoration: none; }

/* feature list w/ paw ticks */
.ticks { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.ticks li { padding-left: 1.75rem; position: relative; margin-bottom: .55rem; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--green-700); font-weight: 800;
}

/* trust strip */
.trust-strip { display: grid; gap: 1rem; }
@media (min-width: 700px) { .trust-strip { grid-template-columns: repeat(4, 1fr); } }
.trust-item {
  display: flex; align-items: center; gap: .7rem;
  font-weight: 600; font-size: .95rem; color: var(--green-900);
}
.trust-item svg { width: 26px; height: 26px; flex: none; color: var(--green-700); }

/* service detail blocks */
.service-block {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 2rem;
  scroll-margin-top: 90px;
}
.service-block h2 { display: flex; align-items: center; gap: .75rem; }
.service-block h2 svg { width: 34px; height: 34px; color: var(--green-700); flex: none; }
.service-cols { display: grid; gap: 1.5rem; margin-block: 1.25rem; }
@media (min-width: 760px) { .service-cols { grid-template-columns: 1fr 1fr; } }
.service-cols h3 { font-size: 1.05rem; }

/* testimonials */
.quote-card { position: relative; }
.quote-card blockquote { margin: 0; font-style: italic; color: var(--ink); }
.quote-card figcaption { margin-top: .9rem; font-weight: 700; color: var(--green-900); font-size: .95rem; }
.placeholder-flag {
  display: inline-block; margin-top: .35rem;
  font-size: .78rem; font-weight: 700; font-style: normal;
  color: #8a5a00; background: var(--amber-100);
  border: 1px solid #ecd9b4; border-radius: 6px; padding: .1rem .5rem;
}

/* placeholder embed panels (reviews feed / instagram feed) */
.embed-placeholder {
  border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--white); padding: 2.5rem 1.5rem; text-align: center;
  color: var(--ink-soft);
}
.embed-placeholder strong { color: var(--green-900); }

/* --------------------------------------------------------------- forms */
form { max-width: 640px; }
.field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--green-900); }
.hint { font-size: .85rem; color: var(--ink-soft); margin-top: .25rem; }
input, select, textarea {
  width: 100%; padding: .75rem .9rem; font: inherit; color: var(--ink);
  background: var(--white); border: 1.5px solid #c9c2b6; border-radius: 10px;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--amber-500); outline-offset: 1px;
  border-color: var(--green-700);
}
fieldset { border: none; margin: 0 0 1.1rem; padding: 0; }
legend { font-weight: 700; color: var(--green-900); margin-bottom: .35rem; padding: 0; }
.radio-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin: 0; }
.radio-row input { width: auto; }
.privacy-note {
  font-size: .9rem; color: var(--ink-soft);
  background: var(--green-050); border-radius: 10px; padding: 1rem 1.25rem;
  margin-block: 1.25rem;
}
/* honeypot — hidden from humans, present for bots */
.hp-field { position: absolute !important; left: -9999px !important; }

/* --------------------------------------------------------- portal page */
.portal-buttons { display: grid; gap: 1.25rem; max-width: 720px; }
@media (min-width: 640px) { .portal-buttons { grid-template-columns: 1fr 1fr; } }
.portal-card {
  display: block; text-decoration: none; text-align: center;
  background: var(--white); border: 2px solid var(--green-700);
  border-radius: var(--radius); padding: 2.5rem 1.5rem;
  box-shadow: var(--shadow); transition: transform .15s;
}
.portal-card:hover { transform: translateY(-3px); }
.portal-card .icon { margin: 0 auto 1rem; }
.portal-card h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.portal-card p { color: var(--ink-soft); font-size: .95rem; margin: 0 auto; }

/* ------------------------------------------------------------- CTA band */
.cta-band {
  background: var(--green-900); color: var(--white);
  border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #cfe0da; margin-inline: auto; }
.cta-band .btn-group { justify-content: center; margin-top: 1.5rem; }
.cta-band .btn-secondary { border-color: var(--white); background: transparent; color: var(--white); }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,.12); color: var(--white); }
.cta-band .btn-primary { background: var(--amber-500); color: var(--green-900); }
.cta-band .btn-primary:hover { background: #f0b95a; color: var(--green-900); }

/* --------------------------------------------------------------- footer */
.site-footer {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--green-900); color: #cfe0da;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem;
  font-size: .95rem;
}
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.site-footer a { color: #e9f2ee; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-brand { display: flex; align-items: center; gap: .6rem; color: var(--white); font-weight: 800; font-size: 1.1rem; margin-bottom: .75rem; }
.footer-brand svg { width: 30px; height: 30px; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.25rem;
  font-size: .85rem; color: #9db8b0;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}

/* --------------------------------------------------- notice + FAQ panel */
.notice {
  background: var(--amber-100); border: 1px solid #ecd9b4;
  border-radius: 12px; padding: 1.1rem 1.4rem;
  color: var(--ink); font-size: 1rem;
}
.notice strong { color: var(--green-900); }

.panel {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.75rem, 4vw, 2.75rem); text-align: center;
}
.panel h3 { margin-bottom: .4rem; }
.panel p { color: var(--ink-soft); margin-inline: auto; }
.panel .btn { margin-top: .75rem; }
.stars { color: var(--amber-500); font-size: 1.3rem; letter-spacing: .15em; }

.faq details {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: .9rem 1.25rem; margin-bottom: .75rem;
}
.faq summary { font-weight: 700; color: var(--green-900); cursor: pointer; }
.faq summary:hover { color: var(--green-700); }
.faq details[open] summary { margin-bottom: .5rem; }
.faq details p { color: var(--ink-soft); margin: 0; }

/* contact option cards */
.option-card { text-align: left; }
.option-card .icon { margin-bottom: .75rem; }
.option-card h3 { margin-bottom: .3rem; }
.option-card p { font-size: .95rem; }
.option-card .btn { margin-top: .5rem; }

/* ------------------------------------------------------------ utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portal-card, .btn { transition: none; }
}

/* ==========================================================================
   V3 media layer — cinematic hero, photography, icons
   Assets from the Higgsfield set (see docs/12-brand-visual-system.md).
   Everything degrades cleanly: if an asset is missing the layout holds and
   the gradient/scrim still renders — no broken-image states.
   ========================================================================== */

/* cinematic hero (home) */
.hero-cinematic {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(540px, 72vh, 720px);
  background: linear-gradient(160deg, var(--green-900), var(--green-700));
  padding: clamp(3.5rem, 9vw, 7rem) 0;
}
.hero-media-bg,
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
  z-index: 0; margin: 0; max-width: none;
}
.hero-video { z-index: 1; opacity: 0; transition: opacity .8s ease; }
.hero-video.is-playing { opacity: 1; }
/* scrim keeps overlaid text at WCAG AA contrast over any frame of the loop */
.hero-scrim {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(90deg, rgba(20, 40, 34, .82) 0%, rgba(20, 40, 34, .55) 45%, rgba(20, 40, 34, .12) 75%),
    linear-gradient(0deg, rgba(20, 40, 34, .45) 0%, transparent 35%);
}
.hero-cinematic .container { position: relative; z-index: 3; }
.hero-cinematic h1 { color: var(--white); }
.hero-cinematic .lede { color: #eef2ec; }
.hero-cinematic .hero-note,
.hero-cinematic .hero-note a { color: #d7e3dc; }
.hero-cinematic .eyebrow {
  background: rgba(250, 247, 242, .14);
  border-color: rgba(250, 247, 242, .35);
  color: var(--white);
}
.hero-cinematic .btn-secondary {
  background: transparent; border-color: var(--white); color: var(--white);
}
.hero-cinematic .btn-secondary:hover { background: rgba(255, 255, 255, .14); color: var(--white); }
.hero-cinematic .btn-primary { background: var(--amber-500); color: var(--green-900); }
.hero-cinematic .btn-primary:hover { background: #f0b95a; color: var(--green-900); }

/* photography in cards / service blocks */
.card-media {
  width: calc(100% + 3.5rem); max-width: none;
  margin: -1.75rem -1.75rem 1.25rem;
  aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.service-media { margin: 0 0 1.5rem; }
.service-media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 12px;
}

/* icon chips holding the generated line icons (self-coloured orange) */
.icon-img { background: var(--amber-100); }
.icon-img img { width: 30px; height: 30px; }

/* gentle hover lift on cards (guarded below for reduced motion) */
.card, .panel { transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 4px 10px rgba(31,64,56,.1), 0 18px 40px rgba(31,64,56,.12); }

/* Mobile keeps the cinematic hero but swaps to a lighter portrait loop —
   main.js replaces the sources from data-mobile-* and only then loads.
   Reduced-motion users get no hero video at all (JS removes it; this CSS
   rule is the belt-and-braces fallback). */
@media (max-width: 819px) {
  .hero-cinematic { min-height: clamp(480px, 62vh, 600px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .card, .panel { transition: none; }
  .card:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   Motion system — decorative micro-loops and tap-to-play previews.
   Poster image is always the base layer; video is injected by main.js only
   when safe (desktop, no reduced-motion, no save-data, element in view) and
   fades in over the poster. Missing/failed video = poster stays, no gap.
   -------------------------------------------------------------------------- */
.media-loop { position: relative; overflow: hidden; }
.media-loop video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .6s ease;
}
.media-loop video.is-playing { opacity: 1; }

/* home service cards: wrapper takes over the full-bleed geometry */
.card-media-wrap {
  width: calc(100% + 3.5rem); margin: -1.75rem -1.75rem 1.25rem;
  aspect-ratio: 4 / 3; border-radius: var(--radius) var(--radius) 0 0;
}
.card-media-wrap .card-media {
  width: 100%; height: 100%; margin: 0; max-width: 100%; border-radius: 0;
}

/* services page figures */
.service-media.media-loop { border-radius: 12px; }
.service-media.media-loop img { border-radius: 0; }

/* tap-to-play vertical previews (Instagram page) — nothing downloads until tapped */
.reel-grid { display: grid; gap: 1.25rem; max-width: 640px; margin-inline: auto; }
@media (min-width: 640px) { .reel-grid { grid-template-columns: 1fr 1fr; } }
.reel-tile {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow);
  background: var(--green-900);
}
.reel-tile img, .reel-tile video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.tap-play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: linear-gradient(0deg, rgba(20,40,34,.38), transparent 45%);
  border: none; cursor: pointer; padding: 0;
}
.tap-play .play-badge {
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(250,247,242,.94); color: var(--green-900);
  font-size: 1.4rem; box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.tap-play:hover .play-badge { transform: scale(1.08); }
.reel-tile.is-active .tap-play { background: transparent; }
.reel-tile.is-active .play-badge { opacity: 0; }
.reel-caption { text-align: center; font-size: .9rem; color: var(--ink-soft); margin-top: 1rem; }
@media (prefers-reduced-motion: reduce) {
  .media-loop video { transition: none; }
  .tap-play .play-badge { transition: none; }
}
