/* ---------------------------------------------------------------------
   PHNX MEDIA — static build
   Light, quiet, editorial. Minimal motion by design.
--------------------------------------------------------------------- */

@font-face {
  font-family: "Fraunces Variable";
  src: url("../fonts/fraunces-variable.woff2") format("woff2-variations");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Variable";
  src: url("../fonts/fraunces-variable-italic.woff2") format("woff2-variations");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter Variable";
  src: url("../fonts/inter-variable.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f3ee;
  --paper-2: #eeeae2;
  --ink: #1c1a17;
  --ink-soft: #55524b;
  --line: #dcd6ca;
  --ember: #c1502e;
  --ember-soft: #e7c7b4;

  --font-display: "Fraunces Variable", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter Variable", "Helvetica Neue", Arial, sans-serif;

  --max: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 600;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--gap);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.site-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ember);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink);
}

/* Transparent, floating over a full-bleed hero (homepage only);
   solidifies once the page scrolls past it. */
.header-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  color: #f6f3ee;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.header-overlay .site-nav a {
  color: #f6f3ee;
}
.header-overlay .nav-toggle {
  color: inherit;
}
.header-overlay.is-scrolled {
  background: var(--paper);
  border-bottom-color: var(--line);
  color: var(--ink);
}
.header-overlay.is-scrolled .site-nav a {
  color: var(--ink-soft);
}
@media (max-width: 720px) {
  .header-overlay .site-nav.is-open a {
    color: var(--ink);
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .site-nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem var(--gap) 2rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .site-nav a {
    width: 100%;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
    color: var(--ink);
  }
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem var(--gap) 2.5rem;
  margin-top: 5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.site-footer a:hover {
  color: var(--ember);
}

.site-footer .footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
}

/* ---------- Type scale ---------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

.display-xl {
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
}
.display-lg {
  font-size: clamp(2.1rem, 4.5vw, 3.6rem);
}
.display-md {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.italic {
  font-style: italic;
  color: var(--ember);
}

p {
  margin: 0;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 42ch;
  line-height: 1.6;
}

/* ---------- Buttons / links ---------- */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ember);
  padding-bottom: 0.15rem;
  transition: opacity 0.2s ease;
}
.link-arrow:hover {
  opacity: 0.6;
}

/* ---------- Sections ---------- */

section {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.rule-top {
  border-top: 1px solid var(--line);
}
.rule-bottom {
  border-bottom: 1px solid var(--line);
}

/* ---------- Plates (image placeholders) ---------- */

.plate {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio, 4/3);
  overflow: hidden;
  background: linear-gradient(150deg, var(--paper-2), var(--paper));
  border: 1px solid var(--line);
}

.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 140% at 15% 0%,
    var(--tint, var(--ember-soft)) 0%,
    transparent 60%
  );
  opacity: 0.55;
}

.plate .plate-label {
  position: absolute;
  bottom: 0.75rem;
  left: 0.9rem;
  z-index: 2;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Hero (full-bleed video) ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #f6f3ee;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(150deg, #d9c2a8, #1c1a17 75%);
}

.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 9, 8, 0.88) 0%,
    rgba(10, 9, 8, 0.35) 55%,
    rgba(10, 9, 8, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 4rem);
  width: 100%;
}

.hero-content .eyebrow {
  color: var(--ember-soft);
}

.hero-content .lede {
  color: #e7e3da;
}

/* ---------- Grids ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
@media (max-width: 860px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Work marquee (homepage preview) ----------
   Continuously auto-scrolls; slows (not stops) on hover.
   Track content is duplicated in the HTML so translateX(-50%) loops seamlessly. */

.work-scroll-viewport {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    black var(--gap),
    black calc(100% - var(--gap)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    black var(--gap),
    black calc(100% - var(--gap)),
    transparent 100%
  );
}

.work-scroll {
  display: flex;
  width: max-content;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  animation: work-marquee 80s linear infinite;
}

.work-scroll-viewport:hover .work-scroll {
  animation-duration: 260s;
}

@keyframes work-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.work-scroll-card {
  flex: 0 0 auto;
  width: min(72vw, 300px);
}

