:root {
  --ink: #103331;
  --deep: #082b29;
  --green: #075f59;
  --accent: #8ce5d3;
  --paper: #fafbf8;
  --surface: #edf4f0;
  --muted: #405b57;
  --rule: #ccdcd5;
  --heading: 'Avenir Next', 'Trebuchet MS', system-ui, sans-serif;
  --section-space: clamp(2.75rem, 6vw, 5.5rem);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.6 system-ui, sans-serif; overflow-wrap: anywhere; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.08; letter-spacing: -.045em; }
h1 { font-size: clamp(2.45rem, 5.25vw, 5.15rem); }
h2 { font-size: clamp(2rem, 4vw, 3.65rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #127b72; outline-offset: 4px; }
.home-hero :focus-visible, .contact-section :focus-visible, footer :focus-visible { outline-color: var(--accent); }
.wrap { width: min(calc(100% - clamp(2rem, 9vw, 9rem)), 75rem); margin-inline: auto; }
[id] { scroll-margin-block-start: 1rem; }
.skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 4; padding: .65rem 1rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }

.header { position: relative; z-index: 2; background: white; border-top: 3px solid var(--green); border-bottom: 1px solid var(--rule); }
.head, .foot { display: flex; align-items: center; justify-content: space-between; gap: .7rem 1.5rem; }
.head { min-height: 5.4rem; padding-block: .3rem; }
.brand { display: flex; align-items: center; gap: 1rem; min-width: 0; text-decoration: none; }
.logo { width: clamp(5.4rem, 16vw, 7rem); aspect-ratio: 1.32; object-fit: cover; }
.brand-place { padding-inline-start: 1rem; border-inline-start: 1px solid var(--rule); color: var(--muted); font-size: .85rem; }
.site-nav { position: relative; display: flex; align-items: center; gap: clamp(.4rem, 1.4vw, .75rem); }
.site-menu { position: relative; }
.site-menu summary, .nav-contact { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .5rem clamp(.65rem, 1.65vw, 1.15rem); border: 1px solid var(--rule); font-size: .9rem; font-weight: 750; white-space: nowrap; text-decoration: none; }
.site-menu summary { cursor: pointer; list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary::after { content: ''; width: .4rem; height: .4rem; margin-block-start: -.2rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.site-menu[open] summary::after { margin-block-start: .2rem; transform: rotate(225deg); }
.site-menu summary:hover, .site-menu[open] summary { background: var(--surface); border-color: var(--green); }
.nav-contact { background: var(--green); border-color: var(--green); color: white; }
.nav-contact:hover { background: var(--deep); }
.menu-panel { position: absolute; inset: calc(100% + .55rem) 0 auto auto; width: min(17.5rem, calc(100vw - 2rem)); max-height: min(31rem, calc(100dvh - 6rem)); overflow-y: auto; background: white; padding: .55rem; border: 1px solid var(--rule); border-top: 3px solid var(--green); box-shadow: 0 .75rem 2rem #082b2926; }
.menu-panel a { display: flex; align-items: center; min-height: 2.75rem; padding: .4rem .75rem; font-size: .95rem; font-weight: 700; text-decoration: none; }
.menu-panel a:hover, .menu-panel a[aria-current] { background: var(--surface); color: var(--green); }
.menu-panel a[aria-current] { box-shadow: inset 3px 0 var(--green); }
.menu-panel a:focus-visible { outline-offset: -3px; }
.menu-panel p { margin: .35rem .75rem 0; padding-top: .55rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.eyebrow { margin-bottom: .65rem; color: var(--green); font-size: .76rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; margin-top: 1.35rem; padding: .7rem 1.15rem; border: 0; background: var(--accent); color: var(--deep); font-weight: 800; text-align: center; text-decoration: none; }
.button:hover { background: #b8f2e6; }
.plain-link { font-weight: 750; text-underline-offset: .22em; }
.home-hero, .contact-section { background: var(--deep); color: white; }
.home-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: stretch; }
.hero-copy { align-self: center; padding: clamp(3rem, 7.5vw, 7rem) clamp(1.2rem, 4vw, 4rem) clamp(3rem, 7.5vw, 7rem) 0; }
.hero-copy h1 { text-wrap: balance; }
.hero-copy > p:not(.eyebrow) { max-width: 31rem; margin-top: 1rem; color: #e0eeea; font-size: clamp(1rem, 1.55vw, 1.18rem); }
.home-hero .eyebrow, .contact-section .eyebrow { color: var(--accent); }
.hero-photo { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-inline-start: 4px solid var(--accent); }

.catalog, .home-section, .service-next { padding-block: var(--section-space); }
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.5rem); margin-top: 1.5rem; }
.cards article { grid-column: span 2; background: white; border: 1px solid var(--rule); }
.cards article:nth-child(-n+2) { grid-column: span 3; }
.cards a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.cards img { width: 100%; height: clamp(9.5rem, 16vw, 14rem); object-fit: cover; background: var(--surface); }
.cards img[src='equipment.webp'] { object-fit: contain; background: white; }
.cards .field-card-photo { object-position: center 58%; }
.card-copy { position: relative; flex: 1; padding: 1.05rem 2.7rem 1.15rem 1.15rem; }
.card-copy::after { content: ''; position: absolute; top: 1.48rem; inset-inline-end: 1.25rem; width: .46rem; height: .46rem; border: solid var(--green); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.card-copy p { color: var(--muted); margin-top: .35rem; font-size: .94rem; }
.cards article:hover { border-color: var(--green); }
.cards a:hover h3, .cards a:focus-visible h3 { text-decoration: underline; text-underline-offset: .18em; }

.home-section { border-top: 1px solid var(--rule); }
.story-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 1rem clamp(1.5rem, 6vw, 5rem); }
.story-copy, .project-intro { max-width: 39rem; color: var(--muted); font-size: clamp(1rem, 1.65vw, 1.16rem); }
.testimonial-section { padding-block: clamp(1.4rem, 3.5vw, 2.65rem); background: var(--surface); }
.testimonial-section h2 { font-size: clamp(1.55rem, 2.8vw, 2.35rem); }
.project-intro { margin-top: .65rem; }
.featured-project { margin-top: 1.75rem; }
.project-gallery:not(:empty) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 2vw, 1.5rem); margin-top: 1rem; }
.project-gallery figure { background: white; border: 1px solid var(--rule); }
.project-gallery img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; background: var(--surface); }
.project-gallery figcaption { padding: .7rem 1rem; font-size: .9rem; }
.project-gallery h3 { margin-bottom: .25rem; color: var(--ink); }
.project-empty:not(:empty) { margin-top: 1rem; color: var(--muted); }
.contact-section .story-copy { color: #e0eeea; }
.contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1rem; }
.contact-actions .button { margin-top: 0; }
.contact-email { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .95rem; font-weight: 700; text-underline-offset: .22em; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding-top: 1rem; color: var(--muted); font-size: .9rem; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--green); text-underline-offset: .2em; }
.service-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(1.4rem, 5vw, 4.5rem); padding-block: .8rem var(--section-space); }
.service-copy h1 { font-size: clamp(2.35rem, 4.7vw, 4.45rem); text-wrap: balance; }
.service-copy > p:not(.eyebrow) { max-width: 35rem; margin-top: 1rem; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); }
.service-hero img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; background: white; }
.equipment-repair img { object-fit: contain; }
.dot-inspections img { object-position: 65% center; }
figcaption { padding-top: .35rem; color: var(--muted); font-size: .84rem; }
.details { padding-block: var(--section-space); background: var(--surface); border-block: 1px solid var(--rule); }
.details-inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1.4rem clamp(1.5rem, 6vw, 5rem); }
.details dl div { padding-block: .8rem; border-top: 1px solid var(--rule); }
.details dl div:last-child { padding-bottom: 0; }
.details dt { color: var(--green); font-weight: 800; }
.details dd { margin-top: .18rem; color: var(--muted); }
.service-next { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; }
.service-next h2 { margin-bottom: .45rem; font-size: clamp(1.65rem, 3.35vw, 2.85rem); }
.service-next .button { margin-top: 0; }

