/* HME84 Legacy Archive — static transfer from original atelier language */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --hme-obsidian: #0b0c10;
  --hme-midnight: #03102d;
  --hme-deep: #01060f;
  --hme-surface: #051a47;
  --hme-surface-2: #072050;
  --hme-surface-3: #092a5c;
  --hme-turquoise: #1ab5b7;
  --hme-red: #aa2e36;
  --hme-bone: #f3f1e7;
  --hme-grey: #9da1a6;
  --line: rgba(243, 241, 231, 0.12);
  --line-soft: rgba(243, 241, 231, 0.08);
  --text-muted: #b8bec8;
  --text-faint: rgba(184, 190, 200, 0.54);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 14%, rgba(26, 181, 183, 0.23), transparent 28rem),
    radial-gradient(circle at 8% 42%, rgba(170, 46, 54, 0.18), transparent 26rem),
    radial-gradient(circle at 74% 72%, rgba(11, 95, 99, 0.18), transparent 24rem),
    linear-gradient(165deg, var(--hme-midnight) 0%, var(--hme-deep) 52%, var(--hme-midnight) 100%);
  color: var(--hme-bone);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(243, 241, 231, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 241, 231, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

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

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

::selection {
  background: rgba(26, 181, 183, 0.25);
  color: var(--hme-bone);
}

h1,
h2,
h3 {
  color: var(--hme-bone);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.06;
  text-wrap: balance;
}

p,
li {
  max-width: 68ch;
  text-wrap: pretty;
}

.archive-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.archive-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 20;
  width: min(calc(100% - 2rem), 1200px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(243, 241, 231, 0.13);
  border-radius: 18px;
  background: rgba(4, 10, 21, 0.72);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(243, 241, 231, 0.05);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.archive-mark {
  display: flex;
  align-items: center;
  min-width: 0;
}

.archive-mark img {
  width: auto;
  height: clamp(36px, 4.5vw, 48px);
  max-width: min(300px, 42vw);
  object-fit: contain;
  object-position: left center;
}

.archive-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(243, 241, 231, 0.08);
  border-radius: 999px;
  background: rgba(8, 14, 30, 0.72);
  white-space: nowrap;
}

.archive-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}

.archive-nav a::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.34rem;
  height: 1px;
  background: var(--hme-red);
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: left center;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

.archive-nav a:hover {
  color: var(--hme-bone);
  background: rgba(26, 181, 183, 0.08);
}

.archive-nav a:hover::after {
  opacity: 0.85;
  transform: scaleX(1);
}

.archive-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: clamp(9rem, 14vw, 13rem) 0 clamp(4rem, 8vw, 7rem);
}

.archive-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.archive-hero__media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center end;
  padding: 9rem 2vw 4rem 0;
  opacity: 0.28;
}

.archive-hero__media img {
  width: min(620px, 52vw);
  max-height: 68vh;
  object-fit: contain;
  filter: drop-shadow(0 32px 80px rgba(0, 0, 0, 0.45));
}

.archive-hero__inner {
  position: relative;
  z-index: 2;
}

.archive-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--hme-turquoise);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.archive-kicker::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--hme-turquoise);
}

h1 {
  max-width: 11ch;
  margin-top: 1.65rem;
  font-size: clamp(3.25rem, 8.2vw, 7.1rem);
  letter-spacing: -0.015em;
}

.archive-lead {
  max-width: 58ch;
  margin-top: 1.8rem;
  color: var(--text-muted);
  font-size: clamp(1.06rem, 1rem + 0.75vw, 1.5rem);
  line-height: 1.72;
}

.archive-bridge {
  max-width: 46ch;
  margin-top: 1rem;
  color: var(--hme-bone);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 2.25rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.18;
}

.archive-principles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
}

.archive-principles span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(26, 181, 183, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(26, 181, 183, 0.1), rgba(5, 26, 71, 0.72));
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.archive-principles span:nth-child(2) {
  border-color: rgba(170, 46, 54, 0.26);
  background: linear-gradient(135deg, rgba(170, 46, 54, 0.11), rgba(5, 26, 71, 0.72));
}

.archive-principles span:nth-child(4) {
  border-color: rgba(243, 241, 231, 0.2);
}

.archive-intro,
.archive-section,
.archive-close {
  padding: clamp(5rem, 9vw, 8rem) 0;
}

.archive-intro,
.archive-section {
  border-top: 1px solid var(--line);
}

.archive-section--quiet {
  background: linear-gradient(180deg, rgba(5, 26, 71, 0.45) 0%, rgba(3, 16, 45, 0.78) 100%);
}

.archive-two-col,
.archive-entry {
  display: grid;
  grid-template-columns: minmax(220px, 0.76fr) minmax(0, 1.7fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}

.archive-prose {
  color: var(--text-muted);
}

.archive-prose p + p {
  margin-top: 1rem;
}

.archive-intro h2,
.archive-meta h2,
.archive-section-head h2 {
  margin-top: 1rem;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
}

.archive-meta {
  position: sticky;
  top: 122px;
}

.archive-meta p:last-child {
  margin-top: 1.1rem;
  color: var(--text-faint);
}

.archive-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4.5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background:
    linear-gradient(155deg, rgba(9, 42, 92, 0.9), rgba(5, 26, 71, 0.92)),
    var(--hme-surface);
  box-shadow: 0 16px 48px rgba(4, 8, 24, 0.48), inset 0 1px 0 rgba(26, 181, 183, 0.08);
}

