/* ==========================================================
   Wright Way Home Improvement
   Colors pulled from the shirt logo: black, safety gold, white
   ========================================================== */

:root {
  --gold: #f2a900;
  --black: #0e0e0e;
  --paper: #f5f3ee;
  --text: #1c1c1c;
  --muted: #5b5b5b;

  --radius: 6px;
  --maxw: 1160px;

  --font-head: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
svg { flex: none; }

h1, h2 {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--black);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 10px; top: 10px; }

:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--gold); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 18px; height: 18px; }

.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #000; color: var(--gold); }

.btn-outline { border-color: var(--black); color: var(--black); }
.btn-outline:hover { background: var(--black); color: #fff; }

.btn-gold { background: var(--gold); color: #111; }
.btn-gold:hover { background: #ffbb22; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.brand-mark { width: 60px; height: auto; }
.brand-name {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
}
.brand-sub {
  display: block;
  margin-top: 4px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-nav a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: color 0.15s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav .btn { padding: 11px 18px; color: #111; }
.site-nav .btn:hover { color: #111; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: transparent;
  border: 2px solid #333;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.site-header.open .nav-toggle .icon-open { display: none; }
.site-header.open .nav-toggle .icon-close { display: block; }

/* ---------- Hero (home) ---------- */

.hero {
  padding: 96px 0;
  background: var(--gold);
  color: var(--black);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: 44px;
  font-size: clamp(42px, 6vw, 76px);
}
/* Services from the Facebook bio: a tidy grid so every bullet lines up */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 24px;
  margin: 26px 0 36px;
  padding: 0;
  list-style: none;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.82);
}
.services li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
/* Small square bullet, like the window panes in the logo */
.services li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: calc((1.3em - 7px) / 2);
  background: var(--black);
}

.logo-card {
  display: flex;
  justify-content: center;
  padding: 48px 32px;
  background: var(--black);
  border-radius: 10px;
}

/* Stacked logo, same layout as the shirt */
.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 260px;
  max-width: 100%;
  color: #fff;
}
.lockup-mark { width: 160px; height: auto; }
.lockup-name {
  margin-top: 2px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.lockup-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 8px 0 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.lockup-sub::before,
.lockup-sub::after {
  content: "";
  flex: 1;
  height: 4px;
  background: var(--gold);
}
.lockup-level { width: 100%; height: auto; }

/* ---------- Inner page title band ---------- */

.page-head {
  padding: 64px 0 56px;
  background: var(--gold);
  color: var(--black);
}
.page-head h1 {
  font-size: 40px;
  font-size: clamp(38px, 5vw, 60px);
}

/* ---------- Sections ---------- */

.section { padding: 80px 0; }
.section[id] { scroll-margin-top: 20px; }

.section-head {
  margin-bottom: 40px;
  text-align: center;
}
.section-head h2 {
  margin-bottom: 16px;
  font-size: 36px;
  font-size: clamp(30px, 4vw, 44px);
}

/* The level from the logo, used as a divider */
.level {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 auto;
}

/* ---------- Photo grid ---------- */

/* Rows of slots on a 4-column grid, so every edge lines up from row to row.
   Each row holds one wide photo and two tall ones (js/main.js shuffles
   wide photos among wide slots and tall photos among tall slots):
     .big-left / .big-right  big wide photo across 3 columns, two photos stacked beside it
     .center                 wide photo in the middle, tall photos either side
   Row heights come from aspect-ratio, sized so the wide slots stay close to 4:3. */
.work-grid {
  display: grid;
  gap: 14px;
}
.work-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.work-row.big-left,
.work-row.big-right {
  grid-template-rows: repeat(2, minmax(0, 1fr));
  aspect-ratio: 16 / 9;
}
.big-left .landscape { grid-column: 1 / span 3; grid-row: 1 / span 2; }
.big-left .portrait { grid-column: 4; }
.big-right .landscape { grid-column: 2 / span 3; grid-row: 1 / span 2; }
.big-right .portrait { grid-column: 1; }
.work-row.center { aspect-ratio: 27 / 10; }
.center .landscape { grid-column: span 2; }

.work-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ddd;
  text-decoration: none;
  color: #fff;
}
/* Photos fill their slot without affecting its size */
.work-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.work-item:hover img,
.work-item:focus-visible img { transform: scale(1.04); }
.work-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 36px 16px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 34px 30px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
}
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--gold);
  color: #111;
}
.contact-icon svg { width: 26px; height: 26px; }
.contact-card h2 {
  margin-bottom: 6px;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.contact-value {
  margin-bottom: 24px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  word-break: break-word;
}
.contact-card .btn-row { margin-top: auto; }
.contact-card .btn { padding: 12px 20px; font-size: 15px; }

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

.site-footer {
  background: var(--black);
  color: #b3b3b3;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px 40px;
  padding: 40px 20px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  transition: color 0.15s ease;
  word-break: break-word;
}
.footer-links a:hover { color: var(--gold); }
.footer-links svg { width: 18px; height: 18px; color: var(--gold); }
.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid #262626;
  font-size: 14px;
  color: #7d7d7d;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 72px 24px;
  background: rgba(0, 0, 0, 0.94);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  border-radius: 4px;
  object-fit: contain;
}
.lightbox-caption {
  margin-top: 14px;
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
}
.lightbox-count { color: var(--gold); margin-left: 10px; }
.lightbox button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lightbox button:hover { background: var(--gold); color: #111; }
.lightbox button svg { width: 24px; height: 24px; }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 14px; top: 50%; margin-top: -24px; }
.lightbox-next { right: 14px; top: 50%; margin-top: -24px; }
body.no-scroll { overflow: hidden; }

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 980px) {
  .work-grid,
  .work-row { gap: 10px; }
  .hero-inner { gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .header-inner { height: 68px; }

  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 20px 22px;
    background: var(--black);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  }
  .site-header.open .site-nav { display: flex; }
  .site-nav a { padding: 15px 0; border-bottom: 1px solid #242424; font-size: 17px; }
  .site-nav .btn { margin-top: 16px; border: 2px solid transparent; padding: 15px 18px; }

  .hero { padding: 64px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; }
  .logo-card { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 16px;
    margin: 22px 0 30px;
    font-size: 15px;
  }
  .page-head { padding: 44px 0 40px; }

  /* Phones: two tall photos per row, wide photos full width */
  /* Phones: every row becomes the wide photo full width, then two tall photos */
  .work-row,
  .work-row.big-left,
  .work-row.big-right,
  .work-row.center {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    aspect-ratio: auto;
  }
  .work-row .landscape { grid-column: 1 / -1; grid-row: 1; aspect-ratio: 4 / 3; }
  .work-row .portrait { grid-column: auto; aspect-ratio: 3 / 4; }
  .work-caption { padding: 28px 10px 10px; font-size: 14px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-direction: column; }

  .lightbox { padding: 64px 12px 90px; }
  .lightbox img { max-height: calc(100vh - 200px); }
  .lightbox-prev,
  .lightbox-next { top: auto; bottom: 22px; margin-top: 0; }
  .lightbox-prev { left: 50%; margin-left: -62px; }
  .lightbox-next { right: 50%; margin-right: -62px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .footer-inner { padding: 36px 16px; }
  .brand-mark { width: 52px; }
  .brand-name { font-size: 22px; }
  .brand-sub { font-size: 10.5px; letter-spacing: 0.12em; }
  .hero .btn-row .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
