/* Rune and Wire: iron-gall ink on vellum, with copper for the wire.
   Layout: a colophon. The wire band and the mark open it, the name set in cut capitals,
   then the works as plates with their notes beside them, then the name explained. */

@font-face { font-family: "Uncial Antiqua"; src: url("/assets/fonts/uncial-antiqua.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/assets/fonts/cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/eb-garamond.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "EB Garamond"; font-style: italic; src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --vellum: #EEE7D8;
  --vellum2: #E3DAC6;
  --ink: #1F1C19;
  --faded: #6A625A;
  --copper: #A4512A;
  --rule: color-mix(in srgb, var(--faded) 40%, transparent);
  --caps: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --body: "EB Garamond", "Iowan Old Style", Garamond, Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --vellum: #17191C; --vellum2: #202328; --ink: #E9E2D3; --faded: #A39C90; --copper: #DE8B5C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --vellum: #17191C; --vellum2: #202328; --ink: #E9E2D3; --faded: #A39C90; --copper: #DE8B5C;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: url("/assets/paper-grain.png") 0 0 / 192px repeat, var(--vellum);
  color: var(--ink);
  font: 400 1.25rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--copper) 60%, transparent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--copper); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--copper) 28%, transparent); }
h1, h2, h3, p { margin: 0; font-weight: 400; }
.faded { color: var(--faded); }
.small { font-size: 1rem; }

.wrap {
  max-width: 68rem; margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ----- The wire: two strands twisted, in copper ----- */
.wire {
  display: block; height: 26px; flex: 1;
  background: var(--copper);
  -webkit-mask: url("/assets/wire.svg") 0 50% / 31px 26px repeat-x;
          mask: url("/assets/wire.svg") 0 50% / 31px 26px repeat-x;
}
.wire-band { display: flex; align-items: center; gap: 14px; padding-top: 26px; }
.wire-band .wire:first-child { -webkit-mask-position: right 50%; mask-position: right 50%; }
.mark { width: 84px; height: 84px; flex: none; }
.mark .lozenge { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: miter; }
.mark .lozenge.thin { stroke-width: 1.2; stroke: var(--faded); }
.mark .rune { fill: none; stroke: var(--copper); stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.mark .bead { fill: var(--copper); }

/* ----- Hero ----- */
.hero { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(3rem, 2rem + 4vw, 5.5rem); text-align: center; }
.name {
  font-family: var(--caps); font-weight: 500;
  font-size: clamp(2.7rem, 1rem + 7.4vw, 6.6rem);
  line-height: 1; letter-spacing: .08em;
  text-wrap: balance;
}
.name .and { font-family: var(--body); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--copper); font-size: .62em; }
.lede {
  max-width: 34rem; margin: 1.8rem auto 0;
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.45;
  text-wrap: pretty;
}

.label {
  font-family: var(--caps); font-size: .95rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--copper);
  display: flex; align-items: center; gap: 1rem;
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ----- Works ----- */
.works { padding-block: 2rem 4rem; }
.work {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center;
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
.work + .work { border-top: 1px solid var(--rule); }
.work > * { min-width: 0; }
.work:nth-of-type(even) .plate { order: 2; }
.work-text { display: grid; gap: .9rem; }
.kind { font-family: var(--caps); font-size: .85rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faded); }
.work h3 { font-family: var(--caps); font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem); line-height: 1.05; letter-spacing: .03em; }
.work h3 a { text-decoration: none; }
.go { font-family: var(--caps); font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--copper); }
.go:hover { text-decoration: underline; }

