@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap");

/* ==========================================================================
   Paddock — shared stylesheet
   Used by index.html, privacy.html and terms.html.
   Sections:
     1. Tokens (light)            5. Buttons
     2. Tokens (dark)             6. Card
     3. Base + layout             7. Prose (long-form legal text)
     4. Header + nav              8. Footer
                                  9. Landing-page components
   ========================================================================== */


/* 1. Tokens — full light palette on bare :root
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Brand palette */
  --meadow:      #6E9A63;
  --sage:        #8FB08A;
  --pale-grass:  #B7CDA4;
  --cream:       #F6F0E2;
  --milk:        #FBF8F1;
  --oat:         #E4D8BE;
  --warm-brown:  #8A5E3C;
  --dark-bark:   #4A342A;
  --barn-red:    #C0533F;
  --sky:         #CFE3E8;
  --butter:      #E8C87A;

  /* Semantic surfaces + ink */
  --bg:            var(--cream);
  --bg-accent:     #EDE5D2;
  --surface:       var(--milk);
  --surface-sunk:  #F1EADA;
  --text:          var(--dark-bark);
  --text-muted:    #6F5748;
  --text-faint:    #8A7566;
  --border:        var(--oat);
  --border-soft:   #EBE0CA;

  /* Accents */
  --accent:        var(--meadow);
  --accent-ink:    #4A7040;   /* green that passes as small text */
  --accent-soft:   #E4EEDC;
  --link:          #7A5133;
  --link-hover:    var(--barn-red);
  --focus:         var(--warm-brown);

  /* Buttons */
  --btn-bg:        #557B4B;
  --btn-bg-hover:  #47673E;
  --btn-ink:       #FBF8F1;

  /* Header / chrome */
  --header-bg:     rgba(246, 240, 226, 0.86);
  --shadow-sm:     0 1px 2px rgba(74, 52, 42, 0.05), 0 2px 8px rgba(74, 52, 42, 0.05);
  --shadow-md:     0 2px 4px rgba(74, 52, 42, 0.05), 0 12px 32px rgba(74, 52, 42, 0.10);

  /* Illustration */
  --brand-mark-bg:   var(--meadow);
  --brand-mark-line: var(--milk);
  --grid-a:          #C6DBB4;
  --grid-b:          #B0C89E;
  --grid-c:          #9BB98D;
  --grid-line:       rgba(74, 52, 42, 0.10);
  --fence:           var(--warm-brown);
  --mark:            rgba(74, 52, 42, 0.38);
  --cow-body:        #FBF8F1;
  --cow-dark:        #3B2B22;
  --cow-muzzle:      #EBC0B6;
  --cow-horn:        var(--oat);

  --radius-sm: 0.75rem;
  --radius:    1.25rem;
  --radius-lg: 1.75rem;

  --font: "Nunito", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
          "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}


