/*
Theme Name:  Osman Originals
Theme URI:   https://www.osmanoriginals.co.uk
Author:      Osman Originals
Description: Custom homepage theme for Osman Originals — period restoration & bespoke joinery.
Version:     1.0.0
License:     GNU General Public License v2 or later
Text Domain: osman-originals
*/

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --cream:      #F7F3ED;
  --warm-white: #FAF8F4;
  --charcoal:   #2C2C2A;
  --charcoal-2: #3C3C38;
  --brass:      #B8A882;
  --brass-light:#D4C9A8;
  --stone:      #8C8779;
  --border:     rgba(44, 44, 42, 0.12);
  --border-mid: rgba(44, 44, 42, 0.22);

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;

  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  48px;
  --space-xl:  80px;

  --radius-sm: 4px;
  --radius-md: 8px;

  --nav-h: 90px;
  --max-w: 1100px;
}

/* ─── Base ───────────────────────────────────────────────── */
body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-label {
  font-family: var(--ff-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: var(--space-md);
}

.divider {
  height: 1px;
  background: var(--border);
}

/* ─── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: visible;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
  gap: var(--space-md);
}

.nav__logo {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* WordPress nav menu */
.nav__menu {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav__menu a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  transition: color 0.2s;
}

.nav__menu a:hover,
.nav__menu .current-menu-item > a { color: var(--charcoal); }

.nav__cta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
  border: 1px solid var(--border-mid);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, border-color 0.2s;
}

.nav__cta:hover {
  background: var(--charcoal);
  color: var(--warm-white);
  border-color: var(--charcoal);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--charcoal);
  transition: transform 0.25s, opacity 0.25s;
}

/* Mobile nav drawer */
.nav__drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--warm-white);
  z-index: 300;
  flex-direction: column;
  padding: var(--space-xl) var(--space-md);
  gap: var(--space-md);
  overflow-y: auto;
}

.nav__drawer.open { display: flex; }

.nav__drawer .nav__drawer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.nav__drawer .nav__drawer-menu a {
  font-family: var(--ff-display);
  font-size: 28px;
  color: var(--charcoal);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-sm);
  display: block;
}

.nav__drawer-close {
  position: absolute;
  top: 20px;
  right: var(--space-md);
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--charcoal);
  line-height: 1;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--brass);
  color: var(--charcoal);
  border: 1px solid var(--brass);
}
.btn--primary:hover { background: var(--brass-light); border-color: var(--brass-light); }

.btn--ghost {
  background: transparent;
  color: var(--brass);
  border: 1px solid rgba(184,168,130,0.4);
}
.btn--ghost:hover { background: rgba(184,168,130,0.1); border-color: var(--brass); }

.btn--dark {
  background: var(--charcoal);
  color: var(--warm-white);
  border: 1px solid var(--charcoal);
}
.btn--dark:hover { background: var(--charcoal-2); border-color: var(--charcoal-2); }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  background: var(--charcoal);
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: var(--space-xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
}

.hero.has-bg-image {
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,24,18,0.75) 0%, rgba(28,24,18,0.3) 60%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero__eyebrow {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: var(--space-sm);
}

.hero__h1 {
  font-family: var(--ff-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  color: #F5F0E8;
  margin-bottom: var(--space-sm);
}

.hero__h1 em { font-style: italic; color: var(--brass-light); }

.hero__sub {
  font-size: 15px;
  font-weight: 300;
  color: #9E9A8E;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--space-md);
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ─── Services ───────────────────────────────────────────── */
.services { padding: var(--space-lg) 0; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.service-card {
  padding: var(--space-md) var(--space-md) var(--space-lg);
  border-right: 1px solid var(--border);
  background: var(--warm-white);
  transition: background 0.2s;
}
.service-card:last-child { border-right: none; }
.service-card:hover { background: var(--cream); }

.service-card__icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--stone);
}

.service-card__icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card__title {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 400;
  margin-bottom: var(--space-xs);
  color: var(--charcoal);
}

.service-card__desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.65;
}

/* ─── Portfolio ──────────────────────────────────────────── */
.portfolio {
  padding: var(--space-lg) 0;
  background: var(--cream);
}

.portfolio__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.portfolio__link {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  border-bottom: 1px solid var(--border-mid);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.portfolio__link:hover { color: var(--charcoal); }

.portfolio__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-xs);
}

.port-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--charcoal);
  cursor: pointer;
}

.port-item--1 { grid-row: 1 / 3; min-height: 480px; }
.port-item--2 { min-height: 232px; }
.port-item--3 { min-height: 232px; }

.port-item img {
  position: absolute;
  inset: 0;
  transition: transform 0.5s ease;
}
.port-item:hover img { transform: scale(1.04); }

