/* =============================================================================
   Alder & Stone Plumbing — demo presentation site
   -----------------------------------------------------------------------------
   This stylesheet belongs to the DEMO PAGE only. It never touches the Kalix
   widget, which lives in its own Shadow DOM appended directly to <body> by
   widget/kalix-chat.js (a sibling of the .as-page wrapper below, not a
   descendant of it). To keep it that way even in principle:

     - No bare `body`, `a`, `button`, `input` rules. Every selector below is
       scoped under .as-page or targets a demo-page-specific class.
     - Inheritable properties (color, font-family, font-size, line-height)
       are set on .as-page, never on html/body — the widget host is a
       sibling of .as-page, so nothing here can inherit into it regardless,
       but this keeps the discipline explicit rather than accidental.
     - No fixed/sticky element here uses a z-index anywhere near the
       widget's (2147483000) — the highest z-index in this file is 40.
   ========================================================================== */

:root {
  color-scheme: light;
}

html {
  box-sizing: border-box;
  overflow-x: hidden;
}
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  background: #f7f3ea; /* not inherited, but harmless to set here regardless */
  overflow-x: hidden;
}

/* =============================================================================
   TOKENS — scoped to .as-page, the wrapper around all site markup.
   ========================================================================== */

.as-page {
  --as-ivory: #f7f3ea;
  --as-ivory-deep: #efe7d4;
  --as-white: #fffdf8;
  --as-ink: #1c2420;
  --as-ink-soft: #48524c;
  --as-ink-faint: #7c877f;
  --as-forest: #2f4a3c;
  --as-forest-deep: #1f3229;
  --as-forest-soft: #e3e9e1;
  --as-stone: #d9d3c4;
  --as-stone-line: #cabf9f;
  --as-sand: #a97c46;

  --as-font-display: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --as-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --as-ease: cubic-bezier(.22,.61,.36,1);
  --as-motion: 480ms;

  display: block;
  background: var(--as-ivory);
  color: var(--as-ink);
  font-family: var(--as-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.as-page * { min-width: 0; }

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

.as-page a { color: inherit; }

.as-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.as-eyebrow {
  font-size: 12.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
  color: var(--as-sand);
  margin: 0 0 14px;
}

.as-h1 {
  font-family: var(--as-font-display);
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.06;
  letter-spacing: -.015em;
  font-weight: 400;
  color: var(--as-ink);
  margin: 0 0 22px;
}

.as-h2 {
  font-family: var(--as-font-display);
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -.01em;
  font-weight: 400;
  color: var(--as-ink);
  margin: 0 0 18px;
}

.as-h3 {
  font-family: var(--as-font-display);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--as-ink);
  margin: 0 0 8px;
}

.as-lede {
  font-size: clamp(16.5px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--as-ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}

.as-body {
  font-size: 16px; line-height: 1.7; color: var(--as-ink-soft); max-width: 60ch;
}

/* Skip link */
.as-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 30;
  background: var(--as-ink); color: var(--as-white);
  padding: 12px 18px; font-size: 14px; font-weight: 600; text-decoration: none;
  border-radius: 0 0 6px 0;
}
.as-skip-link:focus {
  left: 0;
}

/* Focus ring, applied consistently to every interactive element on the page */
.as-page a:focus-visible,
.as-page button:focus-visible,
.as-page [tabindex]:focus-visible {
  outline: 2.5px solid var(--as-forest);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =============================================================================
   REVEAL-ON-SCROLL — soft fade + upward movement, nothing more.
   ========================================================================== */

.as-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--as-motion) var(--as-ease), transform var(--as-motion) var(--as-ease);
}
.as-reveal.as-in {
  opacity: 1;
  transform: none;
}
/* No JS / reduced motion: everything must already be fully visible. */
.as-no-js .as-reveal,
.as-reduced-motion .as-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .as-page * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .as-reveal { opacity: 1; transform: none; }
}

