/* Little John.
 *
 * The page is a night in Sherwood. It opens on the forest at full bleed, the
 * art dissolves into the dark, and everything below it is read by torchlight.
 * Colours come off the artwork: midnight blue for the ground, warm lantern
 * gold for anything that matters, and the red of his feather kept in reserve
 * so it still counts when it shows up.
 *
 * The type does most of the work. Fraunces has a proper italic and real optical
 * sizing, so headings can be large and soft-edged without turning into a logo,
 * and the body stays quiet underneath.
 */

:root {
  --bg:        #08101c;
  --bg-2:      #0c1526;
  --panel:     #101b30;
  --line:      rgba(228, 235, 248, .13);
  --line-soft: rgba(228, 235, 248, .07);

  --text:      #f3eddf;
  --muted:     #9daac4;
  --faint:     #6c7997;

  --gold:      #f0ac3e;
  --gold-l:    #ffca70;
  --feather:   #c33a30;
  --moss:      #83984c;

  --ink:       #07101d;

  --r:         14px;
  --r-lg:      22px;

  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono:  "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gut: clamp(20px, 5vw, 64px);
  --max: 1120px;
  --read: 660px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.08;
  margin: 0;
}

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

p { margin: 0 0 1.15em; }

.muted { color: var(--muted); }

.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 20px;
}

section {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(70px, 10vw, 132px) var(--gut);
}

/* ================================================================ nav == */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px var(--gut);
  transition: background .4s ease, backdrop-filter .4s ease,
              border-color .4s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}

/* Transparent over the forest, solid once you are reading. */
.nav.settled {
  background: rgba(8, 16, 28, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line-soft);
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(240, 172, 62, .35);
}

.nav nav { display: flex; gap: 26px; }

.nav nav a {
  font-size: 14.5px;
  color: rgba(243, 237, 223, .72);
  text-decoration: none;
  transition: color .18s;
}

.nav nav a:hover { color: var(--gold-l); }

/* ============================================================== bits == */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--gold-l), var(--gold));
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2,.7,.2,1), filter .18s, box-shadow .18s;
}

.btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgba(240, 172, 62, .28);
}

.btn.ghost {
  background: rgba(8, 16, 28, .4);
  color: var(--text);
  border-color: rgba(243, 237, 223, .26);
  backdrop-filter: blur(6px);
}

.btn.ghost:hover {
  background: rgba(243, 237, 223, .08);
  box-shadow: none;
  filter: none;
}

.btn-sm { padding: 9px 18px; font-size: 14px; }

.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ============================================================== hero == */

.hero {
  position: relative;
  min-height: 100svh;
  max-width: none;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(96px, 14vh, 150px) var(--gut) clamp(80px, 12vh, 130px);
  overflow: hidden;
}

/* The forest, dissolving into the page rather than stopping at an edge. */
.hero-sky {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom,
      rgba(8, 16, 28, .74) 0%,
      rgba(8, 16, 28, .30) 26%,
      rgba(8, 16, 28, .40) 58%,
      rgba(8, 16, 28, .88) 86%,
      var(--bg) 100%),
    image-set(url("art/sherwood-sm.jpg") 1x, url("art/sherwood.jpg") 2x);
  background-size: cover, cover;
  background-position: center 42%, center 42%;
  z-index: 0;
}

@media (min-width: 1100px) {
  .hero-sky {
    background-image:
      linear-gradient(to bottom,
        rgba(8, 16, 28, .74) 0%,
        rgba(8, 16, 28, .30) 26%,
        rgba(8, 16, 28, .40) 58%,
        rgba(8, 16, 28, .88) 86%,
        var(--bg) 100%),
      url("art/sherwood.jpg");
  }
}

.hero-in {
  position: relative;
  z-index: 2;
  max-width: 780px;
  display: grid;
  justify-items: center;
}

.portrait {
  width: clamp(112px, 15vw, 158px);
  height: auto;
  border-radius: 50%;
  border: 1px solid rgba(240, 172, 62, .34);
  box-shadow:
    0 0 0 10px rgba(240, 172, 62, .045),
    0 24px 60px rgba(0, 0, 0, .6),
    0 0 80px rgba(240, 172, 62, .2);
  margin-bottom: 30px;
  animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(243, 237, 223, .78);
  padding: 7px 16px 7px 12px;
  border: 1px solid rgba(243, 237, 223, .18);
  border-radius: 999px;
  background: rgba(8, 16, 28, .34);
  backdrop-filter: blur(6px);
  margin: 0 0 24px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 0 rgba(131, 152, 76, .6);
  animation: pulse 2.8s ease-out infinite;
}

@keyframes pulse {
  70%  { box-shadow: 0 0 0 10px rgba(131, 152, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(131, 152, 76, 0); }
}

.hero h1 {
  font-size: clamp(40px, 6.6vw, 82px);
  font-weight: 600;
  line-height: 1.06;
  margin-bottom: 24px;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .75), 0 1px 3px rgba(0, 0, 0, .5);
}

.hero .lede {
  font-size: clamp(17px, 1.7vw, 20px);
  color: rgba(243, 237, 223, .84);
  max-width: 43ch;
  margin: 0 auto 34px;
  text-shadow: 0 1px 22px rgba(0, 0, 0, .8);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.ca {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 11px 15px;
  border: 1px solid rgba(243, 237, 223, .15);
  border-radius: 999px;
  background: rgba(8, 16, 28, .48);
  backdrop-filter: blur(8px);
  margin: 30px 0 0;
}

.ca-label {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}

.ca code { word-break: break-all; color: var(--gold); }

.copy {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color .18s, border-color .18s;
}

.copy:hover { color: var(--text); border-color: var(--gold); }

/* a quiet nudge that there is more below the fold */
.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 22px;
  height: 34px;
  border: 1px solid rgba(243, 237, 223, .26);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
}

