/* ==========================================================================
   Campbell Furniture Restoration
   ========================================================================== */

/* Fonts (self-hosted, latin subset) */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }

:root {
  --orange: #ec9222;
  --cream: #fff4e5;
  --charcoal: #24221e;
  --black: #000;
  --white: #fff;
  --orange-deep: #d47d12; /* same hue, deepened: white = 3.1:1 (large/bold text only) */
  --orange-text: #a35a00; /* 5.2:1 on white — orange for text */
  --muted: #666;          /* 5.7:1 on white */

  --font-heading: "Lato", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;

  --container: 1300px;
  --gutter: clamp(16px, 4vw, 70px);
  --header-h: 90px;
}

/* Reset */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
address { font-style: normal; }



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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--black);
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--white);
}
main:focus { outline: none; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12.5px 37px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .3s, color .3s;
}

/* Header ------------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: var(--orange);
  transition: background-color .3s;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-header__logo img { width: 170px; }
.btn--header { background: var(--white); color: var(--orange-text); }
.btn--header:hover { background: var(--black); color: var(--white); }

.site-header.is-scrolled { background: var(--black); }
.site-header.is-scrolled .btn--header { background: var(--orange); color: var(--black); } /* 16px text: needs 4.5:1, black = 8.7:1 */
.site-header.is-scrolled .btn--header:hover { background: var(--white); color: var(--orange-text); }

main { padding-top: var(--header-h); }

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(520px, calc(100vh - var(--header-h)), 870px);
  overflow: hidden;
  background: var(--charcoal);
  color: var(--white);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
  animation: hero-zoom 12s ease-out both;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.4) 40%, rgba(0,0,0,0) 75%);
}
.hero__content { position: relative; z-index: 1; padding-block: 60px; text-shadow: 0 1px 12px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.5); }
.hero__title {
  max-width: 540px;
  margin-left: 30px;
  font-family: var(--font-heading);
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: 700;
  line-height: 1.2;
}
.hero__text {
  max-width: 500px;
  margin: 28px 0 0 30px;
  font-size: 14px;
  line-height: 1.8;
  text-transform: capitalize;
}
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Section titles ---------------------------------------------------------- */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.26;
  text-align: center;
}
.section-title--on-orange { color: var(--white); } /* 3.1:1 on --orange-deep: OK for large bold text */
.eyebrow {
  margin-bottom: 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: center;
  color: var(--orange-text);
}

/* Services ---------------------------------------------------------------- */
.services {
  padding: 45px 0 112px;
  background: var(--orange-deep);
}
.services .section-title { margin-bottom: 55px; }
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  text-align: center;
}
.service-card__img {
  width: 100%;
  aspect-ratio: 303 / 222;
  object-fit: cover;
}
.service-card__media { position: relative; }
.service-card__icon {
  position: absolute;
  left: 20px;
  bottom: -45px;
  width: 90px;
  height: 90px;
}
.service-card__body {
  flex: 1;
  padding: 72px 20px 45px;
}
.service-card__title {
  margin-bottom: 16px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.service-card p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Projects ---------------------------------------------------------------- */
.projects { padding: 124px 0 124px; }
.projects .section-title { margin-bottom: 50px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.gallery__item {
  display: block;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery__item:hover img,
.gallery__item:focus-visible img { transform: scale(1.05); }

/* Contact ----------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 567px;
  background: var(--charcoal);
  color: var(--cream);
}
.contact__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contact__panel {
  display: flex;
  align-items: center;
  padding: 60px var(--gutter) 60px 105px;
}
.contact__box {
  width: 100%;
  max-width: 572px;
  padding: 45px 45px 55px;
  border: 1px solid rgba(236, 146, 34, .6);
}
.contact__title {
  font-family: var(--font-body);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.contact__phone {
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.3;
  text-underline-offset: 4px;
}
.contact__sms {
  display: block;
  width: fit-content;
  margin-top: 24px;
  font-size: 15px;
  text-underline-offset: 3px;
}
.contact a:hover { color: var(--orange); }

/* Footer ------------------------------------------------------------------ */
.site-footer {
  margin-top: 125px;
  padding: 120px 0 90px;
  border-top: 4px solid var(--orange);
  background: var(--charcoal);
  color: var(--cream); /* 14.6:1 */
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.site-footer__title {
  margin-bottom: 20px;
  color: var(--orange); /* 6.6:1 on charcoal */
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
}
.site-footer address,
.site-footer p { font-size: 14px; line-height: 1.9; }
.site-footer a { font-weight: 700; color: var(--white); }
.site-footer a:hover { color: var(--orange); }

/* 404 page ---------------------------------------------------------------- */
.not-found {
  padding: 120px 0 40px;
  text-align: center;
}
.not-found__text {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
}
.not-found__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 36px;
}
.btn--primary { background: var(--orange); color: var(--black); } /* 8.7:1 */
.btn--primary:hover { background: var(--black); color: var(--white); }
.not-found__phone {
  padding-block: 12px;
  font-weight: 500;
  text-underline-offset: 3px;
}
@media (max-width: 767px) {
  .not-found { padding: 70px 0 20px; }
}

/* Back to top ------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--black);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }

/* Lightbox ---------------------------------------------------------------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .92);
  color: var(--white);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__img {
  max-width: calc(100vw - 140px);
  max-height: calc(100vh - 100px);
  object-fit: contain;
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  opacity: .8;
}
.lightbox__btn:hover { opacity: 1; }
.lightbox__close { top: 12px; right: 12px; font-size: 38px; }
.lightbox__prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 12px; top: 50%; translate: 0 -50%; }
.lightbox__count {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 13px;
  opacity: .8;
}

/* Scroll reveal ----------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s ease, transform .8s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .contact__panel { padding-left: var(--gutter); }
}

@media (max-width: 767px) {
  :root { --header-h: 70px; }
  .site-header__logo img { width: 112px; }
  .btn--header { padding: 10px 20px; font-size: 14px; }

  .hero { min-height: 560px; }
  .hero__bg { object-position: 70% center; }
  .hero::after { background: rgba(0, 0, 0, .55); }
  .hero__title, .hero__text { margin-left: 0; }

  .services { padding: 40px 0 70px; }
  .services .section-title { margin-bottom: 35px; }
  .services__grid { grid-template-columns: 1fr; gap: 24px; }

  .projects { padding: 70px 0; }
  .projects .section-title { margin-bottom: 30px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery__item:first-child { grid-column: span 2; }

  .contact { grid-template-columns: 1fr; min-height: 0; }
  .contact__media img { aspect-ratio: 4 / 3; height: auto; }
  .contact__panel { padding: 40px 16px; }
  .contact__box { padding: 32px 24px 40px; }
  .contact__sms { margin-top: 12px; padding-block: 12px; }

  .site-footer { margin-top: 70px; padding: 60px 0; }
  .site-footer__grid { grid-template-columns: 1fr; }

  .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
  .site-footer address a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  .lightbox__img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; translate: none; }
}

/* Windows High Contrast / forced colors */
@media (forced-colors: active) {
  .btn, .to-top, .lightbox__btn { border: 1px solid ButtonText; }
  .contact__box { border-color: CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .gallery__item:hover img, .gallery__item:focus-visible img { transform: none; }
}
