/* ============================================================
   Halde — Architecture Studio, Zürich
   Swiss International grid system
   Black / white with a single red accent (#E30613)
   ============================================================ */

:root {
  /* Color — disciplined: black, white, one red accent */
  --ink: #000000;
  --paper: #ffffff;
  --red: #e30613;

  /* Type */
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Grid */
  --col: 12;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1440px;

  /* Motion — subtle */
  --ease: cubic-bezier(.2, 0, 0, 1);
  --fast: 120ms;
  --base: 200ms;

  /* Hairlines */
  --hair: 1px solid var(--ink);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

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

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

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

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: var(--hair);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}

.accent-dot { color: var(--red); }

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding-bottom: 2px;
  transition: color var(--fast) var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--base) var(--ease);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

.site-nav a:focus-visible {
  outline: 1px solid var(--red);
  outline-offset: 4px;
}

/* ============================================================
   Hero — oversized centered typographic
   ============================================================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 10vw, 7rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}

.hero-kicker {
  margin: 0 0 clamp(1.5rem, 4vw, 3rem);
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.4vw, 0.85rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(3.5rem, 17vw, 15rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-tagline {
  margin: clamp(1.5rem, 4vw, 3rem) auto 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 400;
}

.hero-rule {
  width: 3rem;
  height: 3px;
  background: var(--red);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
}

/* ============================================================
   Drawing strip — edge-to-edge, four thin-line drawings
   ============================================================ */
.drawing-strip {
  border-top: var(--hair);
  border-bottom: var(--hair);
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.drawing {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border-right: var(--hair);
}

.drawing:last-child { border-right: none; }

.drawing-svg {
  display: block;
  width: 100%;
  height: auto;
}

.drawing-label {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.label-name { font-weight: 500; }
.label-year { color: var(--red); }

/* ============================================================
   Sections
   ============================================================ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: var(--hair);
  padding-bottom: 0.75rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--red);
}

/* ============================================================
   Selected projects
   ============================================================ */
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  border-bottom: var(--hair);
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.project-name {
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-weight: 600;
}

.project-loc {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-detail {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--red);
}

.project-line {
  font-size: 0.95rem;
  max-width: 40ch;
  margin-left: auto;
}

/* ============================================================
   Studio
   ============================================================ */
.studio-statement {
  max-width: 62ch;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  line-height: 1.5;
  margin: 0 0 clamp(2.5rem, 6vw, 4rem);
}

.studio-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--hair);
}

.fact {
  padding: 1.25rem 1rem 1.25rem 0;
  border-right: var(--hair);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fact:last-child { border-right: none; }

.fact-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-value {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 600;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-link {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 4px;
  transition: color var(--fast) var(--ease);
}

.contact-link:hover { color: var(--red); }

.contact-address {
  font-style: normal;
  font-size: 1rem;
  line-height: 1.6;
}

.contact-note {
  margin: 0;
  font-size: 0.95rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: var(--hair);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================
   Scroll reveal (progressive enhancement)
   Hidden state only applies when JS is confirmed running (.js),
   so content is never invisible if scripts fail to load.
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .drawing:nth-child(2) { border-right: none; }
  .drawing:nth-child(n+3) { border-top: var(--hair); }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 600px) {
  .project-item { grid-template-columns: 1fr; }
  .project-detail { text-align: left; }
  .project-line { margin-left: 0; }
  .studio-facts { grid-template-columns: 1fr; }
  .fact { border-right: none; border-bottom: var(--hair); padding: 1rem 0; }
  .fact:last-child { border-bottom: none; }
  .hero-title { white-space: normal; }
}
