/* Hexlace: ported from brand/Hexlace Site.dc.html. Colours are the brand's tokens. */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/CormorantGaramond.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap; src: url("/fonts/CormorantGaramond-italic.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url("/fonts/DMSans.woff2") format("woff2"); }
@font-face { font-family: "Maple Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/MapleMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "Maple Mono"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/MapleMono-Italic.woff2") format("woff2"); }

:root {
  --night: #0a081f;
  --void: #07040d;
  --mist: #2a1840;
  --bone: #f0e6f5;
  --ash: #c2b3cf;
  --fog: #8a7a9c;
  --cinder: #4a3f5c;
  --gold: #d4af37;
  --hex: #ff3ec9;
  --wyrd: #9d5cff;
  --wyrd-soft: #b78aff;
  --aether: #c9a8ff;
  --charm: #7affb0;
  --mono: "Maple Mono", ui-monospace, monospace;
  --serif: "Cormorant Garamond", Georgia, serif;
}

@keyframes hx-breathe { 0%, 100% { opacity: .72; transform: translate(-50%, -50%) scale(.96); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } }
@keyframes hx-twinkle { 0%, 100% { opacity: .12; } 50% { opacity: .85; } }
@keyframes hx-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--night); color: var(--bone); font-family: "DM Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--aether); text-decoration: none; }
a:hover, a:focus-visible { color: var(--hex); }
::selection { background: var(--wyrd); color: var(--bone); }
.mono { font-family: var(--mono); }
.gold { color: var(--gold); }

main { position: relative; min-height: 100vh; overflow: hidden; }

/* Hero */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden;
  background:
    linear-gradient(180deg, transparent 65%, var(--night) 100%),
    radial-gradient(ellipse at 30% 25%, #3a1a5e 0%, #1a1240 35%, #0d0a26 75%, var(--night) 100%);
}
.lattice {
  position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image:
    repeating-linear-gradient(60deg, rgba(212,175,55,.07) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-60deg, rgba(212,175,55,.07) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(212,175,55,.05) 0 1px, transparent 1px 28px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.orb {
  position: absolute; left: 58%; top: 52%; width: 760px; height: 760px; max-width: 160vw; max-height: 160vw;
  transform: translate(-50%, -50%); pointer-events: none; filter: blur(24px);
  background: radial-gradient(circle, rgba(212,175,55,.12) 0%, rgba(255,62,201,.2) 18%, rgba(157,92,255,.12) 38%, transparent 65%);
  animation: hx-breathe 9s ease-in-out infinite;
}
.spark {
  position: absolute; left: var(--l); top: var(--t); font-size: var(--s); line-height: 1;
  color: var(--c); text-shadow: 0 0 8px var(--c); pointer-events: none;
  animation: hx-twinkle var(--p) ease-in-out var(--d) infinite;
}

.masthead {
  position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px 24px; padding: 28px clamp(20px, 4vw, 40px);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--fog);
}
.masthead > span { white-space: nowrap; }
.lights { display: flex; align-items: center; gap: 10px; }
.lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--charm); box-shadow: 0 0 8px var(--charm); }

.name {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 32px; padding: 40px 24px 120px;
}
.seal { display: block; width: 230px; height: 230px; max-width: 60vw; height: auto; filter: drop-shadow(0 0 10px rgba(212,175,55,.35)) drop-shadow(0 0 4px rgba(255,62,201,.45)); }
h1 {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(64px, 13vw, 120px); line-height: 1; letter-spacing: -.01em;
  filter: drop-shadow(0 0 12px rgba(255,62,201,.45));
}
.dot { color: var(--hex); }
.rule { display: flex; align-items: center; gap: 10px; width: 280px; max-width: 80vw; }
.rule i { width: 1px; height: 8px; background: rgba(212,175,55,.5); }
.rule b { flex: 1; height: 1px; background: rgba(212,175,55,.5); }
.gem { width: 9px; height: 9px; border: 1px solid var(--gold); transform: rotate(45deg); display: flex; align-items: center; justify-content: center; }
.gem span { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.tagline { margin: 0; font-size: 13px; letter-spacing: .4em; text-transform: uppercase; color: var(--aether); }

.down {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--gold); font-size: 11px;
}
.down div { width: 1px; height: 36px; background: linear-gradient(180deg, transparent, var(--gold)); }

/* Body */
.body { position: relative; max-width: 880px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; }
.label { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }

.premise { display: flex; flex-direction: column; gap: 32px; padding: clamp(96px, 14vw, 160px) 0 clamp(80px, 12vw, 140px); }
.premise h2 {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(64px, 12vw, 136px); line-height: .92; letter-spacing: -.02em;
  text-shadow: 0 0 48px rgba(157,92,255,.45);
}
.premise h2 .dot { text-shadow: 0 0 18px rgba(255,62,201,.8); }
.premise p { margin: 0; max-width: 540px; font-size: 18px; line-height: 1.65; color: var(--ash); text-wrap: pretty; }

.work {
  position: relative; display: flex; flex-direction: column; gap: 28px; margin-bottom: 120px;
  padding: clamp(28px, 5vw, 56px); border: 1px solid rgba(212,175,55,.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(157,92,255,.22) 0%, transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(255,62,201,.08) 0%, transparent 45%),
    rgba(20,9,31,.85);
  box-shadow: 0 40px 100px -30px rgba(157,92,255,.35);
}
.corner { position: absolute; width: 14px; height: 14px; filter: drop-shadow(0 0 4px rgba(212,175,55,.6)); }
.corner.tl { top: -1px; left: -1px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.corner.tr { top: -1px; right: -1px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.corner.bl { bottom: -1px; left: -1px; border-bottom: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.corner.br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }

.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.meta { display: flex; align-items: center; gap: 14px; color: var(--fog); }
.sep { color: var(--cinder); }
.work-title { display: flex; flex-direction: column; gap: 14px; }
.work-title h2 {
  margin: 0; font-style: italic; font-weight: 400; font-size: clamp(44px, 8vw, 64px); line-height: 1;
  text-shadow: 0 0 24px rgba(157,92,255,.6), 0 0 4px rgba(157,92,255,.8);
}
.lede { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; color: var(--aether); text-wrap: pretty; }
.work-text { display: flex; flex-direction: column; gap: 14px; max-width: 600px; }
.work-text p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ash); text-wrap: pretty; }

.term {
  background: var(--void); border: 1px solid var(--mist); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(157,92,255,.08), 0 0 40px rgba(157,92,255,.18); font-size: 14px; line-height: 1.8;
}
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--mist); font-size: 12px; color: var(--fog); }
.term-bar > span:first-child { display: flex; align-items: center; gap: 10px; }
.lamps { display: flex; gap: 6px; }
.lamps i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--cinder); }
.lamps i.on { background: var(--wyrd); border-color: var(--wyrd); box-shadow: 0 0 6px var(--wyrd); }
.term-body { padding: 18px; display: flex; flex-direction: column; overflow-x: auto; }
.term-body > div { display: flex; align-items: center; gap: 12px; white-space: pre; }
.prompt { color: var(--wyrd); }
.out { padding-left: 26px; font-style: italic; color: var(--fog); }
.cursor { display: inline-block; width: 9px; height: 18px; background: var(--hex); box-shadow: 0 0 8px rgba(255,62,201,.8); animation: hx-blink 1.1s step-end infinite; }

.links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--wyrd); color: var(--bone);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 0 18px rgba(157,92,255,.4); transition: all .18s;
}
.button:hover, .button:focus-visible { background: var(--wyrd-soft); color: #0d0818; box-shadow: 0 0 28px rgba(157,92,255,.7); }
.button.ghost { background: none; border: 1px solid var(--mist); box-shadow: none; }
.button.ghost:hover, .button.ghost:focus-visible { border-color: var(--wyrd); color: var(--aether); background: none; }

footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding: 28px 0 40px; border-top: 1px solid var(--mist); font-size: 12px; letter-spacing: .12em; color: var(--fog);
}
.footer-mark { display: flex; align-items: center; gap: 10px; }
.footer-mark img { display: block; width: 20px; height: 20px; filter: drop-shadow(0 0 4px rgba(212,175,55,.4)); }
.more { font-style: italic; letter-spacing: .04em; color: var(--ash); }

@media (prefers-reduced-motion: reduce) {
  .orb, .spark, .cursor { animation: none; }
  .spark { opacity: .5; }
}
