/* Nightcap Interactive — studio site.
   Palette and type come from the logo: black, copper, white; a Didone display face.
   Direction: a deco bar at night. Warm light on black, copper that catches it,
   thin double rules and diamond corners from the emblem's rings. The bar-menu row
   (name, copper leader, detail) is how things are listed. */

@import url("/assets/fonts/fonts.css");

@property --shine { syntax: "<percentage>"; inherits: false; initial-value: 0%; }

@view-transition { navigation: auto; }

:root {
  --black: #000;
  --copper: #bb8343;
  --copper-hi: #f1c68c;
  --copper-deep: #7a5226;
  --copper-dark: #3b2610;
  --white: #fff;
  --text: #e8e1d6;
  --muted: #9c9286;

  /* metal: a copper gradient with a highlight band */
  --metal: linear-gradient(100deg, var(--copper-deep) 0%, var(--copper) 28%, var(--copper-hi) 46%, var(--copper) 60%, var(--copper-deep) 100%);

  --display: "Playfair Display", "Bodoni 72", Didot, Georgia, serif;
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;

  --gutter: clamp(16px, 5vw, 48px);
  --measure: 36rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--text);
  font: 500 1.25rem/1.65 var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(70% 45% at 50% 0%, rgb(187 131 67 / .16), transparent 70%),
    radial-gradient(50% 35% at 50% 100%, rgb(187 131 67 / .07), transparent 70%),
    var(--black);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--copper); color: var(--black); }
:focus-visible { outline: 1px solid var(--copper); outline-offset: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--copper); color: var(--black); padding: .4em .8em; z-index: 30; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--display); color: var(--white); line-height: 1.1; margin: 0; }
h2 {
  display: flex; align-items: center; gap: 1.2rem;
  font-weight: 400; font-style: italic;
  font-size: clamp(2rem, 4.4vw, 2.7rem);
  margin-bottom: 2.4rem;
}
/* a copper line runs out from each heading */
h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--copper-deep), transparent); }

p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.35rem, 2.4vw, 1.6rem); line-height: 1.5; }
.muted { color: var(--muted); }

/* Art-deco double rule, from the emblem's twin rings (used by the 404 page) */
.rule {
  border: 0; height: 5px; margin: 0;
  border-top: 1px solid var(--copper);
  border-bottom: 1px solid var(--copper-deep);
}

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

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(0 0 0 / .7);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid rgb(187 131 67 / .28);
  view-transition-name: site-header;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; max-width: 72rem; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; transition: rotate .6s var(--ease); }
.brand:hover img { rotate: -12deg; }
.brand span { font: 700 1rem/1 var(--display); letter-spacing: .14em; color: var(--white); }

.nav { display: flex; gap: clamp(1.1rem, 3vw, 2.2rem); }
.nav a { position: relative; font-size: 1.1rem; text-decoration: none; color: var(--text); padding: .4rem 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--copper);
  scale: 0 1; transition: scale .3s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--copper); }
.nav a:hover::after, .nav a[aria-current="page"]::after { scale: 1 1; }
@media (max-width: 520px) { .brand span { display: none; } }