/* =============================================================================
   UTILITY BAR
   ========================================================================== */

.as-utility {
  background: var(--as-ink);
  color: rgba(247,243,234,.82);
  font-size: 13px;
}
.as-utility .as-container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 9px; padding-bottom: 9px;
  flex-wrap: wrap;
}
.as-utility-phone {
  color: var(--as-ivory); text-decoration: none; font-weight: 600; letter-spacing: .01em;
}
.as-utility-phone:hover { color: var(--as-sand); }
.as-utility-right {
  display: flex; align-items: center; gap: 10px; text-align: right;
}
.as-utility-hours { color: rgba(247,243,234,.62); }

@media (max-width: 720px) {
  .as-utility-area { display: none; }
  .as-utility .as-container { justify-content: center; }
}

/* =============================================================================
   NAVIGATION
   ========================================================================== */

.as-nav {
  background: var(--as-ivory);
  border-bottom: 1px solid var(--as-stone-line);
  position: sticky; top: 0; z-index: 20;
}
.as-nav .as-container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px; gap: 20px;
}
.as-brand {
  display: flex; flex-direction: column; text-decoration: none; color: var(--as-ink);
}
.as-brand-name {
  font-family: var(--as-font-display); font-size: 21px; letter-spacing: -.005em;
}
.as-brand-tag {
  font-size: 11.5px; color: var(--as-ink-faint); letter-spacing: .03em; margin-top: 1px;
}

.as-nav-links {
  display: flex; align-items: center; gap: 30px;
  list-style: none; margin: 0; padding: 0;
}
.as-nav-links a {
  text-decoration: none; font-size: 14.5px; font-weight: 550; color: var(--as-ink-soft);
  padding: 6px 0; border-bottom: 1.5px solid transparent;
  transition: color 160ms linear, border-color 160ms linear;
}
.as-nav-links a:hover { color: var(--as-forest); border-color: var(--as-sand); }

.as-nav-actions { display: flex; align-items: center; gap: 14px; }

.as-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14.5px; font-weight: 620;
  padding: 12px 22px; border-radius: 3px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color 160ms linear, color 160ms linear, border-color 160ms linear, transform 160ms var(--as-ease);
  white-space: nowrap;
}
.as-btn:active { transform: scale(.98); }
.as-btn-primary { background: var(--as-forest); color: var(--as-white); }
.as-btn-primary:hover { background: var(--as-forest-deep); }
.as-btn-outline { background: transparent; color: var(--as-ink); border-color: var(--as-ink); }
.as-btn-outline:hover { background: var(--as-ink); color: var(--as-white); }
.as-btn-ghost { background: transparent; color: var(--as-forest); border-color: var(--as-forest); }
.as-btn-ghost:hover { background: var(--as-forest); color: var(--as-white); }
.as-btn-sand { background: transparent; color: var(--as-ink); border-color: var(--as-stone-line); }
.as-btn-sand:hover { border-color: var(--as-sand); color: var(--as-sand); }

.as-nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 1px solid var(--as-stone-line); background: var(--as-white);
  border-radius: 3px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.as-nav-toggle svg { width: 20px; height: 20px; color: var(--as-ink); }

.as-mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  .as-nav-links { display: none; }
  .as-nav-actions .as-btn-outline { display: none; }
  .as-nav-toggle { display: flex; }

  .as-mobile-menu {
    display: block;
    position: fixed; inset: 0; z-index: 25;
    background: var(--as-ivory);
    padding: 20px 24px 32px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--as-ease), transform 220ms var(--as-ease);
    overflow-y: auto;
  }
  .as-mobile-menu[data-open] { opacity: 1; transform: none; pointer-events: auto; }
  .as-mobile-menu-head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px;
  }
  .as-mobile-links { list-style: none; margin: 0 0 28px; padding: 0; }
  .as-mobile-links li { border-bottom: 1px solid var(--as-stone-line); }
  .as-mobile-links a {
    display: block; padding: 16px 2px; text-decoration: none;
    color: var(--as-ink); font-family: var(--as-font-display); font-size: 21px;
  }
  .as-mobile-actions { display: flex; flex-direction: column; gap: 12px; }
  .as-mobile-actions .as-btn { width: 100%; }
}

