/* Shared component and document structure for the neo-brutalist site. */
:root {
  --ink: #20242b;
  --muted: #66707a;
  --paper: #f8f7f2;
  --line: #d8d7d0;
  --blue: #cfe4f1;
  --blue-ink: #2d6f91;
  --lilac: #e2dced;
  --orange: #ecb98d;
  --orange-ink: #8a4f2f;
  --cream: #f2e7bd;
  --acid: #dceec2;
  --pink: #ead0d0;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--sans); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue-ink); outline-offset: 4px; }

.site-header, main, .site-footer { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.2rem 0 1.5rem; border-bottom: 1px solid var(--line); font-size: .76rem; }
.wordmark { display: inline-flex; align-items: center; gap: .7rem; font-weight: 700; }
.wordmark-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: var(--paper); font: .65rem var(--mono); }
nav { display: flex; gap: 2rem; color: var(--muted); }
nav a:hover { color: var(--blue-ink); }
.header-meta, .section-label, .card-type, .card-index, .card-link, .hero-facts dt, .site-footer { font-family: var(--mono); }
.header-meta { color: var(--muted); font-size: .65rem; }

main { padding: 5.5rem 0 6rem; }
.home-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 4rem; align-items: end; min-height: 450px; padding-bottom: 6rem; }
.section-label { margin: 0 0 1rem; color: var(--blue-ink); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 1.3rem; font: 700 clamp(4.5rem, 10vw, 9rem)/.9 var(--sans); letter-spacing: -.07em; }
h2 { margin-bottom: 0; font: 600 clamp(2.5rem, 5vw, 4.6rem)/1 var(--sans); letter-spacing: -.06em; }
.hero-summary { max-width: 32rem; margin: 0; color: var(--muted); font-size: 1.08rem; }
.hero-facts { margin: 0; border-top: 1px solid var(--line); }
.hero-facts div { display: grid; grid-template-columns: 1fr 1.7fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.hero-facts dt { color: var(--muted); font-size: .63rem; text-transform: uppercase; }
.hero-facts dd { margin: 0; font-size: .78rem; }

.projects-section { padding: 1rem 0 7rem; }
.section-heading, .split-section, .contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.section-heading { align-items: end; margin-bottom: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.section-note { max-width: 25rem; margin: 0; color: var(--muted); font-size: .85rem; }
.project-index { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.15rem; }
.index-card { position: relative; display: flex; min-height: 300px; flex-direction: column; justify-content: flex-end; padding: 1.6rem; overflow: hidden; transition: transform .22s ease, box-shadow .22s ease; }
.index-card:hover { transform: translateY(-5px); box-shadow: 7px 7px 0 var(--ink); }
.index-card-blue { background: var(--blue); }
.index-card-lilac { background: var(--lilac); }
.index-card-orange { background: var(--orange); }
.index-card-cream { background: var(--cream); }
.index-card-neutral { background: #e9e8e1; }
.card-index { position: absolute; top: 1.5rem; right: 1.5rem; color: rgba(32,36,43,.48); font-size: .66rem; }
.card-type { align-self: flex-start; margin-bottom: auto; color: var(--muted); font-size: .63rem; letter-spacing: .06em; text-transform: uppercase; }
.index-card h3 { margin: 0 0 .65rem; font: 600 clamp(2rem, 4vw, 3.6rem)/1 var(--sans); letter-spacing: -.06em; }
.index-card p { max-width: 27rem; margin-bottom: 1.5rem; font-size: .88rem; }
.card-link { padding-top: .85rem; border-top: 1px solid rgba(32,36,43,.22); font-size: .64rem; }

.split-section, .contact-section { padding: 2rem 0 7rem; border-top: 1px solid var(--line); }
.text-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; color: var(--muted); }
.text-columns p { margin: 0; font-size: .9rem; }
.contact-links { display: flex; flex-direction: column; align-items: flex-start; }
.contact-links a { display: flex; justify-content: space-between; width: min(100%, 360px); padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.contact-links span { color: var(--blue-ink); }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .64rem; }
.site-footer a:hover { color: var(--blue-ink); }
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.fade-in.visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .site-header, main, .site-footer { width: min(100% - 36px, 600px); }
  .site-header { flex-wrap: wrap; padding-top: 1.5rem; }
  .site-header nav { order: 3; width: 100%; justify-content: space-between; gap: .5rem; }
  .header-meta { margin-left: auto; }
  .home-hero, .section-heading, .split-section, .contact-section { grid-template-columns: 1fr; gap: 2rem; }
  .home-hero { min-height: auto; padding: 3.5rem 0 5rem; }
  .project-index { grid-template-columns: 1fr; }
  .index-card { min-height: 280px; }
  .text-columns { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 480px) {
  h1 { font-size: 4rem; }
  main { padding-top: 3.5rem; }
  .projects-section { padding-bottom: 5rem; }
  .split-section, .contact-section { padding-bottom: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .fade-in { opacity: 1; transform: none; }
}
