/* Incline Construction — site styles
   Colors live in the block below. Change them here and the whole site follows. */

@font-face {
  font-family: "Besley";
  src: url("../fonts/besley.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* Colors taken from the Incline Construction logo */
  --slate: #263940;       /* dark blue-gray: main brand color */
  --slate-deep: #1b2a30;
  --red: #b83226;         /* logo red: links, small details */
  --sun: #d96e2f;         /* logo orange: decoration only */
  --cream: #f4eccc;       /* logo banner cream: panels */
  --chalk: #fdf8e1;       /* page background, matches the logo background */
  --ink: #1f2c31;         /* body text */
  --ink-soft: #4b585d;    /* secondary text */
  --line: #ddd5b6;

  --display: "Besley", Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --rise: clamp(28px, 6vw, 96px);   /* height of the sloped edges */
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

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

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

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }

p { margin: 0 0 1em; max-width: 62ch; }
a { color: var(--red); text-underline-offset: 0.18em; }
a:hover { color: var(--slate); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: var(--cream); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 20;
}
.skip:focus { top: 12px; color: #fff; }

.lede { font-size: 1.2rem; color: var(--ink-soft); }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--chalk); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 80px; padding-block: 8px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;
  line-height: 1.05;
}
.brand img { width: 50px; height: 56px; flex: none; }
.brand small {
  display: block; font-family: var(--body); font-weight: 500;
  font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0;
}

.nav-toggle {
  display: none; font: inherit; font-weight: 600;
  background: none; border: 2px solid var(--ink); color: var(--ink);
  padding: 8px 14px; border-radius: 4px; cursor: pointer;
}
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px);
}
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 600;
  padding: 8px 0; border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }
.site-nav a.btn { padding: 10px 18px; border-bottom: 2px solid var(--slate); color: #fff; }

@media (max-width: 800px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; padding-bottom: 16px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 14px 0; border-bottom: 0; }
  .site-nav a[aria-current="page"] { color: var(--red); }
  .site-nav a.btn { margin-top: 12px; text-align: center; }
}

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

