/* =========================================================
   RIDGE CAP KING – STYLESHEET
   ---------------------------------------------------------
   BRAND SETTINGS: change colours and fonts here only.
   ========================================================= */
:root {
  /* Colours (from Style Guide) */
  --navy: #0c2340;              /* Primary */
  --terracotta: #d26e44;        /* Primary accent */
  --terracotta-dark: #c3452d;   /* Secondary accent */
  --blue: #5895e2;              /* Minor accent */

  /* Supporting neutrals */
  --text: #0c2340;
  --bg: #ffffff;
  --bg-soft: #f2f5f9;
  --line: #d6dde6;

  /* Fonts */
  --font-heading: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --font-body: "Aptos Display", Aptos, "Segoe UI", Calibri, Helvetica, Arial, sans-serif;

  /* Layout */
  --content-width: 46rem;   /* width of the text column */
  --wide-width: 70rem;      /* width of header / footer content */
}

/* =========================================================
   BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;       /* Impact has one weight; avoids fake bold */
  line-height: 1.1;
  margin: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--terracotta); color: var(--navy);
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--blue);
}
.site-header__inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 2.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-header h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  text-transform: uppercase;
  letter-spacing: .01em;
}
.site-header__phone {
  display: inline-block;
  margin-top: .35rem;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--blue);
  text-decoration: none;
  line-height: 1.1;
}
.site-header__phone:hover { text-decoration: underline; }
.site-header__email {
  display: block;
  font-size: .95rem;
  color: #fff;
  text-decoration: none;
  margin-top: .15rem;
}
.site-header__email:hover { text-decoration: underline; }
.site-header__logo { flex: 0 0 auto; }
.site-header__logo img { width: clamp(96px, 16vw, 170px); }

/* Compact header used on Terms / Privacy pages */
.site-header--compact .site-header__inner { padding: 1rem 1.5rem; }
.site-header--compact .site-header__logo img { width: 72px; }
.site-header__back {
  color: #fff; font-weight: 600; text-decoration: none;
}
.site-header__back:hover { text-decoration: underline; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-block;
  margin-top: 1.1rem;
  padding: .7rem 1.4rem;
  background: var(--terracotta);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.btn:hover { background: #e08358; }
.btn:active { background: var(--terracotta-dark); color: #fff; }

/* =========================================================
   IMAGE SLIDERS  (controls are added automatically by main.js)
   ========================================================= */
.slider {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  aspect-ratio: 4 / 3;
}
.slider--hero {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 700px) {
  .slider--hero { aspect-ratio: 21 / 8; max-height: 34rem; width: 100%; }
}
.slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0;
  transition: opacity .7s ease;
  pointer-events: none;
}
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
/* No-JS fallback: show the first slide */
.slider:not(.is-ready) .slide:first-child { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }

.slider__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%;
  background: rgba(12, 35, 64, .72);
  color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer;
}
.slider__btn:hover { background: var(--navy); }
.slider__btn--prev { left: .75rem; }
.slider__btn--next { right: .75rem; }

.slider__dots {
  position: absolute; left: 0; right: 0; bottom: .75rem;
  display: flex; justify-content: center; gap: .5rem;
}
.slider__dot {
  width: .8rem; height: .8rem; padding: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(12, 35, 64, .5);
}
.slider__dot[aria-current="true"] { background: var(--terracotta); border-color: var(--terracotta); }

/* =========================================================
   MAIN CONTENT COLUMN
   ========================================================= */
.section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 0;
}
.section > h2, .page > h1 {
  font-size: clamp(2.2rem, 6vw, 3rem);
  color: var(--blue);
  margin-bottom: .75rem;
}
.section--quote > h2 { color: var(--terracotta); }
.section p { margin: 0 0 1rem; }
.section .lead { font-size: 1.2rem; font-style: italic; }

