/* YardTime — "Sticker Book"
   Tokens mirror Shared/Theme.swift so the site and the app read as one thing.
   Green means "clear" and nothing else; decoration is yellow and ink. */

@font-face {
  font-family: 'Fredoka';
  src: url('assets/Fredoka.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --grn:  #3DA35D;
  --grnL: #5FC57F;
  --org:  #EE8B3A;
  --orgL: #FFC98A;
  --yel:  #FFE27A;
  --cream:#FAF5EC;
  --ink:  #1C1710;
  --ink2: rgba(58, 49, 36, .66);
  --paper:#fff;

  --fred: 'Fredoka', ui-rounded, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --edge: 3px;
  --pad: 1.5rem;
  --max: 1000px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--fred);
  font-weight: 500;
  color: var(--ink);
  background: var(--cream);
  background-image: radial-gradient(rgba(60, 49, 30, .10) 1.4px, transparent 1.4px);
  background-size: 15px 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

a { color: inherit; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--ink); color: var(--cream); padding: .6rem 1rem;
  border-radius: 0 0 10px 0; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- nav ---------- */

.nav {
  display: flex; align-items: center; gap: .6rem;
  padding-block: 1.15rem;
  font-weight: 700; font-size: 1.1rem;
}
.nav__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.nav__brand img {
  width: 32px; height: 32px; border-radius: 9px;
  border: 2.5px solid var(--ink); display: block;
}
.nav__sp { flex: 1; }
.nav a.nav__link {
  font-size: .88rem; font-weight: 600; text-decoration: none;
  border-bottom: 2.5px solid var(--ink); padding-bottom: 1px;
  margin-left: 1.1rem;
}
.nav a.nav__link:hover { background: var(--yel); }

/* ---------- shared bits ---------- */

.kicker {
  display: inline-block; border: 2.5px solid var(--ink); border-radius: 999px;
  background: var(--yel); padding: .18rem .75rem;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .9px;
  margin-bottom: 1rem;
  /* Pinned, not inherited — on the dark NFC band this would otherwise pick up
     the band's cream text and render cream-on-yellow. */
  color: var(--ink);
}

.badge {
  display: inline-block; line-height: 0;
  transition: transform .12s ease;
}
/* Apple's official badge is 119.66 × 40 — let height follow so it is never
   rescaled off its own aspect ratio. Guidelines also require clear space of at
   least 1/4 the badge height around it; the .cta gap covers that. */
.badge img { width: 150px; height: auto; display: block; }
.badge:hover { transform: translateY(-2px); }

.fine { font-size: .85rem; color: var(--ink2); font-weight: 500; }

.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }

.ring { position: relative; }
.ring::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: inherit; animation: pulseRing 2.2s ease-out infinite;
}

.section { padding-block: 3rem; border-top: var(--edge) solid var(--ink); }
.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700;
  letter-spacing: -.6px; margin: 0 0 1.8rem; line-height: 1.1;
}

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