/* ---------- Hero: the emblem, backlit like a bar sign ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - 69px);
  display: grid; place-items: center; align-content: center;
  text-align: center;
  padding: 5rem var(--gutter) 6rem;
}
/* deco sunburst behind the emblem, faded out to the edges, turning very slowly */
.hero__rays {
  position: absolute; z-index: -1;
  left: 50%; top: 42%; width: 160vmax; aspect-ratio: 1;
  translate: -50% -50%;
  background:
    radial-gradient(closest-side, rgb(187 131 67 / .22), transparent 70%),
    repeating-conic-gradient(from 0deg, rgb(187 131 67 / .09) 0deg 2.5deg, transparent 2.5deg 10deg);
  -webkit-mask: radial-gradient(closest-side, #000 8%, transparent 48%);
          mask: radial-gradient(closest-side, #000 8%, transparent 48%);
  animation: rays 180s linear infinite, fade-in 2.4s ease-out both;
}
@keyframes rays { to { rotate: 360deg; } }
@keyframes fade-in { from { opacity: 0; } }

/* thin double copper frame with diamond corners */
.hero__frame {
  position: absolute; inset: clamp(14px, 2.4vw, 32px); z-index: -1;
  border: 1px solid rgb(187 131 67 / .45);
  box-shadow: inset 0 0 0 5px var(--black), inset 0 0 0 6px rgb(122 82 38 / .6);
  pointer-events: none;
  animation: fade-in 1.6s .4s ease-out both;
}
.hero__frame i {
  position: absolute; width: 11px; height: 11px;
  background: var(--black); border: 1px solid var(--copper);
  rotate: 45deg;
}
.hero__frame i:nth-child(1) { left: -6px; top: -6px; }
.hero__frame i:nth-child(2) { right: -6px; top: -6px; }
.hero__frame i:nth-child(3) { left: -6px; bottom: -6px; }
.hero__frame i:nth-child(4) { right: -6px; bottom: -6px; }

.hero h1 { width: min(400px, 74vw); margin: 0 auto; }
.hero__emblem {
  width: 62%; margin: 0 auto 2.4rem;
  filter: drop-shadow(0 0 28px rgb(187 131 67 / .35)) drop-shadow(0 0 70px rgb(187 131 67 / .18));
  animation: settle 1.6s var(--ease) both, glow 6s 2s ease-in-out infinite alternate;
}
.hero__wordmark {
  width: 100%;
  -webkit-mask: linear-gradient(100deg, #000 40%, rgb(0 0 0 / .45) 50%, #000 60%) 100% 0 / 300% 100% no-repeat;
          mask: linear-gradient(100deg, #000 40%, rgb(0 0 0 / .45) 50%, #000 60%) 100% 0 / 300% 100% no-repeat;
  animation: rise 1.2s .35s var(--ease) both, glint 1.6s 1.7s ease-in-out both;
}
.hero__tag {
  margin: 2.6rem auto 0; max-width: 24rem;
  font-style: italic; font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.5rem); color: var(--muted);
  animation: rise 1.2s .6s var(--ease) both;
}
/* "Now pouring": a small lit plaque that links down to the game */
.hero__cue {
  display: inline-flex; align-items: center; gap: .8rem;
  margin-top: 2.4rem; padding: .55rem 1.1rem .5rem;
  font: 700 .95rem/1 var(--display); letter-spacing: .06em; color: var(--white);
  text-decoration: none;
  border: 1px solid rgb(187 131 67 / .55);
  background: linear-gradient(180deg, rgb(187 131 67 / .14), rgb(187 131 67 / .04));
  box-shadow: 0 0 0 4px var(--black), 0 0 0 5px rgb(122 82 38 / .5), 0 10px 30px -10px rgb(187 131 67 / .35);
  transition: background-color .3s, box-shadow .3s, color .3s;
  animation: rise 1.2s .85s var(--ease) both;
}
.hero__cue span { font: italic 400 1.05rem/1 var(--serif); letter-spacing: 0; color: var(--copper); }
.hero__cue span::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 .55rem .1rem 0;
  background: var(--copper-hi); border-radius: 50%;
  box-shadow: 0 0 10px var(--copper-hi);
  animation: pulse 2s ease-in-out infinite;
}
.hero__cue:hover { color: var(--black); background-color: var(--copper); box-shadow: 0 0 0 4px var(--black), 0 0 0 5px var(--copper), 0 14px 40px -8px rgb(187 131 67 / .6); }
.hero__cue:hover span { color: var(--black); }

@keyframes settle { from { opacity: 0; transform: scale(.94) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes glint { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes glow { to { filter: drop-shadow(0 0 36px rgb(187 131 67 / .5)) drop-shadow(0 0 90px rgb(187 131 67 / .24)); } }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Sections and the deco ornament between them ---------- */

.section { padding: clamp(5rem, 11vw, 8rem) 0; }
#games { padding-top: clamp(4rem, 8vw, 6rem); }

.ornament {
  display: flex; align-items: center; gap: 1.2rem;
  width: min(64rem, 100% - 2 * var(--gutter)); margin: 0 auto;
}
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; }
.ornament::before { background: linear-gradient(90deg, transparent, var(--copper-deep)); }
.ornament::after { background: linear-gradient(270deg, transparent, var(--copper-deep)); }
/* a fan of rays in a half circle, over a diamond */
.ornament span {
  position: relative; width: 64px; height: 32px;
  background: repeating-conic-gradient(from -90deg at 50% 100%, var(--copper) 0deg 3deg, transparent 3deg 15deg);
  -webkit-mask: radial-gradient(circle at 50% 100%, #000 31px, transparent 32px);
          mask: radial-gradient(circle at 50% 100%, #000 31px, transparent 32px);
  opacity: .8;
}
.ornament span::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 9px;
  translate: -50% 0; rotate: 45deg; background: var(--copper);
}

/* ---------- Featured game ---------- */

.feature { display: grid; gap: 2rem; }
.feature__art {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9;
  /* double copper frame */
  box-shadow: 0 0 0 1px var(--copper), 0 0 0 7px var(--black), 0 0 0 8px var(--copper-deep), 0 30px 80px -30px rgb(187 131 67 / .35);
  transition: box-shadow .4s var(--ease);
}
.feature__art img:first-child { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease), filter .6s; }
.feature__art::after { /* low light from below so the logo reads */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / .25) 0%, transparent 30%, transparent 60%, rgb(0 0 0 / .55) 100%);
  pointer-events: none;
}
.feature__logo {
  position: absolute; z-index: 1; left: 50%; top: 5%; width: 58%;
  translate: -50% 0; rotate: -2deg;
  filter: drop-shadow(0 8px 16px rgb(0 0 0 / .5));
  transition: scale .6s cubic-bezier(.34, 1.56, .64, 1);
}
.feature__art:hover { box-shadow: 0 0 0 1px var(--copper-hi), 0 0 0 7px var(--black), 0 0 0 8px var(--copper), 0 40px 100px -30px rgb(187 131 67 / .55); }
.feature__art:hover img:first-child { scale: 1.035; filter: brightness(1.06) saturate(1.05); }
.feature__art:hover .feature__logo { scale: 1.04; }

/* the curtain opens as the frame scrolls in */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .feature__art img:first-child { animation: curtain linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    @keyframes curtain { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
  }
}

.feature__body .menu__note { max-width: 40rem; }
.feature__links { display: flex; flex-wrap: wrap; gap: .6rem 2rem; margin: 1.2rem 0 0; }
.feature__links a {
  font: 700 .95rem/1 var(--display); letter-spacing: .06em; color: var(--copper);
  text-decoration: none; padding: .45rem 0; border-bottom: 1px solid var(--copper-deep);
  transition: color .2s, border-color .2s;
}
.feature__links a:hover { color: var(--white); border-color: var(--copper); }

/* ---------- The menu row: name, dotted copper leader, detail ---------- */

.menu { list-style: none; margin: 0; padding: 0; }
.menu > li + li { margin-top: .4rem; }

.menu__row { display: flex; align-items: baseline; gap: .8rem; text-decoration: none; }
.menu__row::after {
  content: ""; order: 2; flex: 1 1 2rem; min-width: 2rem;
  border-bottom: 2px dotted var(--copper-deep);
  transform: translateY(-.3em); transform-origin: left;
}
.menu__name { order: 1; font: 700 clamp(1.5rem, 3.4vw, 2.1rem)/1.15 var(--display); color: var(--white); transition: color .2s; }
.menu__detail { order: 3; font-style: italic; font-weight: 400; color: var(--copper); white-space: nowrap; }
a.menu__row:hover .menu__name { color: var(--copper); }
a.menu__row:hover::after { border-bottom-color: var(--copper); }
.menu__note { margin: .7rem 0 0; color: var(--muted); }

.menu--small li a { padding: .75rem 0; border-bottom: 1px solid rgb(122 82 38 / .35); }
.menu--small .menu__name { display: inline-flex; align-items: center; gap: .8rem; font-size: 1.35rem; font-weight: 600; }
.menu--small svg { width: 20px; height: 20px; color: var(--copper); flex: none; transition: scale .3s cubic-bezier(.34, 1.56, .64, 1); }
.menu--small a:hover svg { scale: 1.2; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .menu__row::after { animation: leader linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    @keyframes leader { from { scale: 0 1; } }
  }
}
@media (max-width: 560px) {
  .menu__row { flex-wrap: wrap; row-gap: 0; }
  .menu__row::after { display: none; }
  .menu__detail { flex-basis: 100%; }
}

/* ---------- Studio statement: copper that catches the light as you scroll ---------- */

.statement { text-align: center; }
.statement__line {
  max-width: 16ch; margin: 0 auto;
  font: italic 700 clamp(2.8rem, 8vw, 5.6rem)/1.02 var(--display);
  letter-spacing: -.01em;
  color: var(--copper);
  background: var(--metal) var(--shine) 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 10px 30px rgb(187 131 67 / .18));
  --shine: 50%;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .statement__line { animation: shine linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    @keyframes shine { from { --shine: 100%; } to { --shine: 0%; } }
  }
}
.statement__bio { max-width: 30rem; margin: 2.2rem auto 0; color: var(--muted); font-size: 1.3rem; }

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

.site-footer { padding: 2.6rem 0 3rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; max-width: 72rem; }
.site-footer small { font-size: 1rem; color: var(--muted); }
.icon-row { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.icon-row a { color: var(--muted); display: block; padding: 2px; transition: color .2s; }
.icon-row a:hover { color: var(--copper); }
.icon-row svg { width: 20px; height: 20px; display: block; }

/* ---------- 404 ---------- */

.notfound { min-height: calc(100svh - 69px - 7rem); display: grid; place-items: center; align-content: center; text-align: center; padding: 4rem var(--gutter); }
.notfound img { width: 120px; margin: 0 auto 2.2rem; filter: drop-shadow(0 0 28px rgb(187 131 67 / .35)); }
.notfound h1 { font-weight: 700; font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: 1rem; }
.notfound p { margin: 0 auto 1.4rem; color: var(--muted); }
.notfound a { color: var(--copper); }

@media (prefers-reduced-motion: reduce) {
  .hero__rays, .hero__frame, .hero__emblem, .hero__wordmark, .hero__tag, .hero__cue, .hero__cue span::before { animation: none; }
}

/* ---------- News ---------- */

.page-head { padding: clamp(4.5rem, 11vw, 7.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { font: italic 400 clamp(2.8rem, 7vw, 4.4rem)/1.02 var(--display); }
.page-head p { margin: 1.2rem 0 0; color: var(--muted); }
.posts { padding-bottom: clamp(5rem, 11vw, 8rem); }
.posts .menu__name { font-size: clamp(1.35rem, 3vw, 1.8rem); }

.article { max-width: 42rem; margin: 0 auto; padding: clamp(4.5rem, 11vw, 7.5rem) var(--gutter) clamp(4rem, 9vw, 6rem); }
.article__back { display: inline-block; margin-bottom: 2.4rem; color: var(--muted); text-decoration: none; font-style: italic; }
.article__back:hover { color: var(--copper); }
.article h1 { font: 700 clamp(2.5rem, 6.4vw, 3.9rem)/1.04 var(--display); letter-spacing: -.01em; }
.article__date { display: block; margin: 1.1rem 0 2.6rem; color: var(--copper); font-style: italic; }
.article p, .article ul { max-width: none; font-size: 1.3rem; line-height: 1.7; }
.article ul { padding-left: 1.1em; margin: 0 0 1.2em; }
.article li + li { margin-top: .3em; }
.article li::marker { color: var(--copper); }
.article a { color: var(--copper-hi); text-underline-offset: 3px; text-decoration-color: var(--copper-deep); }
.article a:hover { text-decoration-color: var(--copper-hi); }
.article h2 { font-size: clamp(1.7rem, 3.6vw, 2.1rem); margin: 3.2rem 0 1.4rem; }
/* the one flourish: a metal Didone drop cap, like the first letter on a bar menu */
.article__lede::first-letter {
  float: left; margin: .06em .1em 0 0;
  font: 700 4.6em/.8 var(--display);
  color: var(--copper);
  background: var(--metal) 40% 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.article__video {
  position: relative; aspect-ratio: 16 / 9; margin: 2.6rem 0;
  background: #000;
  box-shadow: 0 0 0 1px var(--copper-deep), 0 0 0 7px var(--black), 0 0 0 8px var(--copper-deep);
}
.article__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article__end { display: flex; flex-wrap: wrap; gap: .6rem 2rem; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgb(122 82 38 / .45); }
.article__end a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--copper-deep); padding-bottom: 2px; }
.article__end a:hover { color: var(--white); border-color: var(--copper); }
.posts h2.menu__name { display: block; margin: 0; font-style: normal; font-weight: 700; }
.posts h2.menu__name::after { content: none; }
/* keep the footer at the bottom of short pages */
body { min-height: 100svh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