.btn {
  display: inline-block; font: inherit; font-weight: 700;
  padding: 14px 24px; border-radius: 4px; cursor: pointer;
  text-decoration: none; text-align: center;
  background: var(--slate); color: #fff; border: 2px solid var(--slate);
}
.btn:hover { background: var(--slate-deep); border-color: var(--slate-deep); color: #fff; }
.btn.quiet { background: transparent; color: var(--slate); }
.btn.quiet:hover { background: var(--slate); color: #fff; }
.on-dark .btn { background: var(--cream); border-color: var(--cream); color: var(--slate-deep); }
.on-dark .btn:hover { background: #fff; border-color: #fff; color: var(--slate-deep); }
.on-dark .btn.quiet { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.on-dark .btn.quiet:hover { background: #fff; color: var(--slate-deep); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

/* ---------- Hero and the incline ---------- */

.hero { padding: clamp(48px, 9vw, 112px) 0 calc(var(--rise) + clamp(32px, 6vw, 72px)); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(24px, 5vw, 72px); align-items: center;
}
.hero-logo { width: 100%; max-width: 380px; justify-self: end; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
}
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 46ch; }
.page-hero { padding: clamp(40px, 7vw, 84px) 0 calc(var(--rise) + 24px); }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); max-width: 20ch; }

/* A block whose top edge climbs left to right, like the company name. */
.slope {
  margin-top: calc(-1 * var(--rise));
  padding-top: calc(var(--rise) + clamp(32px, 5vw, 64px));
  padding-bottom: clamp(48px, 7vw, 88px);
  clip-path: polygon(0 var(--rise), 100% 0, 100% 100%, 0 100%);
}
.on-dark { background: var(--slate); color: #fff; }
.on-dark a { color: #fff; }
.on-dark .lede, .on-dark .muted { color: #e6e2cf; }
.on-wood { background: var(--cream); }
.on-wood .lede { color: #4a4234; }
.on-wood a { color: #8f271d; }

.band { padding: clamp(48px, 8vw, 100px) 0; }
.band.after-slope { padding-bottom: calc(var(--rise) + clamp(40px, 6vw, 72px)); }

/* Facts under the hero */
.facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 40px;
}
.facts strong {
  display: block; font-family: var(--display); font-weight: 600;
  font-size: 1.3rem; line-height: 1.25; margin-bottom: 4px;
}
.facts span { color: #e6e2cf; }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Home: services ---------- */

.split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 80px); align-items: start;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.favorites { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.favorites a {
  display: block; padding: 24px; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--red);
}
.favorites a:hover { border-color: var(--red); }
.favorites h3 { margin-bottom: 6px; }
.favorites p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 520px) { .favorites { grid-template-columns: 1fr; } }

.plain-list {
  list-style: none; margin: 0; padding: 0;
  columns: 2; column-gap: 40px;
}
.plain-list li {
  break-inside: avoid; padding: 11px 0; border-bottom: 1px solid var(--line);
  font-weight: 600;
}
@media (max-width: 520px) { .plain-list { columns: 1; } }

/* ---------- Steps (a real sequence) ---------- */

.steps {
  list-style: none; margin: 2rem 0 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.steps li { counter-increment: step; padding-top: 16px; border-top: 4px solid var(--sun); }
.steps li::before {
  content: counter(step); display: block;
  font-family: var(--display); font-weight: 700; font-size: 2.2rem;
  line-height: 1; color: var(--red); margin-bottom: 10px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: #4a4234; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Counties ---------- */

.counties {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px;
}
.counties li {
  font-family: var(--display); font-size: 1.45rem; font-weight: 600;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.counties small {
  display: block; font-family: var(--body); font-size: 0.95rem;
  font-weight: 400; color: var(--ink-soft);
}

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

/* ---------- Services page ---------- */

.service {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 12px clamp(24px, 5vw, 64px);
  padding: 32px 0; border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin: 0; }
.service ul { margin: 0.4em 0 0; padding-left: 1.1em; color: var(--ink-soft); }
.service li { margin: 4px 0; }
.service .fav {
  display: inline-block; margin-top: 10px; font-size: 0.9rem; font-weight: 600;
  color: var(--red);
}
@media (max-width: 720px) { .service { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */

.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-top: 2rem;
}
.gallery figure {
  margin: 0; background: #fff; border: 1px solid var(--line);
  display: grid; grid-template-rows: 1fr auto;
}
.gallery a { display: block; min-height: 0; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .full img { aspect-ratio: 2 / 1; }
@media (min-width: 700px) {
  .gallery .wide { grid-column: span 2; }
  .gallery .wide img { aspect-ratio: auto; }
  .gallery .full { grid-column: 1 / -1; }
}
.gallery figcaption { padding: 12px 16px 14px; font-size: 0.98rem; }
.gallery figcaption strong { display: block; }
.gallery figcaption span { color: var(--ink-soft); }
.gallery .empty {
  aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 20px;
  background:
    linear-gradient(to top right, var(--cream) 49.6%, #f9f3da 50.4%);
  color: #4a4234; font-weight: 600; text-align: center;
}

/* ---------- About ---------- */

.portrait {
  aspect-ratio: 4 / 5; background: var(--cream);
  display: grid; place-items: center;
  color: #4a4234; font-weight: 600; text-align: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.values { list-style: none; margin: 2rem 0 0; padding: 0; }
.values li { padding: 18px 0; border-top: 1px solid var(--line); }
.values strong { font-family: var(--display); font-size: 1.2rem; display: block; }

/* ---------- Contact ---------- */

.contact-ways { list-style: none; margin: 0 0 2rem; padding: 0; }
.contact-ways li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-ways span { display: block; font-size: 0.95rem; color: var(--ink-soft); }
.contact-ways a { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }

form { display: grid; gap: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--ink-soft); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; background: #fff;
  border: 1.5px solid #8b9189; border-radius: 4px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--red); outline-offset: 1px; border-color: var(--red);
}
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.form-status { margin: 0; padding: 14px 16px; font-weight: 600; border-left: 6px solid var(--slate); background: #e7ecea; }
.form-status.error { border-left-color: #9b2c1f; background: #f8e7e3; }
.form-status:empty { display: none; }

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

.site-footer {
  background: linear-gradient(var(--red) 0 6px, var(--cream) 6px 9px, var(--sun) 9px 15px, var(--slate-deep) 15px); color: #e6e2cf; padding: 56px 0 32px; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer .cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
}
.site-footer h2 { font-size: 1.1rem; color: #fff; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; overflow-wrap: anywhere; }
.site-footer .fine { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); font-size: 0.92rem; }
.site-footer p { max-width: none; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr; } }

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