/* ===========================
   DESIGN TOKENS
   =========================== */
:root {
  --bg:           #f7f6f3;
  --surface:      #ffffff;
  --ink:          #1a1916;
  --ink-soft:     #6b6860;
  --green:        #2e5c4f;
  --green-light:  #e8efec;
  --green-mid:    #4a7c6d;
  --border:       #e2e0db;

  --font-serif:   'EB Garamond', Georgia, serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-2xl: 11rem;

  --radius: 2px;
  --max-w: 1100px;
  --reading-w: 640px;
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
}

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

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

/* ===========================
   UTILITY
   =========================== */
.label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: var(--space-sm);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: var(--space-md);
}

/* ===========================
   HEADER
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  height: 56px;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
}

.nav-menu {
  position: relative;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius);
  transition: opacity 0.2s;
}

.nav-toggle:hover {
  opacity: 0.6;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-dropdown.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-item {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink);
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-item:last-child {
  border-bottom: none;
}

.nav-item:hover {
  background-color: var(--green-light);
  color: var(--green);
}

/* ===========================
   HERO
   =========================== */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: var(--space-2xl) var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.hero-text {
  flex: 1;
}

.hero-photo {
  flex-shrink: 0;
  width: 420px;
  height: 540px;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
  background-color: var(--ink);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: grayscale(100%);
  display: block;
  background-color: var(--ink);
}

.mission {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 14ch;
  margin-bottom: 1.25rem;
}

.submission {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ===========================
   BUILDING INDEX
   =========================== */
.building-index {
  padding: var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.building-index-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.building-list {
  list-style: none;
  counter-reset: building-counter;
  margin-top: var(--space-md);
}

.building-item {
  counter-increment: building-counter;
  border-top: 1px solid var(--border);
}

.building-item:last-child {
  border-bottom: 1px solid var(--border);
}

.building-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 1.4rem 0;
  color: var(--ink);
  transition: color 0.2s ease;
}

.building-link::before {
  content: "0" counter(building-counter);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  opacity: 0.5;
  flex-shrink: 0;
  width: 2rem;
}

.building-link:hover .building-name {
  color: var(--green);
}

.building-link:hover .building-url {
  opacity: 1;
}

.building-name {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  min-width: 160px;
  color: var(--ink);
  transition: color 0.2s ease;
}

.building-meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-lg);
  flex: 1;
}

.building-tagline {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-soft);
  flex: 1;
}

.building-url {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--green);
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.building-url--muted {
  color: var(--ink-soft);
  font-style: italic;
  letter-spacing: 0;
}


/* ===========================
   PROJECT STUBS (611, ARCA)
   =========================== */
.project-stub {
  padding: var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--green);
}

.project-stub--split {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.project-stub--split .project-stub-inner {
  flex-shrink: 0;
  width: 320px;
}

.project-stub-screenshot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.project-stub-screenshot img {
  width: 100%;
  max-width: 720px;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

@media (max-width: 860px) {
  .project-stub--split {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-stub--split .project-stub-inner {
    width: 100%;
  }

  .project-stub-screenshot {
    width: 100%;
    justify-content: flex-start;
  }
}

#the-611 {
  background-color: var(--bg);
}

#arca {
  background-color: var(--surface);
}

.project-stub-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.project-stub-name {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: var(--space-sm);
  line-height: 1.1;
}

.project-stub-desc {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 48ch;
}

@media (max-width: 860px) {
  .building-index {
    padding: var(--space-lg) var(--space-md);
  }

  .building-link {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .building-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .project-stub {
    padding: var(--space-lg) var(--space-md);
  }
}

/* ===========================
   FEATURE (SCREENSHOT + MARTHA)
   =========================== */
.feature {
  display: grid;
  grid-template-columns: 62fr 38fr;
  min-height: 90vh;
  border-top: 3px solid var(--green);
  border-bottom: 1px solid var(--border);
}

.feature-screenshot {
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  overflow: hidden;
}

.feature-screenshot img {
  width: 100%;
  max-width: 910px;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}

.feature-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  background-color: var(--bg);
}

.project-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: var(--space-md);
  line-height: 1;
}

.project-desc {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: var(--reading-w);
  margin-bottom: var(--space-lg);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--green);
  border-bottom: 1px solid var(--green);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease, gap 0.2s ease;
  width: fit-content;
}

.project-link:hover {
  color: var(--green-mid);
  border-color: var(--green-mid);
  gap: 0.7em;
}

/* ===========================
   MARTHA PRODUCTS
   =========================== */
.products {
  padding: var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
}

.products-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.product-card {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-card--dim {
  opacity: 0.6;
}

.product-status {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.25rem;
}

.product-card--dim .product-status {
  color: var(--ink-soft);
}

.product-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.product-name a:hover {
  border-bottom-color: var(--green);
}

.product-name {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.product-prefix {
  color: var(--green);
  font-weight: 700;
}

.product-card--dim .product-prefix {
  color: var(--ink-soft);
}

.product-target {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.product-desc {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.7;
}

.product-inline {
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 860px) {
  .products {
    padding: var(--space-lg) var(--space-md);
  }

  .products-inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* ===========================
   ABOUT
   =========================== */
.about {
  padding: var(--space-xl) var(--space-md);
  border-top: 3px solid var(--green);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.mission-super {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.4rem;
}

.about-mission {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  color: var(--ink);
  max-width: 36ch;
}

.about-text {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 58ch;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  padding: var(--space-lg) var(--space-md);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-links a:hover {
  color: var(--green);
  border-color: var(--green);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--ink-soft);
  opacity: 0.5;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 860px) {
  .hero {
    padding: var(--space-lg) var(--space-md);
    min-height: auto;
  }

  .hero-inner {
    flex-direction: column-reverse;
    gap: var(--space-md);
  }

  .hero-photo {
    width: 100%;
    height: 75vw;
    max-height: 420px;
  }

  .feature {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .feature-screenshot {
    min-height: 56vw;
    padding: var(--space-md);
  }

  .feature-content {
    padding: var(--space-lg) var(--space-md);
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

@media (max-width: 560px) {
  .hero {
    padding: var(--space-lg) var(--space-sm);
  }

  .feature-content {
    padding: var(--space-lg) var(--space-sm);
  }

  .about {
    padding: var(--space-lg) var(--space-sm);
  }

  .footer {
    padding: var(--space-md) var(--space-sm);
  }

  .footer-links {
    gap: var(--space-sm);
  }
}

/* ===========================
   SUBTLE ENTRANCE ANIMATION
   =========================== */
@media (prefers-reduced-motion: no-preference) {
  .mission,
  .project-name,
  .about-text {
    animation: fadeUp 0.7s ease both;
  }

  .mission    { animation-delay: 0.1s; }
  .project-name { animation-delay: 0.15s; }
  .about-text { animation-delay: 0.2s; }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
