/* Beasties site. Colours and type follow the app (constants/colors.ts, constants/typography.ts). */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/fraunces.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/fraunces-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --cream: #FAF7EE;
  --cream-sheet: #FBF5E8;
  --cream-deep: #F6F0E5;
  --sand: #E8DAC2;
  --terracotta: #E07A5F;
  --moss: #5B8F67;
  --sun: #F4C542;
  --ink: #22372C;
  --ink-deep: #16433A;
  --ink-soft: #4D5E54;
  --peach: #FEF1E3;
  --mint: #EAF1E0;
  --blush: #FDE9E5;
  --mist: #EDF2F2;
  --sky: #D0ECEE;
  --line: #E6DCCB;
  --pet-cat: #F0766E;
  --pet-dog: #FDCE12;
  --pet-bird: #73A58C;
  --outline: #0C0735;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(34, 55, 44, 0.06), 0 8px 24px rgba(34, 55, 44, 0.06);
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--ink-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--moss); }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 10px; z-index: 50;
}
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250, 247, 238, 0.88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--cream-deep); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }

/* Buttons and pills */
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; }
.pill-ink { background: var(--ink); color: var(--cream); }
.pill-ink:hover { background: var(--ink-deep); color: var(--cream); }
.pill-soft { background: var(--cream-deep); color: var(--ink); border: 1px solid var(--line); }
.pill-soft:hover { background: var(--sand); color: var(--ink); }
.pill svg { width: 18px; height: 18px; }

/* Hero */
.hero { position: relative; padding: clamp(32px, 6vw, 72px) 0 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--moss); background: var(--mint); padding: 6px 12px; border-radius: 999px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--moss); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); margin: 18px 0 18px; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--terracotta); }
.hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 34em; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(32px, 6vw, 72px); }

/* Peeking pets */
.peek {
  position: relative;
  height: clamp(280px, 34vw, 420px);
  isolation: isolate;
}
.peek-stage { position: absolute; inset: 0 0 46px 0; clip-path: inset(-400px -60px 0 -60px); }
.pet {
  position: absolute; bottom: -2px;
  background: none; border: 0; padding: 0; cursor: pointer;
  transform-origin: 50% 100%;
  transform: translateY(105%);
  -webkit-tap-highlight-color: transparent;
}
.pet img { width: 100%; height: auto; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.pet-cat  { left: 3%;  width: 36%; z-index: 1; }
.pet-dog  { left: 26%; width: 46%; z-index: 3; }
.pet-bird { right: 2%; width: 33%; z-index: 2; bottom: -10%; }
.ledge {
  position: absolute; left: -4%; right: -4%; bottom: 0; height: 58px; z-index: 5;
  background: var(--sand); border-radius: 26px 26px 0 0;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.45);
}
.ledge::after { content: ''; position: absolute; left: 0; right: 0; top: 18px; height: 2px; background: rgba(34,55,44,.07); }

.peek.is-in .pet { animation: pop-in .9s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.peek.is-in .pet-cat  { animation-delay: .15s; }
.peek.is-in .pet-dog  { animation-delay: .35s; }
.peek.is-in .pet-bird { animation-delay: .55s; }
.peek.is-idle .pet { transform: translateY(0); animation: breathe 4.8s ease-in-out infinite; }
.peek.is-idle .pet-dog  { animation-duration: 5.4s; animation-delay: -1.2s; }
.peek.is-idle .pet-bird { animation-duration: 3.6s; animation-delay: -2.1s; }
.peek.is-idle .pet.duck { animation: duck .9s cubic-bezier(.3, .0, .3, 1) both; }
.peek.is-idle .pet.wiggle { animation: wiggle .7s ease-in-out both; }

@keyframes pop-in {
  0% { transform: translateY(105%); }
  100% { transform: translateY(0); }
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(1.5%) scaleY(1.012); }
}
@keyframes duck {
  0% { transform: translateY(0); }
  35% { transform: translateY(62%); }
  55% { transform: translateY(62%); }
  80% { transform: translateY(-5%); }
  100% { transform: translateY(0); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-4deg) translateY(-2%); }
  45% { transform: rotate(3.5deg) translateY(-3%); }
  70% { transform: rotate(-2deg); }
}

.bubble {
  position: absolute; z-index: 6; top: 0; left: 0; max-width: 15em; margin: 0;
  background: #fff; color: var(--ink); font-family: var(--display); font-style: italic; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.25;
  padding: 10px 16px; border-radius: 18px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.bubble::after { content: ''; position: absolute; bottom: -7px; width: 16px; height: 16px; background: #fff; transform: rotate(45deg); border-radius: 3px; left: var(--tail, 28px); }
.bubble.show { opacity: 1; transform: none; }

.spark {
  position: absolute; width: 28px; height: 28px; z-index: 7; pointer-events: none;
  animation: spark 1s ease-out forwards;
}
@keyframes spark {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.4) rotate(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -70px) scale(1) rotate(25deg); }
}

