/* Blue Purr: his couch at night. One denim texture for the whole page. */
@font-face { font-family: "Chewy Fallback"; src: local("Arial Rounded MT Bold"), local("Arial Bold"); size-adjust: 92%; }

:root {
  --denim: #34548c;
  --navy: #141d38;
  --lamp: #ff9a3c;
  --cream: #fff3e0;
  --pink: #f29bb0;
  --sky: #9cc2ff;
  --stitch: rgba(255, 243, 224, .55);
  --display: "Chewy", "Chewy Fallback", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Fragment Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--cream);
  font: 500 18px/1.55 var(--body);
  background: var(--denim) url("/images/denim.webp") repeat;
  background-size: 420px 420px;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a, button, [role=button], summary, label { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 10px; }

.h2 {
  font: 400 clamp(40px, 5.4vw, 68px)/1 var(--display);
  margin: 0 0 26px;
  color: var(--cream);
  text-shadow: 3px 4px 0 var(--navy);
}

/* Stitched patch: used for the header mark and panels */
.patch, .couch, .shot, .faq details {
  border: 2px dashed var(--stitch);
  outline: 6px solid var(--navy);
  outline-offset: 0;
}

/* Header */
.top {
  max-width: 1240px; margin: 0 auto; padding: 22px 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.patch {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--navy); border-radius: 14px; padding: 5px 16px 5px 5px;
  font: 400 24px/1 var(--display); color: var(--cream);
  transform: rotate(-2deg);
}
.patch img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.top-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.top-nav a {
  text-decoration: none; font-weight: 800; font-size: 16px; min-height: 42px;
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 12px;
  min-width: 44px; justify-content: center;
  transition: color .2s, background-color .2s;
}
.top-nav a:hover { color: var(--lamp); }
.top-nav .top-buy { background: var(--lamp); color: var(--navy); box-shadow: 0 4px 0 var(--navy); }
.top-nav .top-buy:hover { background: var(--cream); color: var(--navy); }

/* Hero: name on the left, the couch game on the right */
.hero {
  max-width: 1240px; margin: 0 auto; padding: 30px 24px 50px;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 40px;
}
.name {
  margin: 0;
  font: 400 clamp(84px, 10vw, 150px)/.92 var(--display);
  padding-bottom: .08em;
  width: fit-content;
  color: var(--cream);
  text-shadow: 5px 7px 0 var(--navy);
  transform: rotate(-3deg);
}
.name span { display: block; }
.name-purr { color: var(--lamp); margin-left: .35em; }
.hero-line { font: 400 clamp(28px, 3vw, 40px)/1.1 var(--display); margin: 34px 0 8px; color: var(--cream); }
.hero-sub { margin: 0 0 24px; max-width: 28em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 0 24px; border-radius: 14px; text-decoration: none; border: 0;
  font: 800 18px/1 var(--body);
  transition: transform .15s ease, background-color .2s, color .2s;
}
.btn:active { transform: translateY(3px); }
.btn-lamp { background: var(--lamp); color: var(--navy); box-shadow: 0 5px 0 var(--navy); }
.btn-lamp:hover { background: var(--cream); }
.btn-soft { background: var(--navy); color: var(--cream); box-shadow: 0 5px 0 rgba(20, 29, 56, .5); }
.btn-soft:hover { color: var(--lamp); }

