/* ===========================================================
   MeadowEdge Labs — site styles
   Warm light theme. Ivory base with soft amber + sage gradient
   washes; two accent tones drawn from the logo:
     meadow green  #566B41   (primary accent)
     amber / gold  #A8782E   (secondary accent)
   No large color fills — warmth comes from washes, tints & accents.
   =========================================================== */

/* ---------- Self-hosted fonts (latin, variable woff2) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
}

:root {
  --bg:        #fbf6ec;   /* warm ivory base                         */
  --panel:     #f0ead9;   /* warm sand panel                         */
  --card:      #fffdf8;   /* warm white card                         */
  --ink:       #23251b;   /* warm near-black                         */
  --ink-2:     #45473a;
  --muted:     #6d6a5b;
  --green:     #566B41;   /* primary accent                          */
  --green-deep:#3e4d2e;
  --green-tint:rgba(86, 107, 65, .10);
  --gold:      #a8782e;   /* secondary accent (rich amber)           */
  --gold-2:    #c2954a;   /* lighter decorative gold                 */
  --gold-tint: rgba(168, 120, 46, .12);
  --line:      #e6ddc8;   /* warm hairline                           */
  --line-2:    #d9cfb4;

  --maxw: 1140px;
  --radius: 7px;
  --shadow-sm: 0 1px 2px rgba(35, 37, 27, .05);
  --shadow-md: 0 18px 40px -18px rgba(70, 60, 25, .30);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  /* warm gradient atmosphere: amber top-right, sage lower-left */
  background-image:
    radial-gradient(1050px 600px at 92% -8%, rgba(190, 134, 48, .30), transparent 60%),
    radial-gradient(900px 600px at -10% 6%, rgba(86, 107, 65, .24), transparent 56%),
    radial-gradient(820px 520px at 18% 92%, rgba(110, 132, 72, .18), transparent 60%),
    radial-gradient(900px 680px at 78% 112%, rgba(190, 134, 48, .20), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--green); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(22px, 5vw, 56px);
}

/* ---------- Two-tone wordmark (matches the logo lockup) ---------- */
.brand-name { font-family: var(--sans); letter-spacing: -0.01em; white-space: nowrap; }
.bn-edge { color: var(--green); font-weight: 600; }
.bn-labs { color: var(--gold);  font-weight: 500; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 246, 236, .8);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark { display: block; transform: translateY(1px); }
.header-inner .brand-name { font-size: clamp(1.4rem, 2.4vw, 1.72rem); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(76px, 12vw, 150px) 0 clamp(56px, 8vw, 104px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(86, 107, 65, .08) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 76%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 76%);
}
.hero-inner { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 26px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.tagline {
  margin: 0;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(2.5rem, 6.6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--ink);
  max-width: 15ch;
}
.tagline em { font-style: italic; font-weight: 400; color: var(--green); }

.intro {
  margin: clamp(26px, 3.4vw, 38px) 0 0;
  font-size: clamp(1.06rem, 1.4vw, 1.22rem);
  line-height: 1.78;
  color: var(--muted);
  max-width: 58ch;
}

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 9vw, 112px) 0; }

.section-alt {
  position: relative;
  background:
    linear-gradient(180deg, rgba(233, 224, 199, .92), rgba(240, 234, 217, .72));
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
/* faint dot texture inside the panel for added interest */
.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(86, 107, 65, .07) 1px, transparent 1.5px);
  background-size: 26px 26px;
}
.section-alt > .container { position: relative; z-index: 1; }

.section-head { margin-bottom: clamp(34px, 5vw, 58px); }

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-index::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

.section-title {
  margin: 0;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--ink);
}

/* ---------- Project cards ----------
   auto-fill grid: drop in another <article class="card"> and it
   flows automatically — no layout changes needed. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(18px, 2.2vw, 26px);
}

.card {
  position: relative;
  background:
    linear-gradient(158deg, #fffefb 0%, #fbf5e9 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: clamp(28px, 3vw, 38px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(var(--green), var(--gold));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: #cbbf9f;
  box-shadow: var(--shadow-md);
}
.card:hover::before { transform: scaleY(1); }

.card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  margin-bottom: 14px;
}

.card-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.card-link {
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}
.card-arrow { display: inline-block; margin-left: 3px; transition: transform .25s var(--ease); }
.card-link:hover { color: var(--green-deep); }
.card-link:hover .card-arrow { transform: translate(2px, -2px); }

.card-desc { margin: 0; color: var(--muted); font-size: 1.02rem; }

/* ---------- What We Do ---------- */
.do-list { list-style: none; margin: 0; padding: 0; max-width: 820px; }

.do-list li {
  list-style: none;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  column-gap: clamp(20px, 4vw, 40px);
  align-items: baseline;
  padding: clamp(20px, 2.6vw, 30px) 0;
  border-top: 1px solid var(--line-2);
}
.do-list li:last-child { border-bottom: 1px solid var(--line-2); }

.do-num {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

.do-text {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: -0.012em;
  color: var(--ink);
  transition: color .25s var(--ease);
}
.do-list li:hover .do-text { color: var(--green); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line-2);
  padding: clamp(40px, 6vw, 60px) 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.footer-brand { display: inline-flex; align-items: center; gap: 11px; }
.footer-brand .brand-name { font-size: 1.18rem; }
.footer-mark { display: block; transform: translateY(1px); }

.footer-meta { text-align: right; }
.footer-contact, .footer-copy { margin: 0; font-size: .94rem; }
.footer-contact { color: var(--muted); }
.footer-contact a {
  color: var(--green);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--green-tint);
  transition: border-color .25s var(--ease);
}
.footer-contact a:hover { border-bottom-color: var(--green); }
.footer-copy { margin-top: 4px; color: var(--muted); opacity: .82; }

/* ---------- Page-load reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-up .9s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 130ms + 80ms);
}
@keyframes reveal-up { to { opacity: 1; transform: none; } }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; animation: none; }
  .card, .card::before, .card-arrow, .do-text { transition: none; }
  .card:hover { transform: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}