.scroll-hint span {
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: rgba(243, 237, 223, .6);
  animation: drift 2.2s ease-in-out infinite;
}

@keyframes drift {
  0%   { opacity: 0; transform: translateY(0); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(11px); }
}

/* fireflies, the one bit of motion the page really earns */
.fireflies { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.fly {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffd98a;
  box-shadow: 0 0 8px 2px rgba(255, 200, 110, .55);
  opacity: 0;
  animation: flit linear infinite;
}

@keyframes flit {
  0%   { opacity: 0; transform: translate(0, 0) scale(.7); }
  12%  { opacity: .85; }
  50%  { transform: translate(var(--dx), var(--dy)) scale(1); }
  82%  { opacity: .7; }
  100% { opacity: 0; transform: translate(calc(var(--dx) * 1.7),
                                          calc(var(--dy) * 1.6)) scale(.7); }
}

/* ============================================================== live == */

.live {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 0;
  margin: 0 auto;
}

.live .stat { background: var(--bg-2); padding: 24px 26px; display: grid; gap: 6px; }

.live .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}

.live .v { font-family: var(--serif); font-size: 27px; font-weight: 600; }

/* ============================================================ ballad == */

.ballad { max-width: 900px; text-align: center; }

.tale {
  font-size: clamp(27px, 3.7vw, 44px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.22;
  color: var(--gold-l);
  margin-bottom: 48px;
}

.tale-body {
  max-width: var(--read);
  margin: 0 auto;
  text-align: left;
  font-size: 17.5px;
  color: rgba(243, 237, 223, .8);
}

/* A drop cap, because it is a story and stories start like this. */
.drop::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.05em;
  line-height: .82;
  font-weight: 600;
  color: var(--gold);
  padding: 4px 12px 0 0;
}

.close {
  margin: 34px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  color: var(--text);
}

/* ============================================================= creed == */

.creed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3.4vw, 46px);
}

.creed-grid article { position: relative; padding-top: 24px; }

/* a hairline that lights up gold, instead of a box around everything */
.creed-grid article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 2px;
  background: var(--gold);
  opacity: .85;
}

.creed-grid h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.creed-grid p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* =============================================================== buy == */

.buy h2 { font-size: clamp(28px, 3.8vw, 44px); margin-bottom: 46px; }

.steps {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.steps li { background: var(--bg-2); padding: 30px 28px 34px; }

.steps .n {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}

.steps h3 { font-size: 20px; margin-bottom: 10px; }

.steps p { color: var(--muted); font-size: 15px; margin: 0; }

.buy-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.buy-cta .muted { font-size: 14px; }

/* ============================================================ ledger == */

.ledger { padding-top: 0; padding-bottom: clamp(40px, 6vw, 70px); }

.ledger-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 34px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}

.ledger-row > div { display: grid; gap: 8px; min-width: 0; }

.ledger .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
}

.ledger .v {
  font-family: var(--serif);
  font-size: clamp(22px, 2.7vw, 32px);
  font-weight: 600;
}

.ledger-row > div:first-child .v { color: var(--gold); }

/* =============================================================== ask == */

.qs {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}

details { background: var(--bg-2); }

summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 28px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 20px;
  color: var(--gold);
  transition: transform .22s;
}

details[open] summary::after { transform: rotate(45deg); }

details p { padding: 0 28px 24px; margin: 0; color: var(--muted); max-width: 66ch; }

/* ============================================================== foot == */

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gut) 76px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 28px;
  position: relative;
  z-index: 1;
}

.foot-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 26px;
  flex-wrap: wrap;
}

.mark { font-family: var(--serif); font-size: 26px; font-weight: 600; margin: 0 0 4px; }

.foot .muted { margin: 0; }

.links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }

.links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s;
}

.links a:hover { color: var(--gold); }

.fine { font-size: 12.5px; color: var(--faint); max-width: 74ch; margin: 0; line-height: 1.65; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  z-index: 200;
  font-family: var(--mono);
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s cubic-bezier(.2,.7,.2,1);
}

.toast.up { opacity: 1; transform: translate(-50%, 0); }

/* sections rise a little as they arrive */
.rise {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

.rise.here { opacity: 1; transform: none; }

/* ============================================================ narrow == */

@media (max-width: 900px) {
  .creed-grid, .steps, .live { grid-template-columns: 1fr; }
  .live { border-radius: var(--r); }
  .nav nav { display: none; }
  .creed-grid { gap: 34px; }
  .ledger-row { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { min-height: 92svh; }
  .tale-body { font-size: 16.5px; }
  .drop::first-letter { font-size: 3.4em; }
  .steps li { padding: 26px 22px 28px; }
  .live .stat { padding: 20px 22px; }
  details p, summary { padding-left: 22px; padding-right: 22px; }
  .foot-top { align-items: flex-start; }
  .ca { font-size: 11.5px; }
}

/* Anyone who has asked for less motion gets none of it. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .fireflies { display: none; }
  .rise { opacity: 1; transform: none; }
}
