/*
Theme Name: Ascot Roofing
Theme URI: https://ascotroofing.com/
Author: Ascot Roofing Limited
Description: A lightweight, responsive theme created for Ascot Roofing Limited.
Version: 1.0.1
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: ascot-roofing
*/

:root {
  --ink: #10243e;
  --ink-deep: #07182d;
  --blue: #0069a8;
  --blue-bright: #0087c8;
  --blue-pale: #e9f5fb;
  --yellow: #ffd400;
  --white: #ffffff;
  --mist: #f4f7f9;
  --line: #dce5ea;
  --muted: #536274;
  --success: #18794e;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(7, 24, 45, 0.12);
  --radius: 18px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .site-header {
  top: 32px;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(var(--content), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink-deep);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(16, 36, 62, 0.1);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 184px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--blue);
}

.mobile-nav {
  position: relative;
  display: none;
  margin-left: auto;
}

.mobile-nav summary {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav nav {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: min(310px, calc(100vw - 28px));
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.mobile-nav nav a {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 750;
  text-decoration: none;
}

.mobile-nav nav a:last-child {
  border-bottom: 0;
}

.mobile-nav nav a:hover,
.mobile-nav nav a:focus-visible {
  color: var(--blue);
  background: var(--blue-pale);
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.header-call:hover,
.header-call:focus-visible {
  background: var(--ink);
}

.header-call svg,
.button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 680px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--ink-deep);
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background-image: url("assets/images/hero.jpg");
  background-position: center 44%;
  background-size: cover;
  transform: scale(1.01);
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 24, 45, 0.95) 0%, rgba(7, 24, 45, 0.82) 44%, rgba(7, 24, 45, 0.25) 82%),
    linear-gradient(0deg, rgba(7, 24, 45, 0.5), transparent 45%);
}

.hero-content {
  max-width: 760px;
  padding: 88px 0 108px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--yellow);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.8rem, 6.5vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 660px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 21px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--ink-deep);
  background: var(--yellow);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #ffe45f;
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}

.button-whatsapp {
  color: #072f1b;
  background: #25d366;
}

.button-whatsapp:hover,
.button-whatsapp:focus-visible {
  background: #42df7b;
}

.hero-note {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
}

.trust-strip {
  position: relative;
  z-index: 2;
  margin-top: -48px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.trust-item {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 27px;
  border-right: 1px solid var(--line);
}

.trust-item:last-child {
  border-right: 0;
}

.trust-item strong {
  color: var(--blue);
  font-size: 1.06rem;
}

.trust-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.93rem;
}

.section {
  padding: 112px 0;
}

.section-muted {
  background: var(--mist);
}

.section-dark {
  color: var(--white);
  background: var(--ink-deep);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.8vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.section-heading p:not(.eyebrow) {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-dark .section-heading p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.72);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(7, 24, 45, 0.05);
}

.service-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-pale);
  font-size: 0.8rem;
  font-weight: 900;
}

.service-card h3 {
  margin: 24px 0 10px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.audience-card {
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 40px;
  border-radius: var(--radius);
  color: var(--white);
  background-position: center;
  background-size: cover;
}

.audience-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(7, 24, 45, 0.94), rgba(7, 24, 45, 0.08) 78%);
}

.audience-card > * {
  position: relative;
}

.audience-domestic {
  background-image: url("assets/images/domestic.jpg");
}

.audience-commercial {
  background-image: url("assets/images/commercial.jpg");
}

.audience-card h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.audience-card p {
  max-width: 530px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
}

.leak-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 70px;
  align-items: center;
}

.leak-visual {
  position: relative;
}

.leak-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.leak-badge {
  position: absolute;
  right: -22px;
  bottom: -24px;
  max-width: 230px;
  padding: 20px 22px;
  border-radius: 14px;
  color: var(--ink-deep);
  background: var(--yellow);
  box-shadow: var(--shadow);
  font-weight: 850;
  line-height: 1.3;
}

.leak-copy h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.8vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.leak-copy p {
  color: rgba(255, 255, 255, 0.75);
}

.tick-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.tick-list li {
  position: relative;
  padding-left: 30px;
}

.tick-list li::before {
  position: absolute;
  top: 0.12em;
  left: 0;
  color: var(--yellow);
  content: "✓";
  font-weight: 900;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.project-card {
  position: relative;
  min-height: 330px;
  grid-column: span 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}

.project-card:first-child,
.project-card:nth-child(5) {
  grid-column: span 8;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover img {
  transform: scale(1.035);
}

.project-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 50px 24px 22px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(7, 24, 45, 0.9), transparent);
}

