/* Space Innovative — shared styles */

:root {
  --bg: #fff;
  --fg: #111;
  --muted: #6d6b67;
  --line: #e6e4df;
  --warm: #b7b5b0;
  --dark: #0e0e0e;
  --accent: #7904b8;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --gap: clamp(0.75rem, 1.6vw, 1.5rem);
  --max: 1680px;
  --nav-h: 84px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

section[id] { scroll-margin-top: var(--nav-h); }

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: #fff; color: var(--fg); padding: 0.6rem 1rem; font-size: 0.875rem;
}
.skip:focus { top: 1rem; }

/* ---------- Type & utilities ---------- */

.label {
  font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

.section { padding: clamp(4rem, 10vw, 9rem) var(--pad); }
.wrap { max-width: var(--max); margin: 0 auto; }

.btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  border: 1px solid currentColor; padding: 0.95rem 1.75rem;
  font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { background: var(--fg); border-color: var(--fg); color: #fff; }

.link-arrow::after { content: "\2192"; margin-left: 0.6em; display: inline-block; transition: transform 0.3s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* Scroll reveal (only active when JS has run) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h); color: #fff;
  transition: background 0.35s, color 0.35s, box-shadow 0.35s;
}
.nav-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
}
.brand { display: flex; align-items: center; gap: 0.8rem; }
.brand img { height: 30px; width: auto; }
.brand span { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; }
.brand .logo-dark { display: none; }

