/* ==========================================================================
   Landing page. Builds on the tokens and components of app.css; the feature
   mock-ups reuse the real app components (pins, timeline, tags, ...).
   ========================================================================== */

.landing {
  --section-width: 1180px;
  /* Forest mesh gradient: soft blobs of moss, shade and sunlight on dark fir green.
     Light areas sit right and bottom so white text on the left stays readable. */
  --forest-base: #0F2A1E;
  --forest-mesh:
    radial-gradient(55% 75% at 88% 38%, rgb(112 142 66 / .55), transparent 70%),
    radial-gradient(45% 60% at 100% 100%, rgb(214 168 82 / .38), transparent 72%),
    radial-gradient(60% 80% at 0% 100%, rgb(28 76 70 / .85), transparent 70%),
    radial-gradient(50% 65% at 38% 78%, rgb(52 96 54 / .6), transparent 72%),
    linear-gradient(170deg, #0F2A1E 0%, #13301F 55%, #0D2521 100%);
  /* Fine film grain, generated as SVG noise (no image file needed). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.landing main { overflow-x: clip; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-accent-text);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.btn.big { padding: 12px 22px; font-size: 1rem; border-radius: 10px; }
.btn.ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .2); border-color: #fff; }

.nav-links { display: flex; gap: 22px; margin-left: 20px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }

.text-link { color: var(--accent); font-weight: 700; }

/* ---------- photos with placeholder ---------- */

.photo {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 70% 20%, rgba(255, 255, 255, .18), transparent 60%),
    linear-gradient(160deg, #6F8F6A 0%, #3F5A45 55%, #26382C 100%);
}
.photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* app.css limits the app's player to 60vh; demo videos must fill their frame instead. */
video.photo-img { max-height: none; border-radius: 0; background: none; }
.photo-img.missing { display: none; }
/* Pins are positioned in percent of the photo. landing.js sizes this layer to
   the visible, cropped photo; without JS it simply covers the frame. */
.image-layer { position: absolute; inset: 0; }
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
  color: rgba(255, 255, 255, .75);
  font-size: .85rem;
  line-height: 1.5;
}
.photo-placeholder code { font-size: .8rem; opacity: .8; }

/* ---------- hero ---------- */

.hero { position: relative; color: #fff; }
.hero-photo { height: min(78vh, 720px); min-height: 480px; }
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgb(18 26 21 / .78) 0%, rgb(18 26 21 / .45) 45%, rgb(18 26 21 / 0) 75%),
    linear-gradient(0deg, rgb(18 26 21 / .55) 0%, rgb(18 26 21 / 0) 35%);
}
.hero-pins { position: absolute; inset: 0; z-index: 3; }
.hero-pins .pin:nth-child(1) { animation-delay: .6s; }
.hero-pins .pin:nth-child(2) { animation-delay: 1.1s; }
.hero-pins .pin:nth-child(3) { animation-delay: 1.6s; }

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 4;
  max-width: var(--section-width);
  margin: 0 auto;
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}
.hero-content > * { max-width: 560px; pointer-events: auto; }

