/* The Foundry Yard — design from Stitch project "The Foundry Yard — Web" */
/* Fonts are self-hosted (latin subset) so no visitor data goes to Google */
@font-face { font-family: 'Montserrat'; font-weight: 300 500; font-display: swap; src: url(fonts/montserrat.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(fonts/inter-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #121212;
  --bone: #EAE7D8;
  --muted: #8E8B80;
  --line: rgba(234, 231, 216, 0.15);
  --gutter: clamp(24px, 4vw, 48px);
  --head: 'Montserrat', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--bg);
  color: var(--bone);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: var(--bone); color: var(--bg); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter);
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  font-family: var(--head);
  font-size: 12px;
  text-transform: uppercase;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: 0.3em; }
.brand img { width: 22px; height: 22px; }
.topbar nav a { letter-spacing: 0.25em; color: #C6C6C6; transition: color .2s; }
.topbar nav a:hover, .brand:hover { color: var(--bone); opacity: .7; }

main { flex: 1; padding-top: 63px; }

/* Hero */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(80px, 12vw, 140px) var(--gutter) clamp(80px, 10vw, 128px);
}
.hero-logo { width: clamp(240px, 30vw, 380px); margin-bottom: 48px; }
.tagline {
  font-family: var(--head); font-weight: 300;
  font-size: clamp(17px, 1.6vw, 20px);
  letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(234, 231, 216, 0.8);
}
.meta, .index, .note, .footer {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted);
}
.meta { margin-top: 16px; letter-spacing: 0.3em; }
@media (max-width: 480px) { .meta { letter-spacing: 0.15em; } }

/* Editorial rows */
.row {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  max-width: 1280px; margin: 0 auto; width: 100%;
  padding: clamp(96px, 10vw, 144px) var(--gutter);
  position: relative;
}
.row::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--line); transform-origin: left; }
.index { letter-spacing: 0.25em; }
@media (min-width: 768px) {
  .row { grid-template-columns: 3fr 9fr; gap: 48px; }
  .index { position: sticky; top: 112px; align-self: start; }
}
.statement {
  font-family: var(--head); font-weight: 300;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.35; letter-spacing: -0.01em;
}

/* Contact */
.contact { display: block; padding: 32px 0; position: relative; }
.contact::after { content: ''; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--line); transform-origin: left; }
.contact:first-child { padding-top: 0; }
.caption {
  display: block; margin-bottom: 12px;
  font-family: var(--head); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
.email {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--head); font-weight: 300;
  font-size: clamp(18px, 2.4vw, 30px);
  overflow-wrap: anywhere;
  transition: opacity .2s;
}
.arrow { font-family: var(--mono); transition: transform .2s; }
.contact:hover .email { opacity: .7; }
.contact:hover .arrow { transform: translate(4px, -4px); }
.note { padding-top: 32px; letter-spacing: 0.05em; }