.port-item__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--space-md) var(--space-sm) var(--space-sm);
  background: linear-gradient(transparent, rgba(20,16,8,0.85));
}

.port-item__label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F5F0E8;
}

.port-item__title {
  font-family: var(--ff-display);
  font-size: 15px;
  color: #F5F0E8;
  margin-top: 2px;
}

/* ─── About ──────────────────────────────────────────────── */
.about { padding: var(--space-xl) 0; }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about__img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background: var(--cream);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.about__pullquote {
  font-family: var(--ff-display);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--charcoal);
  margin-bottom: var(--space-md);
}
.about__pullquote em { font-style: italic; color: var(--stone); }

.about__text {
  font-size: 14px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.about__link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  border-bottom: 1px solid var(--border-mid);
  padding-bottom: 2px;
  display: inline-block;
  transition: border-color 0.2s;
}
.about__link:hover { border-color: var(--charcoal); }

/* ─── CTA strip ──────────────────────────────────────────── */
.cta-strip {
  padding: var(--space-xl) 0;
  background: var(--charcoal);
  text-align: center;
}

.cta-strip__h {
  font-family: var(--ff-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 400;
  color: #F5F0E8;
  margin-bottom: var(--space-xs);
}

.cta-strip__sub {
  font-size: 14px;
  font-weight: 300;
  color: #9E9A8E;
  margin-bottom: var(--space-md);
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--warm-white);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.footer__logo {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: var(--space-xs);
}

.footer__tagline {
  font-size: 12px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.7;
}

.footer__heading {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: var(--space-sm);
}

/* WordPress footer nav menu */
.footer__nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__nav-menu a {
  font-size: 13px;
  font-weight: 300;
  color: var(--charcoal);
  transition: color 0.2s;
}
.footer__nav-menu a:hover { color: var(--stone); }

.footer__address {
  font-size: 13px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.8;
  font-style: normal;
}
.footer__address a {
  color: var(--charcoal);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}
.footer__address a:hover { border-color: var(--charcoal); }

.footer__bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy { font-size: 11px; color: var(--stone); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav__menu,
  .nav__cta,
  .nav__social { display: none; }
  .nav__hamburger { display: flex; }

  .services__grid { grid-template-columns: 1fr; }
  .service-card { border-right: none; border-bottom: 1px solid var(--border); }
  .service-card:last-child { border-bottom: none; }

  .portfolio__grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .port-item--1 { grid-row: auto; min-height: 260px; }
  .port-item--2, .port-item--3 { min-height: 180px; }

  .about__grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .about__img { aspect-ratio: 16 / 9; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__inner > *:first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --space-lg: 32px; --space-xl: 52px; }

  .hero { min-height: 420px; padding-top: var(--space-lg); }
  .hero__h1 { font-size: 28px; }

  .portfolio__header { flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
  .portfolio__grid { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr; }
  .footer__inner > *:first-child { grid-column: auto; }
  .footer__bottom { flex-direction: column; gap: var(--space-xs); text-align: center; }
}

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

/* ─── Built-in brass logo (fallback when no WP custom logo set) ── */
.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo-img {
  height: 70px;
  width: auto;
  max-width: 240px;
  display: block;
}

/* ─── Custom logo via WP Customiser ─────────────────────────── */
.nav__logo .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}

.nav__logo .custom-logo {
  height: 70px;
  width: auto;
  max-width: 240px;
  display: block;
  object-fit: contain;
}

/* Scale logo down on small screens */
@media (max-width: 480px) {
  .nav__logo-img,
  .nav__logo .custom-logo {
    height: 48px;
    max-width: 160px;
  }
}

/* ─── Fir cone icon (legacy — kept for reference) ───────────── */
.nav__cone {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   PORTFOLIO ARCHIVE — gallery grid
   ════════════════════════════════════════════════════════════ */

.port-archive {
  padding: var(--space-lg) 0 var(--space-xl);
}

.port-archive__header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: end;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.port-archive__title {
  font-family: var(--ff-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.1;
  margin-top: 4px;
}

.port-archive__sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.7;
  align-self: end;
}

/* ─── Filter bar ─────────────────────────────────────────────── */
.port-filter {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.port-filter__btn {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.port-filter__btn:hover {
  border-color: var(--border-mid);
  color: var(--charcoal);
}

.port-filter__btn.active {
  background: var(--charcoal);
  color: var(--warm-white);
  border-color: var(--charcoal);
}

/* ─── Gallery grid ───────────────────────────────────────────── */
.port-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.port-grid__empty {
  font-size: 14px;
  color: var(--stone);
  padding: var(--space-lg) 0;
  text-align: center;
}

/* ─── Project card ───────────────────────────────────────────── */
.port-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--warm-white);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.3s;
}

.port-card.hidden {
  display: none;
}

.port-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(44,44,42,0.1);
}

.port-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.port-card__img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream);
}