/* Variant for photos with the dog on the left: text on the right. */
.hero.text-right .hero-content { align-items: flex-end; }
.hero.text-right .hero-content > * { max-width: 430px; }
.hero.text-right .hero-photo::after {
  background:
    linear-gradient(270deg, rgb(18 26 21 / .8) 0%, rgb(18 26 21 / .45) 38%, rgb(18 26 21 / 0) 62%),
    linear-gradient(0deg, rgb(18 26 21 / .5) 0%, rgb(18 26 21 / 0) 35%);
}
.hero-photo .photo-img { object-position: 50% 60%; }
.hero .eyebrow { color: var(--brand-accent); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 16px; }
.hero .lead { font-size: 1.12rem; line-height: 1.55; margin: 0 0 26px; color: rgba(255, 255, 255, .88); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* In the app every pin label ends with a delete button; without it the label needs even padding. */
.landing .pin .label:not(:has(button)) { padding-right: 9px; }

/* Pins pop in one after another, like signals appearing in the video. */
.hero-pins .pin { opacity: 0; animation: pin-in .5s cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes pin-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- facts strip ---------- */

.facts {
  list-style: none;
  max-width: var(--section-width);
  margin: -34px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.facts li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.facts strong { display: block; font-size: 1.05rem; color: var(--brand); }
.facts span { color: var(--muted); font-size: .88rem; }

/* ---------- sections ---------- */

.features, .steps { max-width: var(--section-width); margin: 0 auto; padding: 96px 24px 24px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2, .privacy h2, .final-cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; margin: 0; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
  margin-bottom: 96px;
}
.feature.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.reverse .feature-text { order: 2; }
.feature.wide { grid-template-columns: 1fr; gap: 28px; }
.feature.wide .feature-text { max-width: 640px; }
.feature h3 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.015em; margin: 0 0 12px; }
.feature p { color: var(--muted); font-size: 1.02rem; line-height: 1.6; margin: 0 0 16px; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.checks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(.3em + 4px);
  width: 4px;
  height: 7px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- mock-up frame ---------- */

.mock {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 30px 60px -20px rgb(20 32 24 / .3), 0 12px 24px -12px rgb(0 0 0 / .18);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.mock-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-body { padding: 18px; }
.mock-stage { aspect-ratio: 16 / 9; }
.mock-layer { position: absolute; inset: 0; z-index: 2; }
.mock-title { margin: 0 0 8px; font-size: 1rem; }

/* Sits over the picture on wide screens and below it on phones. */
.mock-picker { top: 64px; right: 5%; z-index: 3; height: auto; max-height: none; }
.mock-picker input { color: var(--ink); }

.mock .range-stack { z-index: 2; }
.mock .hold-badge { z-index: 2; }
.mock .controls { margin-top: 0; }
.mock .ctl { display: inline-flex; align-items: center; }
.mock .ctl.pressed { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.fake-select { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 5px 9px; color: var(--ink); }

.frame-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 18px; }
.frame-strip .photo { aspect-ratio: 3 / 2; border-radius: 6px; opacity: .5; overflow: visible; }
.frame-strip .photo-img { border-radius: 6px; }
.frame-strip .photo.on { opacity: 1; outline: 3px solid var(--accent); outline-offset: 2px; }

.mock-timeline { grid-template-columns: 150px minmax(0, 1fr); }
.mock-timeline .tl-inner { position: relative; }
.mock-playhead { animation: playhead 9s linear infinite; }
@keyframes playhead { from { left: 0%; } to { left: 100%; } }

.suggestions-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px; }

.progress-run { animation: progress 6s linear infinite; }
@keyframes progress { from { width: 10%; } to { width: 90%; } }

.mock .category:first-child { margin-top: 0; }
.mock .tag { display: inline-block; }

.summary-item { display: flex; align-items: center; gap: 6px; }
.mock .summary td.num { width: 3em; }
.mock .summary td:last-child { width: 45%; }
.meter { display: block; height: 8px; width: var(--v); min-width: 8px; border-radius: 4px; background: color-mix(in srgb, var(--c) 70%, transparent); }
.export-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Observation mode demo: video with pins that appear while playback holds. */
.observe-demo { aspect-ratio: 5 / 4; }
.demo-pin { opacity: 0; transition: opacity .2s ease; }
.demo-pin.shown { opacity: 1; animation: pin-in .5s cubic-bezier(.2, .9, .3, 1.3); }
.demo-badge { opacity: 0; transition: opacity .2s ease; }
.demo-badge.shown { opacity: 1; }

.share-mock { display: grid; gap: 16px; }
.share-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.share-file > span:last-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.share-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--surface);
  font-weight: 800;
  font-size: .9rem;
}
.share-mock .drop-actions { justify-content: flex-start; }
.share-mock .btn.pressed { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.share-dialog { max-width: none; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }

/* ---------- privacy ---------- */

/* Loud on purpose: the most important promise gets the full signal orange.
   White text would be unreadable on it (2.6:1), near-black reaches 6:1 and more. */
.privacy {
  position: relative;
  margin: 40px 0 0;
  padding: 96px 24px;
  background: #F08700;
  color: #141A16;
}
.privacy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: .18;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.privacy-inner { position: relative; max-width: 760px; margin: 0 auto; text-align: center; }
.privacy .eyebrow { color: #141A16; }
.privacy h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.03em; }
.privacy p { color: #1B2622; font-size: 1.1rem; line-height: 1.6; margin: 18px 0 26px; }
.privacy .text-link {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  background: #141A16;
  color: #fff;
  text-decoration: none;
}
.privacy .text-link:hover { background: #2D3931; }

/* ---------- steps ---------- */

.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step-list li { padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-no {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--surface);
  font-weight: 800;
}
.step-list h3 { margin: 0 0 6px; font-size: 1.15rem; }
.step-list p { margin: 0; color: var(--muted); }

/* ---------- final call to action ---------- */

.final-cta { max-width: 760px; margin: 0 auto; padding: 96px 24px 110px; text-align: center; }
.final-cta p { color: var(--muted); font-size: 1.08rem; margin: 14px 0 26px; }

/* ---------- welcome screen (first visit) ---------- */

.welcome-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: var(--forest-base);
  color: #fff;
  cursor: pointer;
  transition: opacity .8s ease, visibility .8s;
}
.welcome .welcome-screen { display: flex; }
.welcome-screen.closing { opacity: 0; visibility: hidden; }
html.welcome:not(.welcome-done) { overflow: hidden; }
/* The hero pins wait until the welcome screen is gone, so their pop is seen. */
html.welcome:not(.welcome-done) .hero-pins .pin { animation-play-state: paused; }

/* Soft colour blobs drifting at different speeds make the gradient "breathe". */
.welcome-bg { position: absolute; inset: -25%; }
.welcome-bg i {
  position: absolute;
  width: 75vmax;
  height: 75vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--blob), transparent);
  will-change: transform;
  animation: drift 24s ease-in-out infinite alternate;
}
.welcome-bg i:nth-child(1) { --blob: rgb(112 142 66 / .8); top: 0; right: 5%; animation-duration: 19s; }
.welcome-bg i:nth-child(2) { --blob: rgb(28 90 80 / .9); bottom: 0; left: 0; animation-duration: 23s; animation-direction: alternate-reverse; }
.welcome-bg i:nth-child(3) { --blob: rgb(214 168 82 / .45); bottom: 5%; right: 0; animation-duration: 27s; animation-delay: -8s; }
.welcome-bg i:nth-child(4) { --blob: rgb(52 96 54 / .85); top: 20%; left: 20%; animation-duration: 31s; animation-delay: -15s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(9vmax, -6vmax) scale(1.18); }
  66%  { transform: translate(-7vmax, 7vmax) scale(.9); }
  100% { transform: translate(5vmax, 3vmax) scale(1.08); }
}
.welcome-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: .16;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.welcome-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.welcome-logo {
  width: clamp(120px, 24vw, 180px);
  height: auto;
  border-radius: 28%;
  box-shadow: 0 24px 60px rgb(0 0 0 / .35);
  animation: welcome-pop .9s cubic-bezier(.2, .9, .3, 1.2) both;
}
.welcome-title {
  margin: 0;
  font-size: clamp(1.9rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  animation: welcome-rise .8s .2s ease-out both;
}
.welcome-title .brand-name { font-size: inherit; color: #fff; white-space: nowrap; }
.welcome-button {
  padding: 13px 30px;
  border: 1.5px solid rgb(255 255 255 / .55);
  border-radius: 999px;
  background: rgb(255 255 255 / .1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  animation: welcome-rise .8s .45s ease-out both, breathe 2.6s 1.4s ease-in-out infinite;
}
.welcome-button:hover { background: rgb(255 255 255 / .2); border-color: #fff; }
.welcome-button:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 4px; }
@keyframes welcome-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes welcome-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 50% { box-shadow: 0 0 0 10px rgb(255 255 255 / 0), 0 0 30px rgb(240 135 0 / .35); } }

/* ---------- scroll reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
/* Mock-up animations start only once they are in view. */
.reveal:not(.visible) .mock-playhead, .reveal:not(.visible) .progress-run { animation-play-state: paused; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .nav-links { display: none; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 28px; margin-bottom: 72px; }
  .feature.reverse .feature-text { order: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* On tablets and phones the text sits below the photo so it never covers the dog. */
@media (max-width: 1100px) {
  .hero-photo { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
  /* The photo fades into the base colour of the forest gradient below it. */
  .hero-photo::after,
  .hero.text-right .hero-photo::after { background: linear-gradient(0deg, var(--forest-base) 0%, rgb(15 42 30 / 0) 32%); }
  .hero-content, .hero.text-right .hero-content {
    position: relative;
    align-items: stretch;
    padding: 8px 24px 64px;
    background: var(--forest-mesh);
  }
  .hero-content > *, .hero.text-right .hero-content > * { position: relative; max-width: 640px; }
  .hero-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grain);
    opacity: .14;
    mix-blend-mode: soft-light;
    pointer-events: none;
  }
  .facts { margin-top: 16px; }
}
@media (max-width: 600px) {
  .landing .navbar { position: sticky; }
  .landing .navbar .btn:not(.primary) { display: none; }
  .hero-photo { aspect-ratio: 4 / 3; }
  .hero-pins .pin .label { font-size: .7rem; }
  .hero-content, .hero.text-right .hero-content { padding: 8px 18px 44px; }
  .hero .lead { font-size: 1rem; }
  .facts { padding: 0 16px; }
  .facts li { padding: 12px 14px; }
  .features, .steps { padding: 64px 16px 8px; }
  .section-head { margin-bottom: 32px; }
  .step-list { grid-template-columns: 1fr; }
  .mock-timeline { grid-template-columns: 104px minmax(0, 1fr); }
  .mock-picker { position: static; width: auto; margin: 12px; box-shadow: none; }
  .mock .range-pill { font-size: .7rem; }
  .privacy { padding: 64px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-pins .pin { animation: none; opacity: 1; }
  .demo-pin.shown { animation: none; }
  .welcome-bg i, .welcome-logo, .welcome-title, .welcome-button { animation: none; }
  .welcome-screen { transition-duration: .2s; }
  .mock-playhead, .progress-run { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
