/*
 * Tangent — shared look for the tangent.<whatever> family.
 * Single dark theme: near-black "exhibit wall" with warm off-white text.
 * Same palette and type as tangent.gallery. Each site folder carries its own
 * copy of this file so a Vercel project's Root Directory is fully self-contained.
 */
:root {
  --background: #100f0d;
  --foreground: #ece7de;
  --line: #29261f;
  --muted: #9b948a;
  --card: #171613;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--background);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

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

h1,
h2,
p,
ol,
ul {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

::selection {
  background: var(--foreground);
  color: var(--background);
}

:focus-visible {
  outline: 1px solid var(--foreground);
  outline-offset: 4px;
}

/* Letter-spaced eyebrow / wall-label caption */
.label {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

/* Underline that grows from the left on hover */
.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.link-underline:hover::after,
.link-underline[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: linear-gradient(to bottom, rgba(16, 15, 13, 0.96) 40%, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.brand .mark {
  flex: none;
}
.brand-sub {
  display: none;
  margin-left: 0.15rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--line);
  line-height: 1;
}
.nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav ul a {
  display: inline-block;
  padding: 0.75rem 0;
  transition: color 0.3s;
}
.nav ul a:hover,
.nav ul a[aria-current="page"] {
  color: var(--foreground);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}
/* Small screens: the mark sits at the top, sized so it never reaches the copy. */
.hero-art {
  position: absolute;
  top: 5rem;
  right: 1.5rem;
  width: min(70vw, 34svh, 30rem);
  z-index: 1;
  color: var(--foreground);
  pointer-events: none;
}
.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--background) 8%, rgba(16, 15, 13, 0) 55%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero h1 {
  margin-top: 1rem;
  max-width: 48rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.lede {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(236, 231, 222, 0.8);
}
.cta {
  margin-top: 2.5rem;
  color: var(--foreground);
}

/* ---------- Curatorial line ---------- */
.statement {
  max-width: 42rem;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.4vw, 1.5rem);
  line-height: 1.6;
  color: rgba(236, 231, 222, 0.9);
}

/* ---------- Index list (the catalogue) ---------- */
.index {
  border-top: 1px solid rgba(41, 38, 31, 0.7);
}
.index-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}
.rows {
  margin-top: 2rem;
  border-top: 1px solid rgba(41, 38, 31, 0.5);
}
.row {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: 1rem;
  row-gap: 0.4rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(41, 38, 31, 0.5);
  align-items: baseline;
}
.row .num {
  grid-row: span 2;
}
.row .title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.2;
  color: var(--foreground);
}
.row .desc {
  grid-column: 2;
  max-width: 34rem;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--muted);
}
.row .where {
  grid-column: 2;
  margin-top: 0.5rem;
  transition: color 0.3s;
}
a.row .title {
  transition: transform 0.45s var(--ease);
}
a.row:hover .title {
  transform: translateX(0.4rem);
}
a.row:hover .where {
  color: var(--foreground);
}
.row-soon .title,
.row-soon .desc {
  opacity: 0.55;
}

/* ---------- Empty state (labs bench) ---------- */
.bench {
  margin-top: 2rem;
  padding: 3rem 1.75rem;
  border: 1px solid var(--line);
  background: var(--card);
  text-align: center;
}
.bench .mark {
  color: var(--foreground);
  margin-bottom: 1.5rem;
}
.bench .title {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.3;
}
.bench .desc {
  max-width: 28rem;
  margin: 0.75rem auto 0;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(41, 38, 31, 0.7);
}
.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.footer .brand-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.125rem;
}
.footer .blurb {
  max-width: 24rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted);
}
.footer .meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.footer .meta a {
  transition: color 0.3s;
}
.footer .meta a:hover {
  color: var(--foreground);
}
.footer .meta .links {
  display: flex;
  gap: 1.5rem;
}
.footer .copy {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

/* ---------- Entrance motion ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rise {
  animation: rise 0.9s var(--ease) both;
  animation-delay: var(--d, 0s);
}

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .nav {
    padding: 0 2.5rem;
  }
  .nav ul {
    gap: 2.25rem;
  }
  .brand-sub {
    display: block;
  }
  .hero {
    padding: 6rem 2.5rem 5rem;
  }
  .hero-art {
    right: 2.5rem;
  }
  .lede {
    font-size: 1.125rem;
  }
  .statement {
    padding: 8rem 1.5rem;
  }
  .row {
    grid-template-columns: 3rem 1fr auto;
    column-gap: 1.5rem;
  }
  .row .num {
    grid-row: span 2;
  }
  .row .where {
    grid-column: 3;
    grid-row: 1;
    margin-top: 0;
    white-space: nowrap;
  }
  .row .desc {
    grid-column: 2 / span 2;
  }
  .footer-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 3.5rem 2rem;
  }
  .footer .meta {
    align-items: flex-end;
  }
}

/* Wide screens: copy bottom-left, the mark centred in the right half. */
@media (min-width: 960px) {
  .hero-art {
    top: 0;
    bottom: 0;
    right: 3rem;
    width: min(46vw, 78svh, 44rem);
    display: flex;
    align-items: center;
  }
  .hero h1 {
    max-width: 38rem;
  }
  .lede {
    max-width: 32rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
}
