:root {
  --dark: #010013;
  --light: #FAF9F6;
  --muted: rgba(250, 249, 246, 0.68);
  --muted-dark: rgba(1, 0, 19, 0.68);
  --line: rgba(250, 249, 246, 0.16);
  --line-dark: rgba(1, 0, 19, 0.12);
  --glass: rgba(250, 249, 246, 0.08);
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
  --radius-xl: 34px;
  --radius-md: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--dark);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 20%, rgba(250, 249, 246, 0.08), transparent 28%),
    radial-gradient(circle at 82% 4%, rgba(250, 249, 246, 0.06), transparent 24%),
    linear-gradient(135deg, #010013 0%, #05031e 48%, #010013 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.22;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(250, 249, 246, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 249, 246, 0.035) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, transparent, black 14%, black 80%, transparent);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(1, 0, 19, 0.74);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 195px;
}

.brand-logo {
  width: 142px;
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(250, 249, 246, 0.10));
}

.brand-text {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-links a {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(250, 249, 246, 0.76);
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--light);
  background: rgba(250, 249, 246, 0.08);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(250, 249, 246, 0.42);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  transition: 200ms ease;
}

.nav-cta:hover {
  background: var(--light);
  color: var(--dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--light);
  background: rgba(250, 249, 246, 0.05);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--light);
  transition: 200ms ease;
}

