/* ============================================
   $dog · share this dog
   warm paper-zine + memey accents
   ============================================ */

:root {
  --bg: #F4EFE6;
  --bg-deep: #ECE5D6;
  --ink: #1A1715;
  --ink-soft: #4A433D;
  --ink-faint: #8A8074;
  --accent: #D94F2A;
  --accent-deep: #B33D1F;
  --highlight: #F5D547;
  --paper-line: #C9C0B0;
  --paper-card: #FBF8F1;
  --shadow-sharp: 0 6px 0 0 var(--ink);
  --shadow-soft: 0 16px 40px -16px rgba(26, 23, 21, 0.22);

  --font-serif: 'Instrument Serif', 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-marker: 'Caveat', cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

/* ============================================
   Decorative layers
   ============================================ */

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: multiply;
  z-index: 1;
}

#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 79, 42, 0.55), transparent 70%);
  mix-blend-mode: multiply;
  opacity: 0.3;
  pointer-events: none;
  z-index: 2;
  transform: translate(-100px, -100px);
  transition: opacity 200ms ease;
}

@media (pointer: coarse) {
  #cursor-glow { display: none; }
}

#floating-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.float-emoji {
  position: absolute;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

@keyframes drift {
  from { transform: translate(110vw, 0); }
  to   { transform: translate(-20vw, 0); }
}

/* ============================================
   Containers
   ============================================ */

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 5;
}

main { position: relative; z-index: 5; }

/* ============================================
   Topbar
   ============================================ */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(244, 239, 230, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-line);
  z-index: 100;
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar-mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--ink);
  position: relative;
  z-index: 10;
}

.topbar-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

@media (max-width: 1079px) {
  .topbar-caption { display: none; }
}

/* ============================================
   Buttons (SHARE family)
   ============================================ */

.btn-share {
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #FFF8EE;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-sharp);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 200ms ease;
  text-align: center;
  user-select: none;
}

.btn-share:hover {
  transform: translateY(3px);
  box-shadow: 0 3px 0 0 var(--ink);
  background: var(--accent-deep);
}

.btn-share:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 0 var(--ink);
}

.btn-share--small {
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-width: 2px;
  box-shadow: 0 4px 0 0 var(--ink);
}

.btn-share--small:hover { box-shadow: 0 2px 0 0 var(--ink); }

.btn-share--big {
  width: 100%;
  height: 96px;
  font-size: 24px;
  border-radius: 999px;
}

.btn-share--medium {
  width: 100%;
  height: 64px;
  font-size: 18px;
  border-radius: 999px;
}

.arrow { display: inline-block; transform: translateY(-1px); }

/* ============================================
   Eyebrow + headlines
   ============================================ */

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow .hairline {
  width: 80px;
  height: 1px;
  background: var(--paper-line);
}

.eyebrow-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.headline {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-align: center;
  margin: 0 0 28px;
}

.section-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
  margin: 0 auto 56px;
  max-width: 880px;
}

.subhead {
  font-family: var(--font-sans);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

/* Marker highlight */
.marker {
  background: linear-gradient(180deg, transparent 58%, rgba(245, 213, 71, 0.7) 58%);
  padding: 0 2px;
}

.marker--skew {
  transform: skewY(-1deg);
  display: inline-block;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100svh;
  padding: 156px 0 80px;
  display: flex;
  align-items: flex-start;
}

.hero .container {
  width: 100%;
}

.hero-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 56px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 64px;
}

.hero-action__left {
  max-width: 540px;
  width: 100%;
  justify-self: end;
}

.hero-action__right {
  width: 100%;
  max-width: 480px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tweet-card {
  background: var(--paper-card);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow-sharp);
  padding: 14px;
  transform: rotate(-1deg);
  overflow: hidden;
  min-height: 320px;
}

.tweet-mount {
  width: 100%;
}

.tweet-placeholder {
  font-family: var(--font-marker);
  font-size: 32px;
  color: var(--ink-faint);
  text-align: center;
  padding: 80px 20px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tweet-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 16px;
  text-align: center;
}

/* Sticky-note */
.note {
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  box-shadow: var(--shadow-soft);
  padding: 18px 22px;
  font-family: var(--font-marker);
  color: var(--ink);
}

.note-floating {
  position: absolute;
  top: -38px;
  right: -16px;
  transform: rotate(-4deg);
  font-size: 28px;
  font-weight: 700;
  z-index: 11;
  padding: 12px 20px;
  background: var(--highlight);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  box-shadow: 0 4px 0 0 rgba(26, 23, 21, 0.4);
}

.counter {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.04em;
}

.counter-num {
  display: inline-block;
  min-width: 1ch;
  font-weight: 500;
}

.copy-link {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
  text-align: center;
  padding: 4px;
  transition: color 200ms ease;
  position: relative;
  z-index: 10;
}

.copy-link:hover { color: var(--accent); }

.scroll-cue {
  font-family: var(--font-marker);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink-faint);
  text-align: center;
  transform: rotate(-2deg);
  margin-top: 24px;
}

