:root {
  --bg: #f4f1e8;
  --bg-soft: #ebe5d6;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #f8f5ee;
  --surface-dark: #18322a;
  --text: #1f2a24;
  --text-soft: #4e5f56;
  --heading: #18322a;
  --line: rgba(24, 50, 42, 0.12);
  --primary: #295c4c;
  --primary-2: #3f7a66;
  --accent: #c9873d;
  --accent-soft: #efd5b4;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(32, 52, 44, 0.10);
  --shadow-soft: 0 10px 30px rgba(32, 52, 44, 0.08);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --max-width: 1200px;
  --nav-height: 78px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(201, 135, 61, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(63, 122, 102, 0.10), transparent 30%),
    linear-gradient(180deg, #f6f3eb 0%, #f1ede3 100%);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem;
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.2rem;
  color: var(--text-soft);
  font-size: 1.02rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: 0.25s ease;
}

a:hover,
a:focus {
  color: var(--accent);
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 241, 232, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  width: min(calc(100% - 2rem), var(--max-width));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo span {
  color: var(--accent);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
}
nav ul li a[aria-current="page"] {
  color: var(--primary);
}
nav ul li a:hover,
nav ul li a:focus {
  color: var(--primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: -0.35rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #7a877f;
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: rgba(41, 92, 76, 0.22);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(41, 92, 76, 0.45);
  box-shadow: 0 0 0 4px rgba(63, 122, 102, 0.10);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.contact-form textarea {
  resize: vertical;
  min-height: 180px;
}

.contact-form button {
  align-self: flex-start;
  margin-top: 0.5rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.95rem 1.4rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-form button:hover,
.contact-form button:focus {
  background: var(--primary-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}


.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
}

.nav-cta:hover,
.nav-cta:focus {
  color: var(--white);
  background: var(--primary-2);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0;
}

.nav-toggle span {
  height: 2px;
  width: 100%;
  background: var(--heading);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Buttons */
.button,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.25s ease;
  border: 1px solid transparent;
}

.button {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.button:hover,
.button:focus {
  background: var(--primary-2);
  color: var(--white);
  transform: translateY(-2px);
}

.button-secondary {
  background: var(--accent-soft);
  color: var(--heading);
  border-color: rgba(201, 135, 61, 0.15);
}

.button-secondary:hover,
.button-secondary:focus {
  background: #e7c79c;
  color: var(--heading);
  transform: translateY(-2px);
}

.button-ghost {
  background: transparent;
  color: var(--heading);
  border-color: var(--line);
}

.button-ghost:hover,
.button-ghost:focus {
  border-color: rgba(41, 92, 76, 0.3);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Sections */
section {
  padding: 5.5rem 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.section-heading.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(63, 122, 102, 0.10);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lead {
  font-size: 1.12rem;
  color: var(--text-soft);
}

/* Hero */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1.1fr 0.9fr;
}

.hero-copy {
  max-width: 720px;
}

.hero-copy p {
  font-size: 1.1rem;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.meta-pill {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.56));
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-panel-top {
  display: flex;
  gap: 0.45rem;
  padding: 1rem 1.25rem 0;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d4d1c9;
}

.hero-dot:nth-child(1) { background: #e2b37b; }
.hero-dot:nth-child(2) { background: #d8c76f; }
.hero-dot:nth-child(3) { background: #7da68f; }

.hero-panel-content {
  padding: 1.25rem;
}

.hero-card-stack {
  display: grid;
  gap: 1rem;
}

.mini-card {
  background: rgba(248, 245, 238, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.mini-card strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--heading);
}

.mini-card p {
  margin: 0;
  font-size: 0.95rem;
}

.mini-label {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--accent);
}

/* Stats bar */
.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2rem;
}

.stat-card {
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  color: var(--heading);
  margin-bottom: 0.35rem;
}

.stat-card span {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* Service cards */
.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(41, 92, 76, 0.18);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: rgba(63, 122, 102, 0.10);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
}

.card h3 {
  margin-bottom: 0.65rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Work */
.work-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.work-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.work-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.work-card-body {
  padding: 1.4rem;
}

.work-meta {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Split section */
.split-section {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.feature-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.64));
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}


.feature-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.feature-item {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(248, 245, 238, 0.82);
  border: 1px solid var(--line);
}

.feature-item strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--heading);
}

/* CTA */
.cta-panel {
  background: linear-gradient(135deg, #214c3f 0%, #18322a 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow);
}

.cta-panel h2,
.cta-panel p {
  color: var(--white);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* Footer */
footer {
  padding: 2.5rem 1rem 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-soft);
}

.footer-inner {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.social-links {
  margin: 0 0 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-links a {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.social-links a:hover,
.social-links a:focus {
  color: var(--primary);
  transform: translateY(-2px);
}

/* Utilities */
.text-link {
  font-weight: 600;
  color: var(--primary);
}

.text-link:hover,
.text-link:focus {
  color: var(--accent);
}

/* Mobile */
@media (max-width: 980px) {
  .hero-grid,
  .split-section,
  .cards-grid,
  .work-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 4rem 0 3rem;
  }
}

@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: calc(var(--nav-height) - 2px);
    right: 1rem;
    width: min(260px, calc(100vw - 2rem));
    flex-direction: column;
    align-items: flex-start;
    background: rgba(248, 245, 238, 0.96);
    border: 1px solid var(--line);
    padding: 1rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }

  nav ul.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  section {
    padding: 4.5rem 0;
  }

  .cta-panel {
    padding: 2rem;
  }
  /* Case study page */
.case-study-hero {
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.case-study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.case-study-meta .meta-pill {
  background: rgba(255, 255, 255, 0.72);
}

.case-study-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.case-study-content {
  display: grid;
  gap: 1.5rem;
}

.case-study-section {
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}

.case-study-section h2,
.case-study-section h3 {
  margin-bottom: 0.8rem;
}

.case-study-sidebar {
  position: sticky;
  top: 100px;
}

.case-study-summary {
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.64));
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.case-study-summary h3 {
  margin-bottom: 1rem;
}

.summary-list {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.summary-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--heading);
}

.case-study-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.case-study-image {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.65);
}

.case-study-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.note-box {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(201, 135, 61, 0.10);
  border: 1px solid rgba(201, 135, 61, 0.18);
}

@media (max-width: 980px) {
  .case-study-grid {
    grid-template-columns: 1fr;
  }

  .case-study-sidebar {
    position: static;
  }

  /* Lab / Journal */
.lab-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.lab-card {
  display: block;
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lab-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(41, 92, 76, 0.18);
}

.lab-date {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lab-card h3 {
  margin-bottom: 0.7rem;
}

.lab-card p:last-child {
  margin-bottom: 0;
}

.post-layout {
  display: grid;
  grid-template-columns: 0.95fr 2.05fr;
  gap: 2rem;
  align-items: start;
}

.post-sidebar {
  position: sticky;
  top: 100px;
}

.post-sidebar-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.64));
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.post-sidebar-card h3 {
  margin-bottom: 1rem;
}

.post-meta-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.post-meta-item strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--heading);
}

.post-content {
  display: grid;
  gap: 1.5rem;
}

.post-content-section {
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}

.post-content-section h2,
.post-content-section h3 {
  margin-bottom: 0.8rem;
}

@media (max-width: 980px) {
  .lab-grid,
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
  }
}
