/* =========================================================
   ACE Websites

   One accent (green). Paper and ink.
   Surfaces: radius 12. Controls: radius 8.
   Hover = border/color change only.
   Motion = small distances, one easing curve, reveal once.
   ========================================================= */

:root {
  --bg: #f7f4ee;
  --surface: #fffefb;
  --ink: #1a1815;
  --muted: #6f675c;
  --line: #e4ddd0;
  --line-strong: #cfc6b4;
  --green: #1c5a48;
  --green-dark: #143f33;
  --green-soft: #e8efe9;
  --radius: 12px;
  --radius-control: 8px;
  --max: 64rem;
  --header-h: 3.75rem;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--green); color: var(--surface); }

/* Sticky header must not cover anchor targets */
main section[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.45em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 3.75rem);
  letter-spacing: -0.032em;
  line-height: 1.08;
}

h1 em {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 480;
  color: var(--green);
}

h2 { font-size: clamp(1.55rem, 3.2vw, 2rem); }
h3 { font-size: 1.05rem; margin-bottom: 0.4em; }

p { margin: 0 0 0.85rem; }

a { color: var(--green); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 100;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* Type utilities */

.section-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 0.7rem;
}

.section-label::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 1px;
  background: var(--green);
}

.lede, .section-lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 38rem;
}

.muted { color: var(--muted); }

.fine { font-size: 0.85rem; color: var(--muted); margin-top: 1.1rem; }

.k {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 244, 238, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  background: var(--bg);
  border-bottom-color: var(--line-strong);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--green);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
  background: var(--green);
  color: var(--bg);
}

.brand-mark svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.6rem);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav a:hover { color: var(--ink); }

.nav a.is-active:not(.nav-cta) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.45em;
}

.nav-cta {
  background: var(--green);
  color: var(--surface) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-control);
  white-space: nowrap;
  transition: background 0.15s ease;
}

.nav-cta:hover { background: var(--green-dark); color: var(--surface) !important; }

/* Mobile menu */

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  background: var(--green);
  border-color: var(--green);
  color: var(--surface);
}

.nav-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line-strong);
  padding: 0.35rem var(--pad) 0.9rem;
}

.nav-menu.is-open { display: flex; flex-direction: column; }

.nav-menu a {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}

.nav-menu a:last-child { border-bottom: 0; }
.nav-menu a.is-active { color: var(--green); }

/* Hero */

