/* ElmCoffee — durable AI infrastructure, architectural bands */
:root {
  --bark: #44403C;
  --trunk: #78350F;
  --canopy: #65A30D;
  --mist: #F0FDF4;
  --steel: #475569;
  --fh: 'Zilla Slab', Georgia, serif;
  --fb: 'PT Sans', system-ui, sans-serif;
  --t: 0.65s;
  --gutter: clamp(1.1rem, 4vw, 2.25rem);
  --content-max: 1180px;
  --trunk-line: 4px solid var(--trunk);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--fb);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  background: var(--mist);
  color: var(--bark);
  -webkit-font-smoothing: antialiased;
  line-height: 1.68;
}

body.theme-elm h1,
body.theme-elm h2,
body.theme-elm h3 {
  font-family: var(--fh);
  font-weight: 600;
  line-height: 1.18;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.8vw, 3.15rem);
  margin: 0 0 0.65rem;
}

h2 {
  font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem);
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--trunk);
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--canopy);
}

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

main {
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--bark);
  color: var(--mist);
  padding: 0.6rem 1rem;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--canopy);
  outline-offset: 2px;
}

::selection {
  background: var(--canopy);
  color: #fff;
}

/* Header — bark band */
.site-header {
  background: var(--bark);
  color: var(--mist);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: var(--trunk-line);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1rem) var(--gutter);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.logo {
  font-family: var(--fh);
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.45rem);
  font-weight: 600;
  color: var(--mist);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  min-width: 0;
}

.nav-link {
  text-decoration: none;
  color: rgba(240, 253, 244, 0.82);
  font-weight: 500;
  white-space: nowrap;
  padding: 0.2rem 0;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--canopy);
}

.nav-link.is-active {
  border-bottom: 2px solid var(--canopy);
}

.btn-nav {
  margin-left: auto;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  background: var(--canopy);
  color: #fff;
  padding: clamp(0.7rem, 1.5vw, 0.85rem) clamp(1.1rem, 2vw, 1.45rem);
  border: none;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--fb);
  cursor: pointer;
  transition: transform var(--t), background var(--t), box-shadow var(--t);
}

.btn:hover {
  transform: translateY(-2px);
  background: #4d7c0f;
  box-shadow: 0 8px 22px rgba(101, 163, 13, 0.35);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--canopy);
  color: var(--mist);
}

.btn-outline:hover {
  background: var(--canopy);
  color: #fff;
}

.btn-bark {
  background: var(--trunk);
}

.btn-bark:hover {
  background: var(--bark);
}

/* Trunk divider utility */
.trunk-divider {
  height: var(--trunk-line);
  border: none;
  background: var(--trunk);
  margin: 0;
}

.trunk-divider--vertical {
  width: 4px;
  height: auto;
  min-height: 100%;
  background: var(--trunk);
}

/* Hero — architectural grid */
.hero-elm {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  align-items: center;
  background: linear-gradient(180deg, var(--mist) 0%, #e7f5eb 100%);
  border-bottom: var(--trunk-line);
}

.hero-elm .hero-copy {
  grid-column: 1 / span 6;
}

.hero-elm .hero-visual {
  grid-column: 7 / span 6;
  position: relative;
}

.hero-elm .hero-visual::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8%;
  bottom: 8%;
  width: 4px;
  background: var(--trunk);
}

.hero-elm img {
  width: 100%;
  object-fit: cover;
  max-height: clamp(260px, 42vw, 420px);
  border: var(--trunk-line);
  box-shadow: 12px 12px 0 var(--bark);
}

.tagline {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  color: var(--steel);
  max-width: 38ch;
}

.hero-elm .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--trunk);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Root band — horizontal four cells */
.band-roots {
  background: var(--bark);
  color: var(--mist);
}

.root-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 100%;
}

.root-band .band-cell {
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--gutter);
  text-align: center;
  border-right: 4px solid var(--trunk);
  transition: background var(--t);
}

.root-band .band-cell:last-child {
  border-right: none;
}

.root-band h3 {
  margin: 0 0 0.35rem;
  color: var(--canopy);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem);
}