.work-scroll-card .plate {
  --ratio: 3/4;
  transition: border-color 0.2s ease;
}
.work-scroll-card:hover .plate {
  border-color: var(--ember-soft);
}
.work-scroll-card h3 {
  font-size: 1.15rem;
  margin-top: 0.85rem;
  transition: color 0.2s ease;
}
.work-scroll-card:hover h3 {
  color: var(--ember);
}

@media (prefers-reduced-motion: reduce) {
  .work-scroll {
    animation: none;
  }
  .work-scroll-viewport {
    overflow-x: auto;
  }
}
.work-scroll-card .eyebrow {
  margin-top: 0.3rem;
}

.archive-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* ---------- Work list ---------- */

.work-item {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 3.25rem) 0;
  border-top: 1px solid var(--line);
}
.work-item:last-child {
  border-bottom: 1px solid var(--line);
}
@media (max-width: 860px) {
  .work-item {
    grid-template-columns: 1fr;
  }
}

.work-item .title {
  transition: color 0.2s ease;
}
.work-item:hover .title {
  color: var(--ember);
}
.work-item:hover .plate {
  border-color: var(--ember-soft);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.filters button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0;
}
.filters button.active,
.filters button:hover {
  color: var(--ember);
}

/* ---------- Team — simple headshot columns ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem) clamp(1rem, 2vw, 1.5rem);
}
@media (max-width: 860px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 620px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 380px) {
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 220px;
    margin: 0 auto;
  }
}

.team-col .plate {
  --ratio: 4/5;
  max-width: 200px;
  margin: 0 auto 1rem;
}
.team-col h2,
.team-col h3 {
  font-size: 1.05rem;
}
.team-col .eyebrow {
  margin: 0.3rem 0 0.5rem;
  font-size: 0.65rem;
}
.team-col .quote {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
a.team-col h3,
a.team-col h2 {
  transition: color 0.2s ease;
}
a.team-col:hover h3,
a.team-col:hover h2 {
  color: var(--ember);
}

/* ---------- Services list ---------- */

.service-row {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.5rem;
}
.service-row:last-child {
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) {
  .service-row {
    grid-template-columns: 1fr;
  }
}
.service-row .cap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin-top: 0.75rem;
}
.service-row .cap-list li {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

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

.timeline-row {
  display: grid;
  grid-template-columns: 0.4fr 0.8fr 2fr;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.timeline-row:last-child {
  border-bottom: 1px solid var(--line);
}
@media (max-width: 700px) {
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ---------- Contact form ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.field span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  padding: 0.5rem 0;
  outline: none;
  transition: border-color 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--ember);
}
.field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  resize: none;
}
.submit-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.9rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.submit-btn:hover {
  background: var(--ember);
}

/* ---------- Case study ---------- */

.case-hero {
  padding-top: 2.5rem;
}
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 2.5rem 0;
}
.case-meta dt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.case-meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.case-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
}
.case-video.vertical {
  aspect-ratio: 9 / 16;
  max-width: 420px;
  margin: 0 auto;
}
.case-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.case-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-list li {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 0.3rem 0.7rem;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-top: 2.5rem;
}
@media (max-width: 700px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

.next-project {
  display: block;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}

/* ---------- Utility fade-in (subtle, one-shot) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Case study narrative sections ---------- */

.case-section {
  display: grid;
  grid-template-columns: minmax(130px, 0.45fr) 2fr;
  gap: 1.25rem 2.5rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}
.case-section:first-child {
  border-top: none;
}
@media (max-width: 700px) {
  .case-section {
    grid-template-columns: 1fr;
  }
}
.case-section .eyebrow {
  margin: 0;
  padding-top: 0.35rem;
}
.case-body p {
  color: var(--ink-soft);
  max-width: 62ch;
  font-size: 1.05rem;
  line-height: 1.7;
}
.case-body p + p {
  margin-top: 1rem;
}
.case-body p.case-takeaway {
  color: var(--ember);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.3;
}
.case-highlights li {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.case-highlights li:first-child {
  border-top: none;
  padding-top: 0;
}
.case-highlights strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}
.case-highlights span {
  color: var(--ink-soft);
  max-width: 62ch;
  display: block;
}

/* ---------- Real images ---------- */

.plate.has-img::after {
  display: none;
}
.plate.has-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
}

.plate.has-img .plate-label {
  display: none;
}
.plate video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  z-index: 3;
}
