:root {
    --bg: #f7f8f5;
    --surface: #ffffff;
    --surface-alt: #eef1ec;
    --border: #e2e6df;
    --text: #23291f;
    --text-muted: #646d5e;
    --text-dim: #9aa192;
    --accent: #3e7c74;
    --accent-soft: #e2eeec;
    --accent-warm: #cb8a3e;
    --accent-warm-soft: #f6e9d7;

    --font-display: 'Fraunces', serif;
    --font-body: 'Work Sans', sans-serif;
  }

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

  @keyframes floatBlob {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-24px, 26px) scale(1.08); }
    100% { transform: translate(18px, -18px) scale(0.96); }
  }
  @keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(203, 138, 62, 0.45); }
    50%      { box-shadow: 0 0 0 6px rgba(203, 138, 62, 0); }
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes drawLine {
    from { height: 0; }
    to   { height: 20px; }
  }

  .card,
  .gloss-item,
  .stack-layer,
  .contact-card,
  .section-head,
  .why-text {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
  }
  .card.in-view,
  .gloss-item.in-view,
  .stack-layer.in-view,
  .contact-card.in-view,
  .section-head.in-view,
  .why-text.in-view {
    opacity: 1;
    transform: translateY(0);
  }
  .grid .card:nth-child(1) { transition-delay: 0.02s; }
  .grid .card:nth-child(2) { transition-delay: 0.08s; }
  .grid .card:nth-child(3) { transition-delay: 0.14s; }
  .grid .card:nth-child(4) { transition-delay: 0.20s; }
  .grid .card:nth-child(5) { transition-delay: 0.26s; }
  .grid .card:nth-child(6) { transition-delay: 0.32s; }
  .stack .stack-layer:nth-child(1) { transition-delay: 0.02s; }
  .stack .stack-layer:nth-child(3) { transition-delay: 0.10s; }
  .stack .stack-layer:nth-child(5) { transition-delay: 0.18s; }
  .stack .stack-layer:nth-child(7) { transition-delay: 0.26s; }
  .stack .stack-layer:nth-child(9) { transition-delay: 0.34s; }
  .contact-grid .contact-card:nth-child(2) { transition-delay: 0.08s; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }

  .wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 32px;
  }

  a { color: var(--accent); text-decoration: none; }
  a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

  /* ---------- NAV ---------- */
  nav {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(247, 248, 245, 0.82);
    border-bottom: 1px solid var(--border);
  }
  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
  }
  .nav-mark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .nav-mark svg { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .nav-mark:hover svg { transform: rotate(-8deg) scale(1.08); }
  .nav-mark .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-warm);
  }
  .nav-links {
    display: flex;
    gap: 30px;
    font-size: 14.5px;
    font-weight: 500;
  }
  .nav-links a { color: var(--text-muted); transition: color 0.2s; }
  .nav-links a:hover { color: var(--text); }

  /* ---------- HERO ---------- */
  header.hero {
    padding: 100px 0 88px;
    position: relative;
    overflow: hidden;
  }
  .hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
    animation: floatBlob 16s ease-in-out infinite alternate;
  }
  .hero-blob.b1 {
    width: 380px; height: 380px;
    background: var(--accent-soft);
    top: -140px; right: -80px;
    opacity: 0.9;
  }
  .hero-blob.b2 {
    width: 260px; height: 260px;
    background: var(--accent-warm-soft);
    bottom: -120px; right: 220px;
    opacity: 0.8;
    animation-delay: -6s;
    animation-duration: 20s;
  }
  header.hero .wrap { position: relative; z-index: 1; }

  header.hero .eyebrow { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both; }
  header.hero h1 { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
  header.hero .lede { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both; }
  header.hero .hero-meta { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.42s both; }
  .eyebrow {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
  }
  .eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-warm);
  }
  h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-optical-sizing: auto;
    font-size: clamp(2.5rem, 5.5vw, 4.1rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    margin-bottom: 26px;
    max-width: 13ch;
    color: var(--text);
  }
  h1 em {
    font-style: italic;
    color: var(--accent);
    font-weight: 500;
  }
  .hero p.lede {
    font-size: 1.18rem;
    color: var(--text-muted);
    max-width: 48ch;
    font-weight: 400;
  }
  .hero-meta {
    margin-top: 52px;
    display: flex;
    gap: 44px;
    flex-wrap: wrap;
  }
  .hero-meta div { font-size: 14px; color: var(--text-dim); }
  .hero-meta strong {
    display: block;
    color: var(--text);
    font-size: 1.7rem;
    font-family: var(--font-display);
    font-weight: 600;
    margin-bottom: 2px;
  }

  /* ---------- SECTION HEADINGS ---------- */
  section { padding: 84px 0; border-top: 1px solid var(--border); }

  .section-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 40px;
  }
  .section-num {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 15px;
    color: var(--accent-warm);
  }
  h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 600;
  }
  .section-intro {
    color: var(--text-muted);
    max-width: 58ch;
    margin-bottom: 44px;
    font-size: 1.02rem;
  }

  /* ---------- WHY ---------- */
  .why-text {
    max-width: 62ch;
    color: var(--text-muted);
    font-size: 1.08rem;
  }
  .why-text p + p { margin-top: 18px; }
  .why-text strong { color: var(--text); font-weight: 600; }

  /* ---------- STACK DIAGRAM ---------- */
  .stack {
    display: flex;
    flex-direction: column;
    max-width: 620px;
    margin: 8px auto 0;
  }
  .stack-layer {
    position: relative;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s, box-shadow 0.25s;
    box-shadow: 0 1px 2px rgba(35, 41, 31, 0.03);
  }
  .stack-layer + .stack-layer { border-top: none; margin-top: 0; }
  .stack-layer:first-child { border-radius: 12px 12px 0 0; }
  .stack-layer:last-child { border-radius: 0 0 12px 12px; }
  .stack-layer:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(62, 124, 116, 0.1);
  }
  .layer-label {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .layer-index {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 13px;
    color: var(--text-dim);
    width: 20px;
  }
  .layer-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.08rem;
  }
  .layer-detail {
    font-size: 13.5px;
    color: var(--text-dim);
    text-align: right;
  }
  .stack-connector {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 auto;
  }

  .status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 30px;
    margin-top: 44px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
  }
  .status-strip span { display: flex; align-items: center; gap: 9px; }
  .status-strip .led {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent-warm);
    animation: pulseGlow 2.4s ease-in-out infinite;
  }
  .status-strip span:nth-child(2) .led { animation-delay: 0.4s; }
  .status-strip span:nth-child(3) .led { animation-delay: 0.8s; }

  /* ---------- GRID / CATEGORIES ---------- */
  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 30px;
    box-shadow: 0 1px 2px rgba(35, 41, 31, 0.03);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
  }
  .card.in-view:hover { transform: translateY(-3px); }
  .card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(35, 41, 31, 0.06); }
  .card-icon { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .card:hover .card-icon { transform: scale(1.12) rotate(-4deg); }
  .card-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 14px;
  }
  .card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
  }
  .card-icon svg { width: 18px; height: 18px; }
  .card h3 {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
  }
  .card p.desc {
    color: var(--text-muted);
    font-size: 0.96rem;
    margin-bottom: 16px;
  }
  .tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tag {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 5px 11px;
    border-radius: 20px;
  }

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

  /* ---------- SERVICE GLOSSARY ---------- */
  .glossary {
    display: flex;
    flex-direction: column;
  }
  .gloss-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 26px 0;
    border-top: 1px solid var(--border);
  }
  .gloss-item:last-child { padding-bottom: 0; }
  .gloss-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--text);
  }
  .gloss-name .cat {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    color: var(--accent-warm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 6px;
  }
  .gloss-desc {
    color: var(--text-muted);
    font-size: 0.98rem;
    max-width: 56ch;
  }

  @media (max-width: 640px) {
    .gloss-item { grid-template-columns: 1fr; gap: 8px; }
  }

  /* ---------- CONTACT ---------- */
  .contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow: 0 1px 2px rgba(35, 41, 31, 0.03);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .contact-card.in-view:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(35, 41, 31, 0.07);
    transform: translateY(-1px);
  }
  .contact-card .card-icon { background: var(--accent-warm-soft); color: var(--accent-warm); }
  .contact-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
  }
  .contact-value {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
  }

  @media (max-width: 640px) {
    .contact-grid { grid-template-columns: 1fr; }
  }

  /* ---------- FOOTER ---------- */
  footer { padding: 60px 0 68px; border-top: 1px solid var(--border); }
  .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13.5px;
    color: var(--text-dim);
  }
  .footer-inner .mark { display: flex; align-items: center; gap: 8px; font-weight: 500; }
  .footer-inner .mark .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-warm);
  }

  @media (max-width: 600px) {
    .wrap { padding: 0 20px; }
    header.hero { padding: 76px 0 60px; }
    section { padding: 60px 0; }
    .nav-links { display: none; }
    .hero-meta { gap: 30px; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
  }

/* ---------- NAV DROPDOWNS ---------- */
.nav-links { align-items: center; }
.dropdown {
  position: relative;
}
.dropdown summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
  user-select: none;
}
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary:hover { color: var(--text); }
.dropdown .chev {
  width: 9px; height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s;
  margin-top: -3px;
}
.dropdown[open] .chev { transform: rotate(-135deg) translateY(1px); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(35, 41, 31, 0.09);
  padding: 8px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdownIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.dropdown-menu a:hover { background: var(--accent-soft); color: var(--accent); }
.dropdown-menu .menu-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 6px 12px 4px;
}
.dropdown-menu .menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}

