/* ==========================================================================
   Univeracity — editorial site
   Palette: color-tinged greys only. Logo may carry gold.
   ========================================================================== */

:root {
  /* Warm charcoal foundation with cool mid-greys */
  --bg: #0c0c0d;
  --bg-elevated: #121214;
  --bg-card: #161618;
  --line: #2a2a2e;
  --line-soft: #1c1c1f;

  --ink: #e6e4e0; /* warm off-white */
  --ink-soft: #a8a6a1; /* warm grey */
  --ink-mute: #7c7974; /* deeper warm grey */
  --ink-faint: #5a5753;

  /* Cool-tinged greys for structure / UI */
  --steel: #9a9aa2;
  --steel-dim: #5c5c66;
  --mist: #c8c7c4;

  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype",
    Palatino, Georgia, serif;
  --font-sans: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --shell: min(1120px, calc(100% - 3rem));
  --narrow: min(680px, 100%);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
  --scroll-progress: 0;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

:focus-visible {
  outline: 1px solid #b6924a;
  outline-offset: 0.3rem;
}

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--mist);
}

strong {
  font-weight: 500;
  color: var(--ink);
}

::selection {
  background: #2e2e32;
  color: var(--ink);
}

/* -------------------------------------------------------------------------- */
/* Atmosphere                                                                 */
/* -------------------------------------------------------------------------- */

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 80% 50% at 50% -10%,
      rgba(48, 48, 52, 0.45),
      transparent 55%
    ),
    radial-gradient(
      ellipse 40% 30% at 85% 60%,
      rgba(36, 36, 40, 0.35),
      transparent 50%
    ),
    radial-gradient(
      ellipse 35% 25% at 10% 80%,
      rgba(32, 30, 28, 0.4),
      transparent 50%
    );
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.875rem;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* -------------------------------------------------------------------------- */
/* Layout                                                                     */
/* -------------------------------------------------------------------------- */

.shell {
  width: var(--shell);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.shell.narrow {
  width: var(--narrow);
}

.shell.center {
  text-align: center;
}

.section {
  padding: clamp(5rem, 12vw, 8.5rem) 0;
  position: relative;
  z-index: 1;
}

.section-label {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.15rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-head {
  max-width: 36rem;
  margin-bottom: clamp(2.5rem, 6vw, 3.75rem);
}

.section-intro {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 32rem;
}

/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(12, 12, 13, 0.55);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  transition:
    border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, #8f6826, #d6ad58 58%, #1a8468);
  transform: scaleX(var(--scroll-progress));
  transform-origin: left;
  opacity: 0.72;
  transition: transform 0.08s linear;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
  background: rgba(12, 12, 13, 0.82);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
}

.brand-mark {
  width: 1.85rem;
  height: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.nav a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 0.25s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.nav a[aria-current="location"] {
  color: var(--ink);
}

.nav a[aria-current="location"]::after {
  content: "";
  display: block;
  width: 0.25rem;
  height: 0.25rem;
  margin: 0.28rem auto -0.53rem;
  border-radius: 50%;
  background: #b6924a;
  box-shadow: 0 0 0.55rem rgba(182, 146, 74, 0.5);
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* -------------------------------------------------------------------------- */

.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(5rem, 12vw, 7rem);
  position: relative;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(280px, 40vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    var(--line) 20%,
    var(--line) 80%,
    transparent
  );
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 42rem;
}

.hero-mark {
  margin-bottom: 2.25rem;
}

.hero-instrument {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(13rem, 23vw, 17rem);
  aspect-ratio: 1;
  isolation: isolate;
}

.hero-instrument::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(213, 171, 86, 0.2),
    rgba(184, 135, 52, 0.07) 42%,
    transparent 72%
  );
  filter: blur(1.1rem);
  opacity: 0.7;
  animation: hero-light-drift 12s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes hero-light-drift {
  0% {
    transform: translate3d(-12%, -8%, 0) scale(0.88);
  }
  50% {
    transform: translate3d(10%, -2%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(3%, 12%, 0) scale(0.94);
  }
}

.hero-logo {
  width: clamp(7.5rem, 16vw, 10.5rem);
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.45));
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.hero-lede {
  margin: 1.75rem 0 0;
  max-width: 28rem;
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.55;
  color: var(--steel);
}

.hero-rule {
  width: 3rem;
  height: 1px;
  margin: 2rem 0;
  background: var(--line);
}

.hero-sub {
  margin: 0;
  max-width: 26rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-mute);
}