.port-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.port-card:hover .port-card__img img {
  transform: scale(1.05);
}

.port-card__img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone);
}

.port-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 18, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.port-card:hover .port-card__overlay {
  background: rgba(28, 24, 18, 0.45);
}

.port-card__view {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F5F0E8;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
}

.port-card:hover .port-card__view {
  opacity: 1;
  transform: translateY(0);
}

.port-card__info {
  padding: var(--space-sm);
}

.port-card__cat {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 4px;
}

.port-card__title {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 4px;
  line-height: 1.3;
}

.port-card__excerpt {
  font-size: 12px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.6;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.port-card__count {
  font-size: 10px;
  color: var(--stone);
  letter-spacing: 0.04em;
}


/* ════════════════════════════════════════════════════════════
   SINGLE PROJECT — header, gallery, nav
   ════════════════════════════════════════════════════════════ */

/* ─── Breadcrumb ─────────────────────────────────────────────── */
.proj-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--stone);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.proj-breadcrumb a {
  color: var(--stone);
  transition: color 0.2s;
}
.proj-breadcrumb a:hover { color: var(--charcoal); }

/* ─── Project header ─────────────────────────────────────────── */
.proj-header {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}

.proj-header__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.proj-header__title {
  font-family: var(--ff-display);
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  margin-top: 4px;
  margin-bottom: var(--space-sm);
}

.proj-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.proj-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--stone);
  font-weight: 300;
}

.proj-header__desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.8;
}

.proj-header__desc p { margin-bottom: var(--space-sm); }
.proj-header__desc p:last-child { margin-bottom: 0; }

/* ─── Gallery grid ───────────────────────────────────────────── */
.proj-gallery {
  padding: var(--space-lg) 0;
}

.proj-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

/* First image spans 2 columns and 2 rows for visual interest */
.proj-gallery__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.proj-gallery__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--cream);
  border: none;
  padding: 0;
  cursor: zoom-in;
  border-radius: var(--radius-sm);
}

.proj-gallery__item:first-child {
  aspect-ratio: 1;
}

.proj-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.proj-gallery__item:hover img {
  transform: scale(1.04);
}

.proj-gallery__zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 24, 18, 0);
  color: #F5F0E8;
  opacity: 0;
  transition: background 0.3s, opacity 0.3s;
}

.proj-gallery__item:hover .proj-gallery__zoom {
  background: rgba(28, 24, 18, 0.4);
  opacity: 1;
}

/* ─── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 10, 0.94);
  cursor: pointer;
}

.lightbox__stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 80px);
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 2px;
  display: block;
  transition: opacity 0.2s;
}

.lightbox__img.loading { opacity: 0; }

.lightbox__loader {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.lightbox__loader.active { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.lightbox__caption {
  font-size: 12px;
  font-weight: 300;
  color: rgba(245, 240, 232, 0.6);
  text-align: center;
  margin-top: 12px;
  min-height: 18px;
  letter-spacing: 0.03em;
}

.lightbox__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 2;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #F5F0E8;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox__close:hover { background: rgba(255,255,255,0.2); }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #F5F0E8;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255,255,255,0.18); }
.lightbox__prev { left: var(--space-sm); }
.lightbox__next { right: var(--space-sm); }

.lightbox__prev:disabled,
.lightbox__next:disabled { opacity: 0.3; cursor: default; }

.lightbox__counter {
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(245, 240, 232, 0.45);
  letter-spacing: 0.08em;
  z-index: 2;
  white-space: nowrap;
}

/* ─── Project nav (prev / next / all) ───────────────────────── */
.proj-nav {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  background: var(--cream);
}

.proj-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.proj-nav__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 240px;
}

.proj-nav__link--next { align-items: flex-end; text-align: right; }

.proj-nav__dir {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  transition: color 0.2s;
}
.proj-nav__link:hover .proj-nav__dir { color: var(--charcoal); }

.proj-nav__name {
  font-family: var(--ff-display);
  font-size: 15px;
  color: var(--charcoal);
}