.hero {
  position: relative;
  min-height: calc(100svh - 82px);
  display: grid;
  align-items: center;
  padding: 90px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(320px, 0.93fr);
  gap: 54px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: rgba(250, 249, 246, 0.72);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

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

.hero h1,
.page-hero h1 {
  margin-bottom: 22px;
  font-size: clamp(52px, 8vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.hero h1 span,
.page-hero h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(250, 249, 246, 0.74);
}

.lead {
  max-width: 710px;
  color: rgba(250, 249, 246, 0.78);
  font-size: clamp(18px, 2vw, 22px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(250, 249, 246, 0.3);
  color: var(--light);
  background: rgba(250, 249, 246, 0.06);
  cursor: pointer;
  transition: 220ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(250, 249, 246, 0.62);
  background: rgba(250, 249, 246, 0.12);
}

.btn.primary {
  background: var(--light);
  color: var(--dark);
  border-color: var(--light);
}

.btn.primary:hover {
  box-shadow: 0 18px 40px rgba(250, 249, 246, 0.16);
}

.hero-card {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(250, 249, 246, 0.13), rgba(250, 249, 246, 0.025)),
    radial-gradient(circle at 52% 36%, rgba(250, 249, 246, 0.18), transparent 34%);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(250, 249, 246, 0.22);
  border-radius: 50%;
  animation: float 7s ease-in-out infinite;
}

.hero-card::before {
  width: 310px;
  height: 310px;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
}

.hero-card::after {
  width: 490px;
  height: 490px;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  animation-delay: -2s;
}

.camera-frame {
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(250, 249, 246, 0.20);
  border-radius: 26px;
}

.camera-frame span {
  position: absolute;
  width: 58px;
  height: 58px;
  border-color: var(--light);
  opacity: 0.92;
}

.camera-frame span:nth-child(1) { top: 0; left: 0; border-top: 3px solid; border-left: 3px solid; }
.camera-frame span:nth-child(2) { top: 0; right: 0; border-top: 3px solid; border-right: 3px solid; }
.camera-frame span:nth-child(3) { bottom: 0; left: 0; border-bottom: 3px solid; border-left: 3px solid; }
.camera-frame span:nth-child(4) { bottom: 0; right: 0; border-bottom: 3px solid; border-right: 3px solid; }

.hero-logo {
  position: absolute;
  width: min(76%, 420px);
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 32px 50px rgba(0, 0, 0, 0.38));
}

.hero-meta {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.meta-pill {
  padding: 18px;
  border-radius: 20px;
  background: rgba(1, 0, 19, 0.56);
  border: 1px solid rgba(250, 249, 246, 0.12);
  backdrop-filter: blur(15px);
}

.meta-pill strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.meta-pill small {
  color: rgba(250, 249, 246, 0.64);
}

.section {
  padding: 110px 0;
}

.section.tight {
  padding: 76px 0;
}

.paper {
  background: var(--light);
  color: var(--dark);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.55fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 46px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: clamp(38px, 5.5vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.section-head p {
  margin-bottom: 8px;
  color: var(--muted);
}

.paper .section-head p,
.paper .muted {
  color: var(--muted-dark);
}

.muted {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  min-height: 270px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(250, 249, 246, 0.055);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 240ms ease;
  overflow: hidden;
  position: relative;
}

.card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -80px;
  top: -80px;
  border-radius: 50%;
  border: 1px solid rgba(250, 249, 246, 0.18);
  transition: 260ms ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 249, 246, 0.38);
  background: rgba(250, 249, 246, 0.09);
}

.card:hover::after {
  transform: scale(1.35);
}

.card .number,
.service-number {
  color: rgba(250, 249, 246, 0.42);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.card h3 {
  margin: 34px 0 14px;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.card p {
  color: var(--muted);
  margin-bottom: 0;
}

.paper .card {
  border-color: var(--line-dark);
  background: rgba(1, 0, 19, 0.035);
}

.paper .card::after {
  border-color: rgba(1, 0, 19, 0.12);
}

.paper .card p {
  color: var(--muted-dark);
}

.paper .card .number,
.paper .service-number {
  color: rgba(1, 0, 19, 0.36);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.portrait-block {
  min-height: 510px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-dark);
  background:
    linear-gradient(135deg, rgba(1, 0, 19, 0.12), rgba(1, 0, 19, 0.02)),
    repeating-linear-gradient(-45deg, rgba(1, 0, 19, 0.055) 0 1px, transparent 1px 18px);
  position: relative;
  overflow: hidden;
}

.portrait-block::before {
  content: "OPREŠNIK";
  position: absolute;
  left: 28px;
  bottom: 18px;
  color: rgba(1, 0, 19, 0.07);
  font-size: clamp(46px, 7vw, 86px);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.portrait-block .logo-mark {
  width: min(84%, 410px);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.story h2 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.055em;
  margin-bottom: 24px;
}

.story p {
  color: var(--muted-dark);
  font-size: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 30px;
}

.stat {
  padding: 20px;
  border: 1px solid var(--line-dark);
  border-radius: 18px;
}

.stat strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted-dark);
  font-size: 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.project-card {
  min-height: 380px;
  grid-column: span 4;
  border-radius: 24px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(to top, rgba(1, 0, 19, 0.92), rgba(1, 0, 19, 0.12)),
    radial-gradient(circle at 30% 25%, rgba(250, 249, 246, 0.20), transparent 28%),
    linear-gradient(135deg, rgba(250, 249, 246, 0.12), rgba(250, 249, 246, 0.025));
}

.project-card.wide {
  grid-column: span 8;
}

.project-card.tall {
  min-height: 460px;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(250, 249, 246, 0.18);
  border-radius: 18px;
}

.project-content {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
}

.project-tag {
  display: inline-flex;
  border: 1px solid rgba(250, 249, 246, 0.24);
  border-radius: 999px;
  padding: 6px 11px;
  margin-bottom: 12px;
  color: rgba(250, 249, 246, 0.78);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card h3 {
  margin-bottom: 7px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.project-card p {
  margin-bottom: 0;
  color: rgba(250, 249, 246, 0.70);
}

.cta-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: clamp(30px, 5vw, 58px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(250, 249, 246, 0.13), rgba(250, 249, 246, 0.035)),
    radial-gradient(circle at 88% 18%, rgba(250, 249, 246, 0.18), transparent 25%);
}

.cta-block h2 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.cta-block p {
  margin-bottom: 0;
  color: var(--muted);
}

.page-hero {
  padding: 94px 0 68px;
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: rgba(250, 249, 246, 0.58);
  font-size: 14px;
  margin-bottom: 26px;
}

.breadcrumb a:hover {
  color: var(--light);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 48px;
}

.sidebar-note {
  position: sticky;
  top: 110px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(250, 249, 246, 0.055);
}

.sidebar-note p {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item span {
  color: rgba(250, 249, 246, 0.50);
  font-weight: 700;
}

.timeline-item h3 {
  margin-bottom: 8px;
  font-size: 26px;
}

.timeline-item p {
  color: var(--muted);
  margin-bottom: 0;
}

.service-list {
  display: grid;
  gap: 18px;
}

.service-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(250, 249, 246, 0.055);
}

.service-row h3 {
  font-size: clamp(25px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.045em;
  margin-bottom: 10px;
}

.service-row p {
  color: var(--muted);
  margin-bottom: 0;
}

.price-badge {
  white-space: nowrap;
  color: var(--dark);
  background: var(--light);
  border-radius: 999px;
  padding: 10px 15px;
  font-size: 13px;
}

.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 46px;
}

.process-step {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(250, 249, 246, 0.045);
}

.process-step strong {
  display: block;
  margin-bottom: 14px;
  color: rgba(250, 249, 246, 0.48);
}

.gallery-note {
  margin: 42px 0 0;
  padding: 20px 22px;
  border: 1px dashed rgba(250, 249, 246, 0.28);
  border-radius: 18px;
  color: rgba(250, 249, 246, 0.66);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.contact-card,
.form-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(250, 249, 246, 0.055);
  padding: clamp(24px, 4vw, 38px);
}

.contact-methods {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.contact-method {
  display: block;
  padding: 18px;
  border: 1px solid rgba(250, 249, 246, 0.12);
  border-radius: 18px;
  background: rgba(250, 249, 246, 0.035);
  transition: 180ms ease;
}

.contact-method:hover {
  transform: translateY(-2px);
  background: rgba(250, 249, 246, 0.08);
}

.contact-method span {
  display: block;
  color: rgba(250, 249, 246, 0.48);
  font-size: 13px;
}

.contact-method strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: rgba(250, 249, 246, 0.68);
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(250, 249, 246, 0.16);
  border-radius: 16px;
  background: rgba(1, 0, 19, 0.44);
  color: var(--light);
  padding: 14px 15px;
  outline: none;
  transition: 180ms ease;
}

input:focus,
textarea:focus {
  border-color: rgba(250, 249, 246, 0.54);
  box-shadow: 0 0 0 4px rgba(250, 249, 246, 0.08);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-help {
  margin-top: 14px;
  color: rgba(250, 249, 246, 0.58);
  font-size: 14px;
}

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: center;
}

.footer-logo {
  width: 145px;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(250, 249, 246, 0.64);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--light);
}

.credit {
  color: rgba(250, 249, 246, 0.46);
  font-size: 14px;
  text-align: right;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: 700ms cubic-bezier(.2, .7, .2, 1);
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -54%) scale(1.03); }
}

@media (max-width: 980px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .site-header.open .nav-links {
    position: absolute;
    top: 82px;
    left: 20px;
    right: 20px;
    display: grid;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(1, 0, 19, 0.96);
    box-shadow: var(--shadow);
  }

  .site-header.open .nav-links a {
    padding: 14px 16px;
  }

  .hero-grid,
  .split,
  .section-head,
  .two-col,
  .contact-grid,
  .cta-block {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 440px;
  }

  .cards,
  .process {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card,
  .project-card.wide {
    grid-column: span 6;
  }

  .sidebar-note {
    position: static;
  }

  .service-row {
    grid-template-columns: 1fr;
  }

  .price-badge {
    width: fit-content;
  }

  .credit {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .brand-logo {
    width: 118px;
  }

  .hero,
  .section,
  .page-hero {
    padding-block: 66px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(46px, 15vw, 72px);
  }

  .hero-card {
    min-height: 390px;
    border-radius: 26px;
  }

  .hero-meta,
  .stats,
  .form-grid,
  .footer-grid,
  .cards,
  .process {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card.wide {
    grid-column: span 12;
    min-height: 340px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .actions .btn {
    width: 100%;
  }
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 500ms ease;
}

.project-card:hover img {
  transform: scale(1.04);
}

.project-card img + .project-content {
  z-index: 2;
}


.project-card.has-image {
  background: var(--dark);
}

.project-card.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1, 0, 19, 0.92), rgba(1, 0, 19, 0.30) 45%, rgba(1, 0, 19, 0.08));
  z-index: 1;
  pointer-events: none;
}

.project-card.has-image::before {
  z-index: 3;
  pointer-events: none;
}

.project-card.has-image .project-content {
  z-index: 4;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(250, 249, 246, 0.08);
  color: var(--light);
}


.project-card.has-image h3 {
  color: var(--light);
}

.project-card.contain-image img {
  object-fit: contain;
  object-position: center center;
}

.project-card.contain-image {
  background:
    linear-gradient(to top, rgba(1, 0, 19, 0.96), rgba(1, 0, 19, 0.18)),
    linear-gradient(135deg, rgba(250, 249, 246, 0.08), rgba(250, 249, 246, 0.03));
}

.project-card img.focus-center {
  object-position: 60% center;
}


.sidebar-note {
  display: flex;
  flex-direction: column;
}

.about-card-photo {
  margin-top: 24px;
  flex: 1;
  min-height: 360px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(250, 249, 246, 0.14);
  background: rgba(1, 0, 19, 0.35);
}

.about-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}


/* Klik na fotografijo - prikaz celotne fotografije */
.project-card.has-image img,
.about-card-photo img {
  cursor: zoom-in;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 82px 24px 28px;
  background: rgba(1, 0, 19, 0.82);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.photo-lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.photo-lightbox__image {
  display: block;
  max-width: min(96vw, 1500px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
  transform: scale(0.94) translateY(12px);
  opacity: 0;
  transition: transform 300ms cubic-bezier(.2, .7, .2, 1), opacity 300ms ease;
}

.photo-lightbox.open .photo-lightbox__image {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.photo-lightbox__close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid rgba(250, 249, 246, 0.72);
  border-radius: 999px;
  background: #FAF9F6;
  color: #010013;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.36);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.photo-lightbox__close:hover,
.photo-lightbox__close:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46);
  outline: none;
}

.photo-lightbox__hint {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  color: rgba(250, 249, 246, 0.72);
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

body.lightbox-active {
  overflow: hidden;
}

@media (max-width: 640px) {
  .photo-lightbox {
    padding: 78px 14px 28px;
  }

  .photo-lightbox__image {
    max-width: 96vw;
    max-height: 80vh;
    border-radius: 14px;
  }

  .photo-lightbox__close {
    top: 14px;
    right: 14px;
    min-width: 104px;
    min-height: 42px;
    padding: 10px 14px;
  }
}


/* Mobile stability fix:
   On phones the scroll/reveal animations and hover transforms can make cards
   jump or move strangely while scrolling. These overrides keep the layout stable. */
@media (hover: none), (pointer: coarse) {
  .btn:hover,
  .nav-cta:hover,
  .card:hover,
  .contact-method:hover,
  .photo-lightbox__close:hover,
  .photo-lightbox__close:focus-visible {
    transform: none;
  }

  .card:hover::after,
  .project-card:hover img {
    transform: none;
  }
}

@media (max-width: 768px) {
  html {
    scroll-behavior: auto;
  }

  body::after {
    display: none;
  }

  [data-reveal],
  [data-reveal].visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-card::before,
  .hero-card::after {
    animation: none !important;
  }

  .hero-card::before {
    transform: translate(-50%, -50%) !important;
  }

  .hero-card::after {
    transform: translate(-50%, -50%) !important;
  }

  .project-card img,
  .photo-lightbox__image {
    transition: none !important;
  }

  .section-head {
    gap: 18px;
    margin-bottom: 28px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-card,
  .project-card.wide,
  .project-card.tall {
    grid-column: 1 / -1 !important;
    min-height: 390px;
  }

  .project-content {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .project-card h3 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .two-col {
    gap: 24px;
  }

  .sidebar-note {
    position: static;
    min-height: auto;
  }

  .about-card-photo {
    flex: none;
    min-height: 320px;
  }
}

@media (max-width: 430px) {
  .container {
    width: min(100% - 24px, var(--max));
  }

  .nav {
    min-height: 70px;
  }

  .site-header.open .nav-links {
    top: 74px;
    left: 12px;
    right: 12px;
  }

  .hero,
  .section,
  .page-hero {
    padding-block: 54px;
  }

  .hero h1,
  .page-hero h1 {
    letter-spacing: -0.055em;
  }

  .project-card,
  .project-card.wide,
  .project-card.tall {
    min-height: 360px;
    border-radius: 20px;
  }

  .project-card::before {
    inset: 14px;
    border-radius: 15px;
  }

  .project-tag {
    font-size: 11px;
    padding: 5px 10px;
    margin-bottom: 9px;
  }

  .project-card p {
    font-size: 14px;
    line-height: 1.45;
  }

  .hero-card {
    min-height: 340px;
  }

  .hero-logo {
    width: min(80%, 310px);
  }

  .hero-meta {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .meta-pill {
    padding: 14px;
  }

  .about-card-photo {
    min-height: 280px;
  }
}

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

/* FINAL MOBILE TEXT FIX
   On phones the gallery text is moved below each image instead of sitting
   over the photo. This prevents overlapping text and keeps every card readable. */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .container {
    width: min(100% - 24px, var(--max));
  }

  .section,
  .section.tight,
  .page-hero,
  .hero {
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .section-head {
    display: block;
    margin-bottom: 24px;
  }

  .section-head h2 {
    font-size: clamp(32px, 10vw, 46px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    overflow-wrap: break-word;
  }

  .section-head p,
  .lead,
  p {
    overflow-wrap: break-word;
  }

  .project-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 22px;
  }

  .project-card,
  .project-card.wide,
  .project-card.tall {
    grid-column: 1 / -1 !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    overflow: hidden;
    background: #010013;
  }

  .project-card::before,
  .project-card.has-image::before,
  .project-card.has-image::after {
    display: none !important;
  }

  .project-card img,
  .project-card img.focus-center,
  .project-card.contain-image img {
    position: relative !important;
    inset: auto !important;
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover !important;
    object-position: center center !important;
    transform: none !important;
    transition: none !important;
  }

  .project-content,
  .project-card img + .project-content,
  .project-card.has-image .project-content {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 2;
    width: 100%;
    padding: 18px 18px 20px;
    background: #010013;
  }

  .project-tag {
    margin-bottom: 10px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.10em;
    max-width: 100%;
    white-space: normal;
  }

  .project-card h3 {
    font-size: clamp(24px, 7vw, 32px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em;
    margin: 0 0 8px;
    overflow-wrap: break-word;
  }

  .project-card p {
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: break-word;
  }

  .card,
  .service-row,
  .timeline-item,
  .contact-card,
  .form-card,
  .sidebar-note {
    overflow-wrap: break-word;
  }

  .cta-block {
    display: block;
  }

  .cta-block .btn,
  .actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .project-card img,
  .project-card img.focus-center,
  .project-card.contain-image img {
    aspect-ratio: 1 / 1;
  }

  .project-content,
  .project-card img + .project-content,
  .project-card.has-image .project-content {
    padding: 16px;
  }

  .project-card h3 {
    font-size: clamp(22px, 8vw, 30px) !important;
  }

  .section-head h2 {
    font-size: clamp(30px, 11vw, 42px);
  }
}

/* Aligned footer */
.site-footer {
  padding: 54px 0 26px;
  border-top: 1px solid rgba(250, 249, 246, 0.12);
  background: rgba(1, 0, 19, 0.98);
}

.footer-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(150px, 0.75fr));
  gap: 34px;
  align-items: start;
}

.footer-brand {
  max-width: 360px;
}

.footer-logo {
  width: 160px;
  margin: 0 0 16px;
  display: block;
}

.footer-brand p {
  margin: 0;
  color: rgba(250, 249, 246, 0.62);
  font-size: 14px;
  line-height: 1.6;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.footer-column h3 {
  margin: 0 0 6px;
  color: rgba(250, 249, 246, 0.45);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-column a,
.footer-column span {
  color: rgba(250, 249, 246, 0.70);
  font-size: 14px;
  line-height: 1.35;
}

.footer-column a:hover,
.footer-bottom a:hover {
  color: var(--light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(250, 249, 246, 0.10);
}

.footer-bottom p {
  margin: 0;
  color: rgba(250, 249, 246, 0.45);
  font-size: 13px;
}

.footer-bottom a {
  color: rgba(250, 249, 246, 0.72);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .footer-layout {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 42px 0 22px;
  }

  .footer-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-logo {
    width: 145px;
  }

  .footer-column {
    gap: 8px;
  }

  .footer-bottom {
    display: grid;
    gap: 10px;
    align-items: start;
  }
}
