/* =========================
   ROOT VARIABLES
========================= */
:root {
  --bg: #0b0b0b;
  --bg-muted: #121212;
  --text: #f0f0f0;
  --text-muted: #b0b0b0;
  --border: #2a2a2a;
  --accent: #ffffff;
}

/* =========================
   GLOBAL RESET
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================
   CONTAINERS & SECTIONS
========================= */
.container {
  max-width: 1200px;
  padding: 0 1.5rem;
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section.muted {
  background: var(--bg-muted);
}

/* =========================
   TYPOGRAPHY
========================= */
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.2rem;
  max-width: 700px;
  color: var(--text-muted);
}

/* =========================
   HEADER / NAV
========================= */
.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--text-muted);
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--accent);
}

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  margin-top: 1rem;
}

.btn.primary {
  background: var(--accent);
  color: #000;
}

.btn.secondary {
  background: transparent;
}

/* =========================
   CAPABILITIES PAGE
========================= */
.capability-block {
  margin-bottom: 3rem;
  max-width: 800px;
}

/* =========================
   WORK / CASE STUDIES
========================= */
.case-study {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
  align-items: start;
}

.case-image {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--border);
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.case-image img {
  width: 100%;
  height: auto;
  display: block;
}

.case-content {
  max-width: 760px;
  /* editorial width */
}

.case-content h2 {
  margin-top: 0;
}

.case-meta {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.case-meta li {
  margin-bottom: 0.3rem;
}

/* =========================
   YOUTUBE VIDEO EMBED
========================= */
.case-content .case-video {
  max-width: 560px;
  margin-top: 1.5rem;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* =========================
   FINAL CTA
========================= */
.final-cta {
  text-align: center;
}

/* =========================
   FOOTER
========================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .case-study {
    grid-template-columns: 1fr;
  }

  .case-content {
    max-width: 100%;
  }

  .case-content .case-video {
    max-width: 100%;
  }

  .nav a {
    margin-left: 1rem;
  }
}

/* =========================
   CONTACT PAGE – FINAL FIX
========================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
  /* ← THIS WAS MISSING */
}

.contact-form {
  max-width: 520px;
}

/* Force vertical form layout */
.contact-form label {
  display: flex;
  /* ← KEY FIX */
  flex-direction: column;
  /* ← KEY FIX */
  margin-bottom: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.8rem;
  background: #0e0e0e;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #555;
}

.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-form button {
  align-self: flex-start;
  margin-top: 1.5rem;
}

/* Right column */
.contact-notes {
  max-width: 420px;
}

.contact-notes h2 {
  margin-top: 0;
}

.contact-notes ul {
  padding-left: 1.2rem;
  margin-bottom: 1.5rem;
}

.contact-notes li {
  margin-bottom: 0.4rem;
}


/* =========================
   hero image ========================= */
.hero {
  padding: 5rem 0;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  max-height: 720px;
  object-fit: cover;
}


.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

/* Credits strip */
.credits {
  text-align: center;
}

.credits-logo {
  margin: 1.25rem auto 0.75rem;
  max-width: 1100px; /* keeps it from looking like an ad banner */
}

.credits-logo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px; /* optional; remove if you want hard edges */
}


/* =========================
   HERO — MOBILE FIX (put at VERY END of file)
   Goal: image first as the landing panel, then text when scrolling
========================= */
@media (max-width: 900px) {

  /* Make hero full-bleed for the image */
  .hero {
    padding: 0;
  }

  .hero .container {
    max-width: none;
    padding: 0;
  }

  /* Stack layout and force visual-first */
  .hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "visual"
      "text";
    gap: 0;
    align-items: stretch;
  }

  .hero-visual {
    grid-area: visual;
    width: 100%;
    height: 70vh;      /* tweak: 65–85vh */
    min-height: 420px; /* stops it becoming a thin strip */
    max-height: 720px; /* optional */
    overflow: hidden;
  }

  .hero-visual img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    display: block;
  }

  .hero-text {
    grid-area: text;
    padding: 2rem 1.5rem; /* reintroduce padding for text */
  }

  /* Optional: slightly reduce headline size on phones */
  .hero-text h1 {
    font-size: 2rem;
  }
}