/* CA as his collar tag. Port of the 21st.dev copy with confirmation (ibrandify): icon swaps to a check. */
.tag {
  display: flex; align-items: center; gap: 0; width: 100%; max-width: 540px; margin: 0 0 22px; padding: 0;
  background: none; border: 0; color: var(--navy); text-align: left; font: inherit;
}
.tag-ring { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 6px solid #c9ced8; margin-right: -8px; position: relative; z-index: 1; background: var(--denim); }
.tag-body {
  flex: 1; display: grid; gap: 2px; padding: 12px 18px 12px 22px; min-height: 48px;
  background: linear-gradient(#ffd27a, var(--lamp)); border-radius: 12px 40px 40px 12px;
  box-shadow: 0 5px 0 var(--navy); transition: transform .15s;
}
.tag:hover .tag-body { transform: rotate(-1deg); }
.tag-label { font-size: 13px; font-weight: 800; }
.tag-text { font: 400 clamp(11px, 3.1vw, 16px)/1.35 var(--mono); overflow-wrap: anywhere; }
.tag-status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
.tag-check { display: inline-block; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.tag.is-copied .tag-check { opacity: 1; transform: none; }

/* The couch game */
.couch {
  position: relative; border-radius: 26px; background: rgba(20, 29, 56, .88);
  padding: 14px 16px 18px;
}
.couch-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; padding: 2px 6px 10px; }
.couch-bar b { font: 400 18px var(--mono); color: var(--lamp); margin-left: 4px; }
.couch-hearts { display: inline-flex; gap: 6px; }
.couch-hearts i { width: 18px; height: 18px; background: var(--pink); clip-path: path("M9 16.5 1.8 9.6A4.3 4.3 0 0 1 9 3.9a4.3 4.3 0 0 1 7.2 5.7z"); transition: opacity .2s, transform .2s; }
.couch-hearts i.lost { opacity: .2; transform: scale(.8); }

.couch-stage {
  position: relative; aspect-ratio: 7 / 5; border-radius: 18px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 85%, rgba(255, 154, 60, .32), transparent 62%), #1d2a52;
}
.cat { position: absolute; inset: 6% 6% 4%; padding: 0; border: 0; background: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.cat:not(:disabled) { cursor: pointer; }
.cat-shake { position: relative; display: block; width: 100%; height: 100%; }
.cat-img, .cat-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.cat-ghost { opacity: 0; transition: opacity .25s; background: url("/images/calm.webp") 50% 100% / contain no-repeat; }
.cat-mad, .cat-belly { opacity: 0; transition: opacity .12s; }
.couch-stage[data-state="mad"] .cat-calm { opacity: 0; }
.couch-stage[data-state="mad"] .cat-mad { opacity: 1; }
.couch-stage[data-state="belly"] .cat-calm { opacity: 0; }
.couch-stage[data-state="belly"] .cat-belly { opacity: 1; }
.couch-stage[data-state="belly"] .cat-ghost { opacity: 0 !important; }

/* The purr blur: ghosts offset to each side, the whole cat trembles. Only transform and opacity animate. */
.couch-stage[data-purr="1"] .cat-ghost { opacity: .22; }
.couch-stage[data-purr="2"] .cat-ghost { opacity: .32; }
.couch-stage[data-purr="3"] .cat-ghost { opacity: .4; }
.couch-stage[data-purr="1"] .g1 { transform: translateX(-4px); }
.couch-stage[data-purr="1"] .g2 { transform: translateX(4px); }
.couch-stage[data-purr="2"] .g1 { transform: translate(-8px, 1px); }
.couch-stage[data-purr="2"] .g2 { transform: translate(8px, -1px); }
.couch-stage[data-purr="3"] .g1 { transform: translate(-13px, 2px); }
.couch-stage[data-purr="3"] .g2 { transform: translate(13px, -2px); }
.couch-stage[data-purr="1"] .cat-shake { animation: tremble .12s linear infinite; }
.couch-stage[data-purr="2"] .cat-shake { animation: tremble .08s linear infinite; }
.couch-stage[data-purr="3"] .cat-shake { animation: tremble2 .06s linear infinite; }
.couch-stage[data-state="mad"] .cat-ghost { opacity: 0; transition: none; }
.couch-stage[data-state="mad"] .cat-shake { animation: none; }
@keyframes tremble { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-1.5px, .5px); } 50% { transform: translate(1.5px, -.5px); } 75% { transform: translate(-1px, -.5px); } }
@keyframes tremble2 { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3px, 1px); } 50% { transform: translate(3px, -1px); } 75% { transform: translate(-2px, -1px); } }
.couch-stage.bit { animation: bitten .35s ease; }
@keyframes bitten { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }

.couch-panel {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 18px;
  padding: 14px 6px 0; min-height: 96px;
}
.couch-panel .btn { grid-column: 2; grid-row: 1 / 3; }
.couch-panel .btn:disabled { opacity: .55; box-shadow: none; transform: none; }
.couch-title { margin: 0; font: 400 clamp(24px, 2.6vw, 32px)/1.05 var(--display); color: var(--cream); }
.couch-text { margin: 0; font-weight: 700; font-size: 16px; }

