/* =====================================================
   Flat Grove Digital — Design System
   Rugged, honest, field-tested. Subtle outdoors influence.
===================================================== */

:root {
  --forest: #2f3b2a;
  --forest-deep: #232c1f;
  --canvas: #f3eee1;
  --canvas-alt: #e9e0c9;
  --walnut: #4a3524;
  --charcoal: #24261f;
  --rust: #b5502f;
  --rust-dark: #953f24;
  --moss: #6b7b5e;
  --brass: #a3852f;
  --white: #ffffff;
  --line: #d8cdae;
  --shadow-soft: 0 10px 26px rgba(36, 38, 31, 0.1);
  --shadow-pop: 0 16px 36px rgba(36, 38, 31, 0.16);
  --radius: 10px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--charcoal);
  background: var(--canvas);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--forest-deep);
}

.display {
  font-family: 'Bebas Neue', 'Oswald', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
h1.display { font-size: clamp(3rem, 6.5vw, 5.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }

p { margin: 0 0 1em; color: var(--walnut); }
a { color: var(--rust-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; position: relative; }
@media (max-width: 700px) { section { padding: 54px 0; } }

.alt-bg { background: var(--canvas-alt); }
.forest-bg { background: var(--forest); }
.forest-bg h1, .forest-bg h2, .forest-bg h3 { color: #fff; }
.forest-bg p { color: #d7ddce; }
.center { text-align: center; }

/* ---------- Rule-line divider (matches the logo motif) ---------- */
.rule-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--rust-dark);
  margin-bottom: 14px;
}
.rule-label::before, .rule-label::after {
  content: "";
  width: 46px;
  height: 2px;
  background: var(--rust);
}
.forest-bg .rule-label { color: var(--brass); }
.forest-bg .rule-label::before, .forest-bg .rule-label::after { background: var(--brass); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head p { color: var(--walnut); font-size: 1.05rem; }

/* ---------- Topographic texture (subtle) ---------- */
.topo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%232F3B2A' stroke-width='1.2'%3E%3Cpath d='M-20,80 Q100,20 220,90 T440,70'/%3E%3Cpath d='M-20,140 Q100,80 220,150 T440,130'/%3E%3Cpath d='M-20,200 Q100,140 220,210 T440,190'/%3E%3Cpath d='M-20,260 Q100,200 220,270 T440,250'/%3E%3Cpath d='M-20,320 Q100,260 220,330 T440,310'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 500px 500px;
}
.forest-bg .topo-bg { opacity: 0.08; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23F3EEE1' stroke-width='1.2'%3E%3Cpath d='M-20,80 Q100,20 220,90 T440,70'/%3E%3Cpath d='M-20,140 Q100,80 220,150 T440,130'/%3E%3Cpath d='M-20,200 Q100,140 220,210 T440,190'/%3E%3Cpath d='M-20,260 Q100,200 220,270 T440,250'/%3E%3Cpath d='M-20,320 Q100,260 220,330 T440,310'/%3E%3C/g%3E%3C/svg%3E"); }
.topo-host { position: relative; overflow: hidden; }
.topo-host > .container { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.96rem;
  padding: 15px 30px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--rust); color: #fff; border-color: var(--rust); box-shadow: var(--shadow-pop); }
.btn-primary:hover { background: var(--rust-dark); border-color: var(--rust-dark); }

.btn-outline { background: transparent; color: var(--forest-deep); border-color: var(--forest-deep); }
.btn-outline:hover { background: var(--forest-deep); color: #fff; }

.forest-bg .btn-outline { color: #fff; border-color: #fff; }
.forest-bg .btn-outline:hover { background: #fff; color: var(--forest-deep); }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 10px 20px; font-size: 0.82rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(47, 59, 42, 0.96);
  backdrop-filter: blur(6px);
}
.nav-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand img { height: 204px; width: auto; display: block; }
@media (max-width: 920px) {
  .brand img { height: 110px; }
}
@media (max-width: 480px) {
  .brand img { height: 84px; }
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: #e8e4d5;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.86rem;
  padding: 6px 2px;
  position: relative;
}
.nav-links a:hover { text-decoration: none; color: #fff; }
.nav-links a.active { color: var(--brass); }
.nav-links a.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--brass);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; }

@media (max-width: 920px) {
  .nav-links {
    position: fixed; top: 122px; left: 0; right: 0;
    background: var(--forest);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 10px 24px 20px;
    transform: translateY(-130%); opacity: 0; pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav-toggle { display: flex; }
  .nav-cta .btn-primary.desktop-only { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 78px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } .hero-ctas, .hero-badges { justify-content: center; } }

.hero p.lead { font-size: 1.14rem; color: #d7ddce; max-width: 520px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin: 26px 0; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.03em;
  color: #e8e4d5;
}
.hero-panel {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 30px;
}
.hero-panel .row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.hero-panel .row:last-child { border-bottom: none; }
.hero-panel .row span:first-child { color: #b9c0ab; font-family: 'Oswald', sans-serif; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.03em; }
.hero-panel .row span:last-child { color: #fff; font-weight: 600; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.feature-card .icon {
  width: 42px; height: 42px;
  margin-bottom: 14px;
  color: var(--rust);
}
.feature-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; margin: 0; }

/* ---------- Two-column split ---------- */
.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Service cards ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
@media (max-width: 780px) { .service-grid { grid-template-columns: 1fr; } }
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px;
  border-top: 4px solid var(--rust);
  box-shadow: var(--shadow-soft);
}
.service-card.alt { border-top-color: var(--moss); }
.service-card ul { margin: 18px 0 22px; }
.service-card li { padding: 6px 0 6px 26px; position: relative; font-size: 0.95rem; color: var(--walnut); }
.service-card li::before { content: "—"; position: absolute; left: 0; color: var(--rust); font-weight: 700; }
.service-card.alt li::before { color: var(--moss); }

/* ---------- Tech spec list ---------- */
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 780px) { .spec-list { grid-template-columns: 1fr; } }
.spec-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.spec-item h3 { font-size: 1rem; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.spec-item h3 .num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: var(--rust);
  min-width: 30px;
}
.spec-item p { font-size: 0.92rem; margin: 0; }
.spec-item ul { margin-top: 10px; }
.spec-item li { font-size: 0.88rem; padding: 4px 0 4px 18px; position: relative; color: var(--walnut); }
.spec-item li::before { content: "•"; position: absolute; left: 0; color: var(--moss); }

/* ---------- Pricing cards ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 940px) { .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

.price-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
  border: 2px solid var(--line);
  display: flex;
  flex-direction: column;
}
.price-card.featured { border-color: var(--rust); position: relative; }
.price-card .ribbon {
  position: absolute; top: -14px; right: 22px;
  background: var(--rust); color: #fff;
  font-family: 'Oswald', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px;
}
.price-card .price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem;
  color: var(--forest-deep);
  margin: 6px 0 2px;
}
.price-card .price span { font-size: 1rem; font-family: 'Inter', sans-serif; color: var(--walnut); }
.price-card .tagline { font-size: 0.88rem; color: var(--moss); font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.03em; }
.price-card ul { margin: 14px 0 24px; flex-grow: 1; }
.price-card li { padding: 6px 0 6px 24px; position: relative; font-size: 0.92rem; color: var(--walnut); }
.price-card li::before { content: "—"; position: absolute; left: 0; color: var(--rust); }

.care-toggle {
  display: flex; justify-content: center; gap: 4px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; max-width: 320px; margin: 0 auto 40px;
}
.care-toggle button {
  flex: 1; border: none; background: transparent; padding: 10px 18px;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.03em; border-radius: 999px;
  cursor: pointer; color: var(--walnut);
}
.care-toggle button.active { background: var(--forest); color: #fff; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.step .num { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: var(--rust); display: block; margin-bottom: 8px; }
.step h3 { font-size: 0.98rem; margin-bottom: 6px; }
.step p { font-size: 0.88rem; margin: 0; }

/* ---------- Case study ---------- */
.case-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 780px) { .case-card { grid-template-columns: 1fr; } }
.case-card img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.case-card .content { padding: 36px; }
.case-tag {
  display: inline-block; background: var(--canvas-alt); color: var(--forest-deep);
  font-family: 'Oswald', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
  margin-bottom: 12px;
}
.stat-row { display: flex; gap: 28px; margin: 20px 0; flex-wrap: wrap; }
.stat-row .stat b { display: block; font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; color: var(--rust); }
.stat-row .stat span { font-size: 0.8rem; color: var(--walnut); text-transform: uppercase; letter-spacing: 0.03em; }

/* ---------- Timeline (about) ---------- */
.timeline { border-left: 2px solid var(--line); padding-left: 28px; }
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -34px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--rust); border: 3px solid var(--canvas);
}
.timeline-item h3 { font-size: 1rem; margin-bottom: 4px; }
.timeline-item p { font-size: 0.92rem; margin: 0; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 42px;
  box-shadow: var(--shadow-soft);
  max-width: 760px;
  margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 20px; }
.field label {
  display: block; font-family: 'Oswald', sans-serif; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.03em;
  margin-bottom: 7px; font-size: 0.82rem; color: var(--forest-deep);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 2px solid var(--line);
  border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 1rem;
  background: var(--canvas); color: var(--charcoal);
  transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--rust); }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--moss); margin-top: 6px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--forest);
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #d7ddce; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: #cfd4c4; padding: 60px 0 24px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 36px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-family: 'Oswald', sans-serif; color: #fff; font-size: 0.88rem;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px;
}
.footer-grid a { color: #b9c0ab; }
.footer-grid a:hover { color: var(--brass); }
.footer-grid li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-brand img { height: 192px; margin-bottom: 14px; }
.footer-tag { font-size: 0.88rem; color: #9aa38a; max-width: 280px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem; color: #8b9479;
}
.footer-bottom a { color: #8b9479; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Selected work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .work-grid { grid-template-columns: 1fr; } }
.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); }
.project-card .icon { width: 40px; height: 40px; color: var(--rust); margin-bottom: 14px; }
.project-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.project-card p { font-size: 0.92rem; flex-grow: 1; }
.project-card .visit-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--rust-dark);
  margin-top: 10px;
}
.project-card .visit-link:hover { text-decoration: none; color: var(--rust); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