@media (prefers-reduced-motion: reduce) {
  .pet, .peek.is-in .pet, .peek.is-idle .pet, .peek.is-idle .pet.duck, .peek.is-idle .pet.wiggle { animation: none !important; transform: none !important; }
  .bubble { transition: none; }
  .spark { display: none; }
}

/* Sections */
section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 12px; }
.section-head p { color: var(--ink-soft); margin: 0; font-size: 18px; }
.band { background: var(--cream-sheet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--card, #fff); border-radius: var(--radius); padding: 26px 24px 28px; box-shadow: var(--shadow); }
.feature .icons { display: flex; gap: 6px; margin-bottom: 16px; }
.feature .icons img { width: 48px; height: 48px; }
.feature h3 { font-size: 23px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.feature .tag { display: inline-block; margin-left: 6px; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .02em; vertical-align: middle; color: var(--terracotta); background: var(--blush); padding: 3px 8px; border-radius: 999px; }
.c-peach { --card: var(--peach); }
.c-mint { --card: var(--mint); }
.c-blush { --card: var(--blush); }
.c-mist { --card: var(--mist); }
.c-sheet { --card: #fff; }
.c-sky { --card: #E6F4F4; }

.species { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(18px, 4vw, 48px); margin-top: clamp(36px, 5vw, 56px); }
.species figure { margin: 0; display: grid; justify-items: center; gap: 8px; }
.species img { width: clamp(56px, 7vw, 76px); height: clamp(56px, 7vw, 76px); transition: transform .3s cubic-bezier(.2,1.4,.4,1); }
.species figure:hover img { transform: translateY(-6px) rotate(-4deg); }
.species figcaption { font-weight: 600; font-size: 15px; color: var(--ink-soft); }

.privacy-band { background: var(--ink); color: var(--cream); border-radius: 32px; padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.privacy-band h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 14px; }
.privacy-band p { color: #D7E0D9; margin: 0 0 22px; }
.privacy-band a.pill { background: var(--cream); color: var(--ink); }
.privacy-band a.pill:hover { background: var(--sun); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 14px 16px; border-radius: 16px; }
.checks li::before { content: ''; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322372C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat; }

.soon { text-align: center; }
.soon h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.soon p { color: var(--ink-soft); max-width: 32em; margin: 0 auto 24px; }
.soon .hero-actions { justify-content: center; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 15px; color: var(--ink-soft); }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 2fr; gap: 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; align-content: flex-start; }
.site-footer nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .brand { margin-bottom: 10px; }
.site-footer p { margin: 4px 0; }

/* Legal and help pages */
.doc { padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 8vw, 96px); }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(36px, 5vw, 54px); margin-bottom: 10px; }
.doc .meta { color: var(--ink-soft); font-size: 15px; margin: 0 0 28px; }
.doc h2 { font-size: clamp(24px, 3vw, 30px); margin: 44px 0 12px; scroll-margin-top: 84px; }
.doc h3 { font-size: 20px; margin: 28px 0 8px; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.doc p, .doc li { color: #2F4338; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc .summary { background: var(--mint); border-radius: var(--radius); padding: 22px 24px; margin: 8px 0 32px; }
.doc .summary h2 { margin-top: 0; font-size: 22px; }
.doc .summary ul, .doc .summary p:last-child { margin: 0; }
.doc .toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 8px; }
.doc .toc p { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.doc .toc ol { margin: 0; columns: 2; column-gap: 28px; }
@media (max-width: 640px) { .doc .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--cream-deep); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.note { background: var(--peach); border-radius: 16px; padding: 14px 18px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; margin: 14px 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--ink); font-weight: 700; display: grid; place-items: center; font-size: 15px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }

/* Values the owner still has to fill in. Remove before going live. */
.fill { background: #FFF3B0; outline: 1px dashed #C9A400; border-radius: 4px; padding: 0 4px; }

/* 404 */
.lost { text-align: center; padding: clamp(56px, 10vw, 120px) 0; }
.lost img { width: 160px; margin: 0 auto 24px; }
.lost h1 { font-size: clamp(36px, 5vw, 54px); margin-bottom: 10px; }
.lost p { color: var(--ink-soft); margin: 0 0 24px; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-actions { margin-bottom: 8px; }
  .ledge { left: 0; right: 0; }
  .peek { max-width: 560px; width: 100%; margin: 64px auto 0; height: clamp(300px, 80vw, 440px); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .privacy-band { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .section-head p { font-size: 17px; }
}
