/* ============================================================
   RK Roofing North Wales — styles
   Colours, fonts and layout recreated from the original site.
   Colours are stored as HSL values so they're easy to tweak.
   ============================================================ */

:root {
  --background: 200 8% 12%;
  --foreground: 40 10% 90%;
  --card: 200 8% 16%;
  --primary: 200 6% 8%;
  --primary-foreground: 40 10% 92%;
  --secondary: 200 6% 20%;
  --secondary-foreground: 40 10% 85%;
  --muted-foreground: 200 5% 55%;
  --border: 200 6% 22%;
  --cta: 35 80% 52%;
  --cta-foreground: 200 10% 8%;
  --section-alt: 200 7% 14%;

  --radius: 0.5rem;
  --header-h: 5rem;

  --font-display: "Montserrat", sans-serif;
  --font-heading: "Oswald", sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

/* ----------------------------- reset ----------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-cta {
  color: hsl(var(--cta));
}
.text-cta {
  color: hsl(var(--cta));
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ----------------------------- buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-sm {
  font-size: 0.8125rem;
  padding: 0.5rem 0.9rem;
}
.btn-lg {
  font-size: 1rem;
  padding: 0.85rem 2rem;
}
.btn-block {
  width: 100%;
}
.btn .icon {
  width: 1.15rem;
  height: 1.15rem;
}
.btn-lg .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-cta {
  background-color: hsl(var(--cta));
  color: hsl(var(--cta-foreground));
}
.btn-cta:hover {
  background-color: hsl(var(--cta) / 0.9);
}

.btn-outline {
  background-color: transparent;
  border-color: hsl(var(--foreground) / 0.3);
  color: hsl(var(--foreground));
}
.btn-outline:hover {
  background-color: hsl(var(--foreground) / 0.1);
}

/* ----------------------------- header ----------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: hsl(var(--primary) / 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid hsl(var(--border));
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand-logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  object-fit: cover;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.main-nav a:hover {
  color: hsl(var(--foreground));
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.btn-outline.btn-sm {
  border-color: hsl(var(--muted-foreground) / 0.3);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: hsl(var(--foreground));
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle .icon {
  width: 1.6rem;
  height: 1.6rem;
}

/* ----------------------------- hero ----------------------------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsla(200, 8%, 6%, 0.92), hsla(200, 6%, 12%, 0.8));
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.hero-logo {
  width: 10rem;
  height: 10rem;
  border-radius: 9999px;
  object-fit: cover;
  margin-bottom: 2rem;
  border: 2px solid hsl(var(--cta) / 0.3);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.6);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  letter-spacing: 0.05em;
  max-width: 48rem;
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: hsl(var(--foreground) / 0.7);
  max-width: 36rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground) / 0.6);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ----------------------------- sections ----------------------------- */
.section {
  padding: 4rem 0;
}
.section-tight {
  padding: 2.5rem 0;
}
.section-alt {
  background-color: hsl(var(--section-alt));
}
@media (min-width: 768px) {
  .section {
    padding: 6rem 0;
  }
  .section-tight {
    padding: 3.5rem 0;
  }
}

.section-head {
  text-align: center;
  margin-bottom: 2rem;
}
.eyebrow {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8125rem;
  color: hsl(var(--cta));
}
.section-head h2,
.areas-inner h2,
.quote-copy h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  margin-top: 0.4rem;
}
.section-lead {
  font-family: var(--font-body);
  color: hsl(var(--muted-foreground));
  max-width: 36rem;
  margin: 0.6rem auto 0;
  font-size: 0.95rem;
}

