:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --ink: #151414;
  --muted: #5a5651;
  --surface: #fffaf2;
  --surface-strong: #ffffff;
  --line: #d8cec1;
  --accent: #0f766e;
  --accent-strong: #0b5d56;
  --gold: #b6781f;
  --rose: #b3264b;
  --shadow: 0 18px 45px rgb(27 24 18 / 14%);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", Arial, sans-serif;
  line-height: 1.6;
}

body.lightbox-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgb(15 118 110 / 12%), transparent 35%),
    linear-gradient(315deg, rgb(179 38 75 / 10%), transparent 40%);
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 4px solid #f2c94c;
  outline-offset: 4px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Days One", "Work Sans", sans-serif;
  line-height: 1.1;
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--ink);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(21 20 20 / 12%);
  background: rgb(246 241 232 / 92%);
  backdrop-filter: blur(16px);
}

.portfolio-nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.05;
}

.brand span {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand strong {
  font-family: "Days One", "Work Sans", sans-serif;
  font-size: clamp(1rem, 5vw, 1.35rem);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-actions a:hover {
  background: rgb(15 118 110 / 10%);
}

.nav-actions .nav-cta {
  background: var(--ink);
  color: #ffffff;
}

.nav-actions .nav-cta:hover {
  background: var(--accent-strong);
}

.nav-actions .nav-back {
  border: 2px solid var(--ink);
}

.hero,
.overview,
.services-section,
.gallery-section,
.contact-band,
.page-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: center;
  gap: 32px;
  padding: 48px 0 40px;
}

.eyebrow,
.section-kicker,
.work-card p {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 11ch;
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 12vw, 6.8rem);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: var(--ink);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button-secondary {
  background: transparent;
}

.button-secondary:hover {
  background: #ffffff;
}

.hero-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 92px;
  gap: 10px;
}

.hero-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgb(21 20 20 / 12%);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-showcase img:first-child {
  grid-column: 1 / 4;
  grid-row: 1 / 4;
}

.hero-showcase img:nth-child(2) {
  grid-column: 3 / 5;
  grid-row: 3 / 6;
}

.hero-showcase img:nth-child(3) {
  grid-column: 1 / 3;
  grid-row: 4 / 7;
}

.overview {
  display: grid;
  gap: 24px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.services-section {
  padding: 56px 0 20px;
}

.overview h2,
.gallery-section h2,
.contact-band h2 {
  max-width: 780px;
  font-size: clamp(1.6rem, 7vw, 3.5rem);
}

.overview-grid {
  display: grid;
  gap: 12px;
}

.overview-grid article {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 250 242 / 74%);
}

.overview-grid span {
  color: var(--rose);
  font-weight: 900;
}

.overview-grid h3 {
  margin: 14px 0 10px;
  font-size: 1.2rem;
}

.overview-grid p,
.services-layout,
.section-heading p,
.contact-band p,
.page-footer {
  color: var(--muted);
}

.services-layout {
  display: grid;
  gap: 18px;
}

.services-layout > div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 72%);
}

.services-layout h3 {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 1.15rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pill-list li {
  border: 1px solid rgb(15 118 110 / 28%);
  border-radius: 8px;
  background: rgb(15 118 110 / 9%);
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 800;
}

.gallery-section {
  padding: 62px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.filter-bar {
  position: sticky;
  top: 72px;
  z-index: 10;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  margin-bottom: 18px;
  background: rgb(246 241 232 / 92%);
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
}

.filter-button {
  min-width: max-content;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 15px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #ffffff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.work-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgb(27 24 18 / 8%);
}

.work-card[hidden] {
  display: none;
}

.work-card a {
  display: block;
}

.work-card img,
.work-card video {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #201f1c;
  object-fit: cover;
}

.video-card video {
  aspect-ratio: 16 / 10;
}

.work-card div {
  padding: 16px;
}

.work-card p {
  margin-bottom: 8px;
}

.work-card h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.work-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.contact-band {
  display: grid;
  gap: 22px;
  align-items: center;
  padding: 40px 20px;
  margin-bottom: 48px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
}

.contact-band h2 {
  margin-bottom: 0;
}

.contact-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
}

.page-footer p {
  margin-bottom: 0;
}

.page-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  font-weight: 800;
}

.page-footer a:hover {
  color: var(--accent-strong);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(10 10 10 / 84%);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-panel {
  width: min(1080px, 100%);
  max-height: 94svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.lightbox-toolbar h2 {
  margin: 0;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 1rem;
}

.lightbox-close {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--accent-strong);
}

#lightboxImage {
  width: 100%;
  height: 100%;
  max-height: calc(94svh - 69px);
  object-fit: contain;
  background: #111111;
}

@media (min-width: 620px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-card.featured {
    grid-column: span 2;
  }

  .work-card.featured img,
  .work-card.featured video {
    aspect-ratio: 16 / 10;
  }

  .page-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-links {
    justify-content: flex-end;
  }
}

@media (min-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
    gap: 48px;
    padding-top: 34px;
  }

  .hero-showcase {
    grid-auto-rows: 108px;
  }

  .overview {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .work-card.featured {
    grid-column: span 2;
  }

  .work-card.tall {
    grid-row: span 2;
  }

  .work-card.tall img {
    aspect-ratio: 4 / 6.7;
  }

  .contact-band {
    grid-template-columns: 1fr auto;
    padding: 48px;
  }

  .contact-actions {
    justify-content: flex-end;
  }
}

@media (min-width: 1120px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .portfolio-nav {
    width: min(100% - 24px, 1180px);
    min-height: 68px;
  }

  .nav-actions a:not(.nav-cta) {
    display: none;
  }

  .hero,
  .overview,
  .services-section,
  .gallery-section,
  .contact-band,
  .page-footer {
    width: min(100% - 24px, 1180px);
  }

  .hero-showcase {
    grid-auto-rows: 78px;
  }

  .filter-bar {
    top: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .button,
  .filter-button,
  .work-card,
  .overview-grid article,
  .contact-band {
    border: 2px solid CanvasText;
  }
}