/* ============================================
   STUDY
   ============================================ */

.study {
  background: var(--bg-deep);
  padding: 120px 0;
  position: relative;
}

.study-grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 72px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

.study-abstract {
  max-width: 56ch;
}

.abstract-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
  display: inline-block;
  margin-bottom: 24px;
}

.abstract-body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.hairline-divider {
  height: 1px;
  background: var(--paper-line);
  margin: 24px 0 16px;
}

.citation {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.55;
}

.study-note {
  position: relative;
  display: flex;
  justify-content: center;
}

.note-study {
  max-width: 320px;
  transform: rotate(2deg);
  padding: 28px 28px 22px;
  background: var(--paper-card);
  border: 1px solid var(--paper-line);
  box-shadow: 0 18px 36px -18px rgba(26, 23, 21, 0.3);
  position: relative;
}

.note-line-1 {
  font-family: var(--font-marker);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}

.note-line-2 {
  font-family: var(--font-marker);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  color: var(--accent-deep);
  transform: rotate(-1deg);
  display: inline-block;
  margin-bottom: 16px;
}

.note-sig {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-top: 8px;
}

.paw-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 96px;
  gap: 16px;
  position: relative;
}

.paw-divider::before,
.paw-divider::after {
  content: "";
  flex: 1;
  max-width: 40%;
  height: 1px;
  background: var(--paper-line);
}

.paw {
  font-size: 24px;
  display: inline-block;
}

/* ============================================
   ACCESS
   ============================================ */

.access {
  background: var(--bg);
  padding: 96px 0 0;
}

.access-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-deep);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-sharp);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ca-block { display: flex; flex-direction: column; gap: 12px; }

.ca-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  display: inline-block;
  align-self: flex-start;
}

.ca-row {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: clamp(15px, 2vw, 22px);
  color: var(--ink);
  background: var(--paper-card);
  border: 1.5px solid var(--paper-line);
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
  text-align: left;
  width: 100%;
}

.ca-row:hover { border-color: var(--ink); }

.ca-row.is-copied {
  background: #3F8C5A;
  color: #FFF8EE;
  border-color: #3F8C5A;
}

.ca-value {
  word-break: break-all;
  flex: 1;
  font-weight: 500;
}

.ca-copy {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.ca-row.is-copied .ca-copy {
  color: #FFF8EE;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.chip {
  position: relative;
  z-index: 10;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 10px 20px;
  background: transparent;
  transition: background 200ms ease, color 200ms ease;
  white-space: nowrap;
}

.chip:hover { background: var(--accent); color: #FFF8EE; }

/* ============================================
   FOOTER
   ============================================ */

.footer {
  margin-top: 80px;
  border-top: 1px solid var(--paper-line);
  padding: 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}

.footer-citation {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.5;
  max-width: 460px;
}

.footer-tag {
  font-family: var(--font-marker);
  font-weight: 600;
  font-size: 26px;
  color: var(--ink);
  transform: rotate(-2deg);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer-links a {
  position: relative;
  z-index: 10;
  transition: color 200ms ease;
}

.footer-links a:hover { color: var(--accent); }

/* ============================================
   Toasts
   ============================================ */

.toast-stack {
  position: fixed;
  top: 80px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  pointer-events: none;
  max-width: 320px;
}

.toast {
  pointer-events: none;
  background: var(--paper-card);
  border: 1.5px solid var(--ink);
  box-shadow: 0 8px 0 0 rgba(26, 23, 21, 0.5);
  padding: 12px 18px;
  font-family: var(--font-marker);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  transform: rotate(-3deg) translateX(120%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 320ms ease;
}

.toast.is-in {
  transform: rotate(-3deg) translateX(0);
  opacity: 1;
}

.toast.is-out {
  transform: rotate(-3deg) translateX(120%);
  opacity: 0;
}

.toast--accent {
  background: var(--highlight);
}

/* ============================================
   Confetti
   ============================================ */

.confetti-piece {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  user-select: none;
  will-change: transform, opacity;
}

/* ============================================
   IntersectionObserver fades
   ============================================ */

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease-out, transform 700ms ease-out;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1079px) {
  .hero-action {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .study-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .study-note { justify-content: center; }
}

@media (max-width: 767px) {
  .hero {
    padding: 120px 0 56px;
  }
  .hero-action {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-action__left { max-width: 100%; justify-self: stretch; }
  .note-floating { display: none; }

  .study { padding: 80px 0; }
  .study-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 40px;
  }
  .study-note { justify-content: center; }
  .note-study { max-width: 100%; }

  .access { padding: 72px 0 0; }
  .access-card { padding: 24px; }
  .chip-row { gap: 10px; }
  .chip { font-size: 13px; padding: 9px 16px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }
  .footer-citation { max-width: 100%; }
  .footer-links { justify-content: center; }

  .toast-stack {
    right: 12px;
    top: 72px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 479px) {
  .container { padding: 0 20px; }
  .topbar-inner { padding: 0 20px; gap: 12px; }
  .btn-share--big { height: 80px; font-size: 20px; }
}