/* =============================================================================
   HERO
   ========================================================================== */

.as-hero {
  position: relative;
  padding: 76px 0 90px;
  overflow: hidden;
}
.as-hero .as-container {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.as-hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.as-hero-support {
  font-size: 14.5px; color: var(--as-ink-faint); max-width: 42ch;
}

/* The visual panel: no photography, an art-directed material composition
   built entirely from layered gradients, a fine architectural grid, and a
   single oversized ghost numeral, in the site's own palette. */
.as-hero-panel {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 8%, rgba(255,255,255,.10), transparent 55%),
    linear-gradient(155deg, var(--as-forest) 0%, var(--as-forest-deep) 62%, #14211b 100%);
  box-shadow: 0 30px 70px -30px rgba(20,30,25,.45);
}
.as-hero-panel::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 64px);
  opacity: .5;
}
.as-hero-panel-num {
  position: absolute; right: -18px; bottom: -60px;
  font-family: var(--as-font-display); font-size: 320px; line-height: 1;
  color: rgba(255,255,255,.08);
  user-select: none;
}
.as-hero-panel-tag {
  position: absolute; left: 26px; bottom: 26px; right: 26px;
  color: var(--as-ivory);
}
.as-hero-panel-tag .as-eyebrow { color: rgba(247,243,234,.7); margin-bottom: 8px; }
.as-hero-panel-tag strong {
  display: block; font-family: var(--as-font-display); font-size: 22px; font-weight: 400;
}

@media (max-width: 900px) {
  .as-hero .as-container { grid-template-columns: 1fr; }
  .as-hero-panel { aspect-ratio: 16/11; }
}

/* =============================================================================
   TRUST / INTRO STRIP — editorial, not an icon grid
   ========================================================================== */

.as-trust {
  padding: 80px 0;
  background: var(--as-white);
  border-top: 1px solid var(--as-stone-line);
  border-bottom: 1px solid var(--as-stone-line);
}
.as-trust .as-container {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: start;
}
.as-trust-values {
  display: flex; flex-direction: column; gap: 30px;
}
.as-trust-value {
  padding-top: 20px; border-top: 1px solid var(--as-stone-line);
}
.as-trust-value:first-child { border-top: 0; padding-top: 0; }
.as-trust-value h3 {
  font-family: var(--as-font-display); font-size: 19px; font-weight: 400; margin: 0 0 6px; color: var(--as-ink);
}
.as-trust-value p { margin: 0; color: var(--as-ink-soft); font-size: 15px; line-height: 1.6; }

@media (max-width: 860px) {
  .as-trust .as-container { grid-template-columns: 1fr; gap: 32px; }
}

/* =============================================================================
   SERVICES — one featured panel + a row list, not seven identical cards
   ========================================================================== */

.as-services { padding: 90px 0; }
.as-section-head { max-width: 60ch; margin-bottom: 48px; }

.as-services-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px;
}

.as-service-feature {
  position: relative;
  border-radius: 4px; overflow: hidden;
  background: linear-gradient(160deg, var(--as-stone) 0%, var(--as-ivory-deep) 100%);
  padding: 40px 36px;
  min-height: 360px;
  display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid var(--as-stone-line);
}
.as-service-feature::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(47,74,60,.05) 0 2px, transparent 2px 26px);
}
.as-service-feature > * { position: relative; }
.as-service-feature .as-eyebrow { color: var(--as-forest); }
.as-service-feature h3 { font-size: 28px; margin-bottom: 10px; }
.as-service-feature p { color: var(--as-ink-soft); max-width: 40ch; margin: 0 0 18px; }

