/* ──────────────────────────────────────────────────────────────────────
   Zellner Development — File Library
   Dark/gold/cream construction-luxury aesthetic
   ────────────────────────────────────────────────────────────────────── */

:root {
  --c-ink:        #2b2b2b;          /* header charcoal, matches brand */
  --c-ink-deep:   #1a1a1a;
  --c-ink-soft:   #3a3a3a;
  --c-cream:      #faf6ec;          /* warm page background          */
  --c-cream-2:    #f3ede0;
  --c-paper:      #ffffff;
  --c-line:       #e6dfce;
  --c-line-2:     #d6cdb6;
  --c-text:       #2b2b2b;
  --c-text-mute:  #6c6557;
  --c-text-quiet: #9b9482;

  --c-gold:       #d4a017;          /* primary gold from logo        */
  --c-gold-deep:  #b8870b;
  --c-gold-light: #f5d76e;
  --c-gold-pale:  #fbeec1;

  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Manrope', -apple-system, system-ui, sans-serif;

  --radius:       14px;
  --radius-sm:    8px;
  --shadow-sm:    0 1px 2px rgba(40,30,10,.06), 0 1px 1px rgba(40,30,10,.04);
  --shadow-md:    0 8px 24px rgba(40,30,10,.08), 0 2px 6px rgba(40,30,10,.05);
  --shadow-lg:    0 24px 48px rgba(40,30,10,.12), 0 4px 12px rgba(40,30,10,.06);

  --container:    1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
a   { color: inherit; }
button { font: inherit; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--c-ink);
  color: #fff;
  border-bottom: 1px solid #000;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand img {
  height: 56px;
  width: auto;
}
.nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  text-decoration: none;
  color: #f3eedf;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .01em;
  border-radius: 6px;
  transition: background-color .15s, color .15s;
  position: relative;
}
.nav a + a { border-left: 1px solid #4a4438; }
.nav a:hover { color: var(--c-gold-light); }
.nav a:last-child {
  margin-left: 10px;
  background: linear-gradient(135deg, var(--c-gold), var(--c-gold-deep));
  color: #1a1a1a;
  font-weight: 600;
  border-left: none;
}
.nav a:last-child:hover { color: #1a1a1a; filter: brightness(1.05); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform .2s, opacity .2s;
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--c-ink) 0%, var(--c-ink) 60%, #232323 100%);
  color: #f3eedf;
  padding: 76px 28px 120px;
  overflow: hidden;
}
.hero::before {
  /* subtle architectural lines */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(115deg, transparent 0%, transparent 49.6%, rgba(212,160,23,.07) 49.8%, rgba(212,160,23,.07) 50%, transparent 50.2%),
    linear-gradient(75deg,  transparent 0%, transparent 79.6%, rgba(212,160,23,.05) 79.8%, rgba(212,160,23,.05) 80%, transparent 80.2%);
  background-size: 100% 100%;
  pointer-events: none;
}
.hero__grain {
  position: absolute;
  inset: 0;
  opacity: .14;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.hero__inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
}
.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--c-gold-light);
  margin: 0 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.hero__eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--c-gold);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 0 0 24px;
  color: #fff;
  max-width: 22ch;
}
.hero__title br { display: block; }
.hero__lede {
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.65;
  color: #d8d1bf;
  margin: 0 0 40px;
}
.hero__search {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(212,160,23,.3);
  border-radius: 999px;
  padding: 6px 8px 6px 22px;
  max-width: 600px;
  transition: border-color .2s, background-color .2s;
}
.hero__search:focus-within {
  border-color: var(--c-gold-light);
  background: rgba(255,255,255,.08);
}
.hero__search svg {
  width: 20px;
  height: 20px;
  color: var(--c-gold-light);
  flex-shrink: 0;
}
.hero__search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font: inherit;
  font-size: 16px;
  padding: 14px 10px;
}
.hero__search input::placeholder { color: rgba(243,238,223,.5); }

/* ── Filter strip ───────────────────────────────────────────────────── */
.filters {
  background: var(--c-cream-2);
  border-bottom: 1px solid var(--c-line);
  margin-top: -1px;
  position: sticky;
  top: 92px;
  z-index: 20;
}
.filters__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
}
.filters__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  flex-shrink: 0;
}
.filters__chips {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}
.chip {
  background: transparent;
  border: 1px solid var(--c-line-2);
  color: var(--c-text);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--c-ink); }
.chip.is-active {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: #fff;
}

