/* FlockAngel public website (flockangel.com).
   Palette matches the FlockAngel dashboard: Barn Red, Golden Hay, Soft Wheat / Warm Espresso.
   CSP is strict (style-src 'self'): no inline style attributes in index.html. */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/PlusJakartaSans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #F9F2E4;
  --bg-alt: #F2E7D3;
  --card: #FFFDF9;
  --ink: #2B2119;
  --muted: #6B5F54;
  --line: #E5DDD3;
  --line-strong: #CFC3B5;
  --primary: #B5471E;
  --primary-hover: #9C3B17;
  --on-primary: #FFFFFF;
  --hay: #D99A2B;
  --focus: #B57A18;
  --success: #3D6628;
  --success-bg: #EDF4E8;
  --success-ink: #203B12;
  --warning: #C0761A;
  --warning-bg: #FDF1DC;
  --warning-ink: #5E3605;
  --shadow: 0 1px 2px rgba(43, 33, 25, .05), 0 12px 32px -14px rgba(43, 33, 25, .18);
  --shadow-lg: 0 2px 4px rgba(43, 33, 25, .06), 0 30px 60px -24px rgba(43, 33, 25, .35);
  --radius: 18px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* scene */
  --sky-a: #F7C98B;
  --sky-b: #FBE7C6;
  --sun: #FFF3D6;
  --hill-far: #B9C38A;
  --hill-near: #8FA35E;
  --hedge: #6E8546;
  --wood: #9A5A36;
  --wood-dark: #6E3D22;
  --roof: #B5471E;
  --cam-frame: #2B2119;

  /* CTA band */
  --cta-bg: #B5471E;
  --cta-ink: #FFF6EA;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #17110D;
    --bg-alt: #1F1712;
    --card: #241B16;
    --ink: #F5EEDB;
    --muted: #C2B4A1;
    --line: #3D322A;
    --line-strong: #5A4B3F;
    --primary: #E66E45;
    --primary-hover: #F08259;
    --on-primary: #2A0C00;
    --hay: #E8B23A;
    --focus: #E8B23A;
    --success: #7EBA59;
    --success-bg: #1B2E12;
    --success-ink: #BFE6A6;
    --warning: #E59E38;
    --warning-bg: #362005;
    --warning-ink: #FFD69A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 30px 60px -24px rgba(0, 0, 0, .8);

    --sky-a: #C9773F;
    --sky-b: #EBB27A;
    --sun: #FFE2B0;
    --hill-far: #7E8A55;
    --hill-near: #5F7140;
    --hedge: #4C5E30;
    --cam-frame: #0D0907;

    --cta-bg: #3A1A0E;
    --cta-ink: #FFE9D6;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--primary-hover); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.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;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 520px) { .wrap { padding: 0 16px; } }

h1, h2, h3 { letter-spacing: -.025em; margin: 0; }
h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15;
  font-weight: 800;
  max-width: 20ch;
}
.kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ---- Header ---- */
.site-header { padding: 20px 0; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.015em;
}
.brand:hover { color: var(--ink); }
.brand img { border-radius: 9px; display: block; }
.brand-small { font-size: 15px; gap: 8px; }
.brand-small img { border-radius: 6px; }

.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.header-nav a:hover { color: var(--ink); }
.header-nav .signin-link {
  padding: 7px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
}
.header-nav .signin-link:hover { border-color: var(--ink); }
@media (max-width: 640px) {
  .header-nav a:not(.signin-link) { display: none; }
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 72px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 102, 40, .45); }
  80%, 100% { box-shadow: 0 0 0 9px rgba(61, 102, 40, 0); }
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 800;
  margin-bottom: 20px;
}
.hero-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 30px;
  max-width: 34em;
}

/* ---- Interest forms ---- */
.interest-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 480px;
}
.interest-form input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
.interest-form input::placeholder { color: var(--muted); opacity: .8; }
.interest-form input:focus { outline: none; border-color: var(--focus); }
.btn {
  padding: 14px 24px;
  border-radius: 999px;
  border: 0;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .65; cursor: wait; }

.form-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.form-status {
  flex-basis: 100%;
  margin: 2px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}
.form-status.is-ok { background: var(--success-bg); color: var(--success-ink); }
.form-status.is-error { background: var(--warning-bg); color: var(--warning-ink); }

