/* Alabama Reliable Roofing — rebrand in the company's own colors
   Extracted from alabamareliableroofing.com:
     brick  #702014  (exact logo pigment — Alabama state mark)
     red    #CA181E  (site theme accent / buttons)
     ink    #111922  (site theme dark)
     slate  #5A5A68  (site theme gray)
     fog    #F8F8F8  (site theme light bg)
   Light theme: white/fog surfaces, ink text, red + brick as identity. */

:root {
  --red: #CA181E;
  --red-dark: #A21015;
  --brick: #702014;
  --brick-deep: #591A10;
  --ink: #111922;
  --slate: #5A5A68;
  --fog: #F8F8F8;
  --white: #FFFFFF;
  --line: #E6E4E1;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --radius: 8px;
  --container: 1140px;
  --callbar-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--red); }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.15s ease;
}

.skip-link:focus { top: 0; }

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.02;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

h1 {
  font-size: clamp(3rem, 10.5vw, 5.4rem);
  font-weight: 700;
  color: var(--white);
}

h1 em {
  font-style: normal;
  color: #FFB4AE;
  position: relative;
}

h2 {
  font-size: clamp(2.1rem, 5.6vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  max-width: 24ch;
}

h3 {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.spec-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

.spec-label .chalk {
  display: inline-block;
  width: 34px;
  height: 2px;
  background: var(--red);
  flex: none;
}

.spec-label-light { color: #FFB4AE; }
.spec-label-light .chalk { background: #FFB4AE; }

.section-lead {
  max-width: 58ch;
  color: var(--slate);
  margin-bottom: 2.5rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn svg { width: 18px; height: 18px; flex: none; }

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 12px rgba(202, 24, 30, 0.3);
}
.btn-red:hover { background: var(--red-dark); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9); }

.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-ink:hover { background: #26313D; }

.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */

.site-header {
  background: var(--white, #fff);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  min-height: 44px;
}

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

.site-nav {
  display: none;
  margin-left: auto;
  gap: 26px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--red); border-bottom-color: var(--red); }

.header-call { display: none; margin-left: auto; }

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .header-call { display: inline-flex; margin-left: 0; }
  .brand img { height: 44px; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  color: var(--white);
  padding: clamp(88px, 15vw, 168px) 0 clamp(130px, 17vw, 190px);
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 38%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg,
      rgba(17, 25, 34, 0.9) 0%,
      rgba(17, 25, 34, 0.72) 42%,
      rgba(64, 24, 16, 0.42) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.hero-copy { max-width: 640px; }

.hero-sub {
  max-width: 50ch;
  margin-top: 1.25rem;
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2rem;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin-top: 2.25rem;
}

.hero-chips li {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(17, 25, 34, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* photo credit chip */
.hero-tag {
  position: absolute;
  right: 18px;
  bottom: clamp(56px, 9vw, 104px);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(17, 25, 34, 0.55);
  padding: 6px 10px;
  border-radius: 4px;
  display: none;
}

@media (min-width: 720px) { .hero-tag { display: block; } }

/* rooflines (signature dividers) */
.roofline {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: clamp(44px, 7vw, 90px);
  z-index: 3;
}

.roofline-hero { bottom: -1px; }
.roofline-top { top: -1px; }

/* ---------- sections ---------- */

.section { padding: clamp(64px, 9vw, 110px) 0; }

/* ---------- work gallery ---------- */

.section-work { padding-top: clamp(48px, 7vw, 76px); }

.work-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  justify-content: space-between;
}

.work-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 2.2rem;
}

.work-grid {
  display: grid;
  gap: 14px;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 340px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 20px 12px;
  margin: 0 -20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.work-grid::-webkit-scrollbar { display: none; }

.work-item {
  scroll-snap-align: center;
  margin: 0;
}

.work-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--fog);
}

.work-item figcaption {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 2px 0;
  font-size: 0.92rem;
  color: var(--slate);
}

.work-kind {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brick);
  white-space: nowrap;
}

@media (min-width: 900px) {
  .work-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: unset;
    overflow: visible;
    padding: 0;
    margin: 0;
    gap: 20px;
  }
  .work-item-wide { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
  .work-item-wide img { flex: 1; height: 100%; aspect-ratio: auto; min-height: 0; object-position: 50% 22%; }
}

/* ---------- services ---------- */

.section-services { background: var(--fog); }

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(17, 25, 34, 0.1);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--red);
  margin-bottom: 16px;
}

.card p { color: var(--slate); font-size: 0.98rem; }

/* ---------- stats band (logo brick) ---------- */

.stats-band {
  position: relative;
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px,
      transparent 2px, transparent 72px),
    var(--brick);
  color: var(--white);
  padding: clamp(120px, 16vw, 170px) 0 clamp(64px, 9vw, 100px);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 16px;
  margin-top: 1.5rem;
}