.proj-nav__all {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  border: 1px solid var(--border-mid);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.proj-nav__all:hover {
  background: var(--charcoal);
  color: var(--warm-white);
  border-color: var(--charcoal);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .port-archive__header { grid-template-columns: 1fr; gap: var(--space-sm); }
  .port-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-header__inner { grid-template-columns: 1fr; gap: var(--space-md); }
  .proj-gallery__grid { grid-template-columns: repeat(3, 1fr); }
  .proj-gallery__item:first-child { grid-column: span 2; grid-row: span 1; }
  .lightbox__stage { max-width: calc(100vw - 100px); }
}

@media (max-width: 600px) {
  .port-grid { grid-template-columns: 1fr; }
  .proj-gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .proj-gallery__item:first-child { grid-column: span 2; }
  .lightbox__stage { max-width: calc(100vw - 24px); }
  .lightbox__prev { left: 4px; }
  .lightbox__next { right: 4px; }
  .proj-nav__inner { flex-direction: column; align-items: stretch; text-align: center; }
  .proj-nav__link--next { align-items: center; text-align: center; }
  .proj-nav__all { text-align: center; }
}

/* ════════════════════════════════════════════════════════════
   CONTACT PAGE
   ════════════════════════════════════════════════════════════ */

.contact-page {
  padding: var(--space-lg) 0 var(--space-xl);
}

/* ─── Page header ────────────────────────────────────────────── */
.contact-page__header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: end;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.contact-page__title {
  font-family: var(--ff-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.15;
  margin-top: 4px;
}

.contact-page__intro {
  font-size: 14px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.75;
  align-self: end;
}

/* ─── Body: two-column layout ────────────────────────────────── */
.contact-page__body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-xl);
  align-items: start;
}

/* ─── Notices ────────────────────────────────────────────────── */
.contact-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 14px;
  line-height: 1.6;
}

.contact-notice svg { flex-shrink: 0; margin-top: 2px; }

.contact-notice strong { display: block; font-weight: 500; margin-bottom: 2px; }
.contact-notice p { margin: 0; font-weight: 300; }

.contact-notice--success {
  background: #F0F7F0;
  border: 1px solid #C3DFC3;
  color: #2D5A2D;
}

.contact-notice--error {
  background: #FDF3F3;
  border: 1px solid #E8C3C3;
  color: #6B2D2D;
}

/* ─── Form ───────────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Honeypot — visually hidden */
.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-form__req {
  color: var(--brass);
  font-size: 14px;
  line-height: 1;
}

.contact-form__optional {
  font-size: 11px;
  font-weight: 300;
  color: var(--stone);
  letter-spacing: 0;
}

.contact-form__input {
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--charcoal);
  background: var(--warm-white);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(184, 168, 130, 0.15);
}

.contact-form__input::placeholder { color: var(--stone); opacity: 0.7; }

.contact-form__select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C8779' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.contact-form__textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.contact-form__captcha-notice {
  font-size: 12px;
  color: var(--stone);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.contact-form__submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 4px;
}

.contact-form__privacy {
  font-size: 11px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.6;
  margin-top: 4px;
}

/* ─── Info panel ─────────────────────────────────────────────── */
.contact-info {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info__block {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.contact-info__icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-info__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 3px;
}

.contact-info__value {
  font-size: 13px;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1.7;
  font-style: normal;
}

.contact-info__value--link {
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}
.contact-info__value--link:hover {
  color: var(--stone);
  border-color: var(--stone);
}

.contact-info__note {
  border-top: 1px solid var(--border);
  padding-top: var(--space-sm);
  font-size: 12px;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.7;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .contact-page__header { grid-template-columns: 1fr; gap: var(--space-sm); }
  .contact-page__body   { grid-template-columns: 1fr; }
  .contact-info { order: -1; } /* info panel above form on mobile */
}

@media (max-width: 600px) {
  .contact-form__row { grid-template-columns: 1fr; }
  .contact-form__submit { width: 100%; justify-content: center; }
}

/* ─── Front page portfolio items — full click area ───────────── */
a.port-item {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

a.port-item .port-item__overlay {
  background: linear-gradient(transparent, rgba(20,16,8,0.75));
  transition: background 0.3s;
}

a.port-item:hover .port-item__overlay {
  background: linear-gradient(transparent, rgba(20,16,8,0.92));
}

a.port-item img {
  transition: transform 0.5s ease;
}

a.port-item:hover img {
  transform: scale(1.04);
}

/* ─── Social icons — nav ─────────────────────────────────────── */
.nav__social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--stone);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav__social-link:hover {
  color: var(--charcoal);
  border-color: var(--border-mid);
  background: var(--cream);
}

/* ─── Social icons — mobile drawer ──────────────────────────── */
.nav__drawer-social {
  display: flex;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  margin-top: var(--space-sm);
}

.nav__drawer-social a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-display);
  font-size: 18px;
  color: var(--stone);
  border-bottom: none;
  padding-bottom: 0;
  transition: color 0.2s;
}

.nav__drawer-social a:hover { color: var(--charcoal); }

/* ─── Social icons — footer ──────────────────────────────────── */
.footer__social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer__social-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--stone);
  transition: color 0.2s;
}

.footer__social-link:hover { color: var(--charcoal); }

.footer__social-link svg { flex-shrink: 0; }

.footer__bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

@media (max-width: 600px) {
  .footer__social { order: -1; width: 100%; }
}
