:root {
  --bg: #140d07;
  --brass-hi: #fff1c1;
  --brass: #d6a751;
  --brass-lo: #7a5018;
  --ink: #1e1208;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

main {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 16px 6vh;
  text-align: center;
}

/* ---- logo ---- */

.logo {
  width: clamp(140px, 30vmin, 250px);
  height: auto;
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, .7))
    drop-shadow(0 0 30px rgba(255, 160, 60, .18));
  animation: sway 9s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50%      { transform: translateY(-6px) rotate(1.2deg); }
}

/* ---- engraved brass wordmark ---- */

.wordmark {
  font-family: "Rye", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 12vw, 5.8rem);
  line-height: 1.1;
  letter-spacing: .03em;
  white-space: nowrap;
  background: linear-gradient(
    180deg,
    var(--brass-hi) 0%,
    #e9c77e 30%,
    #a8742a 52%,
    #e6c07a 68%,
    var(--brass-lo) 100%
  );
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 2px 0 #2a1808)
    drop-shadow(0 4px 6px rgba(0, 0, 0, .6))
    drop-shadow(0 0 22px rgba(255, 170, 70, .22));
}

/* ---- ornamental divider with turning cog ---- */

.divider {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: min(420px, 80vw);
}

.rule {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass) 40%, var(--brass-hi) 100%);
  box-shadow: 0 1px 0 #2a1808;
}

.rule:last-child {
  background: linear-gradient(270deg, transparent, var(--brass) 40%, var(--brass-hi) 100%);
}

.cog {
  width: 26px;
  height: 26px;
  flex: none;
  fill: var(--brass);
  filter: drop-shadow(0 1px 0 #2a1808);
  animation: turn 8s linear infinite;
}

.cog circle { fill: var(--bg); }

@keyframes turn { to { transform: rotate(360deg); } }

/* ---- film grain + vignette ---- */

.grain,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.grain {
  inset: -50%;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .75 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(4) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-3%, 2%); }
  50%  { transform: translate(2%, -3%); }
  75%  { transform: translate(-2%, -1%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 45%, rgba(8, 4, 1, .85) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .logo, .cog, .grain { animation: none; }
}