@media (min-width: 900px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat dd {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.stat dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E8B7AD;
  margin-bottom: 8px;
}

/* ---------- storm / split ---------- */

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

@media (min-width: 960px) {
  .split { grid-template-columns: 7fr 5fr; gap: 64px; }
}

.split-copy > p { color: var(--slate); max-width: 56ch; }

.claim-steps {
  list-style: none;
  counter-reset: step;
  margin: 1.75rem 0 2rem;
  display: grid;
  gap: 18px;
}

.claim-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  color: var(--slate);
}

.claim-steps li strong { color: var(--ink); }

.claim-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  background: var(--brick);
  border-radius: 50%;
}

.split-panel {
  display: grid;
  gap: 16px;
}

.panel-block {
  background: var(--fog);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.panel-block p { color: var(--slate); font-size: 0.98rem; }

.panel-logo {
  height: 44px;
  width: auto;
  margin-bottom: 14px;
}

.storm-photo { margin: 0; }

.storm-photo img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.storm-photo figcaption {
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---------- about ---------- */

.section-about { background: var(--fog); }

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

@media (min-width: 960px) {
  .about-grid { grid-template-columns: 7fr 5fr; gap: 64px; }
}

.about-grid p { color: var(--slate); max-width: 56ch; margin-bottom: 1rem; }

.hours-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
}

.hours-table th, .hours-table td {
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

.hours-table th { font-weight: 600; color: var(--ink); }
.hours-table td { text-align: right; color: var(--slate); }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }

.hours-card .btn { width: 100%; }

/* ---------- service area ---------- */

.service-area { margin-top: 2.25rem; }

.service-area > p { color: var(--slate); max-width: 56ch; }

.area-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
}

.area-chips li {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brick);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 4px;
  padding: 7px 12px;
}

.area-note {
  font-size: 0.95rem;
  color: var(--slate);
}

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

.section-faq .faq-list {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\2013";
  transform: rotate(180deg);
}

.faq-item summary:hover { color: var(--red); }

.faq-a { padding: 0 20px 18px; }

.faq-a p { color: var(--slate); max-width: 62ch; }

/* ---------- estimate / contact ---------- */

.section-estimate { position: relative; }

.estimate-copy > p { color: var(--slate); max-width: 50ch; }

.contact-list {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  gap: 16px;
}

.contact-list li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: baseline;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
}

.contact-list a { color: var(--ink); text-decoration-color: var(--red); overflow-wrap: anywhere; }
.contact-list span:not(.contact-label) { color: var(--slate); }

.estimate-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 14px;
  padding: 28px 24px;
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(17, 25, 34, 0.12);
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--fog);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
}

.form-note {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--slate);
  text-align: center;
}

.hidden-field { display: none; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: #ABB4BE;
  padding: 44px 0 calc(28px + var(--callbar-h) + env(safe-area-inset-bottom));
  font-size: 0.92rem;
}

.footer-inner { display: grid; gap: 20px; }

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-mark { width: 34px; height: 34px; flex: none; margin-top: 3px; }

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 4px;
}

.footer-fine { border-top: 1px solid #26313D; padding-top: 20px; }
.footer-fine a { color: #D3D9DF; }

@media (min-width: 900px) {
  .site-footer { padding-bottom: 32px; }
}

/* ---------- mobile call bar ---------- */

.call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.call-bar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.12s ease;
}

.call-bar-btn:active { transform: scale(0.97); }

.call-bar-btn svg { width: 18px; height: 18px; }

.call-bar-call {
  background: var(--red);
  color: #fff;
}

.call-bar-estimate {
  background: var(--white);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

@media (min-width: 900px) {
  .call-bar { display: none; }
}

/* ---------- reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* hero load sequence */
.hero-reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: heroUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-reveal.r1 { animation-delay: 0.05s; }
.hero-reveal.r2 { animation-delay: 0.15s; }
.hero-reveal.r3 { animation-delay: 0.3s; }
.hero-reveal.r4 { animation-delay: 0.45s; }
.hero-reveal.r5 { animation-delay: 0.6s; }

@keyframes heroUp {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
  .card:hover { transform: none; }
}
