/* Jay's Elite Fence: demo. Palette from the logo (black, red) plus cedar and Colorado sky. */
:root {
  --ink: #15171A;
  --paper: #F4F5F3;
  --white: #FFFFFF;
  --red: #C4121A;
  --red-dark: #A00E15;
  --cedar: #B97A3D;
  --cedar-light: #E9C79A;
  --sky: #1F4E8C;
  --mute: #555B63;
  --line: #D3D6D1;
  --display: "Archivo", "Arial Black", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --wrap: 1200px;
  --gut: 32px;
  /* picket silhouette used as the fence-line divider */
  --pickets: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='20' viewBox='0 0 22 20'%3E%3Cpath d='M1 20V6l3-5h14l3 5v14z' fill='%2315171A'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--sky); text-underline-offset: 3px; }
h1, h2, h3, p, ul, ol, figure, blockquote, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.015em;
  line-height: 1.04;
}
h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); }
h3 { font-family: var(--display); font-weight: 700; font-stretch: 112%; font-size: 1.375rem; line-height: 1.2; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.hero__bar :focus-visible, .foot :focus-visible, .sticky-book :focus-visible, .lightbox :focus-visible { outline-color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin-inline: auto; padding-inline: var(--gut); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 12px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 24px;
  font-family: var(--display); font-weight: 700; font-stretch: 108%; font-size: 1.0625rem; line-height: 1.1;
  text-decoration: none; border: 2px solid transparent; border-radius: 4px; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--cedar-light); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: auto; height: 56px; }
.brand__name { font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: 1.25rem; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.0625rem; padding: 10px 0; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--red); }
.top__act { display: flex; align-items: center; gap: 18px; }
.top__tel { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.125rem; white-space: nowrap; }
.top__tel svg { color: var(--red); }
.top__quote { min-height: 48px; padding: 10px 18px; font-size: 1rem; }
.menu-btn { display: none; width: 48px; height: 48px; padding: 0; background: none; border: 2px solid var(--ink); border-radius: 4px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { display: block; width: 22px; height: 2.5px; background: var(--ink); }
.mobile-menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gut) 16px; box-shadow: 0 18px 30px rgba(21, 23, 26, .16); }
.mobile-menu a { display: flex; align-items: center; min-height: 54px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.1875rem; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; color: var(--red); }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(21, 23, 26, .45); }
[hidden] { display: none !important; }

