/* Shared styles for every page: colours, type, nav, buttons, footer. */

:root {
  --nav-h: 92px;
  --navy: #1C3553;
  --navy-deep: #142840;
  --red: #9B2C2C;
  --red-light: #B83535;
  --red-tint: rgba(155, 44, 44, 0.1);
  --cream: #F6F3EE;
  --white: #FFFFFF;
  --offwhite: #F7F8FA;
  --gray-100: #EEF0F3;
  --gray-500: #5F6B7C;
  --gray-800: #2D3748;
  --radius: 22px;
  --shadow: 0 22px 50px rgba(28, 53, 83, 0.12);
  --display: 'Montserrat', sans-serif;
  --body: 'Be Vietnam Pro', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  -webkit-tap-highlight-color: rgba(155, 44, 44, 0.12);
  font-family: var(--body);
  color: var(--gray-800);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(155, 44, 44, 0.45);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.display {
  font-family: var(--display);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.display .accent {
  color: var(--red);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-red {
  background: var(--red);
  color: var(--white);
}

.btn-red:hover {
  background: var(--red-light);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: #26466c;
}

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--navy);
}

.btn-light:hover {
  background: var(--cream);
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.btn-ghost-light:hover {
  background: var(--white);
  color: var(--navy);
}

/* ---------- Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(246, 243, 238, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(28, 53, 83, 0.1);
}

.nav {
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
}

.nav-links a {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--red);
  border-bottom-color: var(--red);
}

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-actions .btn {
  padding: 13px 24px;
  font-size: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.brand-type {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-wordmark {
  height: 44px;
  width: auto;
}

.brand-plumbing {
  width: 104px;
  height: auto;
  margin-top: 4px;
  align-self: flex-end;
  margin-right: 2px;
}

.brand-dog {
  height: 62px;
  width: auto;
  margin-left: 0;
}

.nav-toggle {
  display: none;
  justify-self: end;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 0;
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.mobile-menu {
  display: none;
}

@media (max-width: 1080px) {
  :root {
    --nav-h: 76px;
  }

  .nav {
    grid-template-columns: auto 1fr;
    padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
  }

  .nav > .nav-links,
  .nav-actions {
    display: none;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .brand-wordmark {
    height: 34px;
  }

  .brand-plumbing {
    width: 80px;
  }

  .brand-dog {
    height: 48px;
  }

  .mobile-menu {
    display: block;
    position: fixed;
    top: var(--nav-h);
    right: 0;
    bottom: 0;
    z-index: 100;
    width: min(360px, 86vw);
    overflow-y: auto;
    background: var(--cream);
    border-left: 1px solid rgba(28, 53, 83, 0.1);
    box-shadow: -24px 0 50px rgba(20, 40, 64, 0.18);
    padding: 16px 22px calc(28px + env(safe-area-inset-bottom));
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.32s;
  }

  .mobile-menu.open {
    transform: none;
    visibility: visible;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
  }

  .menu-scrim {
    position: fixed;
    inset: var(--nav-h) 0 0;
    z-index: 99;
    background: rgba(20, 40, 64, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  }

  .menu-scrim.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s;
  }

  html.menu-lock,
  html.menu-lock body {
    overflow: hidden;
  }

  .nav-toggle .icon-close,
  .nav-toggle[aria-expanded="true"] .icon-menu {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
  }

  .mobile-menu .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .mobile-menu .nav-links a {
    display: block;
    padding: 16px 4px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(28, 53, 83, 0.08);
  }

  .mobile-menu .btn {
    width: 100%;
    margin-top: 12px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--white);
  border-top: 1px solid rgba(28, 53, 83, 0.12);
  padding: 88px 32px 36px;
}

.footer-inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

.footer-dog {
  position: absolute;
  bottom: calc(100% + 84px);
  right: clamp(0px, 4vw, 60px);
  width: clamp(92px, 9vw, 124px);
  height: auto;
  pointer-events: none;
  transform-origin: bottom center;
}

.footer-dog.in {
  animation: dogHop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes dogHop {
  0% { transform: translateY(40px) scale(0.9); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

.book-dog {
  position: absolute;
  top: -58px;
  left: 50%;
  width: 96px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.footer-call {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.footer-call .brand-name {
  color: var(--red);
}

.footer-call .tag {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 0 18px 4px;
  border-radius: 10px;
  transform: rotate(-2deg);
  margin-right: 8px;
}

.footer-phone {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.footer-phone:hover {
  color: var(--red);
}

.footer-sub {
  margin-top: 18px;
  font-size: 1.1rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.footer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.footer-nav {
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 14px 56px;
  list-style: none;
}

.footer-nav a {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
}

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

.footer-info {
  font-style: normal;
  grid-column: 2;
  justify-self: end;
  text-align: right;
  color: var(--gray-500);
  line-height: 1.8;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(28, 53, 83, 0.1);
  color: var(--gray-500);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .site-footer {
    padding: 64px 18px 28px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-dog {
    bottom: calc(100% + 60px);
    width: 84px;
  }

  .footer-nav,
  .footer-info {
    grid-column: auto;
    justify-self: start;
    text-align: left;
  }
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: var(--gray-500);
}

.footer-legal a:hover {
  color: var(--red);
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 64px) 24px 96px;
}

.legal h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 10px;
}

.legal-updated {
  color: var(--gray-500);
  margin-bottom: 40px;
}

.legal h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  margin: 40px 0 12px;
}

.legal p,
.legal li {
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--gray-800);
}

.legal p + p {
  margin-top: 12px;
}

.legal ul {
  padding-left: 22px;
  margin: 10px 0;
}

.legal li + li {
  margin-top: 6px;
}

.legal a {
  color: var(--red);
  font-weight: 600;
}

.legal-contact {
  margin-top: 16px;
  padding: 22px 24px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(28, 53, 83, 0.1);
  line-height: 1.8;
}

/* ---------- Book Now dialog ---------- */
.book-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  overflow: visible;
  padding: 56px 40px 32px;
  border: 0;
  border-radius: 26px;
  background: var(--cream);
  color: var(--gray-800);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.book-dialog::backdrop {
  background: rgba(20, 40, 64, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.book-dialog[open] {
  animation: bookIn 0.25s ease;
}

@keyframes bookIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.book-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(28, 53, 83, 0.08);
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-close:hover {
  background: rgba(28, 53, 83, 0.16);
}

.book-close svg {
  width: 20px;
  height: 20px;
}

.book-dialog h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 28px;
}

.book-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}

.book-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 24px 22px;
  background: var(--white);
  border: 2px solid rgba(28, 53, 83, 0.1);
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.book-option:hover {
  border-color: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(28, 53, 83, 0.14);
}

.book-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.book-icon svg {
  width: 24px;
  height: 24px;
}

.book-price {
  position: absolute;
  top: 24px;
  right: 22px;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--navy);
}

.book-price.free {
  color: var(--red);
}

.book-option strong {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy);
}