/* Listen */
.track {
  position: relative;
  display: grid; grid-template-columns: 72px 1fr auto auto; align-items: center; gap: 8px 32px;
  padding: 24px 0;
}
.track::after { content: ''; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--line); transform-origin: left; }
.track:first-child { padding-top: 0; }
.track-no, .track-time { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }
.track-title {
  font-family: var(--head); font-weight: 300;
  font-size: clamp(15px, 1.8vw, 22px); letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(234, 231, 216, 0.75); transition: color .3s;
}
.track-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 1px solid var(--line); cursor: pointer; transition: border-color .2s;
}
.track-btn:hover, .track.playing .track-btn { border-color: var(--bone); }
.icon { width: 10px; height: 12px; background: var(--bone); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.track.playing .icon { width: 10px; height: 10px; clip-path: none; }
.track.playing .track-title, .track.playing .track-time { color: var(--bone); }
.track-progress {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  height: 1px; width: 100%; background: var(--bone);
  transform: scaleX(0); transform-origin: left;
}
.volume {
  display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding-top: 24px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted);
}
.volume input {
  --v: 80%;
  -webkit-appearance: none; appearance: none; width: 120px; height: 13px; cursor: pointer;
  background: linear-gradient(var(--bone), var(--bone)) 0 50% / var(--v) 1px no-repeat,
              linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat;
}
.volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 8px; background: var(--bone); border: 0; border-radius: 0; }
.volume input::-moz-range-thumb { width: 8px; height: 8px; background: var(--bone); border: 0; border-radius: 0; }
.volume input:focus-visible { outline: 1px solid var(--bone); outline-offset: 4px; }
@media (max-width: 600px) {
  .track { grid-template-columns: 1fr auto auto; gap: 8px 16px; }
  .track-no { grid-column: 1 / -1; }
}

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
  letter-spacing: 0.05em;
}
.footer a {
  font-family: var(--head); letter-spacing: 0.25em; color: var(--bone); transition: opacity .2s;
}
.footer a:hover { opacity: .7; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* Legal pages */
.legal { max-width: 760px; width: 100%; margin: 0 auto; padding: clamp(112px, 12vw, 160px) var(--gutter) 96px; }
.legal h1 {
  margin: 16px 0 8px;
  font-family: var(--head); font-weight: 300; font-size: clamp(24px, 3vw, 32px);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.legal .updated { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.05em; }
.legal h2 {
  margin: 48px 0 16px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--head); font-weight: 400; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
}
.legal p, .legal li { font-size: 15px; line-height: 1.7; color: rgba(234, 231, 216, 0.85); }
.legal p + p { margin-top: 12px; }
.legal ul { display: grid; gap: 10px; padding-left: 18px; }
.legal strong { font-weight: 400; color: var(--bone); }
.legal a, .modal-note a { text-decoration: underline; text-underline-offset: 3px; }
.legal .table { display: grid; border-top: 1px solid var(--line); }
.legal .table div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.legal .table span { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding-top: 3px; }

/* Motion: hero on load, rows revealed on scroll (main.js). Nothing moves for reduced-motion users. */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 1.2s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-logo { animation-name: emerge; animation-duration: 1.8s; }
  .tagline { animation-delay: .6s; }
  .meta { animation-delay: .8s; }

  .js .reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity 1s cubic-bezier(.2, .7, .2, 1), transform 1s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0s);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }

  .js .row::before, .js .contact::after, .js .track::after {
    transform: scaleX(0);
    transition: transform 1.4s cubic-bezier(.65, 0, .35, 1) var(--d, 0s);
  }
  .js .row.is-in::before, .js .contact.is-in::after, .js .track.is-in::after { transform: scaleX(1); }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes emerge { from { opacity: 0; transform: scale(.96); filter: blur(8px); } }

/* Contact modal */
.modal {
  margin: auto; padding: 0;
  width: min(560px, calc(100% - 32px));
  background: var(--bg); color: var(--bone);
  border: 1px solid var(--line);
}
.modal::backdrop { background: rgba(10, 10, 10, 0.8); backdrop-filter: blur(4px); }
.modal-form { display: grid; gap: 24px; padding: clamp(24px, 5vw, 40px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-close { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--bone); }
.modal-to { font-family: var(--head); font-weight: 300; font-size: clamp(16px, 4.2vw, 24px); overflow-wrap: anywhere; }
.field {
  display: grid; gap: 8px;
  font-family: var(--head); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea {
  font: 300 16px var(--body); letter-spacing: normal;
  color: var(--bone); background: transparent;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 8px 0; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--bone); }
.field-error { display: none; font-family: var(--mono); letter-spacing: 0.05em; color: var(--bone); }
.field.invalid .field-error { display: block; }
.field.invalid input { border-bottom-color: var(--bone); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.modal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.send {
  font: 400 12px var(--head); letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--bone); background: none;
  border: 1px solid var(--bone); padding: 14px 24px; cursor: pointer;
  transition: background .2s, color .2s, opacity .2s;
}
.send:not(:disabled):hover { background: var(--bone); color: var(--bg); }
.send:disabled { opacity: .3; cursor: not-allowed; }
.modal-status, .modal-note { font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; color: var(--muted); }
.modal-status { text-transform: uppercase; }