/* ---- Hero scene ---- */
.hero-scene { margin: 0; position: relative; }
.cam {
  border-radius: 22px;
  padding: 10px;
  background: var(--cam-frame);
  box-shadow: var(--shadow-lg);
  transform: rotate(1.2deg);
}
.scene { display: block; width: 100%; height: auto; border-radius: 14px; }
.sky-a { stop-color: var(--sky-a); }
.sky-b { stop-color: var(--sky-b); }
.sun { fill: var(--sun); }
.hill-far { fill: var(--hill-far); }
.hill-near { fill: var(--hill-near); }
.hedge { fill: var(--hedge); }
.coop-body { fill: var(--wood); }
.coop-leg, .coop-door, .coop-ramp { fill: var(--wood-dark); }
.coop-roof { fill: var(--roof); }
.coop-win { fill: #F6D9A0; }
.fence rect { fill: #E9D7B8; }
.feeder rect { fill: #8E9AA3; }
.feeder .feeder-tray { fill: #6C7780; }

.hen-buff { color: #E5AE5C; }
.hen-white { color: #FBF8F2; }
.hen-black { color: #3B3431; }
.hen-red { color: #A9532A; }
.hen-black .hen-tail { fill: #2A2422; }

.det rect:not(.tag) {
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2.5;
  stroke-dasharray: 10 6;
}
.det .tag { fill: #FFFFFF; }
.det text {
  font: 700 13px var(--font);
  fill: #2B2119;
}
.det-warn rect:not(.tag) { stroke: #FFB547; stroke-dasharray: none; stroke-width: 3; }
.det-warn .tag { fill: #FFB547; }
.det-warn text { fill: #3A2203; }

.hud-pill { fill: rgba(20, 14, 10, .55); }
.hud text { font: 700 13px var(--font); fill: #FFFFFF; }
.rec { fill: #FF5A4A; animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .pulse, .rec { animation: none; }
}

.scene-note {
  position: absolute;
  left: -18px;
  bottom: -22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
}

/* ---- Promise strip ---- */
.promises {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.promise-list {
  list-style: none;
  margin: 0 auto;
  padding-top: 26px;
  padding-bottom: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.promise-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.promise-list strong { color: var(--ink); }
.promise-list svg {
  flex: none;
  width: 24px; height: 24px;
  color: var(--primary);
  margin-top: 1px;
}

/* ---- How it works ---- */
.how { padding-top: 96px; padding-bottom: 96px; }
.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
  box-shadow: var(--shadow);
}
.step-n {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 18px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---- Morning check-in ---- */
.morning {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.morning-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 88px;
}
.ticks {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.ticks li {
  position: relative;
  padding-left: 34px;
  color: var(--muted);
  font-size: 16.5px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1.5px solid var(--success);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 7.5px; top: 8px;
  width: 6px; height: 10px;
  border: solid var(--success);
  border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg);
}
.ticks strong { color: var(--ink); }

/* phone */
.phone {
  justify-self: center;
  width: 100%;
  max-width: 340px;
  padding: 12px;
  border-radius: 44px;
  background: var(--cam-frame);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
}
.phone-screen {
  border-radius: 33px;
  background: var(--bg);
  padding: 22px 14px 18px;
  display: grid;
  gap: 10px;
}
.ph-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 6px 4px;
}
.ph-title { font-weight: 800; font-size: 24px; letter-spacing: -.03em; }
.ph-date, .ph-muted { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ph-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}
.ph-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.ph-card-warn { border-color: color-mix(in srgb, var(--warning) 45%, var(--line)); }
.ph-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ph-label { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.ph-flock {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  text-align: center;
}
.ph-flock li { display: grid; justify-items: center; gap: 1px; font-size: 12px; font-weight: 700; }
.ph-flock svg {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--success);
  padding: 2px;
}
.ph-flock .is-warn svg { border-color: var(--warning); }
.ph-flock em { font-style: normal; font-weight: 600; font-size: 11px; color: var(--muted); }
.ph-flock .is-warn em { color: var(--warning); }
.ph-night {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #231B33;
  border-color: #231B33;
}
.ph-night svg { flex: none; width: 20px; height: 20px; color: #F3D27A; margin-top: 2px; }
.ph-night .ph-label { color: #F1EAFB; }
.ph-night p { color: #C9BEDB; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-good { background: var(--success-bg); color: var(--success-ink); }
.badge-warn { background: var(--warning-bg); color: var(--warning-ink); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-good { background: var(--success); }
.dot-warn { background: var(--warning); }

/* ---- FAQ ---- */
.faq {
  padding-top: 96px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 48px;
  align-items: start;
}
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 40px 20px 0;
  position: relative;
  font-weight: 700;
  font-size: 17.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 10px; height: 10px;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: -4px 0 22px; color: var(--muted); max-width: 62ch; }

/* ---- Final CTA ---- */
.cta { background: var(--cta-bg); color: var(--cta-ink); }
.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.cta h2 { color: #FFFFFF; }
.cta-inner > div p { margin: 12px 0 0; font-size: 17px; opacity: .85; }
.interest-form-full { max-width: none; }
.interest-form-full input {
  flex-basis: 100%;
  background: rgba(255, 255, 255, .96);
  border-color: transparent;
  color: #2B2119;
}
.interest-form-full input::placeholder { color: #7A6D61; }
.interest-form-full input:focus { border-color: var(--hay); }
.btn-light { background: #FFF6EA; color: #8E3414; }
.btn-light:hover { background: #FFFFFF; }
.cta .form-status.is-ok { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
.cta .form-status.is-error { background: #FFF1DC; color: #5E3605; }

/* ---- Footer ---- */
.site-footer { padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-inner .signin-link { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-inner .signin-link:hover { color: var(--ink); }

/* ---- Responsive ---- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 20px; padding-bottom: 64px; }
  .cam { transform: none; }
  .scene-note { left: 12px; }
  .morning-inner { grid-template-columns: 1fr; gap: 48px; padding-top: 64px; padding-bottom: 72px; }
  .faq { grid-template-columns: 1fr; gap: 28px; }
  .cta-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 56px; padding-bottom: 56px; }
}
@media (max-width: 760px) {
  .promise-list, .steps { grid-template-columns: 1fr; }
  .promise-list { gap: 14px; }
  .how, .faq { padding-top: 64px; padding-bottom: 64px; }
  .steps { margin-top: 28px; gap: 14px; }
  h2 { max-width: none; }
}
@media (max-width: 520px) {
  .hero-lead { font-size: 17px; }
  .interest-form .btn { flex: 1 1 100%; }
  .scene-note { position: static; margin-top: 14px; font-size: 13px; }
  .cam { padding: 6px; border-radius: 16px; }
  .scene { border-radius: 11px; }
  .phone { transform: none; }
}