/* ----------------------------- services ----------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.service-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  border-color: hsl(var(--cta) / 0.4);
  transform: translateY(-2px);
}
.service-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: var(--radius);
  background-color: hsl(var(--cta) / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-icon .icon {
  color: hsl(var(--cta));
}
.service-card h3 {
  font-size: 1rem;
  letter-spacing: 0.05em;
}
.service-card p {
  font-family: var(--font-body);
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 0.1rem;
}

/* ----------------------------- why choose us ----------------------------- */
.reasons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .reasons-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.reason {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.reason-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background-color: hsl(var(--cta) / 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.reason-icon .icon {
  width: 1rem;
  height: 1rem;
  color: hsl(var(--cta));
}
.reason h3 {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.reason p {
  font-family: var(--font-body);
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* ----------------------------- recent work carousel ----------------------------- */
.carousel {
  max-width: 56rem;
  margin: 0 auto;
}
.carousel-frame {
  position: relative;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}
.carousel-track {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: hsl(var(--background));
}
@media (min-width: 640px) {
  .carousel-track {
    aspect-ratio: 16 / 10;
  }
}
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.slide.is-active {
  opacity: 1;
}
.carousel-btn {
  position: absolute;
  background-color: hsl(var(--background) / 0.7);
  color: hsl(var(--foreground));
  border: none;
  border-radius: 9999px;
  padding: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  display: flex;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.carousel-btn:hover {
  background-color: hsl(var(--cta));
  color: hsl(var(--cta-foreground));
}
.carousel-prev {
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}
.carousel-next {
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}
.carousel-toggle {
  top: 0.75rem;
  right: 0.75rem;
}
.carousel-toggle .icon {
  width: 1rem;
  height: 1rem;
}
.carousel-caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
}
.carousel-caption h3 {
  letter-spacing: 0.05em;
}
.carousel-caption p {
  font-family: var(--font-body);
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
.carousel-location {
  display: block;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: hsl(var(--cta));
  margin-top: 0.5rem;
}
.carousel-count {
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.dot {
  height: 0.5rem;
  width: 0.5rem;
  border: none;
  border-radius: 9999px;
  background-color: hsl(var(--border));
  cursor: pointer;
  transition: width 0.3s ease, background-color 0.2s ease;
}
.dot:hover {
  background-color: hsl(var(--cta) / 0.5);
}
.dot.is-active {
  width: 2rem;
  background-color: hsl(var(--cta));
}

/* ----------------------------- areas ----------------------------- */
.areas-inner {
  text-align: center;
}
.areas-inner .section-lead {
  margin-bottom: 1.5rem;
}
.areas-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 48rem;
  margin: 0 auto;
}
.area-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}
.area-pill .icon {
  width: 0.75rem;
  height: 0.75rem;
}

/* ----------------------------- faq ----------------------------- */
.faq-inner {
  max-width: 42rem;
}
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.accordion-item {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0 1.25rem;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  padding: 1.1rem 0;
}
.accordion-chevron {
  transition: transform 0.2s ease;
}
.accordion-trigger[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
}
.accordion-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}
.accordion-panel p {
  font-family: var(--font-body);
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  padding-bottom: 1.1rem;
}

/* ----------------------------- quote ----------------------------- */
.quote-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 64rem;
}
@media (min-width: 768px) {
  .quote-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}
.quote-copy h2 {
  margin-bottom: 1rem;
}
.quote-copy p {
  font-family: var(--font-body);
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.125rem;
  transition: background-color 0.2s ease;
}
.phone-cta:hover {
  background-color: hsl(var(--secondary) / 0.8);
}
.phone-cta .icon {
  width: 1.5rem;
  height: 1.5rem;
}
.quote-form {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.quote-form input,
.quote-form textarea {
  width: 100%;
  background-color: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  resize: vertical;
}
.quote-form input::placeholder,
.quote-form textarea::placeholder {
  color: hsl(var(--muted-foreground));
}
.quote-form input:focus,
.quote-form textarea:focus {
  outline: 2px solid hsl(var(--cta) / 0.6);
  outline-offset: 1px;
}
.hidden-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.form-status {
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em;
}
.form-status.is-success {
  color: hsl(var(--cta));
}
.form-status.is-error {
  color: #f87171;
}

/* ----------------------------- footer ----------------------------- */
.site-footer {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 3rem 0;
  border-top: 1px solid hsl(var(--border));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.footer-logo {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  object-fit: cover;
  margin-bottom: 1rem;
}
.footer-about {
  font-family: var(--font-body);
  color: hsl(var(--primary-foreground) / 0.6);
  font-size: 0.875rem;
  line-height: 1.6;
}
.site-footer h4 {
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-links,
.footer-contact {
  list-style: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: hsl(var(--primary-foreground) / 0.6);
}
.footer-links li {
  margin-bottom: 0.5rem;
}
.footer-links a:hover,
.footer-contact a:hover {
  color: hsl(var(--cta));
}
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.footer-contact .icon {
  width: 1rem;
  height: 1rem;
}
.footer-bottom {
  border-top: 1px solid hsl(var(--primary-foreground) / 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: hsl(var(--primary-foreground) / 0.4);
}

/* ----------------------------- responsive nav ----------------------------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: hsl(var(--primary) / 0.98);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid hsl(var(--border));
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }
  .main-nav.is-open {
    display: flex;
  }
  .main-nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid hsl(var(--border));
  }
  .main-nav a:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .hide-xs {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
