/* ============================================================
   AP Studio — Architectural Visualization
   Dark cinematic design system
   ============================================================ */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/fraunces-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
}

:root {
  --bg: #0c0c0e;
  --bg-raise: #131316;
  --bg-card: #17171b;
  --ink: #ece7de;
  --ink-dim: #a49e93;
  --ink-faint: #6d685f;
  --accent: #c8a468;
  --accent-soft: rgba(200, 164, 104, 0.14);
  --line: rgba(236, 231, 222, 0.09);
  --serif: 'Fraunces', 'Georgia', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(20px, 4.5vw, 64px);
  --max: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: #121212; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- typography ---------- */

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 380;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-head { max-width: 720px; margin-bottom: clamp(36px, 6vw, 64px); }
.section-head h2 { font-size: clamp(30px, 4.4vw, 52px); margin-bottom: 16px; }
.section-head p { color: var(--ink-dim); font-size: 17px; max-width: 560px; }

.section { padding: clamp(72px, 10vw, 140px) 0; }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.btn .arr { transition: transform 0.25s ease; }
.btn:hover .arr { transform: translateX(4px); }

.btn-solid { background: var(--ink); color: #121212; }
.btn-solid:hover { background: var(--accent); }

.btn-ghost { border-color: rgba(236, 231, 222, 0.28); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(12, 12, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo { display: flex; align-items: center; gap: 13px; }
.logo-mark {
  height: 26px;
  width: auto;
  display: block;
}
.footer-logo img { height: 48px; width: auto; display: block; }
.logo-word {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.logo-word span { color: var(--ink-dim); font-weight: 400; }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
}
.nav-cta {
  border: 1px solid rgba(236, 231, 222, 0.28);
  padding: 10px 20px !important;
  border-radius: 2px;
  color: var(--ink) !important;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; }
.nav-cta::after { display: none !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  position: relative;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--ink);
  margin: 6px auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 14, 0.97);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .main-nav a { font-size: 18px; }
  body.nav-open .main-nav { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: kenburns 26s ease-out both;
}
@keyframes kenburns {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; }
  html { scroll-behavior: auto; }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(12,12,14,0.94) 0%, rgba(12,12,14,0.35) 45%, rgba(12,12,14,0.25) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(64px, 10vh, 120px);
  padding-top: 140px;
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 84px);
  max-width: 15ch;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(236, 231, 222, 0.82);
  max-width: 52ch;
  margin-bottom: 40px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute;
  right: var(--pad);
  bottom: 40px;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-dim);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 12px;
}
.scroll-hint::after {
  content: '';
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}
@media (max-width: 700px) { .scroll-hint { display: none; } }

/* ---------- credentials strip ---------- */

.creds {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise);
}
.creds-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.cred {
  padding: 30px 26px;
  border-left: 1px solid var(--line);
}
.cred:first-child { border-left: 0; }
.cred b {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 450;
  margin-bottom: 4px;
}
.cred span { font-size: 13px; color: var(--ink-dim); }
@media (max-width: 900px) {
  .creds-inner { grid-template-columns: 1fr 1fr; }
  .cred:nth-child(3) { border-left: 0; }
  .cred { border-top: 1px solid var(--line); }
  .cred:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 520px) {
  .creds-inner { grid-template-columns: 1fr; }
  .cred { border-left: 0 !important; }
  .cred:first-child { border-top: 0; }
}