.root-band p {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.9;
}

.root-band .band-cell:hover {
  background: rgba(120, 53, 15, 0.45);
}

/* Steady packages */
.section-head {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) var(--gutter) 1rem;
}

.steady-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: var(--content-max);
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  padding: 0 var(--gutter);
  border: var(--trunk-line);
  background: #fff;
}

.steady-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-right: var(--trunk-line);
  transition: transform var(--t), box-shadow var(--t);
}

.steady-card:last-child {
  border-right: none;
}

.steady-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 -4px 0 var(--canopy);
}

.steady-card .tier {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--trunk);
  font-weight: 700;
}

.steady-card .price {
  font-family: var(--fh);
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
  color: var(--bark);
  margin: 0.5rem 0;
}

.steady-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--steel);
}

/* Reliability strip */
.reliability-strip {
  background: var(--trunk);
  color: var(--mist);
  padding: clamp(1.75rem, 4vw, 2.5rem) var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  border-top: var(--trunk-line);
  border-bottom: var(--trunk-line);
}

.reliability-strip img {
  border: 2px solid var(--canopy);
}

.reliability-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.reliability-metrics div {
  border-left: 4px solid var(--canopy);
  padding-left: 0.75rem;
}

.reliability-metrics strong {
  display: block;
  font-family: var(--fh);
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.85rem);
}

/* Growth process — 5 steps with trunk connector */
.growth-process {
  background: var(--mist);
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter);
}

.growth-process .process-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.process-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 1.5rem;
  position: relative;
}

.process-track::before {
  content: '';
  position: absolute;
  top: 1.6rem;
  left: 10%;
  right: 10%;
  height: 4px;
  background: var(--trunk);
  z-index: 0;
}

.growth-step {
  text-align: center;
  padding: 0 0.5rem;
  position: relative;
  z-index: 1;
  transition: transform var(--t);
}

.growth-step .step-num {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  background: var(--canopy);
  color: #fff;
  font-family: var(--fh);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--trunk);
}

.growth-step h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.growth-step p {
  font-size: 0.85rem;
  color: var(--steel);
  margin: 0;
}

/* Services row */
.services-row {
  background: #fff;
  border-top: var(--trunk-line);
  border-bottom: var(--trunk-line);
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
}

.services-arch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: var(--content-max);
  margin: 1.25rem auto 0;
}

.service-tile {
  padding: 1.25rem;
  background: var(--mist);
  border: 2px solid var(--bark);
  border-top: 6px solid var(--canopy);
  transition: border-color var(--t);
}

.service-tile:hover {
  border-top-color: var(--trunk);
}

.service-tile img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin-bottom: 0.75rem;
  border-bottom: 3px solid var(--trunk);
}

/* Testimonials */
.testimonials-elm {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: #fff;
  padding: 1.5rem;
  border-left: var(--trunk-line);
  box-shadow: 6px 6px 0 rgba(68, 64, 60, 0.08);
}

.testimonial-card cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--steel);
}

/* Bark CTA */
.bark-cta {
  background: var(--bark);
  color: var(--mist);
  text-align: center;
  padding: clamp(3rem, 8vw, 4.5rem) var(--gutter);
  border-top: 6px solid var(--canopy);
}

.bark-cta h2 {
  color: var(--mist);
  margin-bottom: 0.75rem;
}

.bark-cta p {
  max-width: 42ch;
  margin: 0 auto 1.5rem;
  color: rgba(240, 253, 244, 0.88);
}