.nav.is-solid { background: rgba(255, 255, 255, 0.96); color: var(--fg); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav.is-solid .logo-light { display: none; }
.nav.is-solid .logo-dark { display: block; }

.menu-btn {
  display: inline-flex; align-items: center; gap: 0.8rem;
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.5rem 0; transition: opacity 0.25s;
}
.menu-btn:hover { opacity: 0.6; }
.menu-btn i { display: grid; gap: 6px; width: 26px; }
.menu-btn i::before, .menu-btn i::after { content: ""; display: block; height: 1px; background: currentColor; }

/* Menu panel (slides in from the right) */
.panel { position: fixed; inset: 0; z-index: 60; visibility: hidden; transition: visibility 0s linear 0.5s; }
.panel.is-open { visibility: visible; transition-delay: 0s; }
.panel-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.45s; }
.panel.is-open .panel-scrim { opacity: 1; }
.panel-sheet {
  position: absolute; top: 0; right: 0; height: 100%; width: min(560px, 100%);
  background: #fff; color: var(--fg);
  padding: 0 var(--pad) 2rem; overflow-y: auto;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.5s var(--ease);
}
.panel.is-open .panel-sheet { transform: none; }
.panel-head { height: var(--nav-h); display: flex; align-items: center; justify-content: flex-end; flex: none; }
.panel-links { margin-top: 1.5rem; }
.panel-links > a { display: block; padding: 0.4rem 0; font-size: clamp(1.75rem, 3.2vw, 2.25rem); font-weight: 300; letter-spacing: -0.02em; transition: color 0.25s; }
.panel-links a:hover { color: var(--warm); }
.panel-sub { margin: 0.25rem 0 1.25rem; padding-left: 0.1rem; }
.panel-sub a { display: block; padding: 0.3rem 0; font-size: 1rem; color: var(--muted); transition: color 0.25s; }
.panel-sub a:hover { color: var(--fg); }
.panel-foot { margin-top: auto; padding-top: 3rem; font-size: 0.875rem; color: var(--muted); display: grid; gap: 0.35rem; }
.panel-foot a { color: var(--fg); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

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

.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  background: #000; color: #fff; overflow: hidden;
}
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 50%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 22%);
}
.hero-copy {
  position: absolute; z-index: 2; left: var(--pad); right: var(--pad);
  bottom: clamp(1.5rem, 5vh, 3.5rem);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
}
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 5rem); font-weight: 300; line-height: 1.04; letter-spacing: -0.035em; }
.hero-caption {
  display: inline-block; margin-top: 1.5rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.9;
}
.hero-caption:hover { opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.dots { display: flex; gap: 0.35rem; flex: none; padding-bottom: 0.35rem; }
.dots button { position: relative; width: 30px; height: 2px; background: rgba(255, 255, 255, 0.4); transition: background 0.3s; }
.dots button::before { content: ""; position: absolute; inset: -14px 0; }
.dots button.is-active { background: #fff; }

/* ---------- Home: statement ---------- */

.statement h2 {
  font-size: clamp(1.625rem, 3.3vw, 3.25rem); font-weight: 300;
  line-height: 1.18; letter-spacing: -0.02em; max-width: 27em;
}
.statement .btn { margin-top: clamp(2rem, 4vw, 3.5rem); }

/* ---------- Home: projects grid ---------- */

.projects { padding-top: 0; }
.projects-head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.projects-grid {
  display: grid; grid-template-columns: repeat(8, 1fr);
  column-gap: clamp(1rem, 2.2vw, 2rem); row-gap: clamp(2rem, 5vw, 5rem);
}
.p1 { grid-row: 1; grid-column: 3 / 9; }
.p2 { grid-row: 2; grid-column: 1 / 5; }
.p3 { grid-row: 2; grid-column: 6 / 9; align-self: end; }
.p4 { grid-row: 3; grid-column: 2 / 7; }
.p5 { grid-row: 4; grid-column: 1 / 6; }

.card { display: block; position: relative; }
.card-media { position: relative; overflow: hidden; aspect-ratio: var(--ar, 4 / 3); background: #e4e2dd; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 45%); pointer-events: none; }
.card:hover .card-media img { transform: scale(1.035); }
.card-text { position: absolute; z-index: 1; left: 1.25rem; right: 1.25rem; bottom: 1.1rem; color: #fff; }
.card-title { font-size: clamp(1.05rem, 1.6vw, 1.5rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; }
.card-meta { margin-top: 0.3rem; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }

@media (max-width: 767px) {
  .projects-grid { grid-template-columns: repeat(6, 1fr); }
  .p1, .p2, .p3, .p4, .p5 { grid-row: auto; align-self: auto; }
  .p1 { grid-column: 1 / 7; }
  .p2 { grid-column: 1 / 6; }
  .p3 { grid-column: 2 / 7; }
  .p4 { grid-column: 1 / 6; }
  .p5 { grid-column: 2 / 7; }
  .card-media::after { display: none; }
  .card-text { position: static; color: var(--fg); padding-top: 0.8rem; }
  .card-meta { color: var(--muted); opacity: 1; }
}

/* ---------- Home: recognition ---------- */

.award { border-top: 1px solid var(--line); text-align: center; }
.award blockquote {
  margin: 1.5rem auto 2rem; max-width: 16em;
  font-size: clamp(1.9rem, 4.4vw, 4rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.03em;
}
.award cite { font-style: normal; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); line-height: 1.9; }

/* ---------- Home: about ---------- */

.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: repeat(8, 1fr); column-gap: clamp(1rem, 2.2vw, 2rem); row-gap: 3rem; }
.about-grid > .label { grid-column: 1 / 3; }
.about-body { grid-column: 3 / 9; }
.lead { font-size: clamp(1.25rem, 2.1vw, 1.875rem); font-weight: 300; line-height: 1.35; letter-spacing: -0.015em; }
.lead + .lead { margin-top: 1.25rem; color: var(--muted); }
.about-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem clamp(1rem, 2.2vw, 2rem); margin-top: clamp(3rem, 6vw, 5rem); }
.about-cols h3 { margin-bottom: 1rem; }
.list-lines li { padding: 0.8rem 0; border-top: 1px solid var(--line); font-size: 1.0625rem; font-weight: 300; }
.list-lines li:last-child { border-bottom: 1px solid var(--line); }
.partner { display: flex; flex-direction: column; gap: 0.15rem; }
.partner strong { font-weight: 300; font-size: 1.0625rem; }
.partner span { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Home: clients (dark) ---------- */

.dark { background: var(--dark); color: #fff; }
.dark .label { color: rgba(255, 255, 255, 0.55); }
.clients-list { columns: 3; column-gap: clamp(1rem, 2.2vw, 2rem); margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.clients-list li {
  break-inside: avoid; padding: 1rem 0; border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 1.0625rem; font-weight: 300; color: rgba(255, 255, 255, 0.8);
  transition: color 0.25s, padding-left 0.35s var(--ease);
}
.clients-list li:hover { color: #fff; padding-left: 0.6rem; }

/* ---------- Home: contact ---------- */

.contact-mail {
  display: inline-block; margin-top: 1.25rem;
  font-size: clamp(1.6rem, 5.2vw, 4.75rem); font-weight: 300; letter-spacing: -0.035em; line-height: 1.1;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em;
  overflow-wrap: anywhere; transition: color 0.3s;
}
.contact-mail:hover { color: var(--warm); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding: 2.25rem var(--pad); font-size: 0.875rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.footer .brand img { height: 24px; }
.footer .brand span { color: var(--fg); font-size: 0.75rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.footer-links a:hover, .footer a.mail:hover { color: var(--fg); }

/* ---------- Project page ---------- */

.p-hero { position: relative; height: 100vh; height: 100svh; min-height: 480px; background: #000; overflow: hidden; }
.p-hero img { width: 100%; height: 100%; object-fit: cover; }
.p-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 24%); }
/* Low-resolution covers: shown at (at most) their own width instead of stretched full-screen */
.p-hero.is-contained { height: auto; min-height: 0; background: none; overflow: visible; padding: calc(var(--nav-h) + clamp(1.25rem, 3vw, 2.5rem)) var(--pad) 0; }
.p-hero.is-contained::after { display: none; }
.p-hero.is-contained img { width: 100%; max-width: var(--w); height: auto; margin: 0 auto; }

.p-intro { padding-bottom: clamp(3rem, 7vw, 6rem); }
.p-intro-grid { display: grid; grid-template-columns: repeat(8, 1fr); column-gap: clamp(1rem, 2.2vw, 2rem); row-gap: 2.5rem; }
.p-title { grid-column: 1 / 5; }
.p-title h1 { font-size: clamp(2.1rem, 4.8vw, 4.5rem); font-weight: 300; line-height: 1.04; letter-spacing: -0.035em; margin-top: 1rem; }
.p-desc { grid-column: 5 / 9; align-self: end; font-size: clamp(1.0625rem, 1.35vw, 1.25rem); line-height: 1.65; font-weight: 300; color: #2a2a2a; }
.p-meta { grid-column: 1 / 9; display: flex; flex-wrap: wrap; gap: 1.5rem 3.5rem; padding-top: 1.75rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.p-meta div { display: grid; gap: 0.3rem; }
.p-meta dt { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.p-meta dd { font-size: 1.0625rem; font-weight: 300; }

.gallery { display: grid; gap: var(--gap); padding: 0 var(--pad) clamp(4rem, 9vw, 8rem); max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; }
.row { display: flex; gap: var(--gap); }
.row figure { flex: var(--ar) 1 0%; min-width: 0; }
.row.narrow { width: 100%; max-width: 1100px; margin-inline: auto; }
.row img { width: 100%; height: auto; background: #e4e2dd; }
.row figcaption { padding-top: 0.75rem; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.row figcaption.tag-after { color: var(--accent); }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .about-grid > .label, .about-body { grid-column: 1 / 9; }
  .p-title, .p-desc { grid-column: 1 / 9; }
  .clients-list { columns: 2; }
}

@media (max-width: 700px) {
  :root { --nav-h: 68px; }
  .brand span { letter-spacing: 0.16em; font-size: 0.75rem; }
  .brand img { height: 26px; }
  .row { flex-direction: column; }
  .row figure { flex: none; }
  .row.narrow { max-width: none; }
  .about-cols { grid-template-columns: 1fr; }
  .clients-list { columns: 1; }
  .hero-copy { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .slide, .card-media img, .panel-sheet, .panel-scrim { transition: none; }
}
