/* Roofing Ninja. Mobile-first. No external requests. */

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/oswald-600.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-600.woff2") format("woff2");
}

:root {
  --bg: #121418;
  --bg-top: #171b1f;
  --surface: #1c2126;
  --line: #343b42;
  --text: #f3f0e8;
  --muted: #c8c2b6;
  --faint: #9c968c;
  --accent: #f0b429;
  --ink: #1a1404;
  --header: 4.75rem;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  scroll-padding-bottom: 6.5rem;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 240px) var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
  padding-bottom: 5.75rem;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
.logo-word,
.call-button,
.header-call,
.sticky-call,
.button-secondary,
.hic,
.eyebrow,
.service__num,
.areas li,
.reasons li::before {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0.35rem 0 0.8rem;
  font-size: clamp(2.45rem, 9vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

h3 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.05;
}

p {
  margin: 0 0 0.9rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.16em;
}

a:hover {
  color: #ffd56a;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 80;
  background: var(--accent);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  font-weight: 600;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 1rem;
  min-height: 4.25rem;
  padding: 0.35rem 0 0.15rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: var(--text);
}

.mark {
  display: block;
  flex: 0 0 auto;
}

.mark-cut {
  fill: #121418;
}

.mark-eye {
  fill: var(--accent);
}

.logo-word {
  font-size: 1.25rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 0 0.35rem -0.15rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: var(--text);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-underline-offset: 0.28em;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.header-call {
  display: none;
}

.call-button,
.header-call,
.sticky-call,
.phone-link {
  touch-action: manipulation;
}

.call-button,
.header-call,
.sticky-call {
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
}

.call-button:hover,
.header-call:hover,
.sticky-call:hover,
.button-secondary:hover {
  color: var(--ink);
  background: #ffc53d;
}

.call-button,
.sticky-call,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.8rem 1rem;
  border: 0;
  font-size: 1.3rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  cursor: pointer;
}

.call-button:focus-visible,
.header-call:focus-visible,
.sticky-call:focus-visible,
.button-secondary:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.hero {
  padding: 1.6rem 0 2.4rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.email-link {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.towns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 1rem;
}

.towns li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.towns li::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  background: var(--accent);
  flex: 0 0 auto;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding: 3.1rem 0;
  border-top: 1px solid var(--line);
}

.service {
  display: grid;
  gap: 1rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.services {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.service:last-child {
  padding-bottom: 0;
}

.service__num,
.reasons li::before {
  color: var(--accent);
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.service h3 {
  margin: 0.15rem 0 0.55rem;
}

.service p,
.reasons p {
  max-width: 38rem;
  margin-bottom: 0;
}

.areas {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.areas li {
  margin: 0;
  padding: 0 0 0.55rem;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.7rem, 4.4vw, 2.45rem);
  line-height: 1.05;
}

.reasons {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
}

.reasons li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.reasons li::before {
  content: counter(reason, decimal-leading-zero);
  display: block;
  margin-bottom: 0.3rem;
}

.reasons {
  counter-reset: reason;
}

.reasons li {
  counter-increment: reason;
}

.reasons h3 {
  margin-bottom: 0.4rem;
}

.contact-grid {
  display: grid;
  gap: 1.75rem;
}

.facts {
  margin: 1.2rem 0 0;
}

.facts > div {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin: 0 0 0.2rem;
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
}

.phone-link {
  color: var(--text);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-decoration: none;
}

.phone-link:hover {
  color: var(--accent);
}

.address-link {
  color: var(--text);
  font-weight: 600;
  text-decoration-thickness: 1px;
}

.address-link:hover {
  color: var(--accent);
}

.map-hint {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.hic {
  display: block;
  color: var(--text);
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  letter-spacing: 0.035em;
  line-height: 1.1;
}

.hic-note {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 1rem;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.1rem 1rem 1.2rem;
}

.form-card h3 {
  margin-bottom: 0.45rem;
}

.form-note {
  color: var(--muted);
  font-size: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 0.95rem;
}

.field label {
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #4a535c;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  border-radius: 0;
}

textarea {
  min-height: 8.5rem;
  resize: vertical;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

::placeholder {
  color: var(--faint);
  opacity: 1;
}

.button-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.button-secondary:hover {
  background: var(--accent);
  color: var(--ink);
}

.form-status {
  margin: 0.85rem 0 0;
  color: var(--text);
}

.photo-slot {
  position: relative;
  display: grid;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(240, 180, 41, 0.09), transparent 58%),
    #181c21;
  border: 1px solid var(--line);
}

.photo-slot > * {
  grid-area: 1 / 1;
}

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 1;
}

.photo-slot.is-loaded img {
  opacity: 1;
}

.photo-slot__art {
  align-self: center;
  justify-self: center;
  width: min(78%, 440px);
  height: auto;
  z-index: 0;
}

.photo-slot figcaption {
  align-self: end;
  justify-self: start;
  z-index: 2;
  max-width: calc(100% - 1.4rem);
  margin: 0.7rem;
  padding: 0.45rem 0.6rem 0.5rem;
  background: rgba(18, 20, 24, 0.9);
}

.photo-slot__tag {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--accent);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.photo-slot code {
  display: block;
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.photo-slot__hint {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.photo-slot::before,
.photo-slot::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  pointer-events: none;
}

.photo-slot::before {
  top: 8px;
  left: 8px;
  border-right: 0;
  border-bottom: 0;
}

.photo-slot::after {
  right: 8px;
  bottom: 8px;
  border-left: 0;
  border-top: 0;
}

.photo-slot.is-loaded figcaption,
.photo-slot.is-loaded .photo-slot__art,
.photo-slot.is-loaded::before,
.photo-slot.is-loaded::after {
  display: none;
}

.work-grid {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.work-grid figure {
  margin: 0;
}

.work-grid img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #181c21;
  border: 1px solid var(--line);
}

.work-grid figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  color: var(--text);
  text-decoration: none;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footer-brand:hover {
  color: var(--text);
}

.footer-id {
  margin: 0.2rem 0;
}

.footer-hic {
  margin-top: 0.9rem;
}

.fine {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.3rem;
  margin-top: 1rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.55rem 0 0;
  margin-right: 0.7rem;
  font-weight: 600;
}

.sticky-call {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: auto;
  min-height: 4.25rem;
  padding-bottom: calc(0.8rem + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
}

.sticky-call:focus-visible {
  outline-offset: -6px;
}

.page-404 .miss {
  padding: 3.2rem 0 4rem;
  max-width: 40rem;
}

.page-404 h1 {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
}

.page-404 .call-button {
  margin: 0.4rem 0 1rem;
}

@media (min-width: 700px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1.1rem;
    align-items: start;
  }
}

@media (min-width: 800px) {
  .areas {
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }

  .service {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
    align-items: center;
    padding: 2.1rem 0;
  }

  .service:nth-child(even) .photo-slot {
    order: -1;
  }
}

@media (min-width: 960px) {
  html {
    scroll-padding-bottom: 1.5rem;
  }

  body {
    padding-bottom: 0;
  }

  .site-header .wrap {
    flex-wrap: nowrap;
    min-height: 5rem;
    padding: 0;
  }

  .nav {
    width: auto;
    margin: 0 0 0 0.5rem;
  }

  .header-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-left: auto;
    min-height: 2.9rem;
    padding: 0 0.95rem;
    font-family: "Oswald", "Arial Narrow", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.045em;
    text-transform: uppercase;
  }

  .sticky-call {
    display: none;
  }

  .hero {
    padding: 3.4rem 0 4.2rem;
  }

  .hero-grid {
    grid-template-columns: 1.12fr 0.88fr;
    gap: 3rem;
    align-items: center;
  }

  .hero-actions {
    align-items: flex-start;
  }

  .call-button {
    width: auto;
    min-width: 18.5rem;
  }

  .section {
    padding: 4.6rem 0;
  }

  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: start;
  }

  .form-card {
    padding: 1.4rem 1.4rem 1.5rem;
  }

  .button-secondary {
    width: auto;
    min-width: 16rem;
  }

  .site-footer .wrap {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 2rem;
    align-items: start;
  }

  .footer-nav {
    justify-content: flex-end;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .sticky-call,
  .skip,
  .header-call {
    display: none !important;
  }

  body {
    padding-bottom: 0;
    background: #fff;
    color: #161616;
  }

  .site-header,
  .site-footer,
  .section,
  .facts > div,
  .reasons li,
  .areas li,
  .service,
  .photo-slot,
  .form-card {
    border-color: #bbb;
  }

  .site-header {
    position: static;
  }

  a,
  .phone-link,
  .logo,
  .logo-word,
  .hic {
    color: #161616;
  }

  .mark path {
    fill: #161616;
  }

  .mark-cut {
    fill: #fff;
  }

  .mark-eye {
    fill: #161616;
  }
}