.book-desc {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--gray-500);
  flex: 1;
}

.book-note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--gray-500);
}

.book-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.book-go svg {
  width: 16px;
  height: 16px;
}

.book-call {
  margin-top: 22px;
  font-size: 0.95rem;
  color: var(--gray-500);
}

.book-call a {
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .book-dialog {
    padding: 40px 18px 24px;
  }

  .book-options {
    grid-template-columns: 1fr;
  }
}

/* ---------- Mobile call / book bar ---------- */
.mobile-cta {
  display: none;
}

@media (max-width: 860px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .mobile-cta {
    position: fixed;
    inset: auto 0 0;
    z-index: 98;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(246, 243, 238, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(28, 53, 83, 0.12);
    box-shadow: 0 -10px 30px rgba(28, 53, 83, 0.1);
  }

  .mobile-cta .btn {
    padding: 15px 12px;
    font-size: 1rem;
  }

}

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover {
    transform: none;
  }

  .mobile-menu,
  .mobile-menu.open,
  .menu-scrim,
  .menu-scrim.open {
    transition: none;
  }

  .book-dialog[open],
  .footer-dog.in {
    animation: none;
  }
}

/* ---------- Phones: tighter type, lighter effects ---------- */
@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .eyebrow {
    font-size: 0.72rem;
    margin-bottom: 10px;
  }

  .btn {
    padding: 14px 22px;
    font-size: 0.95rem;
  }

  .footer-call {
    font-size: 2rem;
  }

  .footer-call .tag {
    padding: 0 12px 3px;
    border-radius: 8px;
  }

  .footer-phone {
    font-size: 1.55rem;
  }

  .footer-sub {
    font-size: 0.98rem;
  }

  .footer-bottom {
    margin-top: 40px;
    font-size: 0.82rem;
  }

  .legal {
    padding: calc(var(--nav-h) + 36px) 18px 64px;
  }

  .legal h1 {
    font-size: 2rem;
  }

  .legal h2 {
    font-size: 1.12rem;
    margin-top: 30px;
  }

  .legal p,
  .legal li {
    font-size: 0.96rem;
  }

  /* Book Now becomes a compact sheet that slides up from the bottom */
  .book-dialog {
    width: 100%;
    max-width: none;
    max-height: 90svh;
    margin: auto 0 0;
    padding: 26px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .book-dialog[open] {
    animation: sheetUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .book-dog {
    display: none;
  }

  .book-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }

  .book-dialog h2 {
    font-size: 1.45rem;
    margin-bottom: 16px;
  }

  .book-options {
    gap: 10px;
  }

  .book-option {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
  }

  .book-icon {
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    margin: 0;
  }

  .book-icon svg {
    width: 20px;
    height: 20px;
  }

  .book-option strong {
    grid-column: 2;
    grid-row: 1;
    font-size: 1rem;
  }

  .book-price {
    position: static;
    grid-column: 3;
    grid-row: 1;
    font-size: 1.15rem;
  }

  .book-desc {
    grid-column: 2 / -1;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .book-note {
    grid-column: 2 / -1;
    font-size: 0.76rem;
  }

  .book-go {
    grid-column: 2 / -1;
    margin-top: 4px;
    font-size: 0.72rem;
  }

  .book-call {
    margin-top: 14px;
    font-size: 0.88rem;
  }
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

/* Blur behind fixed bars is expensive on phones and causes scroll stutter */
@media (max-width: 860px) {
  .site-header,
  .mobile-cta {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-header {
    background: var(--cream);
  }

  .mobile-cta {
    background: var(--cream);
  }

  .book-dialog::backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .js .reveal {
    transform: translateY(10px);
    transition-duration: 0.35s;
  }

  .js .reveal.in {
    transform: none;
  }
}

/* Touch screens: no sticky hover lifts after a tap */
@media (hover: none) {
  .btn:hover,
  .book-option:hover {
    transform: none;
  }
}
