/* Sharp Cookie website. Same calm palette as the app. */
:root {
  --bg: #F8F5EF;
  --surface: #FFFFFF;
  --surface-alt: #F1ECE3;
  --border: #E4DDD1;
  --text: #2B3836;
  --text-2: #52605C;
  --muted: #6B7773;
  --accent: #477A6D;
  --accent-ink: #FFFFFF;
  --accent-tint: #E2EEE9;
  --coral: #B5654B;
  --coral-tint: #F7E8E1;
  --honey-tint: #F6EEDC;
  --lavender-tint: #ECE9F5;
  --radius: 22px;
  --shadow: 0 6px 24px rgba(43, 56, 54, 0.08);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --read: 42rem;
  --wide: 70rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.1875rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: #36604f; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--surface); padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.read { max-width: var(--read); margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header { padding: 1rem 0; }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem 1.25rem; flex-wrap: wrap; }
.site-nav a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
.site-nav a.button, .site-nav a.button:hover { color: var(--accent-ink); text-decoration: none; }

.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 0.7rem 1.3rem; border-radius: 999px; text-decoration: none; font-weight: 700;
}
.button:hover { background: #3d6b5f; color: var(--accent-ink); }

/* Hero */
.hero { padding: 2.5rem 0 3rem; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.7rem); line-height: 1.08; margin: 0 0 1rem; letter-spacing: -0.01em; }
.hero p.lede { font-size: 1.3rem; color: var(--text-2); margin: 0 0 1.75rem; max-width: 34rem; }
.hero .biscuit { justify-self: center; width: min(320px, 80%); filter: drop-shadow(0 18px 24px rgba(43,56,54,0.12)); }
.badges { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.badges a { display: block; line-height: 0; }
.badges img { height: 54px; width: auto; }
.small { font-size: 0.95rem; color: var(--muted); }

/* Sections */
section.band { padding: 3.5rem 0; }
section.band.alt { background: var(--surface-alt); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1.2; margin: 0 0 1rem; }
h3 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 0.4rem; }
.section-intro { color: var(--text-2); max-width: 40rem; margin: 0 0 2rem; }

.grid { display: grid; gap: 1.25rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--text-2); }
.card .tag {
  display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--coral);
  background: var(--coral-tint); border-radius: 999px; padding: 0.1rem 0.65rem; margin-bottom: 0.6rem;
}

.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.skill h3 { margin-bottom: 0.5rem; }
.skill ul { margin: 0; padding: 0; list-style: none; }
.skill li { padding: 0.35rem 0; border-top: 1px solid var(--border); color: var(--text-2); font-size: 1.05rem; }
.skill li:first-child { border-top: 0; }
.skill li strong { color: var(--text); font-weight: 700; }

.shots { display: flex; gap: 1.25rem; overflow-x: auto; padding: 0.5rem 0.25rem 1.25rem; scroll-snap-type: x mandatory; }
.shots figure { margin: 0; flex: 0 0 240px; scroll-snap-align: start; }
.shots img { border-radius: 26px; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }
.shots figcaption { text-align: center; font-size: 0.95rem; color: var(--text-2); margin-top: 0.6rem; }

.honest { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; align-items: center; }
.honest img { width: 180px; }

.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 1rem 1.25rem; margin-bottom: 0.75rem;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 0.6rem 0 0; color: var(--text-2); }

.article-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.article-card { display: flex; flex-direction: column; gap: 0.4rem; text-decoration: none; color: inherit; }
.article-card:hover h3 { text-decoration: underline; }
.article-card h3 { color: var(--text); }
.article-card .meta { font-size: 0.9rem; color: var(--muted); margin-top: auto; }

.cta {
  text-align: center; background: var(--accent-tint); border-radius: 28px;
  padding: 2.5rem 1.5rem; margin: 0 auto; max-width: 52rem;
}
.cta img.biscuit { width: 140px; margin: 0 auto 0.5rem; }
.cta .badges { justify-content: center; margin-top: 1.25rem; }

/* Articles */
.crumbs { font-size: 0.95rem; color: var(--muted); margin: 1rem 0 1.5rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.crumbs li + li::before { content: "›"; margin-right: 0.4rem; color: var(--muted); }
.crumbs a { color: var(--text-2); }

article.post h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); line-height: 1.15; margin: 0 0 0.75rem; }
article.post .dek { font-size: 1.3rem; color: var(--text-2); margin: 0 0 1rem; }
article.post .byline { font-size: 0.95rem; color: var(--muted); margin: 0 0 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
article.post h2 { font-size: 1.6rem; margin: 2.4rem 0 0.75rem; }
article.post h3 { margin: 1.8rem 0 0.5rem; }
article.post p, article.post li { color: #33423f; }
article.post ul, article.post ol { padding-left: 1.4rem; }
article.post li { margin: 0.35rem 0; }
article.post blockquote {
  margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 4px solid var(--accent); color: var(--text-2);
}
article.post figure { margin: 2rem 0; }
article.post figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.5rem; text-align: center; }
.note {
  background: var(--honey-tint); border-radius: 18px; padding: 1.1rem 1.35rem; margin: 1.75rem 0;
}
.note p { margin: 0; }
.try {
  display: grid; grid-template-columns: 96px 1fr; gap: 1.25rem; align-items: center;
  background: var(--accent-tint); border-radius: 22px; padding: 1.25rem 1.5rem; margin: 2.5rem 0;
}
.try img { width: 96px; }
.try h2 { font-size: 1.25rem !important; margin: 0 0 0.3rem !important; }
.try p { margin: 0; }
.sources { font-size: 1rem; }
.sources li { color: var(--text-2) !important; overflow-wrap: anywhere; }
.disclaimer { font-size: 0.95rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 2.5rem; }

/* Stroop demo */
.stroop { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; font-weight: 800; font-size: 1.6rem; letter-spacing: 0.02em; margin: 1rem 0; }
.stroop span { min-width: 6ch; }
.ink-red { color: #C0392B; }
.ink-blue { color: #2563A8; }
.ink-green { color: #2E7D4F; }
.ink-purple { color: #7A4BA8; }

.related { margin-top: 3rem; }
.related ul { list-style: none; padding: 0; }
.related li { margin: 0.5rem 0; }

.notfound { text-align: center; padding: 3rem 1.5rem; }
.notfound img { width: 200px; margin: 0 auto 1rem; }

/* Footer */
.site-footer { margin-top: 4rem; padding: 2.5rem 0 3rem; border-top: 1px solid var(--border); font-size: 1rem; color: var(--text-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: flex-start; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--text-2); }
.site-footer p { margin: 0.25rem 0; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .biscuit { grid-row: 1; width: 200px; }
  .grid.three, .skills { grid-template-columns: 1fr 1fr; }
  .article-list, .grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1.125rem; }
  .grid.three, .skills { grid-template-columns: 1fr; }
  .honest { grid-template-columns: 1fr; }
  .honest img { width: 130px; }
  .try { grid-template-columns: 1fr; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav .button { display: none; }
  .badges img { height: 48px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .biscuit { animation: float 6s ease-in-out infinite; }
  @keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
}