/* ---------- Hero ---------- */
.hero__photo { position: relative; height: clamp(440px, calc(100vh - 76px - 150px), 760px); overflow: hidden; background: #3A64A6; }
.hero__photo picture, .hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__photo img { object-fit: cover; object-position: 50% 36%; }
.hero__photo::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(12, 28, 60, .74) 0%, rgba(12, 28, 60, .48) 38%, rgba(12, 28, 60, 0) 66%);
}
.hero__photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 20px; z-index: 2;
  background: var(--pickets) repeat-x left bottom;
}
.hero__text { position: relative; z-index: 3; padding-top: clamp(28px, 5vh, 56px); color: #fff; }
.hero__text h1 { font-size: clamp(2.1rem, min(1rem + 3vw, 7vh), 3.5rem); text-wrap: balance; text-shadow: 0 1px 18px rgba(12, 28, 60, .45); }
.hero__text p { margin-top: 18px; max-width: 34em; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.4; font-weight: 600; text-shadow: 0 1px 12px rgba(12, 28, 60, .6); }
.hero__bar { background: var(--ink); color: #fff; }
.hero__bar-in { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 36px; padding-block: 24px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__rating { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-height: 48px; }
.hero__rating:hover span:last-child { text-decoration: underline; }
.hero__open { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; color: #D9DCE0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #8B9097; flex: none; }
.is-open .dot { background: #3FBF6B; }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(64px, 8vw, 112px); }
.sec__head { margin-bottom: clamp(32px, 4vw, 52px); max-width: 44em; }
.sec__head p { margin-top: 14px; color: var(--mute); font-size: 1.1875rem; }

/* ---------- Fence types ---------- */
.type { display: flex; flex-direction: column; }
.type__photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.type__body { padding-top: 6px; }
.type__draw { width: 190px; height: auto; margin: -62px 0 14px 18px; position: relative; background: var(--paper); padding: 10px 12px 4px; }
.type__body p { margin-top: 8px; color: #2E3237; max-width: 34em; }
.type__body .type__also { color: var(--mute); font-size: 1.0625rem; border-left: 4px solid var(--cedar); padding-left: 12px; margin-top: 16px; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 40px; margin-block: 64px; }

.type--wide { display: grid; grid-template-columns: 1.45fr 1fr; gap: 0 48px; align-items: center; }
.type--wide .type__photo { aspect-ratio: 16 / 10; }
.type--wide .type__body { padding-top: 0; }
.type--wide .type__draw { width: min(300px, 100%); margin: 0 0 22px; padding: 0; background: none; }
.type--wide h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 800; }
.type--flip { grid-template-columns: 1fr 1.45fr; }
.type--flip .type__photo { order: 2; }

/* ---------- Gallery ---------- */
.work { background: var(--ink); color: #fff; }
.work .sec__head p { color: #C9CDD2; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(170px, 19vw, 270px); grid-auto-flow: dense; gap: 10px; }
.shot { position: relative; padding: 0; border: 0; background: #23262B; cursor: zoom-in; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.shot:hover img { opacity: .86; }
.shot--tall { grid-row: span 2; }
.shot--wide { grid-column: span 2; }
.shot--low img { object-position: 50% 100%; }
.work :focus-visible { outline-color: #fff; }

/* ---------- Reviews ---------- */
.sec__head--split { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px 40px; max-width: none; }
.score { display: flex; align-items: center; gap: 16px; }
.score__num { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 3.25rem; line-height: 1; }
.score__txt { display: grid; gap: 4px; color: var(--mute); font-weight: 600; }
.quotes { columns: 2; column-gap: 56px; }
.quote { break-inside: avoid; padding: 26px 0 28px; border-top: 3px solid var(--ink); }
.quote blockquote p { font-size: 1.1875rem; line-height: 1.5; }
.quote:first-child blockquote p { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem); line-height: 1.38; font-weight: 600; }
.quote figcaption { margin-top: 14px; color: var(--mute); font-size: 1.0625rem; }
.quote figcaption strong { color: var(--ink); margin-right: 10px; }
.reviews__more { margin-top: 20px; }
.reviews__more a { font-weight: 700; display: inline-flex; align-items: center; min-height: 48px; }

/* ---------- Service area ---------- */
.area { background: var(--white); border-block: 1px solid var(--line); }
.area__in { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.area__text > p { margin-top: 16px; max-width: 32em; }
.towns { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; max-width: 30em; border-top: 3px solid var(--ink); }
.towns li { padding: 13px 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-stretch: 110%; font-size: 1.25rem; }
.area__note { color: var(--mute); }
.area__note a { font-weight: 700; white-space: nowrap; display: inline-block; padding-block: 10px; }
.map { justify-self: center; width: min(340px, 100%); }
.map svg { width: 100%; height: auto; overflow: visible; }
.map__road { fill: none; stroke: var(--line); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.map__shield rect { fill: var(--sky); }
.map__shield text { fill: #fff; font: 700 11px var(--body); }
.map__ref circle { fill: var(--white); stroke: var(--mute); stroke-width: 2; }
.map__ref text { fill: var(--mute); font: 600 15px var(--body); }
.map__town circle { fill: var(--red); stroke: var(--white); stroke-width: 2.5; }
.map__town text { fill: var(--ink); font: 700 16px var(--body); }
.map__n path { fill: none; stroke: var(--mute); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map__n text { fill: var(--mute); font: 700 13px var(--body); }

/* ---------- How a job goes ---------- */
.how__in { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.how__photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.how__lead { margin-top: 16px; font-size: 1.25rem; max-width: 30em; }
.steps { margin-top: 30px; counter-reset: step; border-top: 3px solid var(--ink); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 1.75rem; line-height: 1; color: var(--cedar); grid-row: span 2; padding-top: 2px; }
.steps p { color: #2E3237; margin-top: 2px; }

/* ---------- Quote ---------- */
.quote-sec { padding-top: 0; }
.quote-sec__in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact > p { margin-top: 14px; max-width: 28em; }
.contact__tel { display: inline-block; margin-top: 16px; padding-block: 6px; font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); line-height: 1.1; color: var(--ink); text-decoration: none; white-space: nowrap; }
.contact__tel:hover { color: var(--red); }
.contact__links { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 8px; }
.contact__links a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }
.contact h3 { margin-top: 34px; }
.hours { margin-top: 10px; border-collapse: collapse; width: 100%; max-width: 26em; border-top: 3px solid var(--ink); }
.hours th, .hours td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; white-space: nowrap; }
.hours .is-today th, .hours .is-today td { font-weight: 700; }
.contact__open { margin-top: 14px; display: flex; align-items: center; gap: 10px; color: var(--mute); }

.form { background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--ink); padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--mute); margin-left: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 12px 14px;
  font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid #8C9198; border-radius: 4px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sky); outline: 3px solid rgba(31, 78, 140, .25); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--red); }
.form__err { color: var(--red-dark); font-weight: 700; min-height: 0; }
.form__err:not(:empty) { margin-bottom: 14px; }
.form__hint { margin-top: 12px; color: var(--mute); font-size: 1rem; }

/* ---------- Footer ---------- */
.foot { position: relative; background: var(--ink); color: #D9DCE0; padding: 56px 0 44px; margin-top: 20px; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -19px; height: 20px; background: var(--pickets) repeat-x left bottom; }
.foot__in { display: flex; flex-wrap: wrap; gap: 32px 72px; align-items: flex-start; }
.foot__brand { display: flex; gap: 22px; align-items: center; margin-right: auto; }
.foot__logo { background: #fff; padding: 10px 14px; border-radius: 4px; flex: none; }
.foot__logo img { height: 84px; width: auto; }
.foot__col { display: grid; gap: 2px; }
.foot__col a { color: #fff; display: inline-flex; align-items: center; min-height: 40px; }
.foot__col span { min-height: 40px; display: inline-flex; align-items: center; }

/* ---------- Mobile bottom bar ---------- */
.sticky-book { display: none; }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(15, 16, 18, .97); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: min(92vw, 1500px); max-height: 80vh; object-fit: contain; }
.lightbox__cap { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 1.0625rem; color: #D9DCE0; padding-inline: 72px; }
.lightbox__btn { position: absolute; width: 54px; height: 54px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 50%; cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .24); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; margin-top: -27px; }
.lightbox__next { right: 16px; top: 50%; margin-top: -27px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 900px) {
  :root { --gut: 24px; }
  .type--wide, .type--flip { grid-template-columns: 1fr; }
  .type--flip .type__photo { order: 0; }
  .type--wide .type__photo { aspect-ratio: 3 / 2; }
  .type--wide .type__body { padding-top: 6px; }
  .type--wide .type__draw { width: 190px; margin: -62px 0 14px 18px; padding: 10px 12px 4px; background: var(--paper); }
  .area__in, .how__in, .quote-sec__in { grid-template-columns: 1fr; gap: 40px; }
  .how__photo { aspect-ratio: 3 / 2; }
  .quotes { columns: 1; }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 26vw; }
  .hero__open { margin-left: 0; }
}
@media (max-width: 699px) {
  :root { --gut: 16px; }
  html { scroll-padding-top: 72px; }
  body { padding-bottom: 76px; }
  .top__in { min-height: 64px; gap: 10px; }
  .brand img { height: 44px; }
  .brand__name { font-size: 1.0625rem; }
  .top__quote { display: none; }
  .top__tel span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .top__tel { width: 48px; height: 48px; justify-content: center; border: 2px solid var(--ink); border-radius: 4px; }
  .top__act { gap: 8px; }

  .hero__photo { height: clamp(470px, 68vh, 600px); }
  .hero__photo img { object-position: 50% 100%; }
  .hero__photo::before { background: linear-gradient(to bottom, rgba(12, 28, 60, .78) 0%, rgba(12, 28, 60, .55) 40%, rgba(12, 28, 60, 0) 64%); }
  .hero__text { padding-top: 24px; }
  .hero__text h1 { font-size: clamp(1.75rem, 8.2vw, 2.25rem); font-stretch: 112%; }
  .hero__text p { margin-top: 12px; font-size: 1.125rem; }
  .hero__bar-in { padding-block: 18px 22px; gap: 10px; }
  .hero__actions { width: 100%; display: grid; gap: 10px; }
  .hero__rating, .hero__open { width: 100%; }
  .hero__rating { gap: 10px; font-size: 1.0625rem; }
  .hero__rating svg { width: 92px; }

  .type-grid { grid-template-columns: 1fr; gap: 44px; margin-block: 44px; }
  .type__draw, .type--wide .type__draw { width: 150px; margin: -48px 0 12px 12px; padding: 8px 10px 3px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 36vw; gap: 6px; }
  .score__num { font-size: 2.75rem; }
  .quote { padding: 22px 0 24px; }
  .towns li { font-size: 1.125rem; }
  .map { width: min(300px, 100%); }
  .form { padding: 22px 16px; }
  .foot { padding-bottom: 32px; }
  .foot__brand { flex-direction: column; align-items: flex-start; margin-right: 0; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 64px; margin-top: 0; }
  .lightbox__cap { padding-inline: 16px; bottom: 132px; }
  .lightbox img { max-height: 62vh; }

  .sticky-book {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--ink); border-top: 1px solid #33373D;
    transform: translateY(110%); visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
  }
  .sticky-book.is-visible { transform: none; visibility: visible; transition: transform .2s ease; }
  .sticky-book a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 4px; font-family: var(--display); font-weight: 700; font-size: 1.0625rem; text-decoration: none; }
  .sticky-book__call { background: #fff; color: var(--ink); }
  .sticky-book__quote { background: var(--red); color: #fff; }
}
@media (max-width: 380px) {
  .brand__name { font-size: .9375rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
