/* Cowkeeper website — one stylesheet, no framework. Mobile-first, WCAG AA contrast, reduced-motion aware. */

:root {
  --ink: #1A1540; --muted: #5D5A7A; --cream: #FAF7F0; --surface: #FFFFFF; --line: #E8E3F2;
  --violet: #4C33D8; --violet-dark: #3C27B8; --violet-deep: #2A1B8C; --violet-tint: #EDE9FB; --violet-tint-2: #F3F0FD;
  --teal: #22D3C5; --teal-hover: #3BE3D6; --teal-light: #9FF3EA;
  --marker: #FFD166; --warm: #FFF7E0; --warm-line: #F3E4B8; --muzzle: #F8B4C8;
  --ok: #178F5A; --ok-ink: #146C46; --ok-bg: #DDF3E8;
  --pend: #B9760A; --pend-ink: #8A5200; --pend-bg: #FFF0D1;
  --unk-ink: #4B5563; --unk-bg: #EEF0F4;
  --risk: #B3261E; --risk-ink: #8E1F18; --risk-bg: #F9E3E1;
  --radius: 18px; --radius-sm: 12px;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-hand: 'Shantell Sans', 'Comic Sans MS', cursive;
  --max: 1200px; --gutter: 20px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--cream); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--violet-deep); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -0.03em; line-height: 1.02; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -48px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 8px; }

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 64px 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.section-warm { background: var(--warm); border-top: 1px solid var(--warm-line); border-bottom: 1px solid var(--warm-line); }
.section-violet { background: var(--violet); color: #fff; position: relative; overflow: hidden; }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.split { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } .split-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .split-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .split-4-8 { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } .split-start { align-items: start; } }

/* type */
.h1 { font-size: clamp(40px, 7vw, 68px); font-weight: 800; }
.h2 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; }
.h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); }
.on-dark .lede, .section-dark .lede { color: #C9C2F0; }
.section-violet .lede { color: #E6E1FF; }
.hand { font-family: var(--font-hand); font-weight: 700; display: inline-block; }
.mark { background-image: linear-gradient(transparent 62%, var(--marker) 62%, var(--marker) 92%, transparent 92%); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 14px 22px; border-radius: 12px; border: 0; cursor: pointer; min-height: 48px; transition: transform .15s ease, background .15s ease; text-decoration: none; white-space: nowrap; }
.nav-cta .btn-sm { padding: 10px 14px; }
@media (max-width: 380px) { .brand .wordmark { font-size: 20px; } }
.btn:hover { transform: translateY(-1px); }
.btn-teal { background: var(--teal); color: var(--ink); } .btn-teal:hover { background: var(--teal-hover); color: var(--ink); }
.btn-purple { background: var(--violet); color: #fff; } .btn-purple:hover { background: var(--violet-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--violet); border: 2px solid #CBC3F2; } .btn-ghost:hover { background: var(--violet-tint); color: var(--violet-deep); }
.btn-white { background: #fff; color: var(--violet-deep); border: 2px solid #DCD6F5; } .btn-white:hover { background: var(--violet-tint-2); }
.btn-outline-white { background: rgba(255,255,255,.1); color: #fff; border: 2px solid rgba(255,255,255,.4); } .btn-outline-white:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-sm { padding: 10px 16px; min-height: 42px; font-size: 14px; }
.btn-block { width: 100%; }

/* components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 24px; }
.tile { transition: all .15s ease; }
.tile:hover { border-color: #B9ADF0; box-shadow: 0 10px 28px rgba(76,51,216,.12); transform: translateY(-2px); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip-ok { background: var(--ok-bg); color: var(--ok-ink); } .chip-pend { background: var(--pend-bg); color: var(--pend-ink); } .chip-unk { background: var(--unk-bg); color: var(--unk-ink); } .chip-demo { background: var(--violet-tint); color: var(--violet-dark); } .chip-risk { background: var(--risk-bg); color: var(--risk-ink); } .chip-teal { background: var(--teal); color: var(--ink); }
.ico { width: 44px; height: 44px; border-radius: 12px; background: var(--violet-tint); color: var(--violet); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico-sm { width: 34px; height: 34px; border-radius: 10px; }
.ico-ok { background: var(--ok-bg); color: var(--ok-ink); }
.check { width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature strong { font-size: 15px; }
.feature .small { color: var(--muted); }
.bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--unk-bg); }
.bar > span { display: block; height: 100%; }
.status-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.status-row > span:first-child { flex: 1; font-weight: 600; }
.notice { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-radius: 16px; padding: 18px 22px; }
.notice-dark { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); }
.notice-violet { background: var(--violet-tint); border: 1px solid #DCD6F5; }
.pattern { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .07; pointer-events: none; }
.rel { position: relative; }

/* nav */
.nav { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand .wordmark { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; }
.brand .dot { color: var(--teal); }
.nav-links { display: none; align-items: center; gap: 2px; }
.navlink { color: var(--ink); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.navlink:hover { background: var(--violet-tint); color: var(--ink); }
.navlink[aria-current="page"] { background: var(--violet-tint); color: var(--violet-dark); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.nav-mobile { display: none; border-top: 1px solid var(--line); background: var(--cream); padding: 8px 0 16px; }
.nav-mobile[data-open="true"] { display: block; }
.nav-mobile a { display: block; padding: 12px 0; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
@media (min-width: 1000px) { .nav-links { display: flex; } .nav-toggle { display: none; } .nav-mobile { display: none !important; } .nav-inner { height: 78px; } }

/* hero */
.hero { color: #fff; position: relative; overflow: hidden; background: var(--violet); }
.hero .wrap { position: relative; padding-top: 64px; padding-bottom: 96px; }
@media (min-width: 900px) { .hero .wrap { padding-top: 84px; padding-bottom: 124px; } }
.hero-art { position: relative; height: 520px; display: none; }
@media (min-width: 1000px) { .hero-art { display: block; } }
.float { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 36px rgba(20,10,80,.16); padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink); animation: ckfloat 7s ease-in-out infinite; }
.float.d2 { animation-delay: -2.3s; } .float.d3 { animation-delay: -4.6s; }
@keyframes ckfloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.herd { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60px; opacity: .22; }
.laptop { position: absolute; left: 70px; top: 120px; width: 420px; }
.laptop-body { background: var(--ink); border-radius: 16px 16px 4px 4px; padding: 10px 10px 0; border: 2px solid #2E2470; }
.laptop-screen { background: #fff; border-radius: 8px 8px 0 0; overflow: hidden; color: var(--ink); }
.laptop-base { height: 14px; background: #2E2470; border-radius: 0 0 14px 14px; margin: 0 -18px; border-top: 2px solid #3C2F8C; }
.mini-nav { width: 92px; border-right: 1px solid var(--line); padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; font-size: 9px; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.mini-nav span { padding: 5px 8px; border-radius: 6px; }
.mini-nav .on { background: var(--violet-tint); color: var(--violet-dark); }
.mini-tile { border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.mini-tile .k { font-size: 8px; color: var(--muted); font-weight: 700; }
.mini-tile .v { font-size: 16px; font-weight: 800; }

/* quiz / interactive */
.choice { width: 100%; font-weight: 600; font-size: 14px; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-align: left; min-height: 46px; display: flex; align-items: center; gap: 10px; }
.choice:hover { border-color: #B9ADF0; background: var(--cream); }
.choice.is-ok { border-color: var(--ok); background: var(--ok-bg); }
.choice.is-bad { border-color: #F2B544; background: var(--pend-bg); }
.choice .bullet { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #CBC3F2; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 11px; font-weight: 800; }
.feedback { border-radius: 12px; padding: 14px 16px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.feedback-ok { background: var(--ok-bg); color: #0F4D32; } .feedback-bad { background: var(--pend-bg); color: #6B3F00; }
.tab { font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; min-height: 44px; }
.tab:hover { border-color: #B9ADF0; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.stepbtn { width: 100%; font-weight: 700; font-size: 14px; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; min-height: 48px; text-align: left; display: flex; align-items: center; gap: 12px; }
.stepbtn:hover { border-color: #B9ADF0; }
.stepbtn[aria-selected="true"] { border-color: var(--violet); background: var(--violet-tint-2); color: var(--violet-dark); }
.stepbtn .n { width: 30px; height: 30px; border-radius: 50%; background: var(--violet); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.stepbtn .when { font-weight: 500; font-size: 12px; color: var(--muted); display: block; }
details.faq { border-bottom: 1px solid var(--line); }
details.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 16px; min-height: 48px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; width: 30px; height: 30px; border-radius: 50%; background: var(--violet-tint); color: var(--violet); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
details.faq[open] summary::after { content: "−"; }
details.faq summary:hover { color: var(--violet); }
details.faq p { padding: 0 0 18px; color: var(--muted); max-width: 680px; line-height: 1.6; font-size: 15px; }
input[type=range] { width: 100%; accent-color: var(--violet); height: 36px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; }
.input { width: 100%; font-size: 15px; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--line); background: #fff; min-height: 48px; }
.input:focus { border-color: var(--violet); outline: none; }
.err { color: var(--risk-ink); font-size: 13px; }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.cmp { width: 100%; border-collapse: collapse; min-width: 720px; }
.cmp th, .cmp td { padding: 14px 12px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmp th { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cmp .hi { background: var(--violet-tint-2); }
.ic { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.ic-ok { background: var(--ok-bg); color: var(--ok-ink); } .ic-var { background: var(--pend-bg); color: var(--pend-ink); } .ic-no { background: var(--unk-bg); color: var(--unk-ink); }
.cell { display: flex; align-items: center; gap: 10px; }
table.plain { width: 100%; border-collapse: collapse; min-width: 560px; }
.plain th, .plain td { padding: 12px 10px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plain th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* lifecycle */
.life { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); position: relative; }
@media (min-width: 720px) { .life { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .life { grid-template-columns: repeat(6, minmax(0, 1fr)); } .life-line { display: block; } }
.life-line { display: none; position: absolute; left: 60px; right: 60px; top: 34px; height: 4px; background: #DCD6F5; border-radius: 2px; }
.life-node { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; position: relative; }
.life-node .dot { width: 72px; height: 72px; border-radius: 50%; background: var(--violet); color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 6px solid var(--cream); box-shadow: 0 0 0 2px #DCD6F5; }
.life-node .dot.teal { background: var(--teal); color: var(--ink); }

/* footer */
footer { background: var(--ink); color: #C9C2F0; padding: 48px 0 32px; position: relative; overflow: hidden; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); } }
.footlink { color: #C9C2F0; font-size: 14px; display: block; padding: 3px 0; }
.footlink:hover { color: #fff; }
.foot-head { color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.foot-bottom { border-top: 1px solid #2E2470; padding-top: 20px; margin-top: 32px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #8F86C7; }
.foot-input { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 10px; border: 1px solid #3C2F8C; background: #241C5C; color: #fff; font-size: 14px; min-height: 44px; }
.foot-input::placeholder { color: #8F86C7; }
.foot-btn { width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--teal); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* print */
@media print { .nav, footer, .btn, .nav-mobile { display: none !important; } body { background: #fff; } .section { padding: 24px 0; } }