footer { background: var(--deep); border-top: 1px solid #3b5a54; color: #e0eeea; }
.foot { flex-wrap: wrap; min-height: 5rem; padding-block: .85rem; font-size: .875rem; }
.foot a { display: inline-flex; align-items: center; min-height: 2.75rem; text-underline-offset: .2em; }
.brand-name { color: white; font-size: 1rem; font-weight: 850; text-decoration: none; }

.admin-layout { padding-block: var(--section-space); }
.admin-layout h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.admin-status { margin-block: 1.15rem; color: var(--muted); }
.admin-panel { max-width: 36rem; padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--rule); background: var(--surface); }
.admin-panel h2 { margin-bottom: .65rem; font-size: clamp(1.65rem, 4vw, 2.5rem); }
.admin-panel label { display: grid; gap: .3rem; margin-top: 1rem; font-weight: 700; }
.admin-panel label[hidden] { display: none; }
.admin-panel input, .admin-panel textarea { width: 100%; min-width: 0; padding: .6rem .7rem; border: 1px solid #8aaead; background: white; color: var(--ink); font: inherit; }
.admin-panel button { border: 0; cursor: pointer; font: inherit; font-weight: 750; }
.admin-panel button:disabled { cursor: wait; opacity: .65; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: 1rem; }
button.plain-link { padding: .45rem 0; background: none; color: var(--green); text-align: left; text-decoration: underline; }
.field-hint { margin-top: .25rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 740px) {
  .brand-place { display: none; }
  .site-menu { position: static; }
  .home-intro, .service-hero, .details-inner, .story-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 2.65rem 0 1.75rem; }
  .hero-copy h1 { text-wrap: wrap; }
  .hero-photo { height: auto; aspect-ratio: 16/10; border-inline-start: 0; border-top: 4px solid var(--accent); }
  .home-hero { padding-bottom: 1.5rem; }
  .cards, .project-gallery:not(:empty) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards article, .cards article:nth-child(-n+2) { grid-column: auto; }
}

@media (max-width: 460px) {
  .head { gap: .5rem; }
  .cards, .project-gallery:not(:empty) { grid-template-columns: minmax(0, 1fr); }
  .cards img { height: auto; aspect-ratio: 16/8; }
  .foot { gap: .15rem 1rem; }
}
