/* Everything here is driven by the tokens the design studio writes:
   --b-primary  --b-accent  --b-ink  --b-paper  --b-radius
   --b-heading  --b-body    and [data-backdrop] on <html>. */

:root {
  --b-primary: #16505c;
  --b-accent: #e8b33a;
  --b-ink: #16202b;
  --b-paper: #f7f8f6;
  --b-radius: 8px;
  --b-heading: 'Archivo', Arial, sans-serif;
  --b-body: 'Archivo', Arial, sans-serif;
}

* { box-sizing: border-box; }

body.brand {
  margin: 0;
  font-family: var(--b-body);
  color: var(--b-ink);
  background-color: var(--b-paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

[data-backdrop='tint'] body.brand {
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--b-accent) 22%, var(--b-paper)), var(--b-paper) 60%);
  background-repeat: no-repeat;
}
[data-backdrop='grid'] body.brand {
  background-image:
    linear-gradient(color-mix(in srgb, var(--b-ink) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--b-ink) 7%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
}
[data-backdrop='halftone'] body.brand {
  background-image: radial-gradient(color-mix(in srgb, var(--b-primary) 16%, transparent) 1.6px, transparent 1.7px);
  background-size: 14px 14px;
}

[data-hero-treatment='wash'] .hero-art-frame { background: linear-gradient(135deg, var(--b-primary), var(--b-accent)); }
[data-hero-treatment='duotone'] .hero-art-frame { background: var(--b-primary); }
[data-hero-treatment='duotone'] .hero-art-frame .art { filter: grayscale(1) contrast(1.05); mix-blend-mode: screen; opacity: .78; }

.brand-wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.home-layout { display: flex; flex-direction: column; gap: 0; }
.home-layout > .brand-panel { width: 100%; }
.hero-art-section { padding: 0 0 92px; }

.brand-head {
  display: flex; align-items: center; gap: 14px;
  padding: 28px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--b-ink) 16%, transparent);
}
.brand-head img.logo { height: 54px; width: auto; }
.brand-head .names { line-height: 1.15; }
.brand-head .school { font-family: var(--b-heading); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand-head .event { font-size: 0.9rem; color: color-mix(in srgb, var(--b-ink) 62%, var(--b-paper)); }
.brand-head .spacer { flex: 1; }
.brand-head .staff-link { color: inherit; text-decoration: none; font-size: 0.84rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.brand-head .staff-link span { color: var(--b-primary); font-size: 1.1rem; margin-left: 5px; }
.brand-head .staff-link:hover { color: var(--b-primary); }
.gallery-art { max-height: 54px; max-width: 160px; margin-left: auto; object-fit: cover; border-radius: var(--b-radius); }

.brand-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr); gap: clamp(36px, 7vw, 100px); align-items: center; padding: clamp(64px, 10vw, 130px) 0 96px; }
.hero-copy { position: relative; z-index: 1; }
.custom-blocks { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.custom-block { position: absolute; display: block; max-width: 100%; }
.custom-block-text { font-family: var(--b-heading); font-weight: 600; line-height: 1.05; white-space: pre-wrap; overflow-wrap: anywhere; }
.custom-block-image { height: auto; border-radius: var(--b-radius); object-fit: contain; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--b-primary); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.eyebrow-dot { width: 10px; height: 10px; background: var(--b-accent); border-radius: 50%; }
.brand-hero h1 {
  font-family: var(--b-heading);
  font-size: clamp(3.4rem, 9vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin: 0 0 26px;
  font-weight: 700;
  max-width: 8ch;
}
.brand-hero .lede { font-size: clamp(1.05rem, 2vw, 1.28rem); max-width: 42ch; margin: 0 0 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; color: color-mix(in srgb, var(--b-ink) 62%, var(--b-paper)); font-size: 0.84rem; }
.hero-meta span::before { content: '—'; color: var(--b-accent); margin-right: 8px; }
.hero-art-frame { position: relative; min-height: 390px; background: var(--b-primary); border-radius: var(--b-radius); overflow: hidden; transform: rotate(2deg); box-shadow: 16px 18px 0 color-mix(in srgb, var(--b-accent) 72%, var(--b-paper)); }
.brand-hero .art { width: 100%; height: 100%; min-height: 390px; object-fit: cover; display: block; }
.art-caption { position: absolute; z-index: 2; top: 22px; left: 22px; right: 22px; display: flex; justify-content: space-between; color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.art-placeholder { min-height: 390px; display: flex; flex-direction: column; justify-content: center; padding: 42px; color: var(--b-paper); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--b-primary) 86%, #000), color-mix(in srgb, var(--b-primary) 86%, #000) 12px, var(--b-primary) 12px, var(--b-primary) 24px); }
.art-placeholder span { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; }
.art-placeholder strong { display: block; color: var(--b-accent); font-family: var(--b-heading); font-size: clamp(4rem, 9vw, 7rem); line-height: 0.9; letter-spacing: -0.06em; }

.brand-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--b-primary); color: #fff; text-decoration: none;
  font-family: var(--b-heading); font-weight: 600;
  padding: 11px 20px; border-radius: var(--b-radius); border: 0; cursor: pointer; font-size: 1rem;
}
.brand-btn:hover { filter: brightness(1.12); }
.brand-btn.quiet { background: transparent; color: var(--b-primary); box-shadow: inset 0 0 0 1.5px currentColor; }

.brand-panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding-bottom: 72px; border-top: 1px solid color-mix(in srgb, var(--b-ink) 16%, transparent); }
.brand-panel {
  background: var(--b-panel);
  border-right: 1px solid color-mix(in srgb, var(--b-ink) 16%, transparent);
  padding: 24px 28px 12px 0;
  margin-right: 28px;
}
.brand-panel:last-child { border-right: 0; margin-right: 0; }
.brand-panel .panel-number { display: block; color: var(--b-primary); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; margin-bottom: 32px; }
.brand-panel h2 { font-family: var(--b-heading); font-size: 1.12rem; margin: 0 0 10px; }
.brand-panel p { margin: 0; font-size: 0.93rem; color: color-mix(in srgb, var(--b-ink) 78%, var(--b-paper)); }

