/* taki.pet, from the "taki.pet" page in the Claude Design project (tama.sh direction). */
:root {
  --bg: #0B0D0C;
  --surface: #101413;
  --panel: #0E1211;
  --chip: #1A201E;
  --line: #1E2422;
  --rule: #161B19;
  --dashed: #2A302D;
  --ink: #E8ECEA;
  --text: #C9D1CC;
  --dim: #8A958F;
  --muted: #56605B;
  --key: #6C7772;
  /* Pet colors, from pets/pid.json. */
  --green: #77e5a2;
  --coding: #61dde3;
  --thinking: #f8ca65;
  --error: #f66d67;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
  --gutter: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .75; }
p, h1, h2, ol, dl, dd { margin: 0; padding: 0; }
kbd { font: 400 11px var(--mono); color: var(--key); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.page { max-width: 1280px; margin: 0 auto; overflow: hidden; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.muted { color: var(--muted); }
.g, .c-idle { color: var(--green); }
.r { color: var(--error); }
.c-coding { color: var(--coding); }
.c-thinking { color: var(--thinking); }
.fine { font: 400 12px var(--mono); color: var(--muted); }

/* Nav */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 32px var(--gutter); font-family: var(--mono); }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--ink); }
.dot { width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* Buttons */
.button { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-radius: 9px; background: var(--green); color: var(--bg); font: 700 15px var(--mono); }
.button-glow { box-shadow: 0 0 30px color-mix(in srgb, var(--green) 25%, transparent); }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 56px; align-items: center; padding: 120px var(--gutter) 170px; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font: 700 58px/1.06 var(--mono); letter-spacing: -.05em; color: var(--ink); text-wrap: balance; }
.lede { font-size: 18px; line-height: 1.6; color: var(--dim); max-width: 440px; text-wrap: pretty; }
.hero-cta { display: flex; margin-top: 10px; }

/* Fixed-size scenes, scaled by site.js on narrow screens. */
.fit { position: relative; width: 100%; }
.fit-inner { position: relative; height: 100%; transform-origin: top left; }
.hero-art { max-width: 560px; height: 520px; }
.hero-pop { --pop-right: 14px; }