.as-service-rows {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--as-stone-line);
}
.as-service-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--as-stone-line);
  text-decoration: none; color: var(--as-ink);
  transition: padding-left 160ms var(--as-ease), color 160ms linear;
}
.as-service-row:hover { padding-left: 10px; color: var(--as-forest); }
.as-service-row-title { font-family: var(--as-font-display); font-size: 19px; }
.as-service-row-desc { font-size: 13.5px; color: var(--as-ink-faint); margin-top: 3px; }
.as-service-row-arrow { flex: none; color: var(--as-ink-faint); transition: transform 160ms var(--as-ease), color 160ms linear; }
.as-service-row:hover .as-service-row-arrow { transform: translateX(4px); color: var(--as-forest); }
.as-service-row-arrow svg { width: 18px; height: 18px; display: block; }

@media (max-width: 900px) {
  .as-services-grid { grid-template-columns: 1fr; }
  .as-service-feature { min-height: 260px; }
}

/* =============================================================================
   URGENT HELP — calm, distinct, not alarmist
   ========================================================================== */

.as-urgent {
  padding: 76px 0;
  background: var(--as-forest);
  color: var(--as-ivory);
  position: relative;
  overflow: hidden;
}
.as-urgent::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 48px);
}
.as-urgent .as-container { position: relative; max-width: 760px; text-align: left; }
.as-urgent .as-eyebrow { color: rgba(247,243,234,.72); }
.as-urgent h2 { color: var(--as-white); }
.as-urgent p { color: rgba(247,243,234,.85); font-size: 17px; max-width: 56ch; margin: 0 0 30px; }
.as-urgent-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.as-urgent .as-btn-outline { border-color: rgba(247,243,234,.5); color: var(--as-ivory); }
.as-urgent .as-btn-outline:hover { background: var(--as-ivory); color: var(--as-forest-deep); border-color: var(--as-ivory); }
.as-urgent .as-btn-primary { background: var(--as-ivory); color: var(--as-forest-deep); }
.as-urgent .as-btn-primary:hover { background: var(--as-white); }

/* =============================================================================
   APPROACH — three editorial steps
   ========================================================================== */

.as-approach { padding: 90px 0; }
.as-approach-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.as-approach-step {
  border-top: 2px solid var(--as-ink);
  padding-top: 20px;
}
.as-approach-num {
  font-family: var(--as-font-display); font-size: 15px; color: var(--as-sand); margin-bottom: 14px; display: block;
}
.as-approach-step h3 { font-size: 20px; margin-bottom: 8px; }
.as-approach-step p { color: var(--as-ink-soft); font-size: 15px; margin: 0; }

@media (max-width: 860px) {
  .as-approach-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* =============================================================================
   RECENT WORK — illustrative gallery
   ========================================================================== */

.as-work { padding: 90px 0; background: var(--as-white); border-top: 1px solid var(--as-stone-line); }
.as-work-note {
  font-size: 13.5px; color: var(--as-ink-faint); margin: -28px 0 44px;
}
.as-work-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.as-work-card {
  border-radius: 3px; overflow: hidden; border: 1px solid var(--as-stone-line); background: var(--as-ivory);
}
.as-work-panel {
  aspect-ratio: 4/5; position: relative;
}
.as-work-panel span.as-work-index {
  position: absolute; left: 14px; top: 14px;
  font-family: var(--as-font-display); font-size: 13px; color: rgba(255,255,255,.85);
  letter-spacing: .04em;
}
.as-work-body { padding: 16px 16px 20px; }
.as-work-label {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--as-sand); margin: 0 0 6px;
}
.as-work-title { font-family: var(--as-font-display); font-size: 16.5px; margin: 0; color: var(--as-ink); line-height: 1.35; }

/* Four distinct art-directed palettes for the four illustrative panels,
   generated purely from the site's own tokens plus small hue shifts. */