/* -------------------------------------------------------------------------- */
/* Manifesto                                                                  */
/* -------------------------------------------------------------------------- */

.manifesto {
  border-top: 1px solid var(--line-soft);
}

.prose {
  margin-top: 2.5rem;
}

.prose p {
  margin: 0 0 1.35rem;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/* Pillars                                                                    */
/* -------------------------------------------------------------------------- */

.pillar-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.pillar {
  padding: 2.25rem 1.75rem 2.5rem 0;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.pillar:not(:last-child) {
  border-right: 1px solid var(--line-soft);
  padding-right: 2rem;
  margin-right: 0.5rem;
}

.pillar-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.85rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.pillar-body {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 20rem;
}

/* -------------------------------------------------------------------------- */
/* Work                                                                       */
/* -------------------------------------------------------------------------- */

.work-list {
  display: grid;
  gap: 1.25rem;
}

.work-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(
      165deg,
      rgba(28, 28, 30, 0.65) 0%,
      rgba(18, 18, 20, 0.4) 100%
    );
  padding: clamp(2rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 40%,
    rgba(255, 255, 255, 0.015) 50%,
    transparent 60%
  );
  pointer-events: none;
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(26rem circle at var(--work-x, 78%) var(--work-y, 35%), rgba(34, 118, 160, 0.1), transparent 65%);
  transition: opacity 0.35s var(--ease);
}

.work-card:hover::after,
.work-card:focus-within::after {
  opacity: 1;
}

.work-card--limitless::after {
  background: radial-gradient(26rem circle at var(--work-x, 78%) var(--work-y, 35%), rgba(154, 154, 162, 0.11), transparent 65%);
}

.work-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.work-status {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.work-category {
  color: var(--ink-faint);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.work-logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.55rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--bg);
}

.work-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 4vw, 3rem);
  letter-spacing: 0.02em;
  color: var(--ink);
}

.work-body {
  margin: 0;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.75rem;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--steel);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 1.75rem;
}

.work-links .work-link { margin-top: 0; }

.work-link:hover,
.work-link:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--steel-dim);
}

.work-link-arrow {
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.25s var(--ease);
}

.work-link:hover .work-link-arrow,
.work-link:focus-visible .work-link-arrow {
  transform: translateX(0.2rem);
}

.work-watermark {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(2rem, 7vw, 6rem);
  width: clamp(9rem, 19vw, 15rem);
  opacity: 0.055;
  filter: grayscale(0.35) saturate(0.65);
  transform: translateY(-50%) rotate(2deg) scale(180%);
  pointer-events: none;
}

.work-card-meta,
.work-identity,
.work-body,
.work-links,
.work-link {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* Close                                                                      */
/* -------------------------------------------------------------------------- */

.close {
  padding-bottom: clamp(6rem, 14vw, 9rem);
}

.close-mark {
  width: 4rem;
  height: auto;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.close-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.25;
  color: var(--ink);
}

.close-sub {
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-soft);
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}

.footer-brand img {
  width: 1.4rem;
  height: auto;
  opacity: 0.9;
}

.footer-copy {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer-note {
  margin: 0;
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* -------------------------------------------------------------------------- */
/* Reveal animations                                                          */
/* -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.delay-1 {
  transition-delay: 0.08s;
}
.delay-2 {
  transition-delay: 0.16s;
}
.delay-3 {
  transition-delay: 0.24s;
}
.delay-4 {
  transition-delay: 0.32s;
}
.delay-5 {
  transition-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-instrument::before {
    animation: none;
    transform: none;
  }

  .delay-1,
  .delay-2,
  .delay-3,
  .delay-4,
  .delay-5 {
    transition-delay: 0s;
  }
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .pillar:not(:last-child) {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
  }

  .pillar {
    padding: 2rem 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .footer-copy,
  .footer-note {
    text-align: center;
  }
}

@media (max-width: 560px) {
  :root {
    --shell: min(1120px, calc(100% - 1.75rem));
  }

  .nav a {
    letter-spacing: 0.1em;
    font-size: 0.72rem;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .hero-title {
    font-size: clamp(3rem, 14vw, 4rem);
  }

  .work-watermark {
    display: none;
  }
}

@media (max-width: 350px) {
  .brand-name {
    display: none;
  }

  .nav {
    gap: 0.8rem;
  }
}
