/* ==========================================================================
   Faryearny Design & Build — paid traffic funnel
   Mobile-first (390px). Vanilla CSS, no framework.

   BRAND COLOURS: taken from faryearnybuildingservices.co.uk (orange, white,
   charcoal). Every colour on the funnel comes from these tokens.
   ========================================================================== */

:root {
  --ink: #16191c;          /* near-black text + dark sections */
  --charcoal: #22272b;     /* secondary dark */
  --stone: #f5f2ec;        /* off-white sections */
  --white: #ffffff;
  --line: #e2dccf;         /* hairlines on light sections */
  --muted: #565c62;        /* secondary text on light */
  --muted-dark: #b9b4aa;   /* secondary text on dark */
  --accent: #d4570f;       /* Faryearny orange — buttons + highlights */
  --accent-dark: #bf4e0d;  /* accent darkened 10% for hover */
  --on-accent: #ffffff;    /* text on accent buttons */

  --font-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 24px;
  --section-y: 60px;
  --measure: 640px;
  --wide: 1180px;
}

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --section-y: 100px;
  }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

@media (min-width: 900px) {
  body { font-size: 18px; }
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
}

h2 { font-size: 28px; }
h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }

@media (min-width: 900px) {
  h2 { font-size: 40px; }
  h3 { font-size: 21px; }
}

p { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Layout helpers ---------- */

.section { padding: var(--section-y) var(--gutter); }
.section--stone { background: var(--stone); }
.section--dark { background: var(--ink); color: var(--white); }

.wrap { max-width: var(--wide); margin: 0 auto; }
.measure { max-width: var(--measure); }

.section-head { margin-bottom: 36px; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.section--dark .section-head p { color: var(--muted-dark); }

@media (min-width: 900px) {
  .section-head { margin-bottom: 52px; }
}

.kicker {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.section--dark .kicker,
.on-image .kicker { color: var(--accent); }

/* ---------- Buttons ---------- */

.btn {
  display: block;
  width: 100%;
  padding: 18px 28px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover,
.btn:focus-visible { background: var(--accent-dark); }

@media (min-width: 640px) {
  .btn { display: inline-block; width: auto; }
}

.friction {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
}
.section--dark .friction,
.hero .friction,
.on-image .friction { color: rgba(255, 255, 255, 0.82); }

.cta-row { margin-top: 40px; }

/* ---------- Top bar (logo + phone only, no nav) ---------- */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  color: var(--white);
}

.topbar--solid {
  position: static;
  background: var(--ink);
}

.logo {
  display: inline-block;
  padding: 6px 0 0 10px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  text-decoration: none;
}
.logo span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.logo em { font-style: normal; color: var(--accent); }

.topbar__phone {
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.topbar__phone small {
  display: none;
  font-weight: 400;
  opacity: 0.8;
  margin-right: 6px;
}

@media (min-width: 640px) {
  .topbar__phone small { display: inline; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 80vh;
  min-height: 80svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px var(--gutter) 48px;
  color: var(--white);
  text-align: center;
  background: var(--charcoal);
  overflow: hidden;
}

@media (min-width: 900px) {
  .hero { min-height: 94vh; padding-top: 120px; padding-bottom: 64px; }
}

.hero__img,
.hero__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 18, 0.62);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}

.hero h1 {
  font-size: 36px;
  color: var(--white);
}

.hero__sub {
  max-width: 600px;
  margin: 18px auto 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
}

.hero .cta-row { margin-top: 30px; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 34px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
}
.trust-strip strong { color: var(--white); }

@media (min-width: 900px) {
  .hero h1 { font-size: 56px; }
  .hero__sub { font-size: 20px; }
  .trust-strip { font-size: 15px; }
}

/* ---------- Form section ---------- */

.form-section { scroll-margin-top: 0; }

.form-grid {
  display: grid;
  gap: 36px;
}

@media (min-width: 960px) {
  .form-grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 64px;
    align-items: start;
  }
}

.form-intro p { margin-top: 14px; color: var(--muted); }

.form-intro .phone-alt {
  margin-top: 22px;
  font-size: 16px;
  color: var(--ink);
}
.form-intro .phone-alt a { font-weight: 700; }

/* Reserve the embed's height up front so nothing jumps when it loads */
.form-embed {
  min-height: 745px;
  background: var(--stone);
  border-radius: 8px;
}
.form-embed iframe {
  display: block;
  width: 100%;
  height: 745px;
  border: 0;
  border-radius: 8px;
}

/* ---------- Credibility band ---------- */

.figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .figures { grid-template-columns: repeat(4, auto); justify-content: space-between; }
}

.figures li { border-top: 2px solid var(--accent); padding-top: 14px; }

.figures strong {
  display: block;
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: var(--white);
}
.figures span {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted-dark);
}