@media (max-width: 720px) {
  .nav-links { gap: 18px; }
}

/* ---------- GUIDE PAGES ---------- */
.guide-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 28px;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--accent); gap: 10px; }
.back-link .arrow { font-size: 15px; }

.guide-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  max-width: 20ch;
  margin-bottom: 18px;
}
.guide-hero p.lede {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.service-block {
  padding: 44px 0;
  border-top: 1px solid var(--border);
}
.service-block:first-of-type { border-top: none; }
.service-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.service-head h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}
.service-tagline {
  color: var(--text-muted);
  font-size: 0.98rem;
}
.service-desc {
  color: var(--text-muted);
  max-width: 66ch;
  margin: 14px 0 28px;
  font-size: 1rem;
}

.service-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
}
@media (max-width: 720px) {
  .service-grid { grid-template-columns: 1fr; }
}

.spec-card, .steps-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px;
}
.spec-card h3, .steps-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}
.spec-list { display: flex; flex-direction: column; gap: 11px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
}
.spec-row:last-child { border-bottom: none; padding-bottom: 0; }
.spec-row .spec-key { color: var(--text-dim); font-weight: 500; }
.spec-row .spec-val { color: var(--text); text-align: right; font-weight: 500; }

.steps-list {
  list-style: none;
  counter-reset: step;
}
.steps-list li {
  counter-increment: step;
  position: relative;
  padding-left: 32px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.steps-list li + li { margin-top: 14px; }
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps-list code, .service-desc code {
  font-family: 'Work Sans', monospace;
  font-size: 0.86em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.guide-index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
@media (max-width: 820px) {
  .guide-index-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .guide-index-grid { grid-template-columns: 1fr; }
}
.guide-index-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.guide-index-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(35, 41, 31, 0.06);
  transform: translateY(-3px);
}
.guide-index-card h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.guide-index-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}