.as-work-panel[data-tone="1"] { background: linear-gradient(150deg, #2f4a3c, #1c2b23); }
.as-work-panel[data-tone="2"] { background: linear-gradient(150deg, #a97c46, #6d5330); }
.as-work-panel[data-tone="3"] { background: linear-gradient(150deg, #d9d3c4, #a89f89); }
.as-work-panel[data-tone="4"] { background: linear-gradient(150deg, #3f4744, #1c2420); }
.as-work-panel[data-tone="3"] .as-work-index { color: rgba(28,36,32,.6); }

@media (max-width: 980px) {
  .as-work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .as-work-grid { grid-template-columns: 1fr; }
}

/* =============================================================================
   SERVICE AREAS
   ========================================================================== */

.as-areas { padding: 90px 0; }
.as-areas-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--as-stone-line);
  border: 1px solid var(--as-stone-line);
}
.as-area-cell {
  background: var(--as-ivory);
  padding: 26px 20px;
  font-family: var(--as-font-display); font-size: 18px; color: var(--as-ink);
}

@media (max-width: 760px) {
  .as-areas-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================================================
   FINAL CONTACT
   ========================================================================== */

.as-contact {
  padding: 90px 0;
  background: var(--as-ink);
  color: var(--as-ivory);
}
.as-contact .as-container { max-width: 760px; }
.as-contact h2 { color: var(--as-white); }
.as-contact p { color: rgba(247,243,234,.78); font-size: 17px; max-width: 56ch; margin: 0 0 34px; }
.as-contact-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.as-contact .as-btn-primary { background: var(--as-sand); color: #241a0d; }
.as-contact .as-btn-primary:hover { background: #c08f52; }
.as-contact .as-btn-outline { border-color: rgba(247,243,234,.45); color: var(--as-ivory); }
.as-contact .as-btn-outline:hover { background: var(--as-ivory); color: var(--as-ink); border-color: var(--as-ivory); }
.as-contact .as-btn-ghost { border-color: rgba(247,243,234,.45); color: var(--as-ivory); }
.as-contact .as-btn-ghost:hover { background: rgba(247,243,234,.12); color: var(--as-ivory); }

/* =============================================================================
   FOOTER
   ========================================================================== */

.as-footer {
  padding: 56px 0 40px;
  background: var(--as-ivory-deep);
  border-top: 1px solid var(--as-stone-line);
}
.as-footer-top {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  margin-bottom: 30px;
}
.as-footer-brand .as-brand-name { font-size: 20px; }
.as-footer-brand p { margin: 6px 0 0; color: var(--as-ink-soft); font-size: 14px; max-width: 40ch; }
.as-footer-contact { font-size: 14.5px; color: var(--as-ink-soft); text-align: right; }
.as-footer-contact a { text-decoration: none; color: var(--as-ink); font-weight: 600; }
.as-footer-contact a:hover { color: var(--as-forest); }
.as-footer-disclosure {
  border-top: 1px solid var(--as-stone-line);
  padding-top: 22px;
  font-size: 12.5px; color: var(--as-ink-faint); line-height: 1.6;
}

@media (max-width: 640px) {
  .as-footer-top { flex-direction: column; }
  .as-footer-contact { text-align: left; }
}

/* =============================================================================
   RESPONSIVE — section rhythm at small widths
   ========================================================================== */

@media (max-width: 640px) {
  .as-container { padding: 0 20px; }
  .as-hero { padding: 52px 0 60px; }
  .as-trust, .as-services, .as-approach, .as-work, .as-areas, .as-contact { padding: 60px 0; }
  .as-hero-actions, .as-urgent-actions, .as-contact-actions { flex-direction: column; align-items: stretch; }
  .as-hero-actions .as-btn, .as-urgent-actions .as-btn, .as-contact-actions .as-btn { width: 100%; }
}

/* =============================================================================
   ACCESSIBILITY UTILITIES
   ========================================================================== */

.as-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