.purr { display: flex; align-items: center; gap: 12px; padding: 14px 6px 0; }
.purr-label { font: 400 22px/1 var(--display); color: var(--lamp); }
.purr-track { flex: 1; height: 14px; border-radius: 10px; background: rgba(255, 243, 224, .14); overflow: hidden; }
.purr-fill { display: block; height: 100%; width: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--pink), var(--lamp)); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }

/* Who is this guy */
.him { max-width: 1240px; margin: 0 auto; padding: 40px 24px 30px; }
.him-grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px 26px; align-items: center; }
.shot { margin: 0; border-radius: 20px; overflow: hidden; background: var(--navy); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.note { margin: 0; font: 800 clamp(19px, 1.9vw, 24px)/1.3 var(--body); }
.s-room { grid-column: 1 / 9; grid-row: 1 / 3; aspect-ratio: 16 / 9; transform: rotate(-1deg); }
.n-room { grid-column: 9 / 13; grid-row: 1; align-self: end; }
.s-window { grid-column: 9 / 13; grid-row: 2 / 4; aspect-ratio: 4 / 3; transform: rotate(1.5deg); }
.n-window { grid-column: 4 / 9; grid-row: 3; text-align: right; color: var(--lamp); font-size: clamp(22px, 2.3vw, 30px); }
.s-basket { grid-column: 1 / 5; grid-row: 4 / 6; aspect-ratio: 1; transform: rotate(-2deg); }
.n-basket { grid-column: 5 / 9; grid-row: 4; align-self: end; }
.s-keys { grid-column: 5 / 11; grid-row: 5 / 7; aspect-ratio: 4 / 3; transform: rotate(1deg); }
.n-keys { grid-column: 1 / 5; grid-row: 6; text-align: right; }
.him-yarn { position: absolute; right: 0; bottom: 8%; width: 170px; filter: drop-shadow(0 8px 0 var(--navy)); }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; padding: 60px 24px 20px; }
.faq-list { display: grid; gap: 18px; }
.faq details { border-radius: 16px; background: rgba(20, 29, 56, .88); }
.faq summary { list-style: none; padding: 16px 22px; font-weight: 800; font-size: 20px; display: flex; justify-content: space-between; gap: 12px; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 30px/1 var(--display); color: var(--lamp); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 18px; }

/* Footer */
.foot {
  max-width: 1240px; margin: 40px auto 0; padding: 0 24px 40px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, .8fr); align-items: end; gap: 26px;
}
.foot-bowl { width: 200px; filter: drop-shadow(0 8px 0 var(--navy)); }
.foot-line { font: 400 clamp(38px, 5vw, 64px)/1 var(--display); margin: 0 0 16px; text-shadow: 3px 4px 0 var(--navy); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 14px; font-weight: 800; }
.foot-links a { min-height: 40px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 4px; transition: color .2s; }
.foot-links a:hover { color: var(--lamp); }
.foot-note { margin: 0; font-size: 14px; opacity: .8; max-width: 32em; }
.foot-tv { width: 100%; max-width: 380px; justify-self: end; border-radius: 20px; border: 2px dashed var(--stitch); outline: 6px solid var(--navy); transform: rotate(2deg); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 20px; }
  .him-grid { grid-template-columns: 1fr; gap: 14px; }
  .him-grid > * { grid-column: 1 !important; grid-row: auto !important; text-align: left !important; }
  .note { margin-bottom: 16px; }
  .him-yarn { position: static; width: 110px; justify-self: end; margin-top: -10px; }
  .foot { grid-template-columns: 1fr; align-items: start; }
  .foot-tv { justify-self: start; max-width: 300px; }
  .foot-bowl { width: 150px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .top { padding: 14px 14px 0; flex-wrap: wrap; }
  .patch { font-size: 21px; }
  .top-nav a { padding: 8px 10px; font-size: 15px; }
  .hero, .him, .faq, .foot { padding-left: 16px; padding-right: 16px; }
  .couch { padding: 10px 10px 14px; }
  .couch-bar { font-size: 14px; }
  .couch-stage { aspect-ratio: 1; }
  .couch-panel { grid-template-columns: 1fr; }
  .couch-panel .btn { grid-column: 1; grid-row: auto; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .couch-stage .cat-shake, .couch-stage.bit { animation: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
