/* AgriMesh Corporation — corporate site. Dependency-free. */

:root {
  --ink: #0c1210;
  --ink-2: #101915;
  --panel: #131c17;
  --line: #223028;
  --ivory: #f1ede1;
  --muted: #a9b3a6;
  --gold: #c9a24a;
  --gold-soft: #e3c878;
  --green: #8fc39a;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 0.35em 0 0.4em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 0.6em; }
h3 { font-size: 1.25rem; margin: 0.6em 0 0.4em; }
p { margin: 0 0 1em; }
a { color: var(--gold-soft); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { border-bottom-color: var(--gold-soft); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 1.2em;
}

/* Header — cinematic glass */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: linear-gradient(180deg, rgba(5, 8, 7, 0.45) 0%, rgba(5, 8, 7, 0) 100%);
  transition: background-color 0.45s ease;
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent 4%, rgba(201, 162, 74, 0.55) 50%, transparent 96%);
  opacity: 0; transition: opacity 0.45s ease; pointer-events: none;
}
.site-header.scrolled {
  background-color: rgba(6, 10, 8, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
}
.site-header.scrolled::after { opacity: 1; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px;
  transition: padding 0.45s ease;
}
.site-header.scrolled .header-inner { padding-top: 13px; padding-bottom: 13px; }

.wordmark { display: flex; align-items: center; gap: 13px; border: 0; color: var(--ivory); }
.wordmark:hover { border: 0; }
.wordmark-mark { width: 34px; height: 34px; color: var(--gold); flex: none; }
.wordmark-text {
  display: flex; flex-direction: column; line-height: 1;
  font-family: Didot, "Bodoni MT", "Cochin", "Playfair Display", Georgia, serif;
  font-size: 1.42rem; letter-spacing: 0.1em; color: var(--ivory);
}
.wordmark-sub {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.56rem; font-weight: 600; letter-spacing: 0.52em; text-transform: uppercase;
  color: var(--gold); margin-top: 7px;
}

.site-nav { display: flex; align-items: center; gap: 34px; }
.nav-link {
  position: relative; border: 0; padding: 8px 2px;
  color: rgba(241, 237, 225, 0.72);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 3px; height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover, .nav-link:focus-visible { color: var(--ivory); border: 0; }
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }
.nav-cta {
  border: 1px solid rgba(201, 162, 74, 0.6); border-radius: 999px;
  color: var(--gold-soft) !important;
  padding: 11px 26px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  transition: background-color 0.32s ease, color 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}
.nav-cta:hover {
  background: var(--gold); border-color: var(--gold); color: #0b100d !important;
  border-bottom-color: var(--gold);
  box-shadow: 0 6px 24px rgba(201, 162, 74, 0.35);
}

.site-header a:focus-visible, .nav-toggle:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  width: 46px; height: 46px; padding: 0;
  background: rgba(6, 10, 8, 0.35); border: 1px solid rgba(241, 237, 225, 0.22);
  border-radius: 12px; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.5px; background: var(--ivory);
  transition: transform 0.35s ease, opacity 0.3s ease;
}
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Hero — cinematic */
.hero {
  position: relative; overflow: hidden;
  min-height: 94vh; min-height: 94svh;
  display: flex; align-items: center;
  padding: 140px 0 120px;
}
.hero-media {
  position: absolute; inset: -3%;
  will-change: transform;
  transform: translate3d(0, 0, 0) scale(1.06);
  background: #0a0f0c url("assets/hero-poster.jpg") center/cover no-repeat;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.6s ease;
}
.hero-video.is-front { opacity: 1; }
.hero-grade {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 20%, rgba(0,0,0,0) 40%, rgba(4,7,5,0.42) 100%),
    linear-gradient(180deg, rgba(5,9,7,0.66) 0%, rgba(5,9,7,0.34) 34%,
      rgba(5,9,7,0.42) 62%, rgba(10,14,12,0.94) 100%);
}
.hero-mesh {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.6; mix-blend-mode: screen;
}
.hero-grain {
  position: absolute; inset: -70px; pointer-events: none; opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  animation: grain 1.1s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-24px, 12px); }
  50% { transform: translate(14px, -18px); }
  75% { transform: translate(-12px, -12px); }
  100% { transform: translate(0, 0); }
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero .eyebrow { margin-bottom: 0.9em; }
.hero h1 {
  font-size: clamp(3rem, 7.6vw, 5.4rem);
  letter-spacing: 0.015em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.6);
}
.hero .lede {
  font-size: clamp(1.15rem, 2.3vw, 1.5rem);
  max-width: 34em; color: var(--ivory);
  text-shadow: 0 1px 14px rgba(0,0,0,0.6);
}
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; z-index: 2;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 0; color: var(--muted);
}
.hero-scroll:hover { border: 0; color: var(--gold-soft); }
.hero-scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scrollcue 2.6s ease-in-out infinite;
}
@keyframes scrollcue { 0%, 100% { opacity: 0.9; transform: scaleY(1); } 50% { opacity: 0.35; transform: scaleY(0.72); } }
.hero-scroll-text {
  font-size: 0.66rem; letter-spacing: 0.32em; text-transform: uppercase;
}
.hero-actions { display: flex; gap: 14px; margin-top: 2.2em; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-grain, .hero-scroll-line, .pulse { animation: none; }
  .hero-media { transform: none; }
}
/* Status pill — greenhouse glass: warm grow-light from above, verdant breath below */
.status-line {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 1.6em 0 0; padding: 8px 16px;
  border: 1px solid rgba(201, 162, 74, 0.38); border-radius: 999px;
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ivory);
  background:
    radial-gradient(130% 170% at 50% -40%, rgba(227, 200, 120, 0.22), rgba(227, 200, 120, 0) 58%),
    radial-gradient(120% 150% at 50% 130%, rgba(74, 170, 112, 0.16), rgba(74, 170, 112, 0) 60%),
    linear-gradient(180deg, rgba(40, 62, 46, 0.58), rgba(12, 19, 15, 0.66));
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(241, 237, 225, 0.14),
    inset 0 0 26px rgba(143, 195, 154, 0.10),
    0 8px 28px rgba(0, 0, 0, 0.35);
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; border: 1px solid transparent; cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); border-bottom-color: transparent; }
.btn-ghost { border-color: var(--line); color: var(--ivory); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn[disabled] { opacity: 0.55; cursor: wait; }

/* Sections */
/* Sections — greenhouse depth: near-black green with a slow, barely-there
   aurora drift of deep emerald and warm gold, like light moving through glasshouse mist */
.section { padding: 96px 0; scroll-margin-top: 92px; }
.section-alt {
  position: relative; overflow: hidden;
  background:
    radial-gradient(70% 60% at 10% 0%, rgba(64, 140, 92, 0.16), rgba(64, 140, 92, 0) 70%),
    radial-gradient(60% 55% at 92% 100%, rgba(201, 162, 74, 0.12), rgba(201, 162, 74, 0) 70%),
    linear-gradient(180deg, #0d1411 0%, #0a100c 100%);
  border-top: 1px solid rgba(201, 162, 74, 0.14);
  border-bottom: 1px solid rgba(201, 162, 74, 0.14);
}
.section-alt::before {
  content: ""; position: absolute; inset: -25%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(34% 30% at 22% 30%, rgba(88, 178, 120, 0.13), rgba(88, 178, 120, 0) 70%),
    radial-gradient(30% 28% at 76% 68%, rgba(227, 200, 120, 0.10), rgba(227, 200, 120, 0) 70%),
    radial-gradient(26% 24% at 55% 85%, rgba(64, 150, 105, 0.10), rgba(64, 150, 105, 0) 70%);
  animation: aurora 46s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate3d(-4%, -2%, 0) scale(1); }
  50% { transform: translate3d(3%, 4%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 3%, 0) scale(1.02); }
}
.section-alt > * { position: relative; z-index: 1; }
.section-lede { color: var(--muted); max-width: 44em; font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 2.6em 0 2em; }
/* Cards — greenhouse glazing: frosted glass over a humid luminous field,
   hairline gold-to-emerald edge, condensation light-catch, sheen sweep on hover */
.card {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle 3px at 82% 12%, rgba(238, 246, 238, 0.14), rgba(238, 246, 238, 0) 70%),
    radial-gradient(circle 2px at 12% 78%, rgba(238, 246, 238, 0.10), rgba(238, 246, 238, 0) 70%),
    radial-gradient(130% 90% at 18% -12%, rgba(227, 200, 120, 0.17), rgba(227, 200, 120, 0) 52%),
    radial-gradient(120% 110% at 108% 112%, rgba(74, 170, 112, 0.22), rgba(74, 170, 112, 0) 60%),
    linear-gradient(165deg, rgba(54, 88, 64, 0.32) 0%, rgba(20, 32, 26, 0.52) 48%, rgba(10, 16, 13, 0.78) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(201, 162, 74, 0.16);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow:
    inset 0 1px 0 rgba(241, 237, 225, 0.10),
    inset 0 0 46px rgba(143, 195, 154, 0.07),
    0 24px 60px rgba(0, 0, 0, 0.45);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg,
    rgba(227, 200, 120, 0.75) 0%,
    rgba(143, 195, 154, 0.22) 30%,
    rgba(143, 195, 154, 0.06) 55%,
    rgba(227, 200, 120, 0.42) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.card::after {
  content: ""; position: absolute; top: -60%; bottom: -60%; left: -30%; width: 46%;
  background: linear-gradient(105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(241, 244, 238, 0.07) 45%,
    rgba(227, 200, 120, 0.06) 55%,
    rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg) translateX(-160%);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.card:hover::after { transform: skewX(-18deg) translateX(480%); }
.card-tag {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: 1em;
}
.card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 0; }
.story-link { color: var(--muted); }

/* Fence panel */
/* Fence panel — the SBIR locked sentence in greenhouse glass with a gold frame */
.fence-panel {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 100% at 50% -20%, rgba(227, 200, 120, 0.13), rgba(227, 200, 120, 0) 55%),
    radial-gradient(110% 120% at 50% 125%, rgba(74, 170, 112, 0.14), rgba(74, 170, 112, 0) 60%),
    linear-gradient(170deg, rgba(52, 84, 62, 0.30), rgba(14, 22, 18, 0.72) 60%, rgba(9, 14, 11, 0.82));
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(201, 162, 74, 0.45); border-radius: var(--radius);
  padding: 38px 36px; margin-top: 2em;
  box-shadow:
    inset 0 1px 0 rgba(241, 237, 225, 0.10),
    inset 0 0 50px rgba(201, 162, 74, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.45);
}
.locked { font-family: Georgia, serif; font-size: 1.35rem; color: var(--ivory); margin-bottom: 0.8em; }
.fence-note { color: var(--muted); margin-bottom: 0; font-size: 0.97rem; }

/* Form */
.contact-form { margin-top: 2em; display: grid; gap: 18px; }
.field label { display: block; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field .opt { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.field input, .field textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ivory); padding: 13px 15px; font-size: 1rem; font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 130px; }
.field.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.6em; font-size: 0.95rem; }
.form-status.ok { color: var(--green); }
.form-status.err { color: #e08a8a; }
.cf-turnstile { margin: 4px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 54px; }
.fence { color: var(--muted); font-size: 0.88rem; max-width: 60em; }
.copy { color: var(--muted); font-size: 0.88rem; margin: 1.4em 0 0; }

/* Mobile */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(6, 10, 8, 0.97);
    -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(201, 162, 74, 0.28);
    padding: 10px 24px 24px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s;
  }
  .site-header.nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .site-nav .nav-link {
    font-size: 0.92rem; padding: 17px 2px;
    border-top: 1px solid rgba(241, 237, 225, 0.08);
  }
  .site-nav .nav-link::after { display: none; }
  .site-nav .nav-cta { margin-top: 16px; text-align: center; }
  .hero { padding: 84px 0 76px; }
  .section { padding: 64px 0; }
  .fence-panel { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .section-alt::before { animation: none; }
  .card::after { transition: none; }
}