@media (min-width: 900px) {
  .figures strong { font-size: 48px; }
}

/* ---------- Problem ---------- */

.pains {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.pains li {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.pains h3 { margin-bottom: 6px; }
.pains p { color: var(--muted); }

@media (min-width: 900px) {
  .pains {
    grid-template-columns: 1fr 1fr;
    column-gap: 64px;
  }
  .pains li { padding: 28px 0; }
}

/* ---------- Mechanism: flush image grid with overlaid captions ---------- */

.mech-head {
  padding: var(--section-y) var(--gutter) 40px;
  background: var(--ink);
  color: var(--white);
}
.mech-head p { margin-top: 12px; color: var(--muted-dark); font-size: 18px; }

.mech-grid {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--ink);
}

@media (min-width: 760px) {
  .mech-grid { grid-template-columns: 1fr 1fr; }
}

.mech-tile {
  position: relative;
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  color: var(--white);
}

@media (min-width: 1100px) {
  .mech-tile { min-height: 520px; }
}

.mech-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mech-tile figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 90px var(--gutter) 28px;
  background: linear-gradient(to top, rgba(14, 16, 18, 0.92) 0%, rgba(14, 16, 18, 0.7) 55%, rgba(14, 16, 18, 0) 100%);
}

.mech-tile .num {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.mech-tile h3 { font-size: 22px; }
.mech-tile p { margin-top: 6px; max-width: 460px; color: rgba(255, 255, 255, 0.86); }

@media (min-width: 900px) {
  .mech-tile h3 { font-size: 26px; }
}

/* ---------- How it works ---------- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 0 0 30px 64px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -6px;
  font-family: var(--font-head);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); }

@media (min-width: 900px) {
  .steps {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1.2fr;
    gap: 48px;
  }
  .steps li { padding: 64px 0 0; border-top: 1px solid var(--line); }
  .steps li::before { top: 16px; }
}

/* ---------- What you get: image + list split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--stone);
}

.split__img {
  position: relative;
  min-height: 400px;
  margin: 0;
}
.split__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__body { padding: var(--section-y) var(--gutter); }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split__img { min-height: 640px; }
  .split__body { padding-left: 64px; padding-right: var(--gutter); align-self: center; }
}

.ticks {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  max-width: 540px;
}
.ticks li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-bottom: 1px solid var(--line);
}
.ticks li:first-child { border-top: 1px solid var(--line); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 22px;
  width: 14px; height: 8px;
  border-left: 3px solid var(--accent-dark);
  border-bottom: 3px solid var(--accent-dark);
  transform: rotate(-45deg);
}

/* ---------- Proof gallery ---------- */

.gallery-head {
  padding: var(--section-y) var(--gutter) 40px;
  background: var(--ink);
  color: var(--white);
}
.gallery-head p { margin-top: 12px; color: var(--muted-dark); font-size: 18px; }

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--ink);
}

.gallery figure {
  position: relative;
  min-height: 400px;
  margin: 0;
  overflow: hidden;
}

.gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery figcaption {
  position: absolute;
  left: 0; bottom: 0;
  padding: 10px 16px;
  background: rgba(14, 16, 18, 0.82);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
}

@media (min-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .wide { grid-column: 1 / -1; min-height: 560px; }
}

@media (min-width: 1100px) {
  .gallery figure { min-height: 480px; }
  .gallery .wide { min-height: 680px; }
}

/* Testimonial overlaid on a project image (ready for a real quote) */
.quote-tile figcaption {
  inset: auto 0 0 0;
  padding: 80px var(--gutter) 32px;
  background: linear-gradient(to top, rgba(14, 16, 18, 0.94), rgba(14, 16, 18, 0));
  font-weight: 400;
}
.quote-tile blockquote {
  margin: 0;
  font-family: var(--font-head);
  font-size: 22px;
  line-height: 1.35;
}
.quote-tile cite { display: block; margin-top: 10px; font-style: normal; font-size: 15px; color: rgba(255, 255, 255, 0.82); }
.quote-tile .stars { display: block; margin-bottom: 10px; color: var(--accent); letter-spacing: 0.15em; }