/* =========================
   MOBILE NAV (hamburger)
========================= */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .header-inner {
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Hide nav by default on mobile */
  .nav {
    display: none;
    position: absolute;
    top: 70px;            /* header height */
    left: 1.5rem;
    right: 1.5rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    padding: 0.75rem;
    z-index: 1000;
  }

  /* When open */
  .nav.is-open {
    display: block;
  }

  .nav a {
    display: block;
    margin: 0;
    padding: 0.9rem 0.75rem;
    border-radius: 8px;
  }

  .nav a + a {
    border-top: 1px solid var(--border);
  }
}

/* =========================
   WORK INDEX — GRID CARDS
========================= */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.work-card:hover {
  border-color: #555;
}

.work-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111;
}

.work-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.work-card:hover .work-card-image img {
  transform: scale(1.03);
}

.work-card-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.work-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.work-card-type {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.work-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.work-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}

.work-card-capability {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  font-style: italic;
}

.work-card-link {
  font-size: 0.85rem;
  color: var(--text);
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   CASE STUDY PAGES
========================= */
.cs-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 2rem;
}

.cs-back:hover {
  color: var(--text);
}

.cs-hero {
  padding-bottom: 2rem;
}

.cs-header {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.cs-header h1 {
  margin-top: 0.5rem;
}

.cs-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
  padding-left: 2rem;
}

.cs-meta li {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cs-meta strong {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.cs-image-full {
  background: #0e0e0e;
  padding: 2rem 0;
}

.cs-image-full img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 620px;
  object-fit: cover;
  object-position: center;
}

.cs-image-full--natural img {
  max-height: 500px;
  object-fit: contain;
  background: #0e0e0e;
}

.cs-image-full--placeholder {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cs-image-full--placeholder .container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.cs-body {
  max-width: 760px;
}

.cs-block {
  margin-bottom: 3rem;
}

.cs-block h2 {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.cs-capability {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text);
  padding: 1.5rem;
  margin-bottom: 3rem;
}

.cs-capability strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.cs-capability p {
  margin: 0;
  font-size: 1rem;
}

.cs-nav {
  display: flex;
}

.cs-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.cs-next {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.cs-next:hover {
  color: var(--text);
}

.cs-draft-note {
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .cs-header {
    grid-template-columns: 1fr;
  }

  .cs-meta {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
  }
}

/* =========================
   CASE STUDY — EXTERNAL LINK
========================= */
.cs-external-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cs-external-link:hover {
  color: var(--text-muted);
}

/* =========================
   CASE STUDY — INLINE IMAGES
========================= */
.cs-image-inline {
  max-width: 760px;
  margin: 0 0 3rem 0;
}

.cs-image-inline img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
}

.cs-image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 0 0 3rem 0;
  max-width: 760px;
}

.cs-image-pair img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  display: block;
  border: 1px solid var(--border);
}

@media (max-width: 900px) {
  .cs-image-pair {
    grid-template-columns: 1fr;
  }
}

/* =========================
   CAPABILITIES — EVIDENCE LINKS
========================= */
.capability-evidence {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  margin-top: 0.75rem;
}

.capability-evidence a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.capability-evidence a:hover {
  color: var(--text);
}

/* =========================
   HOMEPAGE WORK CARDS
========================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
  max-width: 900px;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: #555;
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #111;
}

.card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .card-image img {
  transform: scale(1.03);
}

.card h3 {
  font-size: 1.1rem;
  margin: 1rem 1.25rem 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 1.25rem 1.25rem;
  flex: 1;
}

/* Lists */
.pill-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.pill-list li {
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.two-column-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 2rem;
  margin: 1rem 0;
}

.two-column-list li {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.bullet-columns {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 2rem;
  margin: 1rem 0;
}

.bullet-columns li {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.bullet-columns li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--border);
}

.process-list {
  list-style: none;
  padding: 0;
  counter-reset: process;
  max-width: 700px;
}

.process-list li {
  counter-increment: process;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.process-list li:last-child {
  border-bottom: none;
}

.small-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .two-column-list {
    grid-template-columns: 1fr;
  }

  .bullet-columns {
    grid-template-columns: 1fr;
  }
}