/* A plate: each work shown in its own colours, as a tipped-in print. */
.plate {
  position: relative; display: grid; justify-items: center; align-content: center; gap: .8rem;
  aspect-ratio: 4 / 3; padding: 2rem 1.5rem;
  text-decoration: none;
  box-shadow: 0 22px 40px -26px rgba(0,0,0,.55), 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.plate::after { content: ""; position: absolute; inset: 10px; border: 1px solid var(--plate-rule); pointer-events: none; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .plate:hover { transform: translateY(-3px) rotate(-.4deg); } }

.wendleaf .plate { background: #F1E7D3 url("/assets/paper-grain.png") 0 0 / 160px; color: #2C1A18; --plate-rule: rgba(110,31,36,.35); }
.wendleaf .plate img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 8px 18px -10px rgba(44,26,24,.6); margin-top: .6rem; }
.wl-band { position: absolute; left: 24px; right: 24px; top: 22px; height: 26px; display: flex; }
.wl-band i { display: block; background: #6E1F24; flex: none; -webkit-mask: var(--m) center / auto 100% no-repeat; mask: var(--m) center / auto 100% no-repeat; }
.wl-band .l { --m: url("/assets/marks/wendleaf-bandLeft1.png"); aspect-ratio: 164 / 72; }
.wl-band .r { --m: url("/assets/marks/wendleaf-bandRight1.png"); aspect-ratio: 164 / 72; }
.wl-band .m { --m: url("/assets/marks/wendleaf-bandMiddle.png"); aspect-ratio: 129 / 72; }
.wl-band .r0 { --m: url("/assets/marks/wendleaf-bandRun0.png"); flex: 1; -webkit-mask-position: right center; mask-position: right center; }
.wl-band .r1 { --m: url("/assets/marks/wendleaf-bandRun1.png"); flex: 1; -webkit-mask-position: left center; mask-position: left center; }
.wl-word { font-family: "Uncial Antiqua", var(--caps); font-size: 2rem; line-height: 1; letter-spacing: .02em; }
.wl-tag { font-style: italic; color: #6B5C54; font-size: 1.1rem; }

.hubworld .plate { background: #E4D9C1; color: #2A2420; --plate-rule: rgba(42,36,32,.3); }
.hw-word { font-family: var(--caps); font-weight: 700; font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); letter-spacing: .06em; line-height: 1; }
.hw-tag { font-family: var(--caps); font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; color: #6E6152; }
.hw-rule { width: 50%; height: 1px; background: rgba(42,36,32,.35); margin-block: .3rem; }
.hw-modes { display: grid; grid-template-columns: repeat(2, auto); gap: .35rem 1.6rem; font-size: 1.05rem; }
.hw-modes span::before { content: "›  "; color: #8A4B2A; }

/* ----- The name ----- */
.about { padding-block: 3rem 4.5rem; }
.about-grid { display: grid; gap: 2.2rem; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.pair > div { padding: .4rem clamp(1rem, .5rem + 3vw, 3rem) .4rem 0; display: grid; gap: .7rem; align-content: start; }
.pair > div + div { border-left: 1px solid var(--rule); padding-left: clamp(1rem, .5rem + 3vw, 3rem); }
.pair .word { font-family: var(--caps); font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem); line-height: 1; letter-spacing: .06em; }
.pair > div + div .word { color: var(--copper); }
.close { font-style: italic; font-size: 1.45rem; text-align: center; color: var(--faded); }

/* ----- Write ----- */
.write { padding-block: 1rem 4rem; }
.write .wrap { display: grid; gap: 1.2rem; }
.address-line { font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem); font-style: italic; overflow-wrap: anywhere; }
.address { user-select: all; }

.bottom { padding-block: 1rem 2.5rem; }
.bottom .wrap { display: grid; gap: 1rem; justify-items: center; color: var(--faded); font-size: 1rem; }
.wire.solo { width: min(100%, 18rem); flex: none; }

@media (max-width: 760px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .work:nth-of-type(even) .plate { order: 0; }
  .pair { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .pair > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.8rem; }
  .mark { width: 52px; height: 52px; }
}
@media (max-width: 420px) {
  .hw-modes { grid-template-columns: auto; }
  .plate { aspect-ratio: auto; min-height: 15rem; padding-top: 4rem; }
}