/* ── Files grid ─────────────────────────────────────────────────────── */
.files {
  flex: 1;
  padding: 48px 28px 80px;
}
.files__inner {
  max-width: var(--container);
  margin: 0 auto;
}
.files__meta {
  font-size: 13px;
  color: var(--c-text-mute);
  letter-spacing: .04em;
  margin: 0 0 24px;
}
.files__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.file-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  box-shadow: var(--shadow-sm);
}
.file-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-line-2);
  box-shadow: var(--shadow-md);
}
.file-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.file-card__cat {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-gold-deep);
  background: var(--c-gold-pale);
  border-radius: 4px;
  padding: 4px 10px;
}
.file-card__lock {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--c-cream-2);
  color: var(--c-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-card__lock svg { width: 14px; height: 14px; }
.file-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 10px;
  color: var(--c-ink);
}
.file-card__desc {
  color: var(--c-text-mute);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 20px;
  flex: 1;
}
.file-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--c-line);
}
.file-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--c-text-quiet);
}
.file-card__info strong {
  color: var(--c-text-mute);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 10.5px;
}
.file-card__dl {
  background: var(--c-ink);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color .15s, color .15s, transform .1s;
}
.file-card__dl:hover {
  background: var(--c-gold);
  color: var(--c-ink);
}
.file-card__dl:active { transform: scale(.97); }
.file-card__dl svg { width: 14px; height: 14px; }

.files__empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--c-text-quiet);
}
.files__empty svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--c-line-2);
}
.files__empty p { margin: 0; font-size: 15px; }

.files__loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--c-text-quiet);
}
.files__loading p { margin: 16px 0 0; font-size: 14px; }
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--c-line-2);
  border-top-color: var(--c-gold);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--c-ink);
  color: #d8d1bf;
  padding: 38px 28px;
  margin-top: auto;
}
.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.site-footer__mark {
  height: 44px;
  width: auto;
}
.site-footer__col {
  display: flex;
  flex-direction: column;
}
.site-footer__name {
  font-family: var(--font-display);
  font-size: 17px;
  color: #fff;
  margin: 0;
  letter-spacing: .02em;
}
.site-footer__addr {
  font-size: 13px;
  color: #b8b1a0;
  margin: 2px 0 0;
}
.site-footer__small {
  margin-left: auto;
  font-size: 12px;
  color: #908a7a;
}

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 8, .55);
  backdrop-filter: blur(4px);
  animation: fadeIn .15s ease;
}
.modal__card {
  position: relative;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px 30px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: pop .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--c-text-mute);
  font-size: 14px;
}
.modal__close:hover { background: var(--c-cream-2); color: var(--c-ink); }
.modal__lock {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--c-gold-pale);
  color: var(--c-gold-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__lock svg { width: 26px; height: 26px; }
.modal__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--c-ink);
}
.modal__sub {
  font-size: 14px;
  color: var(--c-text-mute);
  margin: 0 0 22px;
  line-height: 1.5;
}
.modal__sub strong { color: var(--c-ink); }
#pw-input {
  width: 100%;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  background: var(--c-cream);
  border: 1px solid var(--c-line-2);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s;
}
#pw-input:focus { border-color: var(--c-gold); background: #fff; }
.modal__err {
  color: #b1372d;
  font-size: 13px;
  margin: 8px 0 0;
  text-align: left;
}
.modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}
.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s, background-color .15s, color .15s;
}
.btn--ghost {
  background: transparent;
  color: var(--c-text-mute);
}
.btn--ghost:hover { background: var(--c-cream-2); color: var(--c-ink); }
.btn--gold {
  background: linear-gradient(135deg, var(--c-gold), var(--c-gold-deep));
  color: #1a1a1a;
}
.btn--gold:hover { filter: brightness(1.05); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header__inner.is-open + nav { display: flex; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-ink);
    flex-direction: column;
    padding: 12px 20px 20px;
    border-top: 1px solid #000;
    gap: 0;
  }
  .nav.is-open a {
    padding: 14px 8px;
    border-left: 0;
  }
  .nav.is-open a + a {
    border-top: 1px solid #4a4438;
    border-left: 0;
  }
  .nav.is-open a:last-child {
    margin: 12px 0 0;
    text-align: center;
  }
  .hero { padding: 56px 22px 80px; }
  .hero__title { font-size: clamp(32px, 9vw, 48px); }
  .filters { top: 88px; }
  .filters__inner { padding: 12px 20px; }
  .files { padding: 36px 20px 60px; }
  .files__grid { grid-template-columns: 1fr; gap: 14px; }
  .file-card { padding: 22px 22px 18px; }
  .site-footer__inner { gap: 16px; }
  .site-footer__small { width: 100%; margin-left: 0; }
}

@media (max-width: 480px) {
  .brand img { height: 44px; }
  .site-header__inner { padding: 14px 18px; }
  .hero__title { font-size: 36px; }
  .hero__lede { font-size: 15.5px; }
}
