/* ===========================================
   MARKSTONE — SHARED STYLES
   =========================================== */

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

:root {
  --ink: #1A1A1A;
  --paper: #FAF8F4;
  --stone: #F0EBE0;
  --forest: #1F3D2E;
  --forest-deep: #142B20;
  --mute: #6B6B6B;
  --line: #DCD4C3;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

::selection { background: var(--forest); color: var(--paper); }

/* ===========================================
   LAYOUT
   =========================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (min-width: 768px) {
  .container { padding: 0 56px; }
}

@media (min-width: 1024px) {
  .container { padding: 0 80px; }
}

.section {
  padding: 56px 0;
  border-top: 0.5px solid var(--line);
}

@media (min-width: 768px) {
  .section { padding: 80px 0; }
}

@media (min-width: 1024px) {
  .section { padding: 96px 0; }
}

.section.no-border { border-top: none; }
.section.bg-stone { background: var(--stone); }
.section.bg-ink { background: var(--ink); color: var(--paper); }

/* ===========================================
   NAVIGATION
   =========================================== */

nav.site-nav {
  position: sticky;
  top: 0;
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 0.5px solid var(--line);
}

nav.site-nav .nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 768px) {
  nav.site-nav .nav-inner { padding: 28px 56px; }
}

@media (min-width: 1024px) {
  nav.site-nav .nav-inner { padding: 28px 80px; }
}

nav.site-nav .mark {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--forest);
}

nav.site-nav .links {
  display: flex;
  gap: 28px;
}

@media (min-width: 768px) {
  nav.site-nav .links { gap: 40px; }
}

nav.site-nav .links a {
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--mute);
  transition: color 0.2s;
}

nav.site-nav .links a:hover { color: var(--forest); }
nav.site-nav .links a.active { color: var(--forest); }

/* ===========================================
   TYPOGRAPHY
   =========================================== */

.eyebrow {
  font-size: 11px;
  letter-spacing: 4px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 28px;
}

.eyebrow.muted { color: var(--mute); }
.eyebrow.paper { color: var(--paper); opacity: 0.6; }

.hero-h {
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -1.5px;
  font-weight: 700;
  margin-bottom: 32px;
  max-width: 900px;
}

@media (min-width: 768px) {
  .hero-h { font-size: 64px; letter-spacing: -2px; }
}

@media (min-width: 1024px) {
  .hero-h { font-size: 80px; letter-spacing: -2.5px; }
}

.section-h {
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -1px;
  font-weight: 700;
  margin-bottom: 24px;
  max-width: 720px;
}

@media (min-width: 768px) {
  .section-h { font-size: 48px; letter-spacing: -1.5px; }
}

.hero-h em,
.section-h em {
  font-style: italic;
  font-weight: 500;
  color: var(--forest);
}

.bg-ink .hero-h em,
.bg-ink .section-h em {
  color: #C7D9CE;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.6;
  max-width: 560px;
  color: var(--mute);
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .hero-sub { font-size: 19px; }
}

.section-sub {
  font-size: 16px;
  line-height: 1.65;
  max-width: 560px;
  color: var(--mute);
  margin-bottom: 56px;
}

.bg-ink .hero-sub,
.bg-ink .section-sub { color: rgba(250,248,244,0.7); }

/* ===========================================
   BUTTONS
   =========================================== */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--forest);
  color: var(--paper);
  padding: 18px 32px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: opacity 0.2s, transform 0.1s, background 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
}

.cta:hover { opacity: 0.9; }
.cta:active { transform: scale(0.98); }

.cta .arrow {
  font-size: 14px;
  transition: transform 0.2s;
}

.cta:hover .arrow { transform: translateX(2px); }

.cta.outline {
  background: transparent;
  color: var(--forest);
  border: 1px solid var(--forest);
}

.cta.outline:hover {
  background: var(--forest);
  color: var(--paper);
  opacity: 1;
}

.bg-ink .cta {
  background: var(--paper);
  color: var(--ink);
}

.bg-ink .cta:hover { opacity: 0.9; }

.cta.nav-cta {
  padding: 10px 18px;
  font-size: 10px;
  letter-spacing: 2px;
}

@media (max-width: 639px) {
  .cta.nav-cta { display: none; }
}

.text-link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: opacity 0.2s;
}

.text-link:hover { opacity: 0.6; }

/* ===========================================
   GRIDS
   =========================================== */

.three-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .three-col {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 48px;
}

@media (min-width: 768px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

.col h3 {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
  margin-bottom: 14px;
  line-height: 1.3;
}

.col p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--mute);
}

.bg-ink .col p { color: rgba(250,248,244,0.7); }

