/* Steady Cat – calm, friendly, warm. No external fonts or libraries. */

:root {
  --bg: #fff8f0;
  --bg-alt: #fbeee2;
  --surface: #ffffff;
  --text: #3d2e26;
  --muted: #6b5a50;
  --primary: #b5573d;       /* terracotta, white text passes WCAG AA */
  --primary-dark: #964530;
  --accent: #f2b98f;        /* soft peach */
  --border: #ecd9c8;
  --focus: #2f6f73;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(120, 72, 40, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "PingFang TC",
          "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--primary-dark); }
a:hover { color: var(--primary); }

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.75rem, 5vw + 0.5rem, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3vw + 0.5rem, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.narrow { max-width: 680px; }

.small { font-size: 0.9rem; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.lang-toggle {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  min-height: 44px;
  min-width: 64px;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  min-height: 48px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--primary-dark); border-color: var(--primary); }
.btn-secondary:hover { background: var(--bg-alt); color: var(--primary-dark); }
.btn-block { width: 100%; }

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Hero */
.hero { padding: 2.5rem 0 3rem; }
.hero-inner {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 1.5rem;
}
.hero-image img { width: min(260px, 70vw); }
.lead { font-size: 1.15rem; color: var(--muted); }

/* Signup */
.signup { background: var(--bg-alt); padding: 3rem 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
}
.signup-form { margin-top: 1.25rem; }
.signup-form label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.signup-form input[type="email"] {
  width: 100%;
  font: inherit;
  padding: 0.75rem 1rem;
  min-height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
.signup-form input[type="email"]:focus { border-color: var(--focus); }
.consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 1.1rem 0 1.25rem;
}
.consent input {
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.consent label { font-weight: 400; margin: 0; }
.consent-text label { display: inline; }
.consent-privacy { margin-left: 0.35rem; white-space: nowrap; }
.tagline { font-weight: 600; letter-spacing: 0.02em; color: var(--muted); margin: 0 0 0.5rem; }
.site-footer .footer-tagline { margin: 0 0 0.4rem; }
.form-status { min-height: 1.5em; margin: 0.75rem 0 0.25rem; font-weight: 600; }
.form-status.is-error { color: #9b2c1f; }
.form-status.is-info { color: var(--focus); }
[aria-invalid="true"] { border-color: #9b2c1f !important; }

/* Ebook */
.ebook { padding: 3rem 0; }
.ebook-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.ebook-cover img {
  width: min(220px, 60vw);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.6rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23964530' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* Privacy page */
.prose { padding-top: 2rem; padding-bottom: 3rem; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }

/* Footer */
.site-footer {
  background: #f3e2d3;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.75rem 0;
  text-align: center;
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer .disclaimer { max-width: 720px; margin: 0 auto 0.6rem; }

/* Social links (plain links, no embeds) */
.social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  margin-bottom: 1rem;
}
.social-handle { font-weight: 600; color: var(--text); }
.social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
}
.social-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.6rem;
  color: var(--primary-dark);
  text-decoration: none;
  border-radius: 999px;
}
.social-list a:hover { background: var(--bg-alt); text-decoration: underline; }
.social-list svg { flex-shrink: 0; }

/* Tablet and up */
@media (min-width: 600px) {
  .btn-row { flex-direction: row; flex-wrap: wrap; }
  .card { padding: 2rem 2.25rem; }
}

/* Desktop */
@media (min-width: 860px) {
  .hero { padding: 4rem 0 4.5rem; }
  .hero-inner { flex-direction: row; justify-content: space-between; gap: 3rem; }
  .hero-text { flex: 1 1 55%; }
  .hero-image { flex: 0 0 auto; }
  .hero-image img { width: 360px; }
  .ebook-inner { flex-direction: row; align-items: flex-start; gap: 3.5rem; }
  .ebook-cover img { width: 280px; }
  .ebook-text { flex: 1; }
}

/* Gulu hero photo */
.hero-image img.hero-photo { height: auto; border-radius: 24px; box-shadow: 0 8px 24px rgba(27,35,51,.12); }
.hero-image img.hero-photo.no-frame { border-radius: 0; box-shadow: none; }

/* v8: Gulu icon next to the wordmark */
.brand { display: inline-flex; align-items: center; gap: .45rem; }
.brand-icon { width: 32px; height: 32px; object-fit: contain; flex: 0 0 auto; }