/* 2. Tokens — dark. Only what changes, declared twice:
      once for the system preference, once for an explicit toggle.
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #241C17;
    --bg-accent:     #2A211A;
    --surface:       #302620;
    --surface-sunk:  #291F1A;
    --text:          #F2E8D8;
    --text-muted:    #C6B6A2;
    --text-faint:    #A6947F;
    --border:        #4A3A2E;
    --border-soft:   #3D2F26;

    --accent:        var(--sage);
    --accent-ink:    #A9C89F;
    --accent-soft:   #33402D;
    --link:          var(--butter);
    --link-hover:    #F0DDA6;
    --focus:         var(--butter);

    --btn-bg:        var(--pale-grass);
    --btn-bg-hover:  #C8DBB8;
    --btn-ink:       #22190F;

    --header-bg:     rgba(36, 28, 23, 0.86);
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.30), 0 2px 8px rgba(0, 0, 0, 0.24);
    --shadow-md:     0 2px 4px rgba(0, 0, 0, 0.28), 0 14px 34px rgba(0, 0, 0, 0.38);

    --brand-mark-bg: var(--sage);
    --brand-mark-line: #22190F;
    --grid-a:        #4C6243;
    --grid-b:        #435737;
    --grid-c:        #3A4C31;
    --grid-line:     rgba(0, 0, 0, 0.22);
    --fence:         #A9764F;
    --mark:          rgba(246, 240, 226, 0.40);
    --cow-body:      #EFE6D6;
    --cow-dark:      #2A1F19;
    --cow-muzzle:    #C99A8F;
    --cow-horn:      #C7B394;
  }
}

:root[data-theme="dark"] {
  --bg:            #241C17;
  --bg-accent:     #2A211A;
  --surface:       #302620;
  --surface-sunk:  #291F1A;
  --text:          #F2E8D8;
  --text-muted:    #C6B6A2;
  --text-faint:    #A6947F;
  --border:        #4A3A2E;
  --border-soft:   #3D2F26;

  --accent:        var(--sage);
  --accent-ink:    #A9C89F;
  --accent-soft:   #33402D;
  --link:          var(--butter);
  --link-hover:    #F0DDA6;
  --focus:         var(--butter);

  --btn-bg:        var(--pale-grass);
  --btn-bg-hover:  #C8DBB8;
  --btn-ink:       #22190F;

  --header-bg:     rgba(36, 28, 23, 0.86);
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.30), 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow-md:     0 2px 4px rgba(0, 0, 0, 0.28), 0 14px 34px rgba(0, 0, 0, 0.38);

  --brand-mark-bg: var(--sage);
  --brand-mark-line: #22190F;
  --grid-a:        #4C6243;
  --grid-b:        #435737;
  --grid-c:        #3A4C31;
  --grid-line:     rgba(0, 0, 0, 0.22);
  --fence:         #A9764F;
  --mark:          rgba(246, 240, 226, 0.40);
  --cow-body:      #EFE6D6;
  --cow-dark:      #2A1F19;
  --cow-muzzle:    #C99A8F;
  --cow-horn:      #C7B394;
}


/* 3. Base + layout
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  /* `clip` keeps the page from ever scrolling sideways without turning the
     body into a scroll container, which would break the sticky header. */
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.35rem + 3.1vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem); }

p { margin: 0 0 1.1em; }

a {
  color: var(--link);
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.18em;
}

a:hover { color: var(--link-hover); }

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