@media (min-width: 900px) {
  .quote-tile blockquote { font-size: 26px; max-width: 760px; }
}

.gallery-cta {
  padding: 48px var(--gutter) var(--section-y);
  background: var(--ink);
  color: var(--white);
}

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }

.faq__item { border-bottom: 1px solid var(--line); }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 22px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.faq__icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px; height: 18px;
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 18px; height: 2px;
  background: var(--accent-dark);
  transition: transform 0.2s ease;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: rotate(0deg); }

.faq__a { padding: 0 0 24px; color: var(--muted); max-width: var(--measure); }
.faq__a[hidden] { display: none; }

/* No-JS fallback: answers stay visible */
.no-js .faq__a[hidden] { display: block; }

/* ---------- Final CTA on image ---------- */

.final {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-y) var(--gutter);
  text-align: center;
  color: var(--white);
  overflow: hidden;
  background: var(--charcoal);
}
.final > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.final::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 18, 0.66);
}
.final__inner { position: relative; z-index: 1; max-width: 680px; }
.final p { margin-top: 14px; font-size: 18px; color: rgba(255, 255, 255, 0.9); }
.final .cta-row { margin-top: 30px; }
.final .phone-line { margin-top: 18px; font-size: 16px; }
.final .phone-line a { font-weight: 700; }

/* ---------- Thank-you page ---------- */

.ty-hero {
  padding: 56px var(--gutter) var(--section-y);
  background: var(--stone);
}

.ty-hero h1 { font-size: 34px; max-width: 760px; }
.ty-hero .sub { margin-top: 14px; font-size: 19px; color: var(--muted); }

@media (min-width: 900px) {
  .ty-hero { padding-top: 88px; }
  .ty-hero h1 { font-size: 52px; }
}

.ty-steps {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  max-width: 720px;
}
.ty-steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 12px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.ty-steps li:last-child { border-bottom: 1px solid var(--line); }
.ty-steps .n {
  grid-row: span 2;
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.ty-reinforce {
  margin-top: 32px;
  max-width: 720px;
  padding: 20px 22px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  border-radius: 4px;
}

.ty-help { margin-top: 20px; max-width: 720px; color: var(--muted); }
.ty-help a { color: var(--ink); font-weight: 700; }

.strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.strip figure {
  position: relative;
  min-height: 220px;
  margin: 0;
}
.strip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 900px) {
  .strip { grid-template-columns: repeat(4, 1fr); }
  .strip figure { min-height: 400px; }
}

/* ---------- Legal pages ---------- */

.legal h1 { font-size: 34px; margin-bottom: 8px; }
.legal h2 { font-size: 22px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink); }
.legal p + p { margin-top: 12px; }
.legal .placeholder-note {
  margin: 20px 0 8px;
  padding: 14px 16px;
  background: var(--stone);
  border-left: 3px solid var(--accent);
  font-size: 15px;
}
.legal .back { display: inline-block; margin-top: 40px; font-weight: 700; }

/* ---------- Footer ---------- */

.footer {
  padding: 48px var(--gutter);
  background: var(--ink);
  color: var(--muted-dark);
  font-size: 15px;
}
.footer .logo { color: var(--white); }
.footer p { margin-top: 12px; max-width: 460px; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.footer__links a { color: var(--white); }
.footer small { display: block; margin-top: 24px; font-size: 13px; }

/* Room for the sticky bar on mobile (landing page only) */
.has-sticky .footer { padding-bottom: 120px; }

@media (min-width: 900px) {
  .has-sticky .footer { padding-bottom: 48px; }
}

/* ---------- Sticky mobile CTA ---------- */

.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--ink);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(110%);
  transition: transform 0.2s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }

.sticky-cta .btn { flex: 1 1 auto; padding: 15px 16px; font-size: 16px; }

.sticky-cta__call {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 4px;
  background: var(--charcoal);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.sticky-cta__call:hover { background: #2c3236; }

@media (min-width: 900px) {
  .sticky-cta {
    left: auto;
    right: 24px;
    bottom: 24px;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .sticky-cta__call { display: none; }
  .sticky-cta .btn { padding: 16px 26px; }
}