/* ===========================================
   LOGO WALL (Our Team's Work)
   =========================================== */

.logo-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
  margin-top: 48px;
}

@media (min-width: 640px) {
  .logo-wall {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 24px;
  }
}

@media (min-width: 768px) {
  .logo-wall {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px 32px;
    margin-top: 56px;
  }
}

.logo-tile {
  aspect-ratio: 5 / 2;
  background: rgba(26, 26, 26, 0.04);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  text-align: center;
  transition: background 0.2s ease;
}

.logo-tile:hover {
  background: rgba(26, 26, 26, 0.07);
}

.logo-tile span {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--mute);
  text-transform: uppercase;
  opacity: 0.7;
}

/* When a real logo image is used:
   <div class="logo-tile"><img src="logos/foo.svg" alt="Foo"></div>
   The img absorbs the tile size and the span (if removed) is the placeholder fallback. */
.logo-tile img {
  max-width: 70%;
  max-height: 60%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.logo-tile:hover img {
  opacity: 1;
  filter: grayscale(0%);
}

/* ===========================================
   PROGRAM GRID (What We Do — card layout)
   =========================================== */

.program-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 48px;
}

@media (min-width: 640px) {
  .program-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (min-width: 768px) {
  .program-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-top: 56px;
  }
  .program-card-wide {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 40px;
    align-items: center;
  }
  .program-card-wide .program-image {
    aspect-ratio: 16 / 9;
    margin-bottom: 0;
  }
  .program-card-wide .program-title {
    margin-top: 0;
  }
}

.program-image {
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  background: var(--stone);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.program-image.dark   { background: var(--ink); }
.program-image.forest { background: var(--forest); }
.program-image.stone  { background: var(--stone); }

.program-image img,
.strip-tile img,
.case-hero img,
.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.program-image .placeholder-label {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 0 12px;
  text-align: center;
}

.program-image.stone .placeholder-label {
  color: var(--mute);
  opacity: 0.55;
}

.program-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.program-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--mute);
  margin: 0;
}

/* ===========================================
   PHOTO STRIP (legacy, kept for future use)
   =========================================== */

.photo-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .photo-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
  }
}

.strip-tile {
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.strip-tile.dark   { background: var(--ink); }
.strip-tile.forest { background: var(--forest); }
.strip-tile.stone  { background: var(--stone); }

.strip-tile .placeholder-label {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 0 12px;
  text-align: center;
}

.strip-tile.stone .placeholder-label {
  color: var(--mute);
  opacity: 0.55;
}

/* ===========================================
   DIRECTORY LIST (What We Do / What We Make)
   =========================================== */

.directory {
  margin-top: 48px;
  border-top: 0.5px solid var(--line);
}

.dir-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 22px 0;
  border-bottom: 0.5px solid var(--line);
}

.dir-title {
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1.4;
  margin: 0;
}

.dir-desc {
  font-size: 15px;
  color: var(--mute);
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 768px) {
  .dir-row {
    grid-template-columns: 260px 1fr;
    gap: 40px;
    padding: 26px 0;
    align-items: baseline;
  }
  .dir-title {
    font-size: 13px;
  }
  .dir-desc {
    font-size: 16px;
  }
}

@media (min-width: 1024px) {
  .dir-row {
    grid-template-columns: 320px 1fr;
    gap: 56px;
  }
}

@media (min-width: 768px) {
  .directory.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 64px;
  }
  .directory.two-col .dir-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 22px 0;
    align-items: start;
  }
}

/* ===========================================
   PRINCIPLES (numbered list)
   =========================================== */

.principle .number {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--forest);
  font-weight: 700;
  margin-bottom: 16px;
}

.bg-ink .principle .number { color: #8FB39C; }

/* ===========================================
   WORK CARDS
   =========================================== */

.work-card {
  cursor: pointer;
  transition: opacity 0.2s;
}

.work-card:hover { opacity: 0.85; }

.work-image {
  aspect-ratio: 4/3;
  background: var(--stone);
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.work-image.dark { background: var(--ink); }
.work-image.forest { background: var(--forest); }
.work-image.stone { background: var(--stone); }

.work-image .placeholder-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

.work-image.stone .placeholder-label { color: var(--mute); opacity: 0.6; }

.work-meta {
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 600;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.work-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.work-desc {
  font-size: 14px;
  color: var(--mute);
  line-height: 1.6;
  margin-bottom: 16px;
}

.work-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--ink);
  text-transform: uppercase;
}

/* ===========================================
   QUOTES / PITCHES
   =========================================== */

.quote-block {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.quote-block .quote {
  font-size: 26px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.3px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .quote-block .quote { font-size: 32px; }
}

/* ===========================================
   FORMS
   =========================================== */

.form-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.form-field {
  margin-bottom: 36px;
}

.form-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}

.form-field label .required {
  color: var(--forest);
  margin-left: 4px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="date"],
.form-field textarea {
  width: 100%;
  padding: 16px 0;
  font-size: 16px;
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--forest);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .radio-group { grid-template-columns: 1fr 1fr; }
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 14px;
}

