@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #000;
  --foreground: #f2f2f0;
  --accent: #fff;
  --glass: rgba(12, 18, 10, .55);
  --glass-border: rgba(255, 255, 255, .18);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --gutter: 24px;
  --base: calc(112px + env(safe-area-inset-bottom));
  --h-display: clamp(26px, 1.5vw + 19px, 64px);
  --t-body: clamp(14px, .3vw + 12.5px, 18px);
  --t-lead: clamp(12px, .2vw + 11px, 15px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; background: var(--background); color: var(--foreground); }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
.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;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100; padding: 8px 14px;
  border-radius: 999px; background: #fff; color: #000; font-size: 12px; transition: top .2s;
}
.skip:focus { top: 16px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 20px max(var(--gutter), env(safe-area-inset-left));
  font-size: 12px; font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 1px 12px rgba(0,0,0,.45);
}
.site-header img { height: 28px; width: auto; display: block; filter: drop-shadow(0 1px 6px rgba(0,0,0,.35)); }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav a:hover { opacity: .75; }
.hide-sm { display: none; }

/* Full-screen stage */
.stage {
  position: fixed; inset: 0; height: 100vh; height: 100svh; overflow: hidden; color: #fff;
  background: #1d2a17 url("../img/farm-poster.webp") center / cover no-repeat;
  touch-action: pinch-zoom;
}
.bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform-origin: 50% 55%;
  transition: transform 1.4s var(--ease);
}
.brand-mark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: clamp(30px, 5vw, 48px); font-weight: 600; letter-spacing: -.05em;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
  transition: opacity .6s var(--ease);
}
.brand-mark.off { opacity: 0; }
@media (max-width: 639px) { .brand-mark { top: 36%; } }

/* Gradient behind the left text block; JS sizes it to the active text */
.text-shade {
  position: absolute; left: 0; bottom: 0; width: min(680px, 100%); height: 78%;
  pointer-events: none;
  transition: height .9s var(--ease), width .9s var(--ease);
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent 100%);
  mask-image: linear-gradient(to right, #000 55%, transparent 100%);
}
.text-shade svg { width: 100%; height: 100%; display: block; }

