/*
 * UI/UX audit improvements — July 2026
 * Preserves the coastal family-business identity while tightening conversion,
 * accessibility, responsive behavior, and perceived performance.
 */

:root {
  --muted: #c0cbd1;
  --status-urgent: #ffd88a;
  --status-success: #b7f7da;
  --tap-target: 48px;
}

/* The decorative loader delayed access to urgent service actions. */
.cinematic-loader {
  display: none !important;
}

/* Global interaction consistency. */
a,
button,
summary {
  -webkit-tap-highlight-color: rgba(241, 213, 168, .16);
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--gold-light) !important;
  outline-offset: 4px !important;
}

.button,
.header-book,
.phone-link,
.menu-button,
.mobile-menu a,
.customer-tool-card,
.work-tray,
.area-grid a,
.faq-list summary {
  min-height: var(--tap-target);
}

/* Make the urgent phone path primary and online booking secondary. */
.phone-link {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #202116;
  box-shadow: 0 10px 28px rgba(215, 169, 101, .22);
}

.header-book {
  border: 1px solid rgba(241, 213, 168, .42);
  background: rgba(5, 14, 25, .62);
  color: var(--gold-light);
  box-shadow: none;
}

.desktop-nav a {
  font-size: 13px;
}

/* Keep the brand readable without allowing it to collide with navigation. */
.brand {
  min-width: 0;
}

.brand > span:last-child {
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Desktop hero: keep the approved artwork, but never hide the core message. */
@media (min-width: 901px) {
  .hero--approved-art .hero-live-copy {
    position: absolute;
    z-index: 24;
    left: clamp(28px, 5vw, 78px);
    bottom: clamp(78px, 8vh, 118px);
    display: block !important;
    width: min(570px, 44vw);
    max-width: 570px;
    margin: 0;
    padding: clamp(24px, 2.5vw, 38px);
    border: 1px solid rgba(241, 213, 168, .42);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(5, 18, 30, .9), rgba(3, 11, 20, .78));
    box-shadow: 0 30px 86px rgba(0, 0, 0, .42), inset 0 1px rgba(255,255,255,.14);
    text-shadow: 0 3px 24px rgba(0,0,0,.72);
    backdrop-filter: blur(22px) saturate(125%);
    -webkit-backdrop-filter: blur(22px) saturate(125%);
  }

  .hero--approved-art .hero-live-copy h1 {
    max-width: 520px;
    margin-bottom: 16px;
    font-size: clamp(44px, 4.3vw, 68px);
    line-height: .98;
  }

  .hero--approved-art .hero-live-copy > p:not(.eyebrow):not(.hero-urgent-note) {
    max-width: 520px;
    margin: 0;
    color: #e6ecee;
    font-size: clamp(15px, 1.15vw, 18px);
    line-height: 1.58;
  }

  .hero--approved-art .concierge-bar {
    display: none !important;
  }
}

.hero-urgent-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 16px 0 0 !important;
  color: #fff4d8 !important;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.45;
}

.hero-urgent-note::before {
  content: "!";
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 216, 138, .52);
  border-radius: 50%;
  background: rgba(86, 52, 9, .55);
  color: var(--status-urgent);
  font-size: 13px;
}

.hero-trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.hero-trust-points li {
  position: relative;
  padding-left: 15px;
  color: #dce5e8;
  font-size: 12px;
  font-weight: 700;
}

.hero-trust-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(215, 169, 101, .12);
}

.hero-review-link {
  display: none !important;
}

/* Immediate utility strip for existing customers and local trust. */
.conversion-ribbon {
  position: relative;
  z-index: 25;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 17px clamp(20px, 5vw, 78px);
  border-block: 1px solid rgba(241, 213, 168, .24);
  background: linear-gradient(180deg, rgba(4, 14, 24, .94), rgba(3, 11, 20, .98));
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}

.conversion-ribbon-copy {
  min-width: 0;
}

.conversion-ribbon-copy strong,
.conversion-ribbon-copy span {
  display: block;
}

.conversion-ribbon-copy strong {
  color: var(--text);
  font-size: 14px;
}

.conversion-ribbon-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.conversion-ribbon-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.conversion-ribbon-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(241, 213, 168, .34);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.conversion-ribbon-actions a:first-child {
  background: linear-gradient(135deg, rgba(241, 213, 168, .98), rgba(215, 169, 101, .98));
  color: #202116;
}

