@import url("fonts/fonts.css");

:root {
  --paper: #fbf6f0;
  --paper-2: #f3ebe0;
  --ink: #2a211b;
  --ink-soft: #6f6258;
  --accent: #e8873a;
  --accent-ink: #b45f1c;
  --blue: #5eb8ff;
  --green: #33a865;
  --line: #2a211b;
  --pixel: "Pixelify Sans", "Courier New", monospace;
  --body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: 700; letter-spacing: 0.01em; line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin: 0 0 0.3em; }
h3 { font-size: 1.25rem; margin: 0 0 0.2em; }
p { margin: 0 0 1em; }
.wrap { width: min(1100px, 100% - 32px); margin: 0 auto; }
.soft { color: var(--ink-soft); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ---------------------------------------------------------------- header */
.top { border-bottom: 2px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--pixel); font-size: 1.3rem; font-weight: 700; }
/* logo: 48-frame engine loop (32x30 art px): tail sway, an ear flick and a blink every 6 s. Shown at exactly
   one CSS px per art px: any other size scales the pixels unevenly and the cat flickers from frame to frame. */
.brand .logo {
  width: 32px; height: 30px; flex: none;
  background: url("img/logo-ginger.png?v=1x") 0 0 / 1536px 30px no-repeat; image-rendering: pixelated;
  animation: logo 6s steps(48) infinite;
}
@keyframes logo { to { background-position: -1536px 0; } }
.top nav { display: flex; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.top nav a:hover { text-decoration: underline; }
.lang { font: 500 15px var(--body); border: 2px solid var(--line); background: #fff; padding: 6px 8px; border-radius: 0; color: var(--ink); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.05rem var(--pixel); text-decoration: none;
  background: var(--accent); color: #fff;
  border: 2px solid var(--line); box-shadow: 4px 4px 0 var(--line);
  padding: 12px 20px; transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--line); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.kicker { display: inline-block; font: 700 0.95rem var(--pixel); background: var(--ink); color: var(--paper); padding: 4px 10px; margin-bottom: 18px; }
.hero p.lead { font-size: 1.2rem; max-width: 34em; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 14px; }
.hero .note { font-size: 0.95rem; color: var(--ink-soft); }
.phone {
  justify-self: center; width: min(320px, 78vw);
  background: #111; border: 2px solid var(--line); border-radius: 38px;
  padding: 10px; box-shadow: 8px 8px 0 var(--line);
}
.phone video { width: 100%; border-radius: 29px; aspect-ratio: 540 / 1168; object-fit: cover; background: #f8f4ef; }

/* ---------------------------------------------------------------- sections */
section { padding: 56px 0; }
.rule { height: 0; border: 0; border-top: 2px dashed var(--line); margin: 0; opacity: 0.35; }
.head { max-width: 40em; margin-bottom: 28px; }

/* cats */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cat { background: #fff; border: 2px solid var(--line); box-shadow: 4px 4px 0 var(--line); display: flex; flex-direction: column; }
.cat video { width: 100%; aspect-ratio: 1; object-fit: cover; image-rendering: pixelated; border-bottom: 2px solid var(--line); background: #f1eee9; }
.cat .body { padding: 12px 14px 14px; position: relative; flex: 1; }
.cat h3 { display: flex; align-items: center; gap: 8px; }
.cat p { font-size: 0.95rem; margin: 0; color: var(--ink-soft); }
.stamp { font: 700 0.78rem var(--pixel); border: 2px solid var(--line); padding: 1px 6px; margin-left: auto; background: var(--paper-2); }
.stamp.plus { background: var(--accent); color: #fff; }
.cat p.when { font-size: 0.85rem; font-weight: 600; color: var(--accent-ink); margin-bottom: 2px; }

/* Korean and Japanese: the pixel font has no Hangul or Kana, so those glyphs fall back to the system fonts */
:lang(ko) { --pixel: "Pixelify Sans", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; --body: "Work Sans", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; word-break: keep-all; }
:lang(ja) { --pixel: "Pixelify Sans", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif; --body: "Work Sans", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif; line-break: strict; }

/* how it lives */
.notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; padding: 0; margin: 0; list-style: none; }
.notes li { background: #fff; border: 2px solid var(--line); box-shadow: 4px 4px 0 var(--line); display: flex; flex-direction: column; }
.notes video { width: 100%; border-bottom: 2px solid var(--line); background: #f8f4ef; }
.notes .body { padding: 12px 14px 14px; }
.notes b { display: block; font-weight: 600; }
.notes span { color: var(--ink-soft); font-size: 0.97rem; }

/* bond */
.bond { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; align-items: start; }
/* short lists with a pixel cat icon (bond, moments) */
.list { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; margin: 0; list-style: none; }
.list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid #e3d8cb; }
.list li:first-child { padding-top: 0; }
.list .ic { width: 30px; height: 30px; image-rendering: pixelated; margin-top: 3px; }
.list b { display: block; font-weight: 600; }
.list span { color: var(--ink-soft); font-size: 0.97rem; }
/* cat card: a real screenshot from the app, one per language */
.catcard .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.catcard ul { padding-left: 1.2em; margin: 0; }
.catcard li { margin: 6px 0; }
.catcard img { width: 100%; max-width: 520px; justify-self: center; border: 2px solid var(--line); box-shadow: 6px 6px 0 var(--line); background: #f8f4ef; }

/* promise */
.promise { background: var(--ink); color: var(--paper); }
.promise .wrap { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.promise img { width: 112px; height: 112px; image-rendering: pixelated; }
.promise a { color: #ffc58f; }
.promise p { max-width: 46em; }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.plan { background: #fff; border: 2px solid var(--line); box-shadow: 4px 4px 0 var(--line); padding: 22px 24px; }
.plan.plus { background: #fff7ef; }
.plan ul { padding-left: 1.2em; margin: 0 0 1em; }
.plan li { margin: 4px 0; }
.price { font: 700 2rem var(--pixel); margin: 6px 0 2px; }
.prices { display: grid; gap: 8px; margin: 10px 0 14px; }
.prices div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px dashed #d8c9b8; padding: 4px 0; }
.prices b { font: 700 1.2rem var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.small { font-size: 0.88rem; color: var(--ink-soft); }

/* faq */
details { border: 2px solid var(--line); background: #fff; margin: 0 0 12px; }
summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font: 700 1.1rem var(--pixel); width: 1em; }
details[open] summary::before { content: "-"; }
details > div { padding: 0 16px 14px 42px; color: var(--ink-soft); }

/* text pages */
.page { padding: 40px 0 64px; }
.page .wrap { max-width: 760px; }
.page h2 { font-size: 1.35rem; margin-top: 1.8em; }
.page li { margin: 6px 0; }

/* footer */
footer { border-top: 2px solid var(--line); padding: 28px 0 40px; font-size: 0.95rem; }
footer .wrap { display: flex; gap: 18px 28px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
/* walking cat: 8-frame walk cycle from the engine (32x27 art px, shown at 2x). One cycle moves
   it ~17.7 px, so the legs and the travel speed match at ~29.6 px/s; site.js sets the duration. */
footer .walker { width: 100%; height: 54px; position: relative; overflow: hidden; }
footer .walker .walk {
  position: absolute; bottom: 0; left: -70px; width: 64px; height: 54px;
  background: url("img/walk-ginger.png") 0 0 / 512px 54px no-repeat; image-rendering: pixelated;
  animation: legs 0.6s steps(8) infinite, walk 36s linear infinite;
}
@keyframes legs { to { background-position: -512px 0; } }
@keyframes walk { from { left: -70px; } to { left: 100%; } }

/* video play overlay when motion is reduced */
.vid { position: relative; }
.vid button { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border: 2px solid var(--line); background: #fff; box-shadow: 3px 3px 0 var(--line); font: 700 1.4rem var(--pixel); cursor: pointer; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .cats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .notes { grid-template-columns: 1fr; }
  .bond { grid-template-columns: 1fr; gap: 24px; }
  .bond .cat { max-width: 420px; }
  .catcard .wrap { grid-template-columns: 1fr; gap: 28px; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top nav { display: none; }
  .hero { padding-top: 32px; }
  .cats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat .body { padding: 10px; }
  .cat p { font-size: 0.85rem; }
  .promise .wrap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  footer .walker .walk { animation: none; left: 12px; }
  .brand .logo { animation: none; }
  .btn { transition: none; }
}