.panel {
  position: absolute; left: max(var(--gutter), env(safe-area-inset-left)); right: max(var(--gutter), env(safe-area-inset-right));
  bottom: var(--base); pointer-events: none;
  text-shadow: 0 1px 14px rgba(0,0,0,.45), 0 0 2px rgba(0,0,0,.25);
}
.panel > div, .contact > div {
  opacity: 0; filter: blur(6px); transform: translate3d(0, 40px, 0);
  transition: opacity .6s ease, filter .6s ease, transform .6s ease;
  visibility: hidden;
}
.panel.on > div, .contact.on > div {
  opacity: 1; filter: none; transform: none; pointer-events: auto; visibility: visible;
}
.panel h1, .panel h2, .contact h2 {
  font-size: var(--h-display); font-weight: 500; line-height: 1.02; letter-spacing: -.05em;
  text-wrap: balance;
}
.rule { margin-top: 32px; height: 1px; width: 16px; background: #fff; }
.lead { margin-top: 24px; font-size: var(--t-lead); font-style: italic; opacity: .9; }
.eyebrow { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .2em; opacity: .8; }
.panel h2 { margin-top: 16px; }
.panel p.body { margin-top: 24px; font-size: var(--t-body); line-height: 1.45; opacity: .92; text-wrap: pretty; }
.caret {
  display: inline-block; width: 0; height: .85em; margin-right: -2px;
  border-left: 2px solid var(--accent); vertical-align: -.08em;
  animation: caret .9s step-end infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.services ul { list-style: none; margin-top: 24px; }
.services li { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.35); }
.services h3 { font-size: clamp(17px, .45vw + 14px, 22px); font-weight: 500; letter-spacing: -.025em; }
.services li p { font-size: clamp(14px, .2vw + 13px, 16px); opacity: .88; }

/* Contact */
.contact {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: calc(96px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  pointer-events: none; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.contact.on { pointer-events: auto; touch-action: pan-y; }
.contact > div {
  margin: auto; width: 100%; max-width: 64rem; display: grid; gap: 32px; padding-bottom: 32px;
}
.contact h2 { text-shadow: 0 1px 14px rgba(0,0,0,.45); }
.glass {
  border-radius: 16px; border: 1px solid var(--glass-border); background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card { padding: 32px; }
.card > p { margin-bottom: 24px; max-width: 24rem; font-size: var(--t-body); opacity: .9; }
form { display: flex; flex-direction: column; gap: 16px; max-width: 36rem; }
input, textarea {
  font: inherit; font-size: 16px; color: #fff; background: transparent; border-radius: 0;
  border: 0; border-bottom: 1px solid rgba(242,242,240,.3); padding: 12px 0; outline: none; resize: vertical;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.6); }
input:focus, textarea:focus { border-color: #fff; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 36px;
  padding: 0 20px; border-radius: 999px; background: #fff; color: #000;
  font-size: 12px; font-weight: 500; transition: background .15s, opacity .15s;
}
.btn:hover { background: rgba(255,255,255,.85); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn.ghost:hover { background: rgba(255,255,255,.1); }
form .btn { margin-top: 16px; width: fit-content; }
.form-note { font-size: 12px; opacity: .9; min-height: 1em; }

.contact .site-footer { opacity: 0; visibility: hidden; transition: opacity .6s ease; }
.contact.on .site-footer { opacity: 1; visibility: visible; }
body.cookie-open .scroll-hint { opacity: 0 !important; }
.site-footer {
  margin-top: auto; display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 8px 32px; padding: 24px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .2em;
  color: rgba(255,255,255,.75); text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a:hover { color: #fff; }

/* Scroll hint, counter, dots */
.scroll-hint {
  position: absolute; right: 48px; bottom: var(--base); display: none; align-items: center; gap: 16px;
  font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .2em;
  text-shadow: 0 1px 10px rgba(0,0,0,.45); transition: opacity .4s;
}
.mouse {
  display: flex; justify-content: center; height: 32px; width: 20px; padding-top: 6px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
}
.mouse span { height: 6px; width: 4px; border-radius: 999px; background: #fff; animation: hint 1.6s ease-in-out infinite; }
@keyframes hint { 0%,100% { opacity: 1; transform: none; } 60% { opacity: 0; transform: translateY(8px); } }

.progress {
  position: absolute; right: 24px; top: 80px; text-align: right;
  font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .2em;
  opacity: 0; transition: opacity .4s; text-shadow: 0 1px 10px rgba(0,0,0,.45);
}
.progress b {
  display: block; margin-top: 4px; font-size: 24px; font-weight: 500; letter-spacing: -.05em;
  text-transform: none; font-variant-numeric: tabular-nums;
}
.dots {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; gap: 4px;
}
.dots button { display: grid; place-items: center; width: 24px; height: 24px; }
.dots button::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,.45); box-shadow: 0 0 6px rgba(0,0,0,.5);
  transition: background .3s, transform .3s;
}
.dots button[aria-current="step"]::before { background: #fff; transform: scale(1.5); }

/* Floating CTA */
.dock {
  position: fixed; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; justify-content: center; gap: 8px; pointer-events: none;
  transition: opacity .4s, transform .4s;
}
.dock a { pointer-events: auto; }
.dock.off { opacity: 0; transform: translateY(16px); }
.dock.off a { pointer-events: none; }
.wa {
  display: flex; height: 36px; width: 36px; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.3);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .15s;
}
.wa:hover { background: rgba(0,0,0,.5); }

/* Cookie consent */
.cookie {
  position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
  bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  padding: 18px; color: #fff; font-size: 13px; line-height: 1.45;
  max-height: calc(100svh - 24px); overflow-y: auto;
  opacity: 0; transform: translateY(16px); transition: opacity .4s, transform .4s;
}
.cookie.show { opacity: 1; transform: none; }
.cookie.glass { background: rgba(10, 12, 9, .88); }
.cookie .eyebrow { margin-bottom: 8px; }
.cookie p { opacity: .9; }
.cookie p a { text-decoration: underline; text-underline-offset: 2px; }
.cookie .actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.btn { min-height: 36px; }
@media (pointer: coarse) { .btn, .wa { min-height: 44px; height: 44px; } .wa { width: 44px; } .dots button { width: 32px; height: 32px; } }

/* Simple pages (privacy, errors) */
.page {
  position: relative; min-height: 100svh; overflow: auto; overflow-x: hidden;
  background: #1d2a17 url("../img/farm-poster.webp") center / cover fixed no-repeat;
}
body.scroll { overflow: auto; }
.page .text-shade { position: fixed; width: min(900px, 100%); height: 100%; }
.page-inner {
  position: relative; z-index: 1; max-width: 44rem; padding: 120px 24px 80px;
  text-shadow: 0 1px 12px rgba(0,0,0,.4);
}
.page-inner h1 { font-size: 36px; font-weight: 500; letter-spacing: -.05em; line-height: 1.05; margin: 12px 0 20px; }
.page-inner h2 { font-size: 18px; font-weight: 500; letter-spacing: -.025em; margin: 32px 0 8px; }
.page-inner p, .page-inner li { font-size: 14px; line-height: 1.6; opacity: .92; }
.page-inner ul { padding-left: 18px; }
.page-inner .btn { margin-top: 28px; text-shadow: none; }
.code { font-size: clamp(64px, 14vw, 140px); font-weight: 600; letter-spacing: -.06em; line-height: 1; }

@media (min-width: 640px) {
  .hide-sm { display: block; }
  .services li { grid-template-columns: 1fr 1.6fr; gap: 32px; }
  .cookie { left: auto; right: 24px; bottom: 24px; max-width: 400px; }
}
@media (min-width: 768px) {
  :root { --gutter: 48px; }
  .panel { right: auto; max-width: clamp(24rem, 26vw + 8rem, 38rem); }
  .panel.wide { right: var(--gutter); max-width: clamp(48rem, 40vw + 20rem, 64rem); }
  .contact { padding-top: 80px; }
  .contact > div { grid-template-columns: 1fr 1fr; gap: 48px; }
  .scroll-hint { display: flex; }
  .progress { top: auto; right: 64px; bottom: var(--base); }
  .page-inner { padding: 140px 48px 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .panel > div, .contact > div, .bg-video, .text-shade, .dock, .cookie { transition: none; }
  .mouse span, .caret { animation: none; }
}

/* ---------- Device tuning ---------- */
/* Phones */
@media (max-width: 639px) {
  .dots { display: none; }
  .text-shade {
    -webkit-mask-image: linear-gradient(to right, #000 70%, rgba(0,0,0,.55) 100%);
    mask-image: linear-gradient(to right, #000 70%, rgba(0,0,0,.55) 100%);
  }
  .progress { display: none; }
  .panel.services { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .services ul { margin-top: 12px; }
  .services li { padding: 10px 0; }
  .services li p { font-size: 13px; line-height: 1.35; }
  .card { padding: 22px; }
  .contact > div { gap: 20px; }
}
/* Very small phones (iPhone SE, Galaxy mini) */
@media (max-width: 380px) {
  :root { --gutter: 18px; --base: calc(96px + env(safe-area-inset-bottom)); }
  .rule { margin-top: 20px; }
  .lead, .panel p.body { margin-top: 16px; }
  .services li { padding: 12px 0; }
}
/* Landscape phones and short windows */
@media (max-height: 560px) and (orientation: landscape) {
  :root { --base: calc(72px + env(safe-area-inset-bottom)); --h-display: clamp(22px, 2.4vw + 10px, 34px); }
  .site-header { padding-top: max(12px, env(safe-area-inset-top)); }
  .brand-mark { top: 34%; }
  .rule { margin-top: 14px; }
  .lead, .panel p.body { margin-top: 12px; }
  .panel p.body { font-size: 14px; }
  .services ul { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .services li { grid-template-columns: 1fr !important; padding: 8px 0; gap: 2px; }
  .services li p { font-size: 13px; }
  .scroll-hint { display: none; }
  .progress { display: none; }
  .dots { display: none; }
  .dock { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .contact { padding-top: calc(64px + env(safe-area-inset-top)); }
  .contact > div { grid-template-columns: 1fr 1.2fr; gap: 24px; }
  .card { padding: 18px; }
  .card > p { margin-bottom: 8px; }
  form { gap: 6px; }
  form .btn { margin-top: 8px; }
}
/* Large and ultra-wide screens */
@media (min-width: 1600px) {
  :root { --gutter: 72px; --base: calc(140px + env(safe-area-inset-bottom)); }
  .site-header { font-size: 13px; }
  .site-header img { height: 32px; }
  .contact > div { max-width: 76rem; }
}
@media (min-width: 2200px) {
  :root { --gutter: 112px; --base: 180px; }
}

/* Cookie banner: centered card with the cartoon cookie peeking over the top */
.cookie {
  text-align: center; padding: 60px 22px 22px; overflow: visible;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(22, 26, 18, .94), rgba(8, 10, 7, .94));
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.cookie-art {
  position: absolute; left: 50%; top: -52px; width: 96px; height: 96px;
  transform: translateX(-50%) rotate(-8deg);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.45));
  animation: cookie-bob 3.2s ease-in-out infinite;
}
@keyframes cookie-bob { 0%, 100% { transform: translateX(-50%) rotate(-8deg) translateY(0); } 50% { transform: translateX(-50%) rotate(4deg) translateY(-4px); } }
.cookie-title { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.cookie p { font-size: 13px; line-height: 1.5; opacity: .85; max-width: 34ch; margin: 0 auto; }
.cookie .actions { justify-content: center; margin-top: 18px; }
.cookie .actions .btn { flex: 1 1 auto; white-space: nowrap; padding: 0 18px; }
.cookie { max-height: none; }
@media (min-width: 640px) { .cookie { width: 384px; max-width: 384px; } }
@media (max-height: 560px) and (orientation: landscape) {
  .cookie { padding: 44px 18px 16px; }
  .cookie-art { width: 72px; height: 72px; top: -38px; }
}
@media (prefers-reduced-motion: reduce) { .cookie-art { animation: none; } }