.brand-foot {
  border-top: 1px solid color-mix(in srgb, var(--b-ink) 12%, transparent);
  padding: 20px 0 40px; font-size: 0.85rem;
  color: color-mix(in srgb, var(--b-ink) 60%, var(--b-paper));
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ------------------------------------------------------------- gallery */

.gal-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 10px 0 24px; }
.gal-top h1 { font-family: var(--b-heading); font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0 0 6px; letter-spacing: -0.03em; }
.gal-top p { margin: 0; max-width: 52ch; }
.gallery-project-context { margin-bottom: 12px; padding: 10px 14px; border-left: 4px solid var(--b-accent); background: color-mix(in srgb, var(--b-primary) 8%, var(--b-paper)); }
.gallery-project-context span { display: block; color: color-mix(in srgb, var(--b-ink) 62%, var(--b-paper)); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.gallery-project-context strong { display: block; font-family: var(--b-heading); font-size: 1.15rem; line-height: 1.3; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding-bottom: 40px; }
.gal-item { position: relative; border-radius: var(--b-radius); overflow: hidden; background: color-mix(in srgb, var(--b-ink) 8%, var(--b-paper)); border: 0; padding: 0; cursor: zoom-in; }
.gal-item { background: var(--b-panel); }
[data-card-style='outline'] .gal-item { border: 1px solid color-mix(in srgb, var(--b-ink) 22%, transparent); }
[data-card-style='shadow'] .gal-item { box-shadow: 0 12px 28px color-mix(in srgb, var(--b-ink) 16%, transparent); }
.gal-item img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.gal-item:focus-visible { outline: 3px solid var(--b-primary); outline-offset: 2px; }

.viewer { position: fixed; inset: 0; background: rgba(10, 14, 18, 0.93); display: none; flex-direction: column; z-index: 50; }
.viewer.on { display: flex; }
.viewer .frame { flex: 1; display: grid; place-items: center; padding: 16px; min-height: 0; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .tools { display: flex; gap: 10px; justify-content: center; align-items: center; padding: 14px; flex-wrap: wrap; }
.viewer .tools button, .viewer .tools a {
  font: inherit; font-family: var(--b-body); background: rgba(255,255,255,0.12); color: #fff;
  border: 0; border-radius: var(--b-radius); padding: 9px 16px; cursor: pointer; text-decoration: none;
}
.viewer .tools a.save { background: var(--b-accent); color: var(--b-ink); font-weight: 600; }
.viewer .count { color: #cfd6da; font-size: 0.88rem; }

.state { text-align: center; padding: 70px 20px; }
.state h1 { font-family: var(--b-heading); margin-bottom: 8px; }
.state p { margin: 0 auto; max-width: 44ch; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media (max-width: 720px) {
  .brand-wrap { padding: 0 20px; }
  .brand-head { padding: 20px 0; }
  .brand-head img.logo { height: 42px; }
  .brand-head .event { font-size: 0.78rem; }
  .brand-head .staff-link { font-size: 0.7rem; }
  .brand-hero { grid-template-columns: 1fr; gap: 48px; padding: 64px 0 78px; }
  .hero-art-section { padding-bottom: 68px; }
  .brand-hero h1 { font-size: clamp(3.4rem, 19vw, 6rem); }
  .hero-art-frame { min-height: 300px; margin: 0 8px 0 0; }
  .brand-hero .art, .art-placeholder { min-height: 300px; }
  .art-placeholder { padding: 30px; }
  .brand-panels { grid-template-columns: 1fr; }
  .brand-panel { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--b-ink) 16%, transparent); margin: 0; padding: 24px 0; }
  .brand-panel:last-child { border-bottom: 0; }
  .brand-panel .panel-number { margin-bottom: 18px; }
}