.radio-option:hover { border-color: var(--mute); }
.radio-option input { margin-right: 12px; accent-color: var(--forest); }
.radio-option.selected,
.radio-option:has(input:checked) {
  border-color: var(--forest);
  background: rgba(31, 61, 46, 0.04);
}

/* --- Fieldsets, focus, status, success --- */

.form-wrap fieldset {
  border: 0;
  min-width: 0;
}

.form-wrap legend {
  display: block;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
  padding: 0;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border-bottom-color: var(--forest);
  box-shadow: 0 1px 0 0 var(--forest);
}

.radio-option:focus-within { border-color: var(--forest); }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.form-status {
  font-size: 14px;
  line-height: 1.6;
  color: var(--mute);
  max-width: 480px;
}

.form-status.error { color: #8F3A2B; }
.form-status:empty { display: none; }

.form-hint {
  font-size: 13px;
  line-height: 1.6;
  color: var(--mute);
  margin: -6px 0 14px;
  max-width: 480px;
}

.form-field input[type="date"] {
  min-height: 54px;
  appearance: none;
  -webkit-appearance: none;
}

.cta[disabled] { opacity: 0.55; cursor: default; }
.cta[disabled]:active { transform: none; }
.cta[disabled]:hover .arrow { transform: none; }

.form-success {
  max-width: 720px;
  margin: 0 auto;
  outline: none;
}

.form-success h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.form-success p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--mute);
  max-width: 560px;
}

.form-aside {
  max-width: 720px;
  margin: 80px auto 0;
  padding-top: 40px;
  border-top: 0.5px solid var(--line);
}

.form-aside-label {
  font-size: 14px;
  color: var(--mute);
  line-height: 1.6;
}

.form-aside-email {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  font-size: 18px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ===========================================
   CASE STUDY HERO
   =========================================== */

.case-hero {
  aspect-ratio: 16/9;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-hero .placeholder-label {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

.case-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px;
}

@media (min-width: 768px) {
  .case-body { padding: 120px 32px; }
}

.case-body h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 56px 0 20px;
  line-height: 1.2;
}

.case-body h2:first-of-type { margin-top: 0; }

.case-body p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.case-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 64px 0;
}

@media (min-width: 768px) {
  .case-images {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

.case-images .img-placeholder {
  aspect-ratio: 4/5;
  background: var(--stone);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-images .img-placeholder:nth-child(3n) { background: var(--ink); }
.case-images .img-placeholder:nth-child(3n+1) { background: var(--forest); }

.case-images .img-placeholder .placeholder-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.case-images .img-placeholder:nth-child(3n+2) .placeholder-label {
  color: var(--mute);
  opacity: 0.5;
}

.case-quote {
  border-left: 2px solid var(--forest);
  padding-left: 32px;
  margin: 64px 0;
}

.case-quote .text {
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 16px;
}

.case-quote .attribution {
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--mute);
}

/* ===========================================
   FOOTER
   =========================================== */

footer.site-footer {
  border-top: 0.5px solid var(--line);
  padding: 40px 0;
}

footer.site-footer .footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  footer.site-footer .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 56px;
  }
}

@media (min-width: 1024px) {
  footer.site-footer .footer-inner { padding: 0 80px; }
}

footer.site-footer .left,
footer.site-footer .right {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

footer.site-footer .ftr-mark {
  font-weight: 700;
  letter-spacing: 2.5px;
  font-size: 12px;
  color: var(--forest);
}

footer.site-footer .email {
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--mute);
}

footer.site-footer a,
footer.site-footer .copyright {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 600;
}

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

/* ===========================================
   UTILITIES
   =========================================== */

.center { text-align: center; }
.italic { font-style: italic; }
.mb-0 { margin-bottom: 0; }

.hero-section {
  padding: 40px 0 72px;
}

@media (min-width: 768px) {
  .hero-section { padding: 56px 0 96px; }
}

@media (min-width: 1024px) {
  .hero-section { padding: 64px 0 112px; }
}

/* Mockup note (only for review) */
.mockup-note {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 32px;
  font-size: 11px;
  letter-spacing: 2px;
  line-height: 1.6;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
}

.mockup-note strong {
  color: #8FB39C;
}