.archive-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0%, rgba(26, 181, 183, 0.16), transparent 22rem),
    linear-gradient(90deg, rgba(170, 46, 54, 0.18), transparent 32%);
  opacity: 0.78;
}

.archive-panel > * {
  position: relative;
  z-index: 1;
}

.archive-statement {
  color: var(--hme-bone);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 3.35rem);
  font-weight: 300;
  line-height: 1.08;
}

#loop84 .archive-statement {
  color: color-mix(in oklab, var(--hme-bone) 88%, var(--hme-turquoise));
}

.archive-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  list-style: none;
}

.archive-list li {
  padding: 1rem 0 0 1.25rem;
  border-top: 1px solid var(--line-soft);
  border-left: 2px solid rgba(26, 181, 183, 0.34);
  color: var(--text-muted);
}

.archive-list li:nth-child(even) {
  border-left-color: rgba(170, 46, 54, 0.42);
}

.archive-list strong,
.archive-notes strong {
  color: var(--hme-bone);
  font-weight: 600;
}

.archive-wordmark {
  width: min(300px, 72vw);
  margin-bottom: 2rem;
}

.archive-cycle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
}

.archive-cycle div {
  min-height: 230px;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  background: rgba(1, 6, 15, 0.22);
}

.archive-cycle div:nth-child(2) {
  background: linear-gradient(180deg, rgba(26, 181, 183, 0.09), rgba(1, 6, 15, 0.22));
}

.archive-cycle div:nth-child(3) {
  background: linear-gradient(180deg, rgba(170, 46, 54, 0.1), rgba(1, 6, 15, 0.22));
}

.archive-cycle div:last-child {
  border-right: 0;
}

.archive-cycle span {
  color: rgba(26, 181, 183, 0.62);
  font-size: clamp(2.7rem, 6vw, 5rem);
  font-family: var(--font-display);
  line-height: 0.85;
}

.archive-cycle strong {
  display: block;
  margin-top: 1.5rem;
  color: var(--hme-bone);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
}

.archive-cycle p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.archive-notes {
  display: grid;
  gap: 1px;
  margin-top: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--line);
}

.archive-notes p {
  max-width: none;
  padding: 1.25rem;
  background: rgba(1, 6, 15, 0.24);
}

.archive-notes p:nth-child(1) {
  border-left: 3px solid var(--hme-turquoise);
}

.archive-notes p:nth-child(2) {
  border-left: 3px solid var(--hme-red);
}

.archive-notes p:nth-child(3) {
  border-left: 3px solid rgba(243, 241, 231, 0.38);
}

.archive-section-head {
  max-width: 760px;
  margin-bottom: 2.4rem;
}

.archive-section-head p:last-child {
  margin-top: 1rem;
  color: var(--text-muted);
}

.archive-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.archive-gallery figure {
  display: grid;
  grid-template-rows: minmax(220px, 1fr) auto;
  min-height: 300px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 80% 10%, rgba(26, 181, 183, 0.16), transparent 14rem),
    linear-gradient(165deg, rgba(9, 42, 92, 0.82), rgba(5, 26, 71, 0.94));
  transition: border-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.archive-gallery figure:nth-child(3),
.archive-gallery figure:nth-child(4) {
  background:
    radial-gradient(circle at 15% 0%, rgba(170, 46, 54, 0.18), transparent 13rem),
    linear-gradient(165deg, rgba(9, 42, 92, 0.82), rgba(5, 26, 71, 0.94));
}

.archive-gallery figure:hover {
  border-color: rgba(26, 181, 183, 0.42);
  box-shadow: 0 18px 42px rgba(1, 6, 15, 0.36);
  transform: translateY(-2px);
}

.archive-gallery img {
  width: 100%;
  height: 100%;
  padding: 1.4rem;
  object-fit: contain;
}

.archive-gallery figcaption {
  min-height: 58px;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.archive-close {
  text-align: center;
}

.archive-close p {
  margin: 0 auto 1.75rem;
  color: var(--hme-bone);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 6rem);
  line-height: 1;
}

.archive-close .archive-disclaimer {
  max-width: 52ch;
  margin: -0.75rem auto 1.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
}

.archive-return {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--hme-turquoise);
  border-radius: 0.25rem;
  color: var(--hme-turquoise);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
}

.archive-return:hover {
  background: var(--hme-turquoise);
  color: var(--hme-obsidian);
  transform: translateY(-1px);
}

.archive-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.78rem;
}

.archive-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 900px) {
  .archive-header {
    position: absolute;
    align-items: flex-start;
  }

  .archive-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    white-space: normal;
  }

  .archive-nav a {
    font-size: 0.65rem;
    min-height: 28px;
  }

  .archive-hero__media {
    place-items: center;
    padding: 8rem 0 0;
    opacity: 0.22;
  }

  .archive-hero__media img {
    width: 86vw;
  }

  .archive-two-col,
  .archive-entry,
  .archive-cycle,
  .archive-gallery {
    grid-template-columns: 1fr;
  }

  .archive-meta {
    position: static;
  }

  .archive-cycle div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .archive-cycle div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .archive-shell,
  .archive-header {
    width: min(calc(100% - 1rem), 1200px);
  }

  .archive-header {
    padding: 0.6rem;
  }

  .archive-mark img {
    max-width: 46vw;
  }

  .archive-nav {
    gap: 0;
    padding: 3px;
  }

  .archive-nav a {
    padding: 0.35rem 0.5rem;
    letter-spacing: 0.04em;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 5rem);
  }

  .archive-panel {
    padding: 1.35rem;
  }
}
