/* ==========================================================================
   Safe Haven Roofing and Construction
   Design concept: "coursing" — a roof is built from overlapping courses of
   material, each one lapping over the last. That rhythm (repeat, offset,
   protect) is echoed in the divider bands, the hero stripe, and the section
   rhythm below.
   ========================================================================== */

:root {
  --charcoal:     #23282E;
  --charcoal-2:   #2E353D;
  --asphalt:      #4A5259;
  --slate:        #6E7A82;
  --slate-soft:   #A9B4BB;
  --cream:        #F7F4EF;
  --cream-dim:    #EDE8DF;
  --copper:       #B5502E;
  --copper-dark:  #8F3D22;
  --copper-light: #D97A54;

  --font-display: "Zilla Slab", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max-width: 1120px;
  --radius: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--charcoal);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1.1em; }

a { color: var(--copper-dark); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--copper); }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--charcoal);
  color: var(--cream);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--charcoal);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(247, 244, 239, 0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background:
    repeating-linear-gradient(
      180deg,
      var(--copper) 0px, var(--copper) 5px,
      var(--copper-light) 5px, var(--copper-light) 9px
    );
  border-radius: 3px;
  transform: rotate(45deg);
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
}
.brand-text em { font-style: normal; color: var(--slate-soft); font-size: 0.85em; }

.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: var(--cream);
  opacity: 0.82;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { opacity: 1; color: var(--copper-light); }

.nav-cta {
  font-family: var(--font-mono);
  color: var(--cream);
  background: var(--copper);
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--copper-dark); color: var(--cream); }

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

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background: var(--charcoal);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 88px 24px 120px;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--copper-light);
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 16ch;
  color: var(--cream);
}

.hero-sub {
  max-width: 56ch;
  font-size: 1.12rem;
  color: var(--slate-soft);
  margin-top: 18px;
}

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

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--copper);
  color: var(--cream);
}
.btn-primary:hover { background: var(--copper-dark); color: var(--cream); }

.btn-ghost {
  background: transparent;
  border-color: rgba(247, 244, 239, 0.35);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); }

/* Signature element: overlapping shingle-course band along the hero base */
.shingle-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 46px;
  background:
    repeating-linear-gradient(
      -8deg,
      var(--asphalt) 0px, var(--asphalt) 34px,
      var(--charcoal-2) 34px, var(--charcoal-2) 68px
    );
  clip-path: polygon(0 40%, 100% 0%, 100% 100%, 0% 100%);
  opacity: 0.9;
}

/* ==========================================================================
   Article / Guide
   ========================================================================== */

.guide {
  background: var(--cream);
}

.guide-inner {
  max-width: 74ch;
  margin: 0 auto;
  padding: 72px 24px 40px;
}

.lede {
  font-size: 1.18rem;
  color: var(--asphalt);
}

.guide h2 {
  font-size: 1.55rem;
  margin-top: 2.3em;
  color: var(--charcoal);
}

.guide h2:first-of-type { margin-top: 0.4em; }

.guide ul {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}
.guide li { margin-bottom: 0.5em; }

.guide a { font-weight: 600; }

/* Signature element repeated: a slim "course line" divider between
   sections — three offset strokes, echoing overlapping shingle courses */
.course-divider {
  height: 10px;
  margin: 2.6em 0 1.2em;
  background-image:
    linear-gradient(90deg, var(--copper) 0 40%, transparent 40%),
    linear-gradient(90deg, var(--slate-soft) 0 65%, transparent 65%),
    linear-gradient(90deg, var(--cream-dim) 0 100%, transparent 100%);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: left 0px, left 4px, left 8px;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  background: var(--charcoal);
  color: var(--cream);
}

.contact-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow-light { color: var(--copper-light); }

.contact h2 {
  color: var(--cream);
  font-size: 1.9rem;
  max-width: 18ch;
}

.contact p {
  color: var(--slate-soft);
  max-width: 42ch;
}

.contact-card {
  background: var(--charcoal-2);
  border: 1px solid rgba(247, 244, 239, 0.1);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-soft);
}

.contact-list a, .contact-list span {
  color: var(--cream);
  font-size: 1.05rem;
  text-decoration: none;
  font-weight: 500;
}
.contact-list a:hover { color: var(--copper-light); }

@media (max-width: 760px) {
  .contact-inner {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--charcoal-2);
  color: var(--slate-soft);
  border-top: 1px solid rgba(247, 244, 239, 0.08);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.footer-inner a {
  color: var(--slate-soft);
}
.footer-inner a:hover { color: var(--copper-light); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 520px) {
  .hero-inner { padding: 64px 20px 100px; }
  .guide-inner { padding: 56px 20px 24px; }
  .contact-inner { padding: 56px 20px; }
}
