/* Ringshadow's look, shared by the home page and the blog.

   One shape runs it: the dark band the giant's ring throws across Ashfall
   Reach, a parallelogram slanted 12 degrees. It masks every picture (.cut)
   and shapes the buttons; the home page also splits on it. Pages opt in
   with <body class="ring">; site.css stays underneath for the fonts. */

.ring {
  --night: #030912;
  --night-2: #0a1728;
  --night-3: #13263b;
  --deep: #01040a;
  --ink: #ebf7ff;
  --soft: #a9c3d4;
  --cyan: #59d9ff;
  --ice: #ccf2ff;
  --amber: #ffb333;
  /* Ashfall Reach in the sun: the desert of the game's ground. */
  --sun: #d3a062;
  --sun-2: #c48d4f;
  --sun-3: #e2b97f;
  --sun-ink: #170e05;
  --sun-soft: #3e2a13;

  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --text: "Exo 2", system-ui, sans-serif;
  --f-display: clamp(52px, 7vw, 124px);
  --f-head: clamp(34px, 3.4vw, 52px);
  --f-lead: clamp(19px, 1.5vw, 22px);
  --f-body: clamp(16px, 1.25vw, 18px);
  --f-small: 15px;

  --m: clamp(16px, 3vw, 40px);
  --sec: clamp(96px, 11vw, 180px);
  --tilt: 0.21; /* tan 12deg */
  --rise: 7vw;  /* how far the band's edges climb across the page */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);

  font-family: var(--text);
  font-size: var(--f-body);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--night);
}
:where(.ring) :is(h1, h2, h3) {
  font-family: var(--display); font-weight: 600; text-transform: none;
  letter-spacing: -0.01em; line-height: 0.95; color: inherit; margin: 0;
}
:where(.ring) h2 { font-size: var(--f-head); max-width: 14ch; text-wrap: balance; }
:where(.ring) p { max-width: 62ch; margin: 0; }
:where(.ring) a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ring .skip { color: var(--night); }
.ring :focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 0; }
.ring kbd {
  font-family: var(--text); font-weight: 700; font-size: 0.85em;
  padding: 0.05em 0.4em; margin: 0 0.1em; border: 0; border-radius: 0;
  background: var(--night-3); color: var(--ink);
}

/* ---------- The shape ---------- */

/* A picture in the band's shape. The slant is the same 12 degrees at any
   size: the cut is the frame's height times tan 12deg, which for a frame of
   fixed proportions is a fixed share of its width (--dp). The clip sits on
   the frame, so the picture inside can move. */
.cut {
  position: relative; overflow: hidden; aspect-ratio: var(--ar);
  clip-path: polygon(var(--dp) 0, 100% 0, calc(100% - var(--dp)) 100%, 0 100%);
}
.cut.r1 { --ar: 1 / 1; --dp: 21%; }
.cut.r16 { --ar: 16 / 10; --dp: 13.125%; }
.cut > img, .cut > video {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; background: var(--night);
}

/* Buttons: a flat band of colour, cut to the band's slant. */
.ring .btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 34px; border: 0; border-radius: 0; box-shadow: none; /* taste-skill-ignore: resets the shared button */
  background: var(--cyan); color: var(--night);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  font-family: var(--text); font-weight: 700; font-size: var(--f-body);
  letter-spacing: 0; text-transform: none; text-decoration: none;
  transition: transform 140ms var(--ease-out), background-color 180ms ease, color 180ms ease;
}
.ring .btn::before { content: none; }
.ring .btn:active { transform: scale(0.97); }
.ring .btn:focus-visible { outline: none; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
@media (hover: hover) and (pointer: fine) {
  .ring .btn:hover { background: var(--ice); color: var(--night); }
}
.ring .btn-sm { padding: 10px 24px; font-size: var(--f-small); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }

.tlink {
  font-weight: 700; text-decoration: underline;
  text-decoration-color: currentColor; text-decoration-thickness: 2px; text-underline-offset: 5px;
  transition: text-decoration-color 180ms ease, text-underline-offset 180ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tlink:hover { text-underline-offset: 8px; }
}

/* ---------- Navigation: a plain row over the sky ---------- */

.bar {
  position: relative; z-index: 10;
  display: flex; align-items: center; gap: 12px 32px;
  padding: 24px var(--m);
}
.bar-mark {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  font-family: var(--text); font-weight: 700; font-size: var(--f-lead);
  text-decoration: none;
}
.bar ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.bar ul a { font-size: var(--f-body); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .bar ul a:hover { text-decoration: underline; }
}

/* ---------- Footer: the name, built from blocks like the mesas ---------- */

.foot { padding: 64px var(--m) 40px; background: var(--night); color: var(--soft); }
.blocks { display: flex; gap: 4px; align-items: flex-end; height: 34svh; min-height: 180px; text-decoration: none; }
.blocks span {
  flex: 1; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 0.08em; background: var(--sun); color: var(--night);
  font-family: var(--display); font-weight: 700; font-size: clamp(36px, 7vw, 120px); line-height: 0.8;
  transition: transform 240ms var(--ease-out);
}
.blocks span:nth-child(1) { height: 74%; }
.blocks span:nth-child(2) { height: 100%; background: var(--sun-2); }
.blocks span:nth-child(3) { height: 62%; background: var(--sun-3); }
.blocks span:nth-child(4) { height: 88%; }
.blocks span:nth-child(5) { height: 80%; background: var(--sun-2); }
.blocks span:nth-child(6) { height: 96%; background: var(--sun-3); }
.blocks span:nth-child(7) { height: 60%; }
.blocks span:nth-child(8) { height: 84%; background: var(--sun-2); }
.blocks span:nth-child(9) { height: 70%; background: var(--cyan); }
.blocks span:nth-child(10) { height: 92%; background: var(--sun-3); }
@media (hover: hover) and (pointer: fine) {
  .blocks:hover span { transform: translateY(-6px); }
  .blocks:hover span:nth-child(even) { transform: translateY(-12px); }
}
.foot-cols {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 16px;
  margin-top: 56px; font-size: var(--f-small);
}
.foot-cols ul { grid-column: span 2; list-style: none; margin: 0; padding: 0; }
.foot-cols li { margin-bottom: 8px; }
.foot-cols a { color: var(--ink); }
.foot-note { grid-column: 8 / span 5; font-size: var(--f-small); }
.foot-last {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
  max-width: none !important; margin-top: 56px !important; font-size: var(--f-small);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .reveal.s1 { transition-delay: 80ms; }
  .js .reveal.s2 { transition-delay: 160ms; }
  .js .reveal.s3 { transition-delay: 240ms; }

  /* The footer's blocks rise like mesas out of the ground. */
  .js .blocks span { transform: scaleY(0); transform-origin: bottom; transition: transform 900ms var(--ease-out); }
  .js .blocks.is-in span { transform: none; }
  .js .blocks.is-in span:nth-child(2n) { transition-delay: 80ms; }
  .js .blocks.is-in span:nth-child(3n) { transition-delay: 160ms; }
}

/* ---------- Narrower screens ---------- */

@media (max-width: 860px) {
  .bar ul { display: none; }
  .foot-cols ul { grid-column: span 6; }
  .foot-note { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .bar { gap: 12px; }
  .bar-mark { font-size: 18px; }
  .blocks { height: 22svh; min-height: 120px; gap: 3px; }
  .blocks span { font-size: 8.6vw; }
}
