/* Shared steampunk styles for the landing page and the dashboard */

:root {
  color-scheme: dark;
  --brass: #c9a35c;
  --brass-light: #e8cf94;
  --brass-dark: #9c7a3c;
  --copper: #b46a3c;
  --ink: #f1e6d0;
  --muted: rgba(241, 230, 208, 0.72);
  --faint: rgba(241, 230, 208, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 32px 16px;
  font-family: Lora, Georgia, serif;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(135deg, #1a1410, #3b2c20);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  display: grid;
  place-items: center;
}

/* Brass panel */

.card {
  position: relative;
  width: 100%;
  max-width: 640px;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.5rem, 6vw, 3.5rem);
  background: linear-gradient(160deg, rgba(60, 44, 30, 0.85), rgba(32, 24, 17, 0.9));
  border: 2px solid var(--brass);
  border-radius: 6px;
  outline: 1px solid rgba(201, 163, 92, 0.45);
  outline-offset: 6px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 20px 45px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.card--wide {
  max-width: 1040px;
}

/* brass rivets in the corners */
.card::before,
.tile::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background:
    radial-gradient(circle at 5px 5px, var(--brass-light) 0 2px, var(--copper) 3px 4px, transparent 5px) top left / 10px 10px no-repeat,
    radial-gradient(circle at 5px 5px, var(--brass-light) 0 2px, var(--copper) 3px 4px, transparent 5px) top right / 10px 10px no-repeat,
    radial-gradient(circle at 5px 5px, var(--brass-light) 0 2px, var(--copper) 3px 4px, transparent 5px) bottom left / 10px 10px no-repeat,
    radial-gradient(circle at 5px 5px, var(--brass-light) 0 2px, var(--copper) 3px 4px, transparent 5px) bottom right / 10px 10px no-repeat;
}

.gear {
  position: absolute;
  top: -46px;
  right: -46px;
  width: 150px;
  height: 150px;
  color: var(--brass);
  opacity: 0.16;
  pointer-events: none;
  animation: turn 40s linear infinite;
}

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

/* Typography */

.eyebrow {
  position: relative;
  margin: 0 0 0.75rem;
  color: var(--brass);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1 {
  position: relative;
  margin: 0 0 1.5rem;
  font-family: "IM Fell English", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1.05;
  color: var(--brass-light);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 2px;
  margin-top: 1rem;
  background: linear-gradient(90deg, var(--brass), transparent);
}

h1 em {
  font-style: italic;
  color: var(--ink);
}

p {
  position: relative;
  margin: 0 0 1.1rem;
  max-width: 52ch;
  line-height: 1.75;
  font-size: 1.0625rem;
  color: var(--muted);
}

.lead {
  font-size: 1.2rem;
  color: var(--ink);
}

.note {
  font-family: "IM Fell English", Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--faint);
}

/* Links */

a {
  color: var(--brass-light);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(201, 163, 92, 0.55);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: #fff6e0;
  text-decoration-color: var(--copper);
}

a:focus-visible {
  outline: 2px solid var(--brass-light);
  outline-offset: 3px;
  border-radius: 3px;
}

.contact {
  margin: 2rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px dashed rgba(201, 163, 92, 0.4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.contact > span {
  font-family: "IM Fell English", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border: 1px solid #7a5a2a;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brass-light), var(--brass) 55%, var(--brass-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 8px rgba(0, 0, 0, 0.4);
  color: #2a1d10;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.button:hover,
.button:focus-visible {
  color: #2a1d10;
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Dashboard */

.tiles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 2rem;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 150px;
  padding: 22px 24px;
  background: linear-gradient(160deg, rgba(74, 55, 37, 0.7), rgba(38, 28, 20, 0.8));
  border: 1px solid rgba(201, 163, 92, 0.55);
  border-radius: 4px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35), 0 8px 20px -10px rgba(0, 0, 0, 0.6);
  color: inherit;
  text-decoration: none;
  font-weight: 400;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.tile:hover,
.tile:focus-visible {
  border-color: var(--brass-light);
  transform: translateY(-3px);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35), 0 16px 28px -12px rgba(0, 0, 0, 0.7);
  color: inherit;
}

.tile .num {
  color: var(--brass);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}

.tile .name {
  font-family: "IM Fell English", Georgia, serif;
  font-size: 1.85rem;
  line-height: 1.1;
  color: var(--brass-light);
}

.tile .url {
  margin-top: 0.35rem;
  color: var(--faint);
  font-size: 0.85rem;
  word-break: break-all;
}

.tile .arrow {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 1.3rem;
  color: var(--brass);
  transition: transform 0.2s ease, color 0.2s ease;
}

.tile:hover .arrow,
.tile:focus-visible .arrow {
  color: var(--brass-light);
  transform: translate(3px, -3px);
}

.card > footer {
  position: relative;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(201, 163, 92, 0.4);
  font-family: "IM Fell English", Georgia, serif;
  font-style: italic;
  color: var(--faint);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}

@media (prefers-reduced-motion: reduce) {
  a, .button, .tile, .tile .arrow { transition: none; }
  .button:hover, .button:focus-visible, .tile:hover, .tile:focus-visible { transform: none; }
  .gear, .tile { animation: none; }
}