.project-caption strong {
  display: block;
  font-size: 1.1rem;
}

.project-caption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-grid h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.8vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.about-copy p {
  margin-top: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.approved {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.approved span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.86rem;
  font-weight: 800;
}

.coverage {
  margin-top: 44px;
  padding: 28px;
  border-left: 5px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--blue-pale);
}

.coverage h3 {
  margin: 0 0 8px;
}

.coverage p {
  margin: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
  align-items: start;
}

.contact-copy h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.8vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.contact-copy > p {
  color: rgba(255, 255, 255, 0.72);
}

.phone-primary {
  display: inline-block;
  margin-top: 18px;
  color: var(--yellow);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.phone-primary:hover,
.phone-primary:focus-visible {
  text-decoration: underline;
}

.phone-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.contact-whatsapp {
  margin-top: 8px;
}

.contact-copy .whatsapp-note {
  max-width: 440px;
  margin: 10px 0 0;
  font-size: 0.92rem;
}

.other-phones {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.82);
}

.other-phones a {
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.contact-form {
  padding: 34px;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #b9c7d1;
  border-radius: 10px;
  color: var(--ink);
  background: var(--white);
}

.form-field textarea {
  min-height: 126px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(0, 105, 168, 0.16);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.consent input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.form-submit {
  min-height: 52px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue);
  font-weight: 850;
  cursor: pointer;
}

.form-submit:hover,
.form-submit:focus-visible {
  background: var(--ink);
}

.form-status {
  grid-column: 1 / -1;
  padding: 12px 15px;
  border-radius: 9px;
  font-weight: 750;
}

.form-status-success {
  color: var(--success);
  background: #ecfdf3;
}

.form-status-error {
  color: var(--danger);
  background: #fff1f0;
}

.company-field {
  position: absolute !important;
  left: -9999px !important;
}

.site-footer {
  color: rgba(255, 255, 255, 0.72);
  background: #04101f;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 50px;
  padding: 58px 0;
}

.footer-logo {
  width: 170px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--white);
}

.footer-main h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1rem;
}

.footer-main p {
  margin: 14px 0 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--yellow);
}

.footer-bottom {
  padding: 22px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
}

.privacy-note {
  margin-top: 18px;
  font-size: 0.78rem;
}

.privacy-note a,
.consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.privacy-hero {
  padding: clamp(5rem, 10vw, 8rem) 0 3rem;
  background: var(--ink);
  color: #fff;
}

.privacy-hero h1 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
}

.privacy-hero > .container > p:last-child {
  max-width: 46rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.15rem;
}

.privacy-content {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.privacy-copy {
  max-width: 52rem;
}

.privacy-copy h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.privacy-copy p,
.privacy-copy li {
  line-height: 1.75;
}

.privacy-copy li + li {
  margin-top: 0.65rem;
}

.page-content {
  min-height: 60vh;
  padding: 80px 0;
}

.page-content h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
}

@media (max-width: 1040px) {
  .site-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-item:nth-child(2) {
    border-right: 0;
  }

  .trust-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .leak-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .leak-visual {
    max-width: 760px;
  }
}

@media (max-width: 760px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .container {
    width: min(var(--content), calc(100% - 28px));
  }

  .header-inner {
    min-height: 72px;
  }

  .brand img {
    width: 142px;
  }

  .header-call {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
  }

  .header-call span {
    display: none;
  }

  .mobile-nav {
    margin-left: auto;
  }

  .hero {
    min-height: 650px;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(7, 24, 45, 0.94), rgba(7, 24, 45, 0.66));
  }

  .hero-content {
    padding: 74px 0 100px;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.4rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .trust-grid,
  .services-grid,
  .audience-grid,
  .form-grid,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .trust-item,
  .trust-item:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-item:last-child {
    border-bottom: 0;
  }

  .section {
    padding: 82px 0;
  }

  .audience-card {
    min-height: 370px;
    padding: 28px;
  }

  .leak-badge {
    position: relative;
    right: auto;
    bottom: auto;
    max-width: none;
    margin: -12px 18px 0;
  }

  .project-card,
  .project-card:first-child,
  .project-card:nth-child(5) {
    min-height: 300px;
    grid-column: 1 / -1;
  }

  .contact-form {
    padding: 24px;
  }

  .form-field-full {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
