/* viidad.ee: the wayfinding layer (AX-VIIDAD-00026), in zero2one's colours.
   Written by hand, served as is (AX-VIIDAD-00024). Every page is complete without it
   (AX-VIIDAD-00025): this file only styles the plain HTML the renderer writes.

   Layout: the breadcrumb <nav> is the "you are here" band and never leaves the screen;
   site.js adds the week ruler under it, the fingerpost on the home and market index, and the
   event panel. Borders, not shadows; one orange accent for where you are and what to do next. */

@font-face { font-family: "Overpass"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/overpass-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Overpass"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/overpass-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Overpass Mono"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("fonts/overpass-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Overpass Mono"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("fonts/overpass-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* zero2one tokens (kits/zero2one-design-system) */
  --ground: #000000;      /* color-background */
  --surface: #1a1a1a;     /* color-surface */
  --line: #2d2d2d;        /* color-surface-raised: every hairline */
  --ink: #ffffff;         /* color-text-primary */
  --muted: #a8a8a8;       /* color-text-secondary */
  --faint: #666666;       /* color-text-tertiary: small notes only */
  --accent: #e68a5c;      /* color-primary: where you are, what to do next */
  --accent-hover: #ff8c69;
  --accent-deep: #c15f3c; /* underlines, hover borders */
  --on-accent: #000000;
  --bad: #aa6666;         /* always beside the word */
  --nav: rgba(0, 0, 0, 0.9);
  --display: "Overpass", "Arial Narrow", Arial, sans-serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Overpass Mono", "JetBrains Mono", Consolas, ui-monospace, monospace;
  --wrap: 72rem;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(0, 0, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 8.5rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.6 var(--body); letter-spacing: .01em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: inherit; text-decoration-color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

main, footer, .band-inner, .ruler-wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
main { padding-block: 2rem 5rem; }

/* ---------- the band: the breadcrumb, always on screen ---------- */
body > nav, .band { position: sticky; top: 0; z-index: 50; background: var(--nav); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
body > nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .6rem var(--gutter-r) .6rem var(--gutter); font-size: 0; }
.band-inner > nav { display: flex; align-items: center; gap: .3rem; font-size: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.band-inner > nav::-webkit-scrollbar { display: none; }
nav > a, nav > span { flex: none; display: inline-flex; align-items: center; height: 1.9rem; padding: 0 1.1rem 0 .75rem; font: 700 .8rem/1 var(--display); letter-spacing: .03em; text-decoration: none; white-space: nowrap; max-width: 24rem; overflow: hidden; text-overflow: ellipsis;
  background: var(--surface); color: var(--ink); clip-path: polygon(0 0, calc(100% - .6rem) 0, 100% 50%, calc(100% - .6rem) 100%, 0 100%, .45rem 50%); transition: background .15s var(--ease); }
nav > a:hover { background: var(--line); color: var(--ink); }
nav > [aria-current] { background: var(--accent); color: var(--on-accent); }
nav > a:hover[aria-current] { background: var(--accent-hover); color: var(--on-accent); }
/* The first step is the wordmark: a fingerpost glyph and the name. */
nav > :first-child { clip-path: polygon(0 0, calc(100% - .6rem) 0, 100% 50%, calc(100% - .6rem) 100%, 0 100%); padding-left: .6rem; gap: .45rem; font-weight: 900; font-size: .95rem; letter-spacing: -.005em; }
nav > :first-child::before { content: ""; width: .85rem; height: 1.05rem; flex: none;
  background: linear-gradient(currentColor, currentColor) 45% 0 / 2px 100% no-repeat,
              linear-gradient(90deg, var(--accent) 0 70%, transparent 70%) 0 12% / 100% 28% no-repeat,
              linear-gradient(90deg, transparent 30%, currentColor 30%) 0 62% / 100% 28% no-repeat; }
nav > [aria-current]:first-child::before { background: linear-gradient(currentColor, currentColor) 45% 0 / 2px 100% no-repeat,
              linear-gradient(90deg, currentColor 0 70%, transparent 70%) 0 12% / 100% 28% no-repeat,
              linear-gradient(90deg, transparent 30%, currentColor 30%) 0 62% / 100% 28% no-repeat; }
.band { padding: 0; }
.band-inner { display: flex; align-items: center; gap: .9rem; padding-block: .55rem; min-width: 0; }
.here { flex: none; font: 600 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 640px) { .here { display: none; } }

/* The week ruler (site.js, from the market's JSON). */
.ruler-wrap { padding-block: 0 .5rem; }
.ruler { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(3.4rem, 1fr)); gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ruler::-webkit-scrollbar { display: none; }
.tick { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: end; column-gap: .4rem; padding: .3rem .55rem .4rem; text-decoration: none;
  background: var(--surface); color: var(--ink); border-top: 3px solid transparent; transition: background .15s var(--ease); }
.tick:hover { background: var(--line); color: var(--ink); }
.tick[aria-current] { border-top-color: var(--accent); background: var(--line); }
.tick-d { grid-column: 1 / 3; font: 700 .64rem/1 var(--display); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tick[aria-current] .tick-d { color: var(--accent); }
.tick-n { grid-column: 1; font: 900 1.3rem/1 var(--display); }
.tick-bar { grid-column: 2; height: 2px; background: var(--faint); align-self: end; margin-bottom: 3px; transform-origin: bottom; }
.tick[aria-current] .tick-bar { background: var(--accent); }
.tick-c { grid-column: 3; grid-row: 1 / 3; align-self: end; font: 500 .74rem/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- reading ---------- */
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
h1 { font-weight: 900; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.02; letter-spacing: -.025em; margin: .6rem 0 1rem; overflow-wrap: anywhere; }
h2 { font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.15; letter-spacing: -.01em; margin: 2.6rem 0 .8rem; padding-top: .9rem; border-top: 1px solid var(--line); }
h3 { font-weight: 700; font-size: 1.08rem; margin: 1.4rem 0 .3rem; }
p, li, dd, blockquote { max-width: 68ch; }
#capsule { font-size: 1.12rem; color: var(--muted); }
#format { font: 400 .8rem/1.5 var(--mono); color: var(--faint); }
:is(main, .panel-body) ul { padding-left: 0; list-style: none; display: grid; gap: .25rem; }
:is(main, .panel-body) ul > li { padding: .35rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
:is(main, .panel-body) ul > li:not(.event) > a:first-child { color: var(--ink); font: 700 1.02rem/1.3 var(--display); text-decoration: none; }
:is(main, .panel-body) ul > li:not(.event) > a:first-child:hover { color: var(--accent-hover); }
blockquote { margin: .6rem 0; padding: .6rem 1rem; border-left: 3px solid var(--line); color: var(--muted); background: var(--surface); }
time { font-variant-numeric: tabular-nums; }

/* The facts on an event page: a sign plate of label and value. */
dl { margin: .4rem 0 0; border-top: 3px solid var(--ink); max-width: 46rem; }
dl > dt { float: left; clear: left; width: 7.5rem; padding: .6rem 0; font: 600 .7rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
dl > dd { margin: 0; padding: .6rem 0 .6rem 8.5rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
@media (max-width: 480px) { dl > dt { float: none; width: auto; padding-bottom: 0; } dl > dd { padding-left: 0; } }

/* The way on: the one big orange signpost. */
#primary { display: inline-flex; align-items: center; gap: 1.1rem; margin: .4rem 0; padding: .95rem 2.2rem .95rem 1.2rem; background: var(--accent); color: var(--on-accent);
  font: 800 1.08rem/1.2 var(--display); text-decoration: none; clip-path: polygon(0 0, calc(100% - 1.1rem) 0, 100% 50%, calc(100% - 1.1rem) 100%, 0 100%); transition: background .15s var(--ease); }
#primary::after { content: "→"; font-weight: 900; }
#primary:hover { background: var(--accent-hover); color: var(--on-accent); }

/* Shortcut lists (Today, Tomorrow, This weekend …) are sign plates. */
main ul:has(a[href$="/today"]) > li, main ul:has(a[href$="/free/"]) > li { border: 0; padding: 0 0 .35rem; display: flex; flex-direction: column; gap: .3rem; font: 500 .74rem/1.3 var(--mono); color: var(--faint); }
main ul:has(a[href$="/today"]) > li > a:first-child, main ul:has(a[href$="/free/"]) > li > a:first-child {
  display: inline-flex; min-width: min(17rem, 100%); padding: .55rem 1.8rem .55rem .9rem; background: var(--surface); margin-right: .6rem;
  clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 50%, calc(100% - 1rem) 100%, 0 100%); transition: background .15s var(--ease), transform .15s var(--ease); }
main ul:has(a[href$="/today"]) > li > a:first-child:hover, main ul:has(a[href$="/free/"]) > li > a:first-child:hover { background: var(--line); color: var(--ink); transform: translateX(3px); }
main ul:has(a[href$="/today"]) > li > a[aria-current] { background: var(--accent); color: var(--on-accent); }

/* ---------- event lines (site.js turns each line into a row; without it, the line reads as text) ---------- */
li.event { font-size: .92rem; }
li.event.is-row { padding: 0; border-bottom: 1px solid var(--line); color: var(--ink); max-width: none; }
.ev-row { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding: .75rem .5rem; color: var(--ink); text-decoration: none; transition: background .12s var(--ease); }
.ev-row:hover, li.event.is-open .ev-row { background: var(--surface); color: var(--ink); }
li.event.is-open .ev-row { box-shadow: inset 3px 0 0 var(--accent); }
.ev-time { font: 600 .88rem/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.ev-title { display: block; font: 700 1.04rem/1.25 var(--display); overflow-wrap: anywhere; }
.ev-row:hover .ev-title { text-decoration: underline; text-decoration-color: var(--accent-deep); text-decoration-thickness: 2px; }
.ev-sub { display: block; margin-top: .15rem; font: 400 .86rem/1.4 var(--body); color: var(--muted); overflow-wrap: anywhere; }
.ev-tag { font: 500 .74rem/1 var(--mono); white-space: nowrap; padding: .3rem .45rem; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.ev-tag.is-past { color: var(--faint); }
.ev-tag.is-off { color: var(--bad); border-color: var(--bad); background: transparent; }
li.event.is-past .ev-title { color: var(--muted); }
li.ev-band { list-style: none; padding: 1.2rem .5rem .4rem; font: 600 .72rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 0; }
li.ev-now { list-style: none; display: flex; align-items: center; gap: .6rem; margin: .4rem 0; padding: 0 .5rem; border: 0; font: 600 .76rem/1 var(--mono); color: var(--accent); max-width: none; }
li.ev-now::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(230, 138, 92, .3); }
li.ev-now::after { content: ""; flex: 1; height: 2px; background: var(--accent); }
@media (max-width: 520px) { .ev-row { grid-template-columns: 3.8rem minmax(0, 1fr); } .ev-tag { grid-column: 2; justify-self: start; } }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 .5rem; }
.chip { display: inline-flex; gap: .45rem; align-items: center; padding: .38rem .8rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 .84rem/1 var(--display); border-radius: 999px; cursor: pointer; }
.chip span { font: 500 .72rem/1 var(--mono); color: var(--muted); }
.chip:hover { border-color: var(--accent-deep); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip[aria-pressed="true"] span { color: inherit; }

/* ---------- the fingerpost (site.js, three.js) ---------- */
.crossroads { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; margin: 1rem 0 0; }
.crossroads .post { position: relative; aspect-ratio: 1 / 1; max-width: 100%; }
.crossroads canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.post-hint { position: absolute; left: 50%; top: 0; transform: translateX(-50%); font: 600 .66rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
@media (max-width: 760px) { .crossroads { grid-template-columns: 1fr; } .crossroads .post { max-width: 26rem; margin-inline: auto; width: 100%; } }

/* ---------- the event panel (site.js, htmx) ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .7); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
.panel { position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(32rem, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line);
  transform: translateX(102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) 0; }
body.has-panel .panel { transform: none; }
body.has-panel .scrim { opacity: 1; pointer-events: auto; }
body.has-panel { overflow: hidden; }
.panel-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--ground); }
.panel-bar p { margin: 0; font: 600 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.panel-bar span { display: flex; gap: .5rem; }
.panel-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .7rem; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 700 .8rem/1 var(--display); text-decoration: none; cursor: pointer; }
.panel-btn:hover { border-color: var(--accent-deep); color: var(--ink); }
.panel-body { overflow-y: auto; padding: .5rem 1.2rem 3rem; }
.panel-body.htmx-request { opacity: .45; }
.panel-body h1 { font-size: 1.9rem; }
.panel-body h2 { font-size: 1.15rem; margin-top: 1.8rem; }
.panel-body dl > dt { width: 6rem; }
.panel-body dl > dd { padding-left: 7rem; }

footer { padding-block: 2.5rem 3rem; border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; }
footer p { margin: .25rem 0; }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