/* ---------- work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}
.tile {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-card);
  grid-column: span 4;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}
.tile.wide { grid-column: span 8; aspect-ratio: auto; }
.tile.half { grid-column: span 6; }
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 0.5s ease;
}
.tile:hover img { transform: scale(1.045); }
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,12,0.78) 0%, transparent 46%);
  opacity: 0.85;
  transition: opacity 0.4s ease;
}
.tile:hover::after { opacity: 1; }
.tile-label {
  position: absolute;
  z-index: 2;
  left: 22px; right: 22px; bottom: 18px;
}
.tile-label .cat {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}
.tile-label .name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 420;
  line-height: 1.25;
}
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tile, .tile.wide, .tile.half { grid-column: span 1; aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
}

.grid-foot { margin-top: 48px; text-align: center; }

/* ---------- portfolio filters ---------- */

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.25s ease;
}
.filter-btn:hover { color: var(--ink); border-color: rgba(236,231,222,0.3); }
.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #121212;
}
.tile.hidden { display: none; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 8, 10, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lb-img {
  max-width: min(92vw, 1600px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 2px;
}
.lb-caption {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 28px;
  text-align: center;
  max-width: 80vw;
}
.lb-caption .cat {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.lb-caption .name { font-family: var(--serif); font-size: 18px; }
.lb-btn {
  position: absolute;
  background: rgba(236,231,222,0.06);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  display: grid; place-items: center;
  transition: all 0.2s ease;
}
.lb-btn:hover { background: var(--accent); color: #121212; border-color: var(--accent); }
.lb-close { top: 26px; right: 26px; }
.lb-prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 26px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb-btn { width: 44px; height: 44px; }
}

/* ---------- services ---------- */

.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.svc-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}
.svc-card .svc-img { aspect-ratio: 16 / 9; overflow: hidden; }
.svc-card .svc-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.svc-card:hover .svc-img img { transform: scale(1.04); }
.svc-body { padding: 30px 30px 34px; flex: 1; }
.svc-body h3 { font-size: 24px; margin-bottom: 12px; }
.svc-body p { color: var(--ink-dim); font-size: 15px; margin-bottom: 18px; }
.svc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-list li {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 2px;
}
@media (max-width: 800px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---------- process ---------- */

.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}
.step h3 { font-size: 23px; margin-bottom: 10px; }
.step p { color: var(--ink-dim); max-width: 640px; }
.step .note { margin-top: 10px; font-size: 13px; color: var(--accent); letter-spacing: 0.04em; }
@media (max-width: 640px) {
  .step { grid-template-columns: 1fr; gap: 10px; padding: 30px 0; }
  .step-num { font-size: 30px; }
}

.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 46px;
}
.tools-row li {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  padding: 12px 22px;
  border-radius: 2px;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}
.about-copy p { color: var(--ink-dim); margin-bottom: 20px; font-size: 16.5px; }
.about-copy p strong { color: var(--ink); font-weight: 600; }
.about-side { position: sticky; top: 110px; }
.about-side .frame {
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 26px;
}
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.fact-list li span:first-child { color: var(--ink-faint); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11.5px; padding-top: 2px; white-space: nowrap; }
.fact-list li span:last-child { text-align: right; color: var(--ink-dim); }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; }
}

/* ---------- awards band ---------- */

.awards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.award {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 32px 28px;
  background: var(--bg-card);
}
.award .yr { font-size: 12px; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase; }
.award h3 { font-size: 21px; margin: 12px 0 8px; }
.award p { font-size: 14px; color: var(--ink-dim); }
@media (max-width: 800px) { .awards { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(36px, 6vw, 90px);
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 18px; }
.contact-info > p { color: var(--ink-dim); margin-bottom: 34px; max-width: 46ch; }
.contact-lines li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-lines li:last-child { border-bottom: 1px solid var(--line); }
.contact-lines .k { font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.contact-lines a { font-size: 17px; transition: color 0.2s ease; }
.contact-lines a:hover { color: var(--accent); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.field input, .field select, .field textarea {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  padding: 14px 16px;
  transition: border-color 0.2s ease;
  width: 100%;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%), linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-status { font-size: 14px; color: var(--accent); }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 12vw, 150px) 0;
  text-align: center;
}
.cta-band .bg {
  position: absolute; inset: 0;
}
.cta-band .bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-band .bg::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(10, 10, 12, 0.82);
}
.cta-inner { position: relative; z-index: 2; }
.cta-inner h2 {
  font-size: clamp(32px, 5vw, 60px);
  max-width: 22ch;
  margin: 0 auto 20px;
}
.cta-inner p { color: var(--ink-dim); margin-bottom: 38px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-raise);
  padding: 64px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-brand p { color: var(--ink-dim); font-size: 14px; max-width: 34ch; margin-top: 16px; }
.footer-col h4 {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14.5px; color: var(--ink-dim); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--ink); }
.footer-base {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-faint);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- page hero (inner pages) ---------- */

.page-hero {
  padding: 190px 0 70px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(36px, 5.5vw, 68px); max-width: 18ch; margin-bottom: 18px; }
.page-hero p { color: var(--ink-dim); font-size: 17px; max-width: 58ch; }

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
