/* Harbor & Hearth demo polish. Preserve the warm home-repair theme and make the service desk and form easier to use. */

:root {
  --ticket-surface: #123a40;
  --ticket-accent: #eba455;
  --ticket-focus: #f2cd93;
  --ticket-shadow: #e2d5bf;
  --ticket-rule: rgb(255 255 255 / 0.22);
  --ticket-hover: rgb(255 255 255 / 0.09);
  --demo-call-clearance: calc(5.5rem + env(safe-area-inset-bottom));
}

html,
body { overflow-x: clip; }

a, button, input, select, textarea { touch-action: manipulation; }

.demo-notice {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 1rem;
}
.demo-notice > a { font-weight: 650; }

.hero { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem); }
.hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.hero h1 { min-width: 0; overflow-wrap: break-word; }

/* Service desk */
.ticket {
  position: relative;
  z-index: 1;
  margin: -64px 6% 0;
  padding: clamp(1.3rem, 3vw, 1.9rem);
  background: var(--ticket-surface);
  color: var(--white);
  border-top: 8px solid var(--ticket-accent);
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--ticket-shadow);
}
.ticket h2 {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
}
.ticket a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  padding: 0.65rem 0.35rem;
  border-top: 1px solid var(--ticket-rule);
  font-weight: 600;
  text-decoration: none;
}
.ticket a::after {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--ticket-accent);
  border-bottom: 2px solid var(--ticket-accent);
  transform: rotate(-45deg);
}
.ticket a:hover,
.ticket a:active { background: var(--ticket-hover); }
.ticket a:focus-visible { outline: 3px solid var(--ticket-focus); outline-offset: 2px; }

.service-card .text-link {
  min-height: 44px;
  align-self: flex-start;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.about-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}
.about-split h2 { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; letter-spacing: -0.015em; color: var(--navy-800); }
.about-split > div > p { margin-top: 1rem; max-width: 34rem; color: var(--ink-soft); }
.photo-card { margin: 0; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.photo-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.photo-card figcaption { padding: 1rem 0.5rem 0.4rem; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); }
.photo-card strong { display: block; margin-bottom: 0.2rem; font-size: 1.05rem; color: var(--navy-800); }
.photo-note { display: block; margin-top: 0.4rem; font-size: 0.8rem; color: var(--muted); }

.field select { background-color: var(--paper); color: var(--ink); }
.contact-list a { overflow-wrap: anywhere; }

@media screen and (max-width: 900px) {
  html { scroll-padding-bottom: var(--demo-call-clearance); }
  body { padding-bottom: var(--demo-call-clearance); }

  .hero-grid,
  .about-split { grid-template-columns: minmax(0, 1fr); }
  .photo-card { max-width: 480px; }
  .ticket { margin-inline: 4%; }

  .primary-nav {
    position: absolute;
    inset: 100% 0 auto;
  }

  .primary-nav.is-open {
    max-height: calc(100dvh - var(--nav-top, var(--header-h)) - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  html:not(.js) .site-header { position: static; }
  html:not(.js) .header-inner { flex-wrap: wrap; height: auto; padding-block: 0.75rem; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .primary-nav {
    position: static;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .mobile-call { visibility: hidden; }
  .mobile-call.is-visible { visibility: visible; }
  body:has(.primary-nav.is-open, #contact-form :focus) .mobile-call { visibility: hidden; }
}

@media screen and (max-width: 640px) {
  .ticket { margin: -2rem 0 0; }
  .demo-notice > a { display: inline-grid; align-items: center; min-height: 44px; }
}