.hero {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.hero h1 { max-width: 17ch; }

.hero .lede {
  margin-top: 1.1rem;
  font-size: 1.15rem;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
}

.facts li {
  border-top: 2px solid var(--green);
  padding-top: 0.6rem;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.button {
  display: inline-block;
  background: var(--green);
  color: var(--surface);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0.75rem 1.4rem;
  border: 1px solid var(--green);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.button:hover { background: var(--green-dark); border-color: var(--green-dark); }

.button:disabled { opacity: 0.55; cursor: wait; }

.text-link {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.text-link:hover { color: var(--ink); text-decoration-color: var(--green); }

/* Sections */

.section {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.section-head { margin-bottom: 1.5rem; }
.section-head h2 { margin-bottom: 0; }
.section-head .section-lede { margin-top: 0.7rem; }

/* Cards */

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem;
  transition: border-color 0.15s ease;
}

.card:hover { border-color: var(--line-strong); }

.card p { font-size: 0.95rem; color: var(--muted); margin: 0; }

/* Services */

.services-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.service-list {
  border-top: 1px solid var(--line);
}

.service-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.service-item h3 { margin-bottom: 0.2rem; }

.service-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.includes {
  background: var(--green-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
}

.includes h3 { margin-bottom: 0.6rem; }

.includes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.includes li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.5rem;
  border-bottom: 1px solid rgba(28, 90, 72, 0.12);
}

.includes li:last-child { border-bottom: 0; padding-bottom: 0; }

.includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Pricing */

.price--featured { border-top: 2px solid var(--green); }

.price h3 { color: var(--green); }

.price .amount {
  font-size: 2.1rem;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0.8rem 0 0.55rem;
  font-variant-numeric: tabular-nums;
}

.price .amount span {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  vertical-align: 0.35em;
}

/* Process */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.steps li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.step-num {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  margin-top: 0.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.step-body h3 { margin-bottom: 0.2rem; }

.step-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40rem;
}

/* Showcase */

.showcase-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  margin-inline: calc(var(--pad) * -1);
  padding-inline: var(--pad);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.showcase-wrap::-webkit-scrollbar { display: none; }

.showcase-wrap.is-user-scrolled .showcase-track { animation-play-state: paused; }

.showcase-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: showcase-scroll 68s linear infinite;
}

.showcase-wrap:hover .showcase-track,
.showcase-wrap:focus-within .showcase-track {
  animation-play-state: paused;
}

.showcase-set {
  display: flex;
  gap: 1rem;
}

@keyframes showcase-scroll {
  to { transform: translateX(calc(-50% - 0.5rem)); }
}

.showcase-item {
  position: relative;
  flex: none;
  width: clamp(15rem, 21vw, 17.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--green-soft);
  transition: border-color 0.15s ease;
  display: block;
}

.showcase-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

a.showcase-item { text-decoration: none; }

a.showcase-item::before {
  content: attr(data-label);
  position: absolute;
  left: 1rem;
  bottom: 0.9rem;
  z-index: 2;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
  pointer-events: none;
}

a.showcase-item:hover::before,
a.showcase-item:focus-visible::before {
  opacity: 1;
  transform: none;
}

a.showcase-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.62), rgba(20, 18, 15, 0) 48%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

a.showcase-item:hover { border-color: var(--line-strong); }
a.showcase-item:hover::after,
a.showcase-item:focus-visible::after { opacity: 1; }

/* FAQ */

.faq {
  margin: 0;
  max-width: 42rem;
  border-top: 1px solid var(--line);
}

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

.faq summary:hover { color: var(--green); }

.faq summary::-webkit-details-marker { display: none; }

.plus {
  position: relative;
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
}

.plus::before, .plus::after {
  content: "";
  position: absolute;
  top: calc(50% - 0.75px);
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), background 0.15s ease;
}

.plus::after { transform: rotate(90deg); }

details[open] .plus::before,
details[open] .plus::after { background: var(--green); }

details[open] .plus::after { transform: rotate(0deg); }

.faq p {
  margin: 0;
  padding: 0 0 0.95rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 38rem;
  animation: faq-open 0.28s var(--ease);
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
}

/* Contact */

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field-full { grid-column: 1 / -1; }

/* Honeypot: off-screen, not display:none (bots check for that) */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quote-form label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.quote-form .opt {
  font-weight: 400;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.quote-form input,
.quote-form textarea,
.quote-form select {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0.65rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.quote-form textarea { resize: vertical; }

.quote-form input:focus,
.quote-form textarea:focus,
.quote-form select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.quote-form input::placeholder,
.quote-form textarea::placeholder { color: #a89e8e; }

.quote-form input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  accent-color: var(--green);
  flex: none;
  cursor: pointer;
}

.field-check label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  line-height: 1.5;
  cursor: pointer;
}

.field-check input[type="checkbox"] { margin-top: 0.2rem; }

.form-footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.form-status { font-size: 0.9rem; color: var(--muted); margin: 0; }
.form-status.success { color: var(--green); font-weight: 500; }
.form-status.error { color: #a03d1f; font-weight: 500; }

.contact-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.contact-rows a { text-decoration: none; font-weight: 500; }
.contact-rows a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Footer */

.site-footer {
  margin-top: clamp(1rem, 3vw, 1.75rem);
  background: var(--green-dark);
  color: rgba(247, 244, 238, 0.75);
}

.site-footer a { color: rgba(247, 244, 238, 0.75); text-decoration: none; }
.site-footer a:hover { color: var(--surface); }

.site-footer .k { color: rgba(247, 244, 238, 0.45); }

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-block: clamp(2rem, 4vw, 2.5rem) 1.75rem;
}

.footer-word {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.12;
  color: var(--bg);
  margin: 0;
  max-width: 12ch;
}

.footer-word em {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 480;
  color: rgba(247, 244, 238, 0.85);
}

.footer-cols { display: flex; gap: clamp(2rem, 6vw, 3.5rem); }

.footer-cols > div {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1rem 1.25rem;
  border-top: 1px solid rgba(247, 244, 238, 0.12);
  font-size: 0.8rem;
  color: rgba(247, 244, 238, 0.5);
}

/* Scroll reveals — applied only when JS is running (.js on <html>).
   Small distance, once per element, staggered within a group. */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: calc(var(--d, 0) * 65ms);
}

/* 404 */

.nf-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.nf-brand { align-self: flex-start; margin-top: clamp(1.25rem, 4vw, 2rem); }

.nf-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(2.5rem, 8vw, 4rem);
}

.nf-num {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 480;
  font-size: clamp(5rem, 17vw, 9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--green-soft);
  margin: 0 0 0.75rem;
  user-select: none;
}

.nf-main h1 { max-width: 14ch; }

.nf-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 34rem;
}

.nf-note a { font-weight: 500; }

/* Responsive */

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

@media (max-width: 720px) {
  .nav a:not(.nav-cta) { display: none; }
  .nav-toggle { display: inline-flex; }
  .footer-top { flex-direction: column; }
  .hero h1 { max-width: none; }

  .facts {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1.25rem;
    margin-top: 1.75rem;
  }

  .showcase-wrap {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .showcase-wrap::-webkit-scrollbar { display: none; }

  .showcase-item {
    width: 78vw;
    max-width: 20rem;
    scroll-snap-align: center;
  }
}

@media (max-width: 560px) {
  .grid-3, .contact-rows { grid-template-columns: 1fr; }
  .quote-form { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 2rem 1fr; }
}

@media (max-width: 480px) {
  .brand > span:last-child { display: none; }
  .header-inner { gap: 0.75rem; }
  .header-right { gap: 0.5rem; }
  .nav-cta { padding: 0.5rem 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .faq p { animation: none; }

  .showcase-track { animation: none; }

  .showcase-wrap {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .showcase-set[aria-hidden="true"] { display: none; }

  .showcase-item { scroll-snap-align: center; }
}
