/* Clawd site: warm, editorial, in the spirit of Anthropic's design language.
   Palette from the Anthropic brand guidelines; Lora (serif) for display + reading, Poppins for UI. */

:root {
  --ivory: #faf9f5;
  --oat: #f0eee6;
  --line: #e8e6dc;
  --mid: #b0aea5;
  --slate: #141413;
  --body: #3d3d3a;
  --muted: #6b6a64;
  --clay: #d97757;
  --clay-deep: #c4623f;
  --blue: #6a9bcc;
  --green: #788c5d;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(20, 20, 19, .05), 0 12px 40px -12px rgba(20, 20, 19, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--body);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
code, kbd, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
code { background: var(--oat); border: 1px solid var(--line); padding: .08em .4em; border-radius: 6px; font-size: .86em; color: var(--slate); }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); color: var(--slate); font-weight: 500; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 1.04; }
h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.1; }
h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; }
h4 { font-size: 1.2rem; }
em { font-style: italic; color: var(--clay); }
.eyebrow { font-family: var(--sans); font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--clay-deep); margin: 0 0 14px; }
.eyebrow.light { color: var(--clay); }
.sub { color: var(--muted); max-width: 640px; margin: 18px auto 0; }
.fine { font-family: var(--sans); font-size: .82rem; color: var(--muted); line-height: 1.6; margin: 12px 0 0; }
.fine.light { color: #a9a79d; }
.spark { color: var(--clay); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--ivory) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: 1.1rem; color: var(--slate); letter-spacing: -.01em; }
.brand canvas { width: 30px; height: 28px; image-rendering: pixelated; }
.nav-links { display: flex; gap: 30px; font-family: var(--sans); font-size: .9rem; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--body); padding: 6px 0; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--clay); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--sans); font-weight: 500; font-size: .95rem; text-decoration: none; border: 1.5px solid transparent; border-radius: 999px; padding: 12px 22px; cursor: pointer; transition: transform .18s ease, background .18s, color .18s, border-color .18s, box-shadow .18s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-sm { padding: 9px 18px; font-size: .86rem; }
.btn-dark { background: var(--slate); color: var(--ivory); }
.btn-dark:hover { background: #2a2a28; box-shadow: 0 8px 22px -8px rgba(20, 20, 19, .5); transform: translateY(-1px); }
.btn-clay { background: var(--clay); color: #fff; }
.btn-clay:hover { background: var(--clay-deep); box-shadow: 0 10px 24px -8px rgba(217, 119, 87, .7); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--slate); border-color: #cfccc0; }
.btn-ghost:hover { border-color: var(--slate); background: #fff; }
.btn:focus-visible, .chip-btn:focus-visible, .tabs button:focus-visible, summary:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(56px, 10vw, 110px) 0 40px; position: relative; }
.hero::before { content: ""; position: absolute; inset: -40px -10% auto; height: 560px; z-index: -1; background: radial-gradient(60% 60% at 50% 30%, rgba(217, 119, 87, .13), transparent 70%); }
.hero h1 { margin-bottom: 26px; }
.lede { max-width: 680px; margin: 0 auto; font-size: clamp(1.05rem, 1.9vw, 1.28rem); color: var(--body); }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.meta { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin: 18px 0 0; }
.window { margin: 56px auto 0; width: min(760px, 100%); background: var(--oat); border: 1px solid var(--line); border-radius: 22px; padding: 10px; box-shadow: var(--shadow); }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 6px 10px 12px; font-family: var(--sans); font-size: .76rem; color: var(--muted); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e0ddd0; display: block; }
.window-bar i:nth-child(1) { background: #ec6a5e; } .window-bar i:nth-child(2) { background: #f4bf4f; } .window-bar i:nth-child(3) { background: #61c554; }
.window-bar span { margin-left: 8px; }
.window img { width: 100%; border-radius: 14px; background: var(--ivory); }
.hint { font-family: var(--sans); font-size: .88rem; color: var(--muted); margin: 26px 0 0; }
.hint strong { color: var(--slate); font-weight: 500; }

/* ---------- chips marquee ---------- */
.chips { overflow: hidden; border-block: 1px solid var(--line); background: var(--oat); padding: 18px 0; margin-top: 56px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.chips-track { display: flex; gap: 14px; width: max-content; animation: slide 46s linear infinite; }
.chips-track span { font-family: var(--sans); font-size: .86rem; font-weight: 500; color: var(--slate); background: var(--ivory); border: 1px solid var(--line); padding: 8px 18px; border-radius: 999px; white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section-head { text-align: center; margin: 0 auto clamp(40px, 6vw, 72px); max-width: 780px; }
.features { padding: clamp(80px, 12vw, 140px) 0 20px; }
.row { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 84px); align-items: center; margin-bottom: clamp(72px, 10vw, 128px); }
.row.flip .copy { order: 2; }
.row .copy p { margin: 16px 0 0; color: var(--body); }
.row .copy h3 { margin-top: 2px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-family: var(--sans); font-size: .9rem; color: var(--body); }
.ticks li { padding-left: 28px; position: relative; line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; border-radius: 50%; background: var(--clay) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.4l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.media { padding: 12px; overflow: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.media:hover { transform: translateY(-4px) rotate(-.4deg); }
.media img { width: 100%; border-radius: 12px; background: var(--ivory); }

.claude-card { padding: 28px; display: grid; gap: 16px; background: var(--oat); position: relative; min-height: 280px; align-content: center; }
.bubble-demo span { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86rem; color: var(--slate); background: var(--ivory); border: 1.5px solid var(--clay); border-radius: 12px; padding: 9px 14px; box-shadow: 0 6px 16px -8px rgba(217, 119, 87, .55); }
.bubble-demo.b2 { text-align: right; } .bubble-demo.b3 { text-align: left; }
.bubble-demo.b3 span { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-4px); } }
.code { margin: 0; background: var(--slate); color: #e8e6dc; padding: 16px 18px; border-radius: 12px; font-size: .84rem; line-height: 1.6; overflow-x: auto; }
.code .c { color: #8e8c83; }

/* games */
.games { padding: 20px 0 clamp(40px, 6vw, 80px); }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: clamp(72px, 10vw, 120px); }
.game { margin: 0; padding: 12px 12px 22px; overflow: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.game:hover { transform: translateY(-5px); }
.game img { width: 100%; border-radius: 12px; background: var(--ivory); }
.game figcaption { padding: 18px 10px 0; }
.game h4 { margin-bottom: 6px; }
.game p { margin: 0; font-size: 1rem; color: var(--muted); }
.moods { margin-bottom: 0; }

/* tools */
.tools { padding: clamp(40px, 8vw, 100px) 0 clamp(80px, 10vw, 130px); }
.grid-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool { padding: 26px 26px 28px; transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.tool:hover { transform: translateY(-4px); border-color: var(--clay); }
.tool kbd { display: inline-block; font-size: .8rem; background: var(--oat); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 8px; padding: 3px 10px; color: var(--slate); margin-bottom: 16px; }
.tool h4 { margin-bottom: 6px; }
.tool p { margin: 0; font-size: .98rem; color: var(--muted); line-height: 1.55; }

/* try him */
.try { background: var(--slate); color: #d8d6cc; position: relative; overflow: hidden; }
.try::before { content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%; background: radial-gradient(50% 60% at 50% 100%, rgba(217, 119, 87, .28), transparent 70%); pointer-events: none; }
.try-inner { text-align: center; padding: clamp(80px, 11vw, 140px) 0 clamp(150px, 16vw, 200px); position: relative; }
.try h2 { color: var(--ivory); }
.try .sub { color: #a9a79d; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 40px; }
.chip-btn { font-family: var(--sans); font-weight: 500; font-size: .92rem; color: var(--ivory); background: rgba(250, 249, 245, .07); border: 1px solid rgba(250, 249, 245, .18); border-radius: 999px; padding: 11px 22px; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.chip-btn:hover { background: rgba(250, 249, 245, .15); border-color: rgba(250, 249, 245, .4); transform: translateY(-2px); }
.chip-btn.accent { background: var(--clay); border-color: var(--clay); color: #fff; }
.chip-btn.accent:hover { background: var(--clay-deep); }
.chip-btn[aria-pressed="true"] { background: var(--ivory); color: var(--slate); border-color: var(--ivory); }

/* install */
.install { padding: clamp(80px, 11vw, 140px) 0 clamp(40px, 6vw, 70px); }
.install-card { max-width: 820px; margin: 0 auto; padding: 14px; background: #fff; }
.tabs { display: flex; gap: 6px; background: var(--oat); border-radius: 14px; padding: 5px; width: fit-content; margin: 14px 0 22px 4px; }
.tab-wrap { position: relative; display: inline-flex; }
.rec-tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); z-index: 1; font-family: var(--sans); font-size: .6rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--clay); padding: 3px 9px; border-radius: 999px; white-space: nowrap; pointer-events: none; box-shadow: 0 3px 8px -3px rgba(217, 119, 87, .8); }
.fine .good { color: var(--green); font-weight: 600; }
.tabs button { font-family: var(--sans); font-weight: 500; font-size: .86rem; color: var(--muted); background: transparent; border: 0; border-radius: 10px; padding: 9px 20px; cursor: pointer; transition: all .18s; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--slate); box-shadow: 0 1px 3px rgba(20, 20, 19, .12); }
.tab-panel { padding: 8px 18px 20px; }
.tab-panel[hidden] { display: none; }
.dl-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.steps { margin: 22px 0 0; padding-left: 22px; display: grid; gap: 12px; font-family: var(--sans); font-size: .93rem; color: var(--body); }
.steps li::marker { color: var(--clay); font-weight: 600; }
.steps b { font-weight: 600; color: var(--slate); }
.cmd { position: relative; margin: 18px 0 4px; }
.cmd pre { margin: 0; background: var(--slate); color: #e8e6dc; border-radius: 14px; padding: 22px 130px 22px 22px; font-size: .88rem; line-height: 1.75; overflow-x: auto; }
.cmd .btn { position: absolute; top: 14px; right: 14px; }
.cmd pre code, .code code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.cmd .btn-dark { background: rgba(250, 249, 245, .12); color: var(--ivory); border-color: rgba(250, 249, 245, .28); }
.cmd .btn-dark:hover { background: rgba(250, 249, 245, .22); box-shadow: none; }
.cmd .btn.copied, .btn.copied { background: var(--green); border-color: var(--green); color: #fff; }

/* faq */
.faq { padding: clamp(60px, 8vw, 100px) 0 clamp(90px, 11vw, 150px); }
.faq-list { max-width: 780px; margin: 0 auto; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 24px 40px 24px 0; font-family: var(--serif); font-size: 1.22rem; font-weight: 500; color: var(--slate); position: relative; letter-spacing: -.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; margin-top: -9px; border-right: 2px solid var(--clay); border-bottom: 2px solid var(--clay); transform: rotate(45deg); transition: transform .25s; }
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
details p { margin: 0 0 26px; padding-right: 40px; color: var(--body); font-size: 1.04rem; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }

/* footer */
.footer { border-top: 1px solid var(--line); background: var(--oat); padding: 44px 0 120px; }
.foot-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; font-family: var(--sans); font-size: .88rem; font-weight: 500; align-items: center; }
.foot-links a { text-decoration: none; } .foot-links a:hover { color: var(--clay-deep); }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--clay-deep); }

.credits { font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--slate); margin: 14px 0 4px; }
.credits a { text-decoration: none; color: var(--clay-deep); background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 1px; transition: background-size .25s, color .2s; }
.credits a:hover { color: var(--slate); background-size: 100% 100%; background-image: linear-gradient(rgba(217, 119, 87, .22), rgba(217, 119, 87, .22)); }

/* live crab */
#pet { position: fixed; left: 0; top: 0; z-index: 60; width: 68px; height: 64px; image-rendering: pixelated; touch-action: none; cursor: grab; will-change: transform; filter: drop-shadow(0 6px 6px rgba(20, 20, 19, .16)); user-select: none; -webkit-user-select: none; }
#pet.dragging { cursor: grabbing; }
#pet[hidden] { display: none; }
.pet-bubble { position: fixed; left: 0; top: 0; z-index: 61; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .8rem; line-height: 1.4; color: var(--slate); background: var(--ivory); border: 1.5px solid var(--clay); border-radius: 12px; padding: 8px 12px; max-width: 240px; pointer-events: none; box-shadow: 0 10px 26px -12px rgba(20, 20, 19, .45); }
.pet-bubble::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -7px; width: 11px; height: 11px; background: var(--ivory); border-right: 1.5px solid var(--clay); border-bottom: 1.5px solid var(--clay); transform: translateX(-50%) rotate(45deg); }
.pet-bubble[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 80; font-family: var(--sans); font-size: .86rem; background: var(--slate); color: var(--ivory); padding: 11px 20px; border-radius: 999px; pointer-events: none; transition: all .3s cubic-bezier(.2, .8, .2, 1); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* reveal on scroll + hero entrance */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .34s; }

/* responsive */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .row, .row.flip { grid-template-columns: 1fr; }
  .row.flip .copy { order: 0; }
  .grid-tools { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { width: calc(100% - 32px); }
  .grid4, .grid-tools { grid-template-columns: 1fr; }
  .cta .btn { width: 100%; }
  .cmd pre { padding-right: 22px; padding-bottom: 66px; }
  .cmd .btn { top: auto; bottom: 14px; }
  .tab-panel { padding-inline: 8px; }
  summary { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chips-track, .bubble-demo.b3 span { animation: none; }
}