.social-links { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.social-links li { margin-bottom: .6rem; }
.social-links a {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 600; text-decoration: none;
}
.social-links a:hover span.label { text-decoration: underline; }
.social-links svg { width: 2rem; height: 2rem; flex: 0 0 auto; }

/* =========================================================
   SERVICES ACCORDION  (<details> – works without JavaScript)
   ========================================================= */
.accordion { margin-top: 1rem; border-top: 2px solid #b3b3b3; }
.service { border-bottom: 2px solid #b3b3b3; }
.service summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  line-height: 1.1;
  cursor: pointer;
}
.service summary::-webkit-details-marker { display: none; }
.service summary::after {
  content: "";
  flex: 0 0 auto;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background-color: var(--terracotta);
  /* Down arrow (navy). To change its colour, replace %230c2340 below with another hex code (keep the %23 in place of the #). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c2340' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.1rem;
  transition: transform .2s ease;
}
.service[open] summary::after { transform: rotate(180deg); }  /* arrow flips to point up when open */
@media (prefers-reduced-motion: reduce) { .service summary::after { transition: none; } }
.service summary:hover { color: var(--terracotta-dark); }
.service__body { padding: 0 0 1.75rem; }
.service__body > :last-child { margin-bottom: 0; }
.service__body h3 {
  font-size: 1.35rem; margin: 1.5rem 0 .5rem; color: var(--terracotta-dark);
}

/* YouTube embed – responsive 16:9 */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =========================================================
   CONTACT FORM
   ========================================================= */
.quote-form { margin-top: 1.25rem; display: grid; gap: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .3rem; }
.field .req { color: var(--terracotta-dark); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: var(--text);
  padding: .7rem .8rem;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 3px;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--blue); outline-offset: 1px;
}
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field .hint { font-size: .9rem; margin: .35rem 0 0; }
.field .optional { font-weight: 400; font-size: .9rem; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { font-weight: 700; padding: 0; margin-bottom: .4rem; }
.choices label { display: flex; align-items: center; gap: .6rem; font-weight: 400; margin-bottom: .35rem; cursor: pointer; }
.choices input { width: 1.2rem; height: 1.2rem; accent-color: var(--terracotta-dark); flex: 0 0 auto; margin: 0; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }  /* spam trap – leave */
.form-note { font-size: .9rem; margin: 0; }
.quote-form .btn { justify-self: start; margin-top: 0; padding: .85rem 2rem; font-size: 1.05rem; }

/* =========================================================
   LEGAL / MESSAGE PAGES
   ========================================================= */
.page { max-width: var(--content-width); margin: 0 auto; padding: 3rem 1.5rem 1rem; }
.page h2 { font-size: 1.6rem; margin: 2.25rem 0 .5rem; }
.page h3 { font-size: 1.2rem; margin: 1.25rem 0 .4rem; color: var(--terracotta-dark); }
.page p, .page ul { margin: 0 0 1rem; }
.page ul { padding-left: 1.25rem; }
.page li { margin-bottom: .3rem; }
.message-box {
  border-left: 6px solid var(--terracotta);
  background: var(--bg-soft);
  padding: 1.25rem 1.5rem;
  font-size: 1.15rem;
}
.message-box--error { border-left-color: var(--terracotta-dark); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  margin-top: 4rem;
  background: var(--navy);
  color: #fff;
  border-top: 4px solid var(--blue);
  text-align: center;
  padding: 1.5rem 1.5rem 1.75rem;
  font-size: .9rem;
}
.site-footer img { height: 2.1rem; width: auto; margin: 0 auto .6rem; }
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .sep { margin: 0 .5rem; opacity: .7; }

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 560px) {
  .site-header__inner { padding: 1.5rem 1.25rem; align-items: flex-start; }
  .service summary { font-size: 1.5rem; }
  .site-footer .sep { display: none; }
  .site-footer .footer-line > span:not(.sep), .site-footer .footer-line > a { display: block; margin: .2rem 0; }
}
