/* PAD — Plan Architecture and Design */

/* ── Fonts ─────────────────────────────────────────────────── */
@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueLTStd-Th.otf") format("opentype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueLTStd-Lt.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueLTStd-Roman.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HelveticaNeue";
  src: url("assets/fonts/HelveticaNeueLTStd-Md.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #000;
  color: #fff;
  min-height: 100vh;
}

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

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --bg-dark: #000;
  --bg-light: #fafaf9;
  --text-light: #fff;
  --text-dark: #0a0a0a;
  --nav-height: 60px;
  --nav-inset: 32px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--nav-inset);
  height: var(--nav-height);
  pointer-events: none;
}

.site-nav a { pointer-events: auto; }

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 36px;
  width: auto;
  opacity: 0.92;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

.nav-links a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Light nav variant (for text pages) */
.site-nav--light .nav-logo img {
  filter: none;
}

.site-nav--light .nav-links a {
  color: var(--text-dark);
}

/* ── Floating CTAs ──────────────────────────────────────────── */
.floating-ctas {
  position: fixed;
  bottom: 28px;
  right: 28px;
  bottom: max(28px, env(safe-area-inset-bottom));
  right: max(28px, env(safe-area-inset-right));
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.floating-ctas a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.floating-ctas a:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

.floating-ctas svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  padding: 28px var(--nav-inset);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  opacity: 0.45;
  text-align: center;
}

/* ── Home — Hero Loop ───────────────────────────────────────── */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 7s linear;
  will-change: transform;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-slide.active img {
    transform: scale(1.04);
  }
}

/* ── Projects — Grid ────────────────────────────────────────── */
.projects-page {
  background: var(--bg-dark);
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: #111;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease;
  position: absolute;
  inset: 0;
}

.project-card .card-img-hover {
  opacity: 0;
}

.project-card:hover .card-img-primary {
  opacity: 0;
}

.project-card:hover .card-img-hover {
  opacity: 1;
}

/* fallback: simple opacity dip if no second image */
.project-card.no-hover:hover .card-img-primary {
  opacity: 0.72;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .project-card {
    aspect-ratio: 3 / 2;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Project Detail ─────────────────────────────────────────── */
.project-detail {
  background: var(--bg-dark);
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.project-photos {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(32px, 5vw, 80px) clamp(24px, 8vw, 160px);
  max-width: 1400px;
  margin: 0 auto;
}

.project-photos figure {
  margin: 0;
  line-height: 0;
}

.project-photos img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 85vh;
  object-fit: contain;
}

/* Full-bleed variant for landscape photos */
.project-photos .full-bleed img {
  max-height: none;
  object-fit: cover;
  height: 80vh;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px var(--nav-inset) 60px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

.project-nav a:hover {
  opacity: 1;
  color: #fff;
}

.project-nav a {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

/* ── Studio ──────────────────────────────────────────────────── */
.studio-page {
  background: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
}

.studio-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: calc(var(--nav-height) + 60px) var(--nav-inset) 80px;
  gap: 0;
}

.studio-portrait {
  width: 100%;
  max-width: 900px;
  margin-bottom: 48px;
  line-height: 0;
}

.studio-portrait img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
  object-position: center center;
}

.studio-identity {
  text-align: center;
}

.studio-identity .logo-mark {
  height: 28px;
  width: auto;
  margin: 0 auto 20px;
  filter: brightness(0);
  opacity: 0.85;
}

.studio-identity p {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 2;
  opacity: 0.7;
}

.studio-copy {
  max-width: 560px;
  margin-top: 40px;
  text-align: center;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  opacity: 0.8;
}

/* ── Contact ─────────────────────────────────────────────────── */
.contact-page {
  background: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: calc(var(--nav-height) + 60px) var(--nav-inset) 80px;
  max-width: 480px;
}

.contact-inner h1 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 48px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.contact-list .label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.4;
}

.contact-list a,
.contact-list address {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.02em;
  font-style: normal;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  line-height: 1.6;
}

.contact-list a:hover {
  opacity: 1;
}

/* ── Utility ─────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
  .hero-slide img { transition: none; }
  .hero-slide.active img { transform: scale(1); }
  .floating-ctas a { transition: none; }
}

@media (max-width: 480px) {
  :root {
    --nav-inset: 20px;
    --nav-height: 54px;
  }

  .nav-logo img { height: 22px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }

  .studio-portrait img { height: 55vh; }
  .studio-portrait { max-width: 100%; }

  .project-nav { padding: 28px var(--nav-inset) 48px; }
}