.hero { padding-block: 1rem 3.5rem; text-align: center; }
.hero h1 {
  font-size: clamp(2.25rem, 7vw, 3.6rem);
  /* Vertical padding on an inline <mark> does not grow the line box, so the
     highlight collides with the line above unless the leading allows for it. */
  line-height: 1.14; font-weight: 700; letter-spacing: -1.5px;
  margin: 0 0 .8rem;
}
.hero h1 mark {
  background: var(--yel); color: var(--ink);
  padding: .05em .18em; border-radius: 8px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero__lede {
  font-size: clamp(1rem, 2.4vw, 1.2rem); color: var(--ink2);
  max-width: 46ch; margin: 0 auto 2.4rem; font-weight: 500;
}

.split {
  display: grid; grid-template-columns: 1fr 88px 1fr;
  align-items: center; max-width: 740px; margin: 0 auto; text-align: left;
}

.yard {
  border: var(--edge) solid var(--ink); border-radius: 22px;
  padding: 1.15rem 1.3rem; background: var(--paper); position: relative;
}
.yard--in  { box-shadow: 7px 7px 0 var(--grn); transform: rotate(-1.4deg); }
.yard--out { box-shadow: 7px 7px 0 var(--org); transform: rotate(1.4deg); background: #FFF7EE; }

.chip {
  display: inline-block; border: 2.5px solid var(--ink); border-radius: 999px;
  padding: .14rem .65rem; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: .7rem;
}
.chip--in  { background: var(--grnL); }
.chip--out { background: var(--orgL); }

.yard__state {
  font-size: clamp(1.05rem, 3vw, 1.3rem); font-weight: 700;
  display: flex; align-items: center; gap: .5rem;
  margin: 0;
}
.yard__when { font-size: .86rem; color: var(--ink2); font-weight: 500; margin: .3rem 0 0; }

.dog { font-size: 1.8rem; display: inline-block; transform-origin: 50% 90%; }
.dog--wag { animation: wag 3.4s ease-in-out infinite; }
.dog--bob { animation: bob 2.4s ease-in-out infinite; }

/* Sits clear of the card's 7px offset shadow, walking away from the yard. */
.paws {
  position: absolute; bottom: -40px; left: 26px;
  display: flex; gap: 15px; font-size: .8rem;
}
.paws span { opacity: 0; animation: pawpop 3.6s ease-in-out infinite; }
.paws span:nth-child(2) { animation-delay: .35s; }
.paws span:nth-child(3) { animation-delay: .7s; }
.paws span:nth-child(4) { animation-delay: 1.05s; }

/* Pickets plus two crossing rails — without the rails it reads as pencils. */
.fence { display: flex; gap: 7px; justify-content: center; position: relative; }
.fence i {
  width: 11px; height: 86px; background: var(--ink); border-radius: 3px;
  clip-path: polygon(50% 0, 100% 13%, 100% 100%, 0 100%, 0 13%);
}
.fence::before, .fence::after {
  content: ''; position: absolute; left: -7px; right: -7px; height: 7px;
  background: var(--ink); border-radius: 2px;
}
.fence::before { top: 26px; }
.fence::after  { top: 58px; }

.cta {
  display: flex; align-items: center; justify-content: center;
  gap: 1.2rem; margin-top: 3rem; flex-wrap: wrap;
}

/* ---------- how it works ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.step {
  border: var(--edge) solid var(--ink); border-radius: 20px; background: var(--paper);
  padding: 1.2rem 1.3rem; box-shadow: 6px 6px 0 var(--ink);
}
.step__n {
  width: 34px; height: 34px; border: 2.5px solid var(--ink); border-radius: 50%;
  background: var(--grnL); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; margin-bottom: .7rem;
}
.step h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .3rem; }
.step p  { font-size: .9rem; color: var(--ink2); font-weight: 500; margin: 0; }

/* ---------- features ---------- */

.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.feat {
  border: var(--edge) solid var(--ink); border-radius: 20px;
  background: var(--paper); padding: 1.1rem 1.2rem;
}
.feat:nth-child(3n+1) { box-shadow: 6px 6px 0 var(--grn); }
.feat:nth-child(3n+2) { box-shadow: 6px 6px 0 var(--org); }
/* Ink rather than yellow — yellow-on-cream is too low-contrast to read as a
   shadow next to the green and orange cards. Yellow stays the highlighter. */
.feat:nth-child(3n+3) { box-shadow: 6px 6px 0 var(--ink); }
.feat__ic { font-size: 1.5rem; margin-bottom: .45rem; }
.feat h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .25rem; }
.feat p  { font-size: .88rem; color: var(--ink2); font-weight: 500; margin: 0; }

/* ---------- NFC band (the page's one change of scenery) ---------- */

.nfc {
  border-top: var(--edge) solid var(--ink);
  background: var(--ink); color: var(--cream);
}
.nfc__in {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem;
  align-items: center; padding-block: 3rem;
}
.nfc .kicker { border-color: var(--cream); }
.nfc h2 {
  font-size: clamp(1.5rem, 4.4vw, 2.15rem); line-height: 1.18;
  font-weight: 700; letter-spacing: -.8px; margin: 0 0 .9rem;
}
.nfc h2 mark {
  background: var(--yel); color: var(--ink); padding: .05em .16em; border-radius: 7px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.nfc p { font-size: 1rem; color: rgba(250, 245, 236, .72); font-weight: 500; margin: 0 0 1rem; }
.nfc p strong { color: var(--cream); font-weight: 700; }
.nfc__req { font-size: .82rem; color: rgba(250, 245, 236, .48); font-weight: 500; }

/* A door with a tag stuck by the frame, and a phone leaning in to tap it.
   Laid out with flex — positioning each piece from the centre drifts apart. */
.scene {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding-block: .5rem 3.2rem;
}
.scene__door {
  position: relative; flex: none; width: 132px; height: 208px;
  background: #2C2620; border: var(--edge) solid var(--cream);
  border-radius: 10px 10px 0 0;
}
/* Inset panel, so it reads as a door rather than a rectangle. */
.scene__door::before {
  content: ''; position: absolute; inset: 14px;
  border: 2px solid rgba(250, 245, 236, .22); border-radius: 6px;
}
.scene__knob {
  position: absolute; left: 13px; top: 50%; margin-top: -5px;
  width: 11px; height: 11px; border-radius: 50%; background: var(--yel);
}
.scene__tag {
  position: absolute; right: -36px; top: 50%; transform: translateY(-50%);
  width: 70px; height: 70px; border-radius: 50%;
  border: var(--edge) dashed var(--ink); background: var(--yel);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 2;
}
.scene__tag b { font-size: 1.15rem; line-height: 1.1; }
.scene__tag i {
  font-style: normal; font-size: .66rem; font-weight: 700;
  letter-spacing: 1px; color: var(--ink);
}
.scene__wave {
  position: absolute; inset: -3px; border-radius: 50%;
  border: var(--edge) solid var(--yel);
  animation: nfcWave 2.4s ease-out infinite;
}
.scene__wave:nth-of-type(2) { animation-delay: .8s; }
.scene__wave:nth-of-type(3) { animation-delay: 1.6s; }
.scene__phone {
  position: relative; flex: none; margin-left: 68px;
  width: 84px; height: 150px;
  border: var(--edge) solid var(--cream); border-radius: 18px; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  animation: tapNudge 2.4s ease-in-out infinite;
}
.scene__notch {
  position: absolute; top: 8px; left: 50%; margin-left: -14px;
  width: 28px; height: 5px; border-radius: 3px; background: rgba(28, 23, 16, .45);
}
.scene__d { width: 15px; height: 15px; border-radius: 50%; background: var(--org); }
.scene__scr {
  font-size: .64rem; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.25;
}
.scene__cap {
  position: absolute; bottom: .6rem; left: 0; right: 0; margin: 0; text-align: center;
  font-size: .76rem; color: rgba(250, 245, 236, .48); font-weight: 500;
}

/* ---------- screenshots ---------- */

.shots { display: flex; gap: 2rem; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.shots figure { margin: 0; text-align: center; width: 200px; }
.shots img {
  width: 100%; height: auto; border: var(--edge) solid var(--ink);
  border-radius: 22px; display: block;
}
.shots figure:nth-child(1) img { box-shadow: 7px 7px 0 var(--grn); transform: rotate(-2deg); }
.shots figure:nth-child(2) img { box-shadow: 7px 7px 0 var(--org); transform: rotate(1.5deg); }
.shots figcaption { font-size: .85rem; font-weight: 600; color: var(--ink2); margin-top: 1.4rem; }

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

.privacy-card {
  background: var(--paper); border: var(--edge) solid var(--ink);
  box-shadow: 7px 7px 0 var(--grn); border-radius: 22px;
  padding: 1.8rem 2rem; text-align: center;
}
.privacy-card h2 { font-size: clamp(1.35rem, 3.6vw, 1.7rem); margin: 0 0 .6rem; }
.privacy-card p { font-size: .96rem; color: var(--ink2); font-weight: 500; margin: 0 auto; max-width: 56ch; }
.privacy-card a.more {
  display: inline-block; margin-top: 1.1rem; font-weight: 700; font-size: .92rem;
  text-decoration: none; border-bottom: 2.5px solid var(--ink); padding-bottom: 1px;
}
.privacy-card a.more:hover { background: var(--yel); }

/* ---------- footer ---------- */

.foot {
  border-top: var(--edge) solid var(--ink);
  padding-block: 1.6rem; display: flex; align-items: center;
  gap: 1.2rem; font-size: .88rem; font-weight: 600; flex-wrap: wrap;
}
.foot img { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--ink); display: block; }
.foot__sp { flex: 1; }
.foot a { text-decoration: none; border-bottom: 2.5px solid var(--ink); padding-bottom: 1px; }
.foot a:hover { background: var(--yel); }
.foot__note { color: var(--ink2); font-weight: 500; }

/* ---------- document pages (/privacy, /support) ---------- */

/* Narrow the whole page — nav, document and footer together — so a document
   page reads at a comfortable measure without the header outdenting the text. */
.doc-page .wrap { max-width: 720px; }

.doc { padding-block: 2.5rem 4rem; }
.doc h1 {
  font-size: clamp(1.9rem, 5.5vw, 2.6rem); font-weight: 700;
  letter-spacing: -1px; line-height: 1.08; margin: 0 0 .5rem;
}
.doc .updated { font-size: .85rem; color: var(--ink2); font-weight: 500; margin-bottom: 2.2rem; }
.doc h2 {
  font-size: 1.25rem; font-weight: 700; letter-spacing: -.3px;
  margin: 2.4rem 0 .7rem; padding-top: 1.4rem; border-top: 2.5px solid var(--ink);
}
.doc h3 { font-size: 1.02rem; font-weight: 700; margin: 1.6rem 0 .4rem; }
.doc p, .doc li { font-size: 1rem; color: var(--ink2); font-weight: 500; }
.doc p { margin: 0 0 1rem; }
.doc ul { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.doc li { margin-bottom: .5rem; }
.doc strong { color: var(--ink); font-weight: 700; }
.doc a { font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2.5px solid var(--ink); }
.doc a:hover { background: var(--yel); }
.doc blockquote {
  margin: 1.4rem 0; padding: 1.1rem 1.3rem; background: var(--paper);
  border: var(--edge) solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--yel);
}
.doc blockquote > :first-child { margin-top: 0; }
.doc blockquote p:last-child { margin-bottom: 0; }
/* The support page's contact block leads with the address — give it weight. */
.doc blockquote h3 { font-size: 1.4rem; margin-bottom: .6rem; }
.doc code {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px;
  padding: .05em .35em; font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- animation ---------- */

@keyframes wag  { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes bob  { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes pawpop { 0%, 12% { opacity: 0; } 20% { opacity: .55; } 60% { opacity: .55; } 100% { opacity: 0; } }
@keyframes pulseRing { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes nfcWave { 0% { transform: scale(.5); opacity: 0; } 18% { opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes tapNudge { 0%, 100% { transform: translateX(0); } 45% { transform: translateX(-15px); } }

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

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .feats { grid-template-columns: repeat(2, 1fr); }
  .nfc__in { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 620px) {
  :root { --pad: 1.1rem; }

  .nav { font-size: 1rem; }
  .nav a.nav__link { margin-left: .8rem; font-size: .82rem; }

  /* Stack the two yards; the fence turns on its side and sits between them. */
  .split { grid-template-columns: 1fr; gap: 1.4rem; max-width: 420px; }
  .yard--in, .yard--out { transform: none; }
  /* Stacked yards want a fence line running the full width between them, not
     the desktop's short segment (and not a rotated one — rotating a
     full-width flex row throws pickets and rails across both cards).
     Repeating the pickets as a gradient fills the span at any width. */
  .fence {
    height: 58px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 11px, transparent 11px 25px);
  }
  .fence i { display: none; }
  .fence::before, .fence::after { left: 0; right: 0; }
  .fence::before { top: 14px; }
  .fence::after  { top: 38px; }
  .paws { display: none; }

  .feats { grid-template-columns: 1fr; }
  .cta { gap: .9rem; margin-top: 2.2rem; }
  .shots { gap: 1.4rem; }
  .shots figure { width: 150px; }
  .privacy-card { padding: 1.4rem 1.2rem; }

  /* Fixed-geometry illustration — scale the pieces, don't transform the box
     (a transform would leave the full-size layout gap behind). */
  .scene__door  { width: 108px; height: 172px; }
  .scene__tag   { width: 60px; height: 60px; right: -30px; }
  .scene__phone { margin-left: 56px; width: 72px; height: 128px; }

  .foot { font-size: .82rem; gap: .9rem; }
  .foot__sp { flex-basis: 100%; height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .paws span { opacity: .45; }
  .badge:hover { transform: none; }
}