.elm-note {
  text-align: center;
  font-size: 0.88rem;
  color: var(--steel);
  padding: 1rem var(--gutter);
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Footer */
.site-footer {
  background: var(--bark);
  color: var(--mist);
  padding: 2.5rem var(--gutter);
  border-top: var(--trunk-line);
}

.footer-grid {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.site-footer a {
  color: var(--canopy);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-copy {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.88rem;
  opacity: 0.85;
}

/* Cookie */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: var(--trunk-line);
  padding: 1rem var(--gutter);
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 -8px 28px rgba(68, 64, 60, 0.12);
}

.cookie-banner[hidden] {
  display: none;
}

/* Inner pages */
.page-hero {
  background: var(--bark);
  color: var(--mist);
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
  border-bottom: 4px solid var(--canopy);
}

.page-hero h1 {
  max-width: var(--content-max);
  margin: 0 auto 0.5rem;
  color: var(--mist);
}

.page-hero p {
  max-width: var(--content-max);
  margin: 0 auto;
  opacity: 0.9;
}

.filter-bar {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.45rem 1rem;
  border: 2px solid var(--bark);
  background: #fff;
  cursor: pointer;
  font-family: var(--fb);
  font-weight: 600;
  transition: background var(--t), color var(--t);
}

.filter-btn.is-active,
.filter-btn:hover {
  background: var(--canopy);
  color: #fff;
  border-color: var(--canopy);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: var(--content-max);
  margin: 0 auto 3rem;
  padding: 0 var(--gutter) 2rem;
}

.catalog-card {
  background: #fff;
  border: 2px solid var(--bark);
  border-top: 5px solid var(--trunk);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
}

.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 0 var(--canopy);
}

.catalog-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.catalog-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.catalog-body .ref {
  font-size: 0.78rem;
  color: var(--steel);
}

.catalog-body .cat {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--trunk);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.catalog-body .price {
  font-family: var(--fh);
  font-weight: 600;
  font-size: 1.15rem;
}

.services-page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
}

.service-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: var(--trunk-line);
  align-items: start;
}

.service-block:last-child {
  border-bottom: none;
}

.service-block img {
  border: var(--trunk-line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  align-items: start;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.value-cell {
  padding: 1rem;
  background: #fff;
  border-left: 4px solid var(--canopy);
}

.contact-layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 3rem);
}

.contact-aside {
  background: var(--bark);
  color: var(--mist);
  padding: 2rem;
  border-top: 6px solid var(--canopy);
}

.contact-aside a {
  color: var(--canopy);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem;
  border: 2px solid var(--bark);
  border-radius: 2px;
  font-family: var(--fb);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--canopy);
  box-shadow: 0 0 0 3px rgba(101, 163, 13, 0.25);
}

.error {
  color: #b91c1c;
  font-size: 0.85rem;
}

.form-success {
  color: var(--trunk);
  font-weight: 600;
  margin-top: 1rem;
}

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
}

.legal h2 {
  margin-top: 2rem;
}

.legal ul {
  padding-left: 1.25rem;
}

/* Animations — IO + fallback */
html.js .slide-up,
html.js .fade-in {
  opacity: 0;
  transition: opacity var(--t) ease, transform var(--t) ease;
}

html.js .slide-up {
  transform: translateY(28px);
}

html.js .fade-in {
  transform: translateX(24px);
}

html.js .is-visible,
.no-js .slide-up,
.no-js .fade-in {
  opacity: 1;
  transform: none;
}

section {
  scroll-margin-top: 88px;
}

@media (max-width: 960px) {
  .hero-elm .hero-copy,
  .hero-elm .hero-visual {
    grid-column: 1 / -1;
  }

  .root-band,
  .steady-grid,
  .services-arch,
  .process-track,
  .testimonials-elm {
    grid-template-columns: 1fr 1fr;
  }

  .root-band .band-cell:nth-child(2) {
    border-right: none;
  }

  .root-band .band-cell {
    border-bottom: 4px solid var(--trunk);
  }

  .steady-card:nth-child(2) {
    border-right: none;
  }

  .process-track {
    grid-template-columns: 1fr;
  }

  .process-track::before {
    display: none;
  }

  .reliability-strip {
    grid-template-columns: 1fr;
  }

  .service-block {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .root-band,
  .steady-grid,
  .services-arch,
  .testimonials-elm,
  .about-grid,
  .about-values,
  .contact-layout,
  .reliability-metrics {
    grid-template-columns: 1fr;
  }

  .steady-card,
  .root-band .band-cell {
    border-right: none;
    border-bottom: var(--trunk-line);
  }
}