hr {
  height: 1px;
  margin: 2.5rem 0;
  border: 0;
  background: var(--border);
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* Centred container — the page's one horizontal rhythm */
.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.15rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


/* 4. Header + nav — identical markup on every page
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-soft);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  min-height: 4.25rem;
  padding-block: 0.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover { color: var(--text); }

.brand-mark {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  font-weight: 700;
  font-size: 0.98rem;
}

.site-nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
}


/* 5. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  background: var(--accent-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--btn-bg);
  border-color: transparent;
  color: var(--btn-ink);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-ink);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}


/* 6. Card
   ========================================================================== */

.card {
  padding: clamp(1.25rem, 3vw, 1.85rem);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card > :last-child { margin-bottom: 0; }

.card h3 { margin-bottom: 0.4em; }


/* 7. Prose — long-form text (privacy, terms)
   ========================================================================== */

.prose {
  max-width: 65ch;
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 3.25rem) clamp(3rem, 7vw, 4.5rem);
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose h1 {
  margin-bottom: 0.35em;
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem);
}

.prose h2 {
  margin-top: 2.2em;
  margin-bottom: 0.5em;
  font-size: clamp(1.35rem, 1.2rem + 0.8vw, 1.65rem);
  letter-spacing: -0.01em;
}

.prose h3 {
  margin-top: 1.8em;
  margin-bottom: 0.4em;
  font-size: 1.15rem;
  font-weight: 700;
}

.prose p { margin: 0 0 1.15em; }

.prose ul,
.prose ol {
  margin: 0 0 1.3em;
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.5em;
  padding-left: 0.2rem;
}

.prose li::marker { color: var(--accent-ink); }

.prose li > ul,
.prose li > ol {
  margin-top: 0.5em;
  margin-bottom: 0.25em;
}

.prose a {
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
}

.prose a:hover { color: var(--link-hover); }

.prose strong {
  font-weight: 800;
  color: var(--text);
}

.prose em { font-style: italic; }

.prose code {
  padding: 0.12em 0.4em;
  background: var(--surface-sunk);
  border: 1px solid var(--border-soft);
  border-radius: 0.4rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 0.25em 0 0.25em 1.15rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

.prose hr {
  margin: 2.75em 0;
}

/* A wide table scrolls inside itself instead of widening the page.
   Works with a bare <table> and with an optional wrapper. */
.prose .table-wrap,
.prose .table-scroll {
  max-width: 100%;
  margin: 0 0 1.6em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose table {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 0 1.6em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.55;
}

.prose .table-wrap table,
.prose .table-scroll table {
  margin-bottom: 0;
}

.prose th,
.prose td {
  min-width: 6rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--surface-sunk);
  font-weight: 800;
}

.prose caption {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: left;
}

/* Small helpers legal pages tend to want */
.page-meta,
.prose .page-meta {
  margin-bottom: 2.25em;
  color: var(--text-faint);
  font-size: 0.95rem;
}

.muted { color: var(--text-muted); }


/* 8. Footer — identical markup on every page
   ========================================================================== */

.site-footer {
  margin-top: auto;
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  background: var(--bg-accent);
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}

.footer-tagline {
  margin: 0.5rem 0 0;
  max-width: 30ch;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-weight: 700;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.footer-legal {
  flex: 1 1 100%;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 0.88rem;
  line-height: 1.7;
}


/* 9. Landing-page components
   ========================================================================== */

.section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.section-tint {
  background: var(--bg-accent);
  border-block: 1px solid var(--border-soft);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head > :last-child { margin-bottom: 0; }

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(1.06rem, 1rem + 0.4vw, 1.2rem);
  color: var(--text-muted);
  max-width: 42ch;
}

.section-head .lede { max-width: 55ch; }

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 5.5rem);
  background:
    radial-gradient(120% 90% at 80% 0%, var(--accent-soft) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 70%);
  border-bottom: 1px solid var(--border-soft);
}

.hero .wrap {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 60rem) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.hero h1 { margin-bottom: 0.35em; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem;
}

.hero-note {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.92rem;
}

/* Screenshot framing */
.shot {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 19rem;
  padding: 0.5rem;
  background: linear-gradient(160deg, var(--border), var(--border-soft));
  border-radius: 2.4rem;
  box-shadow: var(--shadow-md);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2rem;
  background: var(--surface);
}

.shot figcaption {
  padding: 0.9rem 0.5rem 0.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.shot-sm { max-width: 16.5rem; }

/* Generic responsive grids */
.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 44rem) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 66rem) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Split: text beside a screenshot */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 58rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr); }
  .split-figure { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .split-reverse > :first-child { order: 2; }
}

/* The four rules */
.rule-list {
  counter-reset: rule;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.rule-list li {
  position: relative;
  padding: 0.9rem 1.1rem 0.9rem 3.4rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.rule-list li::before {
  counter-increment: rule;
  content: counter(rule);
  position: absolute;
  left: 0.9rem;
  top: 0.85rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 800;
}

/* Rules diagram */
.rules-figure {
  margin: 0;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: center;
}

/* The two panels share a column ratio equal to their viewBox widths, so a
   square of the board is drawn at the same size in both. */
@media (min-width: 34rem) {
  .rules-figure { grid-template-columns: minmax(0, 296fr) minmax(0, 184fr); }
}

.diagram {
  display: block;
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
  height: auto;
}

.diagram-sm { max-width: 12.4rem; }

.mt { margin-top: 1.5rem; }

.rules-figure figcaption,
.diagram-caption {
  margin: 0.75rem auto 0;
  max-width: 26ch;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Feature list with small ticks */
.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.8rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 0.62rem;
  height: 0.62rem;
  background: var(--accent);
  border-radius: 50%;
}

/* Hint quotes */
.quote-stack {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.quote-stack li {
  padding: 0.85rem 1.1rem;
  background: var(--surface-sunk);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-style: italic;
}

/* Free / Premium */
.plan {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.plan h3 { margin: 0; }

.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan-featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.plan-note {
  margin: 1.5rem 0 0;
  max-width: 60ch;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Closing call to action */
.cta {
  text-align: center;
}

.cta .section-head {
  margin-inline: auto;
  text-align: center;
}

.cta .lede { margin-inline: auto; }

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}


/* Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover { transform: none; }
}