/* Increase legibility where the original styling dropped below practical UI sizes. */
.confidence-ribbon span,
.service-links a,
.service-footer small,
.area-grid span,
footer a,
.footer-brand span {
  font-size: 12px;
  line-height: 1.45;
}

.service-links a,
.text-link,
.text-button,
footer a {
  text-underline-offset: 3px;
}

.service-links a:hover,
.text-link:hover,
footer a:hover {
  text-decoration: underline;
}

.service-card,
.experience-card,
.customer-tool-card,
.area-grid a,
.not-sure-card {
  border-radius: 24px;
}

.customer-tool-card:focus-visible,
.website-builder-card:focus-visible {
  outline: 3px solid var(--gold-light) !important;
  outline-offset: 4px !important;
}

/* Keep the plumbing site focused. Website services remain available elsewhere, not as a homepage conversion. */
.website-builder-card,
footer a[href="website-intake"] {
  display: none !important;
}

/* 1024px correction: provide a real menu instead of silently hiding navigation links. */
@media (max-width: 1120px) {
  .desktop-nav {
    display: none !important;
  }

  .menu-button {
    display: block !important;
  }
}

/* At compact desktop/tablet width, remove the absolute-positioned exploration stack. */
@media (min-width: 901px) and (max-width: 1180px) {
  body .hero.hero--approved-art .live-tray-stack,
  body .hero + .harbor-info-deck {
    display: none !important;
  }

  .hero--approved-art .hero-live-copy {
    width: min(600px, 62vw);
    max-width: 600px;
  }
}

@media (max-width: 900px) {
  .hero--approved-art .hero-live-copy {
    padding-inline: 4px;
  }

  .hero-trust-points {
    gap: 7px 14px;
  }

  .conversion-ribbon {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .conversion-ribbon-actions {
    width: 100%;
  }

  .conversion-ribbon-actions a {
    flex: 1 1 0;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 60px;
  }

  .brand {
    max-width: calc(100% - 52px);
  }

  .brand strong {
    font-size: 12px;
  }

  .mobile-menu {
    overflow-y: auto;
    align-content: start;
  }

  .mobile-menu > a:not(.button) {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding-block: 11px;
    font-size: 23px;
  }

  .hero {
    padding-bottom: 28px;
  }

  .hero--approved-art .hero-live-copy h1 {
    font-size: clamp(39px, 11vw, 46px);
    line-height: 1;
  }

  .hero-actions {
    gap: 9px;
  }

  .hero-actions .button {
    min-height: 54px;
  }

  .hero-trust-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .conversion-ribbon {
    padding: 18px 14px;
  }

  .conversion-ribbon-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .conversion-ribbon-actions a {
    padding-inline: 10px;
    white-space: normal;
    text-align: center;
  }

  .confidence-ribbon {
    gap: 9px;
  }

  .confidence-ribbon div {
    padding: 18px;
  }

  .service-card {
    min-height: 0;
    gap: 34px;
    padding: 22px;
  }

  .service-card h3 {
    font-size: 34px;
  }

  .service-footer {
    gap: 16px;
  }

  .mobile-action-bar {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-action-bar a {
    min-height: 52px;
    font-size: 12px;
  }

  .mobile-action-bar .mobile-call {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #1d2118;
  }

  .mobile-action-bar .mobile-request {
    border: 1px solid rgba(241, 213, 168, .26);
    color: var(--gold-light);
    background: rgba(255,255,255,.025);
  }
}

@media (max-width: 390px) {
  .site-header {
    padding-inline: 9px;
  }

  .brand {
    gap: 7px;
    max-width: calc(100% - 47px);
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .brand strong {
    font-size: 10.5px;
  }

  .brand small {
    font-size: 6.5px;
  }

  .hero-trust-points {
    grid-template-columns: 1fr;
  }

  .conversion-ribbon-copy strong {
    font-size: 13px;
  }

  .conversion-ribbon-copy span {
    font-size: 11px;
  }
}

@media (hover: none) {
  .button:hover,
  .service-card:hover,
  .experience-card:hover,
  .customer-tool-card:hover,
  .area-grid a:hover,
  .work-tray:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-loader {
    display: none !important;
  }
}
