/* =====================================================================
   A First Choice Roofing — Realtor Video Landing Page
   Palette derived from the logo: deep roofing red (#B70900) + black.
   System font stack (no external fonts). No build step required.
   ===================================================================== */

:root {
  /* Brand */
  --brand-red: #b70900;
  --brand-red-dark: #920700;
  --brand-red-darker: #6f0500;

  /* Ink & neutrals */
  --ink: #16181d;
  --ink-soft: #3d434e;
  --muted: #6a7280;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;

  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-dark: #16181d;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 6px 16px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 18px 40px rgba(16, 24, 40, 0.16);

  --radius: 10px;
  --radius-lg: 16px;

  --container: 1120px;
  --header-h: 72px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden; /* guard against accidental horizontal overflow */
}

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

a {
  color: var(--brand-red-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  font-weight: 800;
}
h3 {
  font-size: 1.18rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

/* --------------------------- Accessibility -------------------------- */
:focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 12px;
}

/* ----------------------------- Layout ------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 40px);
}

.container.narrow {
  max-width: 760px;
}

.section {
  padding-block: clamp(48px, 8vw, 88px);
}

.section-soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-red);
  margin: 0 0 0.6rem;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ----------------------------- Buttons ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, transform 0.05s ease;
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}
.btn-primary:hover {
  background: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--brand-red-dark);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--brand-red);
  color: var(--brand-red-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-red-dark);
  border-color: var(--brand-red);
}
.btn-ghost:hover {
  background: rgba(183, 9, 0, 0.06);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1.75rem;
}
.button-row-center {
  justify-content: center;
}

/* ----------------------------- Header ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo {
  height: 42px;
  width: auto;
}
/* Company name kept as accessible text; visually hidden because the logo
   already spells it out, but available to screen readers and for context. */
.brand-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-cta {
  min-height: 42px;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
}

/* ------------------------------- Hero ------------------------------- */
.hero {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(183, 9, 0, 0.06) 0%, rgba(183, 9, 0, 0) 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  padding-block: clamp(52px, 9vw, 96px);
  max-width: 820px;
}
.hero-copy {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

/* --------------------------- Video section -------------------------- */
.video-figure {
  margin: 0;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(140% 120% at 50% 0%, #23262d 0%, #16181d 70%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Fallback for very old browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
  .video-frame {
    height: 0;
    padding-bottom: 56.25%;
  }
}

.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.video-fallback {
  color: #fff;
  padding: 1.5rem;
  text-align: center;
}
.video-fallback a {
  color: #ffb4ad;
}

/* Polished placeholder if the video file has not been added yet */
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: #f4f5f7;
  background:
    radial-gradient(120% 120% at 50% 0%, #26292f 0%, #16181d 72%);
  /* Never intercept clicks meant for the video controls */
  pointer-events: none;
}
/* An author `display` value would otherwise override the UA [hidden] rule,
   leaving this overlay on top of the video permanently. Restore it. */
.video-placeholder[hidden] {
  display: none;
}
.video-placeholder-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  background: var(--brand-red);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}
.video-placeholder-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.video-placeholder-text {
  margin: 0;
  color: #c3c7ce;
  font-size: 0.95rem;
}
.video-placeholder code {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}

.video-caption {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.video-topics {
  margin-top: clamp(32px, 5vw, 52px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 34px);
}
.topics-heading {
  margin-top: 0;
}
.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px 28px;
}
.topic-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
}
.topic-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  background: var(--brand-red);
  /* Roof / chevron shaped marker */
  clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%);
}

/* ------------------------------ Cards ------------------------------- */
.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--brand-red);
}
.card-title {
  margin-top: 0;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* ------------------------------ About ------------------------------- */
.about-copy {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------------------------- Contact CTA --------------------------- */
.cta-section {
  background: var(--bg-dark);
  color: #f4f5f7;
  text-align: center;
}
.cta-section h2 {
  color: #fff;
}
.cta-copy {
  color: #cdd1d8;
  font-size: 1.1rem;
  max-width: 56ch;
  margin-inline: auto;
}
.cta-section .btn-secondary {
  background: #fff;
}
.cta-section .btn-ghost {
  color: #ffb4ad;
  border-color: #ffb4ad;
}
.cta-section .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.contact-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  font-size: 1rem;
}
.contact-list a {
  color: #fff;
  font-weight: 600;
}
.contact-label {
  color: #9aa0aa;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-right: 6px;
}

/* --------------------------- Contact form --------------------------- */
.contact-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.contact-form {
  margin-top: clamp(20px, 4vw, 32px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.field .opt {
  font-weight: 400;
  color: var(--muted);
}
.req {
  color: var(--brand-red);
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  min-height: 48px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea {
  resize: vertical;
  min-height: 120px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(183, 9, 0, 0.18);
}
/* Native validation styling once the user has interacted */
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--brand-red);
}

/* Consent checkbox row */
.consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.45;
  cursor: pointer;
}
.consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--brand-red);
}

/* Honeypot: removed from the visual/AT flow but still submitted so bots
   that auto-fill fields will trip it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 22px;
}
.form-actions .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.form-required-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.form-status {
  margin: 18px 0 0;
  padding: 0;
  font-weight: 600;
  font-size: 1rem;
}
.form-status:empty {
  display: none;
}
.form-status.is-success {
  color: #0f7a34;
  background: #e7f6ec;
  border: 1px solid #b7e3c4;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.form-status.is-error {
  color: var(--brand-red-darker);
  background: #fdeceb;
  border: 1px solid #f5c6c2;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------ Footer ------------------------------ */
.site-footer {
  background: #0f1013;
  color: #b9bec7;
  padding-block: clamp(32px, 5vw, 48px);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.footer-logo {
  height: 44px;
  width: auto;
  /* Logo art is red + black on transparent; a light plate keeps it legible
     on the dark footer without altering the original file. */
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}
.footer-links a {
  color: #e6e8ec;
  font-weight: 600;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-note,
.footer-copy {
  margin: 0;
  font-size: 0.88rem;
  color: #8b909a;
}

/* --------------------------- Responsive ----------------------------- */
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .header-cta {
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
  }
  .brand-logo {
    height: 36px;
  }
  .btn {
    width: 100%;
  }
  .button-row .btn {
    flex: 1 1 100%;
  }
}

/* Keep header from eating too much height on short mobile screens */
@media (max-width: 380px) {
  :root {
    --header-h: 64px;
  }
  .brand-logo {
    height: 32px;
  }
}

/* --------------------------- Reduced motion ------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
