@font-face { font-family: "Zilla Slab"; font-weight: 600; font-display: swap; src: url("/fonts/ZillaSlab_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; font-display: swap; src: url("/fonts/ZillaSlab_700Bold.ttf") format("truetype"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("/fonts/AtkinsonHyperlegible_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("/fonts/AtkinsonHyperlegible_700Bold.ttf") format("truetype"); }

:root {
  --primary: #1F4E8C;
  --primary-2: #2F66AD;
  --tint: #E6EEF8;
  --larch: #C27C1E;
  --snow: #F7F8FA;
  --paper: #FFFFFF;
  --ink: #18212E;
  --muted: #5A6474;
  --line: #DFE4EC;
  --display: "Zilla Slab", Rockwell, Georgia, serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--snow); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--larch); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0; max-width: 60ch; }
.fine { font-size: .92rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
main > section { max-width: var(--max); margin: 0 auto; padding: clamp(44px, 6vw, 80px) var(--gutter); }

/* Header */
.top { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 700 1.25rem/1 var(--display); color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.top nav { display: flex; gap: 22px; align-items: center; }
.top nav a { text-decoration: none; font-weight: 700; color: var(--ink); transition: color .15s; }
.top nav a:hover { color: var(--primary); }
.top nav .nav-cta { background: var(--primary); color: var(--paper); padding: 8px 16px; border-radius: 10px; transition: background .15s; }
.top nav .nav-cta:hover { background: var(--primary-2); color: var(--paper); }
@media (max-width: 560px) { .top nav a:not(.nav-cta) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 700; text-decoration: none; border: 2px solid var(--primary); transition: background .15s var(--ease), color .15s, transform .15s var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--paper); }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn-quiet { background: transparent; color: var(--primary); }
.btn-quiet:hover { background: var(--tint); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero */
main > .hero { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; padding-top: clamp(20px, 4vw, 48px); }
@media (min-width: 880px) { main > .hero { grid-template-columns: 1fr 1.15fr; } }
.hero-text { display: grid; gap: 20px; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); text-wrap: balance; }
.lead { font-size: clamp(1.15rem, 1.7vw, 1.35rem); color: var(--muted); }
.hero-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }

/* Live offers */
main > .offers { padding-top: 0; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.row-head a { font-weight: 700; text-decoration: none; }
.offer-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 45%), 1fr)); gap: clamp(10px, 2vw, 16px); }
.offer-list a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.offer-list a:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -12px rgba(24, 33, 46, .25); }
.offer-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); }
.offer-list .meta { padding: 12px 14px 14px; display: grid; gap: 2px; }
.offer-list strong { font-family: var(--display); font-size: 1.1rem; font-weight: 600; }
.offer-list span { color: var(--muted); font-size: .9rem; }
.offer-list b { color: var(--primary); }

/* Steps: a real sequence */
.steps ol { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; display: grid; gap: 24px; }
@media (min-width: 760px) { .steps ol { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.steps li { counter-increment: step; display: grid; gap: 6px; align-content: start; padding-top: 16px; border-top: 2px solid var(--line); }
.steps li::before { content: counter(step); font: 700 1rem/1 var(--body); color: var(--primary); }
.steps p { color: var(--muted); }

/* Farmers */
main > .farmers { display: grid; gap: 32px; align-items: center; }
@media (min-width: 880px) { main > .farmers { grid-template-columns: 1fr 1fr; gap: 56px; } }
.farmers > div { display: grid; gap: 18px; justify-items: start; }
.farmers img { border-radius: 20px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { padding-left: 28px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

/* App */
.app-grid { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 760px) { .app-grid { grid-template-columns: 1fr 1fr; } }
.app-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3vw, 28px); display: grid; gap: 14px; justify-items: start; align-content: start; }
.app summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.app details p { margin-top: 8px; color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--line); max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: .95rem; }
.foot span { font-weight: 700; color: var(--ink); }

/* Images fade in once loaded instead of popping in */
@media (prefers-reduced-motion: no-preference) {
  img { transition: opacity .4s var(--ease); }
  img.loading { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Missing pages */
.not-found-page { min-height: 100svh; display: flex; flex-direction: column; }
.not-found-page .top { width: 100%; }
.not-found { flex: 1; width: 100%; max-width: 600px; margin: 0 auto; padding: 48px 24px 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px; }
.not-found-code { color: var(--primary); font: 700 clamp(6rem, 16vw, 9rem)/1 var(--display); }
.not-found h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.not-found > p:not(.not-found-code) { color: var(--muted); max-width: 34ch; }
.not-found-actions { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 12px; }

/* Legal pages */
.prose { max-width: 760px; margin: 0 auto; padding: 16px var(--gutter) 80px; line-height: 1.7; overflow-wrap: anywhere; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 16px 0 20px; }
.prose h2 { font-size: 1.4rem; line-height: 1.3; margin: 32px 0 12px; }
.prose p, .prose ul { max-width: 65ch; margin: 0 0 16px; }
.prose ul { padding-left: 24px; }
.prose li + li { margin-top: 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 6px; vertical-align: top; }

/* Contact */
.contact-form:not([hidden]) { display: grid; gap: 12px; }
.contact-form input, .contact-form textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.contact-form textarea { resize: vertical; }
.contact-form button { justify-self: start; font: inherit; font-weight: 700; cursor: pointer; }
.contact-form button:disabled { opacity: .6; cursor: wait; }