/* A Mac screen: wallpaper, menu bar, windows. taki is always shown in one. */
.mac { border-radius: 14px; background: radial-gradient(ellipse at 50% 0%, #151C19 0%, var(--panel) 75%); box-shadow: 0 0 0 1px #1A201E, 0 30px 60px rgba(0, 0, 0, .35); overflow: hidden; }
.hero-term { position: absolute; left: 20px; top: 322px; width: 420px; height: 240px; }

/* Terminal window */
.term { border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 30px 60px rgba(0, 0, 0, .4); font: 400 12.5px/1.8 var(--mono); overflow: hidden; }
.term-bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2A322F; }
.term-bar span { margin-left: 8px; font-size: 11px; color: var(--muted); }
.term-body { padding: 14px 16px; }

/* The menu bar panel, drawn like the app's PopoverView (Style.swift tokens). */
.pop { width: 340px; padding: 16px; border-radius: 12px; background: #0F1211; box-shadow: 0 0 0 1px #262D2A, 0 18px 44px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 14px; font: 400 12px/1.45 var(--mono); color: var(--text); text-align: left; }
.pop p { margin: 0; }
.pop hr { width: 100%; margin: 0; border: 0; border-top: 1px dashed var(--dashed); }
.pop .muted, .pop .key { color: var(--key); }
.pop .grow { flex: 1; min-width: 0; }
.pop-head { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.pop-tile { width: 44px; height: 44px; border-radius: 6px; background: var(--bg); box-shadow: inset 0 0 0 1px #232A27; display: grid; place-items: center; flex: none; }
.key b { color: var(--text); font-weight: 400; }
.pop-body { display: flex; flex-direction: column; gap: 14px; }
.pop-title { font-size: 15px; font-weight: 700; margin-bottom: 3px !important; }
.pop-resume { display: flex; justify-content: space-between; font-size: 13px; color: var(--green); }
.pop-foot { display: flex; gap: 14px; }
.pop-sec { display: flex; flex-direction: column; gap: 3px; }
.pop-sec h4 { margin: 0 0 2px; font-size: 11px; font-weight: 700; color: var(--key); }
.kv { display: flex; justify-content: space-between; gap: 12px; }
.kv span:first-child { color: var(--key); }
.quote { font-size: 11px; color: var(--dim); }
.row { display: flex; gap: 8px; font-size: 11px; white-space: nowrap; }
.row .grow { overflow: hidden; text-overflow: ellipsis; }
.y { color: var(--thinking); }
.journal { gap: 12px; }
.day-nav { display: flex; gap: 12px; }
.day-nav b { font-weight: 400; }
.day-nav b.g { font-weight: 700; }
.day-nav span { color: #232A27; }
.entry { display: flex; flex-direction: column; gap: 3px; }
.entry .gap { margin-top: 8px; }
.entry b { font-size: 13px; }
.entry ul { margin: 8px 0 0; padding: 0; list-style: none; color: var(--dim); display: flex; flex-direction: column; gap: 3px; }
.entry li { display: flex; gap: 7px; }
.entry li::before { content: '-'; }
.small { font-size: 11px; }

/* Section heads */
.section-head { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.section-head h2 { font: 700 44px/1.08 var(--mono); letter-spacing: -.05em; color: var(--ink); text-wrap: balance; }

/* How it works */
.how { border-top: 1px solid var(--rule); padding: 150px var(--gutter) 0; display: flex; flex-direction: column; gap: 64px; font-family: var(--mono); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 900px; width: 100%; margin: 0 auto; }
.step { padding: 22px 20px; border-radius: 14px; background: var(--panel); box-shadow: 0 0 0 1px #1A201E; display: flex; flex-direction: column; gap: 10px; }
.step.is-last { background: #101614; box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 45%, transparent); }
.step-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.step-top .pet { margin: -6px -5px -6px 0; }
.step-title { font-size: 15px; font-weight: 700; }
.step-text { font: 400 13px/1.5 var(--sans); color: var(--dim); }

/* Showcase */
.tour { padding: 150px var(--gutter) 0; display: flex; flex-direction: column; gap: 36px; font-family: var(--mono); }
.tabs { align-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); background: var(--panel); }
.tabs button { padding: 9px 16px; border: 0; border-radius: 7px; cursor: pointer; font: 700 12px var(--mono); background: transparent; color: var(--dim); transition: all .2s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.stage { height: 560px; border-radius: 20px; }
.scene-term { position: absolute; left: 64px; top: 170px; width: 520px; height: 420px; box-shadow: 0 0 0 1px #232A27, 0 30px 60px rgba(0, 0, 0, .5); font-size: 13px; }
.scene-term .term-body { padding: 16px 18px; }
.bubble { position: absolute; padding: 7px 11px; border-radius: 8px; background: rgba(15, 18, 17, .95); box-shadow: 0 0 0 1px var(--dashed); font: 400 12px var(--mono); white-space: nowrap; transition: color .3s; }

.menubar { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 28px; background: rgba(0, 0, 0, .4); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font: 500 12px var(--sans); color: var(--text); }
.menubar-left, .menubar-right { display: flex; gap: 16px; align-items: center; }
.menubar-right { gap: 14px; }
.menubar-left i { width: 11px; height: 11px; border-radius: 50%; background: var(--text); }
.menubar-left b { font-weight: 600; }
.menubar-pet { height: 20px; width: 30px; border-radius: 5px; display: grid; place-items: center; }
.menubar-pet.is-open { background: rgba(255, 255, 255, .16); }
/* The popover hangs from pid's icon, which sits 145px from the menu bar's right edge. */
.menu-pop { position: absolute; z-index: 2; right: var(--pop-right, 64px); top: 38px; }
.menu-pop::before { content: ''; position: absolute; z-index: 1; top: -6px; right: calc(139px - var(--pop-right, 64px)); width: 11px; height: 11px; background: #0F1211; box-shadow: -1px -1px 0 0 #2E3733; transform: rotate(45deg); }

/* Hiding behind an edge (hide.js), as PetWindow.swift's HiddenPet draws it. --box is the pet's box; the edge is its bottom. */
.hiding { position: absolute; width: var(--box); height: var(--box); }
.hiding-clip { position: absolute; inset: 0; clip-path: inset(-100% -100% 0 -100%); } /* only the edge cuts it: the waving arm reaches past the box */
.hiding-rise { --rise: 0; --shift: 0; transform: translate(calc(var(--shift) * var(--box) * .75 / 66), calc(var(--box) * .825 - var(--rise) * var(--box) * .75 / 66)); }
.hands { position: absolute; left: calc(var(--box) / 2 - 22px); top: calc(var(--box) - 5px); display: flex; align-items: flex-start; gap: 1px; animation: sway 2.4s ease-in-out infinite; transition: opacity .15s; }
.hands.is-off { opacity: 0; }
.hands i { width: 4px; height: 8px; background: var(--c); box-shadow: 0 0 6px var(--c); }
.hands i:nth-of-type(3n + 2) { height: 10px; }
.hands b { width: 14px; }
.hiding .bubble { left: calc(var(--box) * .9375 + 2px); top: calc(var(--box) - 44px); opacity: 0; pointer-events: none; transition: opacity .3s ease-in, color .3s; }
.hiding.bubble-left .bubble { left: auto; right: calc(var(--box) * .9375 + 2px); }
.hiding .bubble.is-on { opacity: 1; transition-timing-function: ease-out; transition-duration: .2s; }
.scene-hiding { z-index: 1; left: 404px; top: 10px; }

/* pid roaming the page (roam.js): only the pet and its hands take the pointer. */
.roam { position: absolute; left: 0; top: 0; z-index: 20; pointer-events: none; touch-action: none; }
.roam .pet-sprite, .roam .hands { pointer-events: auto; cursor: grab; }
.roam.is-dragging .pet-sprite { cursor: grabbing; }
@keyframes sway { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1px); } }

/* Thanks (Polar's success page) */
.thanks { padding-bottom: 120px; }
.thanks-art { height: 400px; }
.thanks-steps { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; font: 400 15px/1.5 var(--mono); color: var(--dim); }
.thanks-steps b { color: var(--ink); font-weight: 700; }
.thanks-steps li::marker { color: var(--green); }
.key-field { padding: 8px 10px; border-radius: 6px; background: var(--bg); box-shadow: inset 0 0 0 1px #232A27; color: var(--key); }
.c-sleeping { color: #668a76; }

/* Text pages (privacy) */
.doc { max-width: 680px; padding: 72px var(--gutter) 120px; display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.65; color: var(--dim); }
.doc h1 { font: 700 44px/1.08 var(--mono); letter-spacing: -.05em; color: var(--ink); margin: 0 0 4px; }
.doc h2 { font: 700 15px var(--mono); color: var(--ink); margin: 24px 0 0; }
.doc-lede { font-size: 18px; color: var(--text); }
.doc ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.doc li::marker { color: var(--green); }
.doc code { font: 13px var(--mono); color: var(--text); background: var(--surface); padding: 2px 6px; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.doc .fine { margin-top: 24px; }

/* Ideas */
.ideas { padding: 160px var(--gutter) 0; display: flex; justify-content: center; font-family: var(--mono); }
.ideas-inner { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 18px; }
.ideas h2 { font-size: 24px; font-weight: 700; letter-spacing: -.04em; color: var(--ink); }
/* Two rows in one box: the idea and the send button, then (once there's an idea) the optional email. */
.idea-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 6px 6px 6px 16px; border-radius: 10px; background: var(--panel); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.idea-box > span { font-size: 14px; grid-row: 1; }
.idea-box > input[name="idea"] { grid-column: 2; grid-row: 1; }
.idea-box > button { grid-column: 3; grid-row: 1; }
.idea-box input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--ink); font: 400 14px var(--mono); padding: 10px 0; caret-color: var(--green); }
.idea-box input::placeholder { color: var(--muted); }
.idea-box button { flex: none; padding: 10px 14px; border-radius: 7px; border: 0; cursor: default; font: 400 13px var(--mono); white-space: nowrap; transition: all .2s; background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px #2A322F; }
.idea-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.idea-form.has-text .idea-box { box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 50%, transparent); }
.idea-form.has-text .idea-box button { cursor: pointer; background: var(--green); color: var(--bg); box-shadow: none; }
.idea-box:focus-within { outline: none; }
.idea-email { grid-column: 1 / -1; grid-row: 2; display: none; align-items: center; gap: 12px; margin: 6px 10px 0 0; padding: 4px 0 2px; border-top: 1px dashed var(--dashed); font-size: 14px; color: var(--muted); cursor: text; }
.idea-form.has-text .idea-email, .idea-email:focus-within { display: flex; }
.idea-box .idea-email input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--ink); font: 400 13px var(--mono); padding: 6px 0; caret-color: var(--green); }
.idea-email input::placeholder { color: var(--muted); }
.idea-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.idea-status { font: 400 12px var(--mono); color: var(--green); }
.idea-status.is-error { color: var(--error); }

/* Get taki */
.get { margin: 160px var(--gutter) 120px; padding: 64px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 40px; font-family: var(--mono); }
.get-copy { display: flex; flex-direction: column; gap: 16px; }
.get h2 { font-size: 36px; font-weight: 700; letter-spacing: -.04em; color: var(--ink); }
.perks { display: flex; flex-wrap: wrap; gap: 20px; font-size: 12px; color: var(--dim); }
.perks b { font-weight: 400; }
.get-action { display: flex; align-items: center; gap: 28px; }
.get-button { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.get-button .fine { font-size: 11px; }

/* Footer */
.foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 20px; padding: 28px var(--gutter); border-top: 1px solid var(--rule); font: 400 12px var(--mono); color: var(--muted); }
.foot nav { display: flex; gap: 28px; justify-self: end; }
.foot .by { color: var(--dim); }
.heart { color: var(--error); }

/* Pet (see pet.js) */
.pet { --s: 1; position: relative; display: block; width: calc(160px * var(--s)); height: calc(160px * var(--s)); flex: none; }
.pet-shadow { position: absolute; left: 25%; bottom: calc(6px * var(--s)); width: 50%; height: calc(6px * var(--s)); background: color-mix(in srgb, var(--c) 18%, transparent); }
.pet-sprite {
  position: absolute; left: calc(10px * var(--s)); bottom: calc(12px * var(--s)); width: calc(140px * var(--s));
  filter: drop-shadow(0 0 calc(10px * var(--s)) color-mix(in srgb, var(--c) 45%, transparent));
}
.pet-sprite svg { display: block; width: 100%; height: auto; }
.pet-sprite .pet-prop { position: absolute; }
/* The welcome wave (design: dWave), pivoting on the shoulder. */
.prop-wave { transform-origin: calc(5px * var(--s)) calc(45px * var(--s)); animation: wave .32s ease-in-out infinite alternate; }
@keyframes wave { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }
.pet-badge { position: absolute; top: calc(6px * var(--s)); right: 0; font: 700 calc(14px * var(--s)) / 1 var(--mono); animation: blink 1s steps(1) infinite; }
.anim-bob { animation: bob var(--p) steps(2) infinite; }
.anim-hop { animation: bob var(--p) steps(2) infinite; }
.anim-shake { animation: shake var(--p) steps(2) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--amp) * var(--s) * -1)); } }
@keyframes shake { 0%, 100% { transform: translateX(calc(var(--amp) * var(--s) * -1)); } 50% { transform: translateX(calc(var(--amp) * var(--s))); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .nav { padding-block: 20px; }
  .hero { padding-block: 48px 96px; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .how, .tour, .ideas { padding-top: 96px; }
  .idea-box button { padding: 10px; }
  .section-head h2 { font-size: 32px; }
  .get { margin-block: 96px 64px; padding: 32px 24px; }
  .get h2 { font-size: 28px; }
  .get-action { gap: 16px; }
  .foot { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .foot nav { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
