/* Istoik Studios: neutral black and gold until the Emergent look arrives. Phone and iPad first. */
@font-face { font-family: "Cinzel"; font-weight: 500; font-display: swap; src: url(/fonts/cinzel-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 600; font-display: swap; src: url(/fonts/cinzel-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url(/fonts/public-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-display: swap; src: url(/fonts/public-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url(/fonts/public-sans-latin-600-normal.woff2) format("woff2"); }

:root {
  --void: #050405; --ink: #1c1a17; --rule: #2a2116; --gold: #d69d2d; --gold-hi: #e2b14a;
  --cream: #ede7da; --muted: #a39a87; /* muted lifted from #8a7a52 so small text passes contrast on black */
  --f-display: "Cinzel", Georgia, serif; --f-body: "Public Sans", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; background: var(--void); color: var(--cream); font: 400 1rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--gold-hi); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* entrance */
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; transform-origin: 50% 50%; will-change: transform, opacity;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 60%, transparent 100%); }
.still { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 98vh * 1320 / 1084); height: auto; z-index: 0; transform-origin: 50% 50%; pointer-events: none; }
body.live .still { display: none; }

/* top bar */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 12px max(18px, env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, rgba(5,4,5,.9), rgba(5,4,5,0)); }
body.scrolled .bar { background: rgba(5,4,5,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.bar { transition: background .25s linear; }
.mark { display: flex; align-items: center; gap: 10px; opacity: 0; text-decoration: none; min-height: 44px; }
.mark canvas { display: block; }
body:not(.scrolled) .mark { pointer-events: none; }
.nav { margin-left: auto; display: flex; gap: 22px; }
.nav a { color: var(--cream); text-decoration: none; font: 500 .74rem/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; padding: 14px 0; opacity: .85; }
.nav a:hover { color: var(--gold-hi); opacity: 1; }
.menu-btn { display: none; margin-left: auto; background: rgba(5,4,5,.6); color: var(--cream); border: 1px solid var(--rule); min-height: 44px; padding: 0 16px;
  font: 500 .72rem/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 100%; right: max(18px, env(safe-area-inset-right, 0px)); flex-direction: column; gap: 0;
    background: #0c0a08; border: 1px solid var(--rule); padding: 6px 20px; box-shadow: 0 18px 40px rgba(0,0,0,.6); min-width: 220px; }
  .nav.open { display: flex; }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--rule); }
  .nav a:last-child { border-bottom: 0; }
}

/* content */
main { position: relative; z-index: 5; }
.intro { height: 100vh; height: 100lvh; position: relative; transition: height 1.2s cubic-bezier(.65,0,.35,1); overflow: hidden; }
body.gliding .intro { height: 0; }
@media (prefers-reduced-motion: reduce) { .intro { transition: none; } }
.cue { all: unset; cursor: pointer; padding: 12px 18px; position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(40px + env(safe-area-inset-bottom, 0px)); display: grid; justify-items: center; gap: 10px;
  font: 500 .68rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.cue i { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: scaleY(.4); transform-origin: top; opacity: .4 } 50% { transform: scaleY(1); opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .cue i { animation: none; } }

.content { max-width: 1100px; margin: 0 auto; padding: 110px max(18px, env(safe-area-inset-right, 0px)) 96px max(18px, env(safe-area-inset-left, 0px)); display: grid; gap: 96px; }
section[id] { scroll-margin-top: 84px; }
h2 { margin: 0 0 8px; font: 600 clamp(1.6rem, 1.2rem + 2vw, 2.6rem)/1.15 var(--f-display); letter-spacing: .04em; }
.lead { margin: 0 0 28px; color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 820px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--void); padding: 28px 24px 32px; display: grid; gap: 10px; align-content: start; min-height: 200px; scroll-margin-top: 84px; }
.tile small { font: 600 .68rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.tile h3 { margin: 0; font: 600 1.3rem/1.2 var(--f-display); letter-spacing: .04em; }
.tile p { margin: 0; color: var(--muted); }

.contacts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.contacts li { background: var(--void); padding: 20px 22px; display: grid; gap: 6px; }
.contacts small { font: 600 .66rem/1 var(--f-body); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.contacts a, .contacts span { color: var(--cream); font-size: 1.05rem; overflow-wrap: anywhere; text-decoration: none; min-height: 28px; }
.contacts a:hover { color: var(--gold-hi); }

.foot { position: relative; z-index: 5; border-top: 1px solid var(--rule); padding: 28px max(18px, env(safe-area-inset-left, 0px)) calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; color: var(--muted); font-size: .88rem; }
.foot b { font: 600 .9rem/1.6 var(--f-display); letter-spacing: .08em; color: var(--cream); }

.mgr-link { color: var(--muted); text-decoration: none; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; padding: 10px 6px; }
.mgr-link:hover { color: var(--gold-hi); }
.edit-fab { position: fixed; z-index: 30; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--gold); color: #0b0b0c; font: 600 .9rem/1 var(--f-body); padding: 15px 20px; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* ---- offer tiles as links */
a.tile { color: inherit; text-decoration: none; transition: background .25s ease; }
a.tile:hover { background: #0d0b08; }
a.tile:hover h3, a.tile:focus-visible h3 { color: var(--gold-hi); }
.more { margin-top: 6px; color: var(--gold-hi); font: 600 .78rem/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; }
.more i { font-style: normal; transition: transform .25s ease; }
a.tile:hover .more i { transform: translateX(4px); }
.tile.wide { border: 1px solid var(--rule); min-height: 0; }

/* ---- inner pages */
body:not([data-page="home"]) .mark { opacity: 1; }
.page { gap: 56px; }
.page-head { display: grid; gap: 10px; }
.page-head small, .badges small { font: 600 .68rem/1 var(--f-body); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
h1 { margin: 0; font: 600 clamp(2rem, 1.4rem + 3vw, 3.4rem)/1.1 var(--f-display); letter-spacing: .04em; }
.page-head .lead { margin: 0; }
.h3 { font: 600 .8rem/1.2 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 22px 0 10px; }
.nav a[aria-current="page"] { color: var(--gold-hi); }
.note { color: var(--muted); border-left: 2px solid var(--gold); padding-left: 12px; margin: 0; font-size: .92rem; }
.small-print { color: var(--muted); font-size: .85rem; margin: 0; max-width: 70ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; background: var(--gold); color: #0b0b0c; text-decoration: none; font: 600 .85rem/1 var(--f-body); letter-spacing: .06em; }
.btn:hover { background: var(--gold-hi); }
.btn.off { background: transparent; color: var(--muted); border: 1px solid var(--rule); cursor: default; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge { font: 600 .64rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; padding: 5px 7px; border: 1px solid var(--gold); color: var(--gold-hi); }
.badge.soft { border-color: var(--rule); color: var(--muted); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: .74rem; color: var(--cream); border: 1px solid var(--rule); padding: 3px 8px; }
.price { font: 600 1rem/1.3 var(--f-body); color: var(--cream); }

/* ---- catalog */
.filters { display: grid; gap: 8px; }
.filter-label { margin: 6px 0 0; color: var(--muted); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.filter button { all: unset; cursor: pointer; min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--rule); color: var(--cream); font-size: .88rem; }
.filter button[aria-pressed="true"] { border-color: var(--gold); color: #0b0b0c; background: var(--gold); }
.filter button:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.catalog { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .catalog { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .catalog { grid-template-columns: repeat(3, 1fr); } }
.pcard { display: grid; align-content: start; border: 1px solid var(--rule); color: inherit; text-decoration: none; background: #070605; transition: border-color .25s ease, transform .25s ease; }
.pcard[hidden] { display: none; }
.pcard:hover { border-color: var(--gold); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .pcard, .pcard:hover { transition: none; transform: none; } }
.preview { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--rule); }
.pcard-body { padding: 18px 18px 20px; display: grid; gap: 10px; }
.pcard h3 { margin: 0; font: 600 1.15rem/1.25 var(--f-display); letter-spacing: .03em; }
.pcard p { margin: 0; color: var(--muted); font-size: .95rem; }
.empty { margin: 0; }

/* ---- product page */
.crumbs { font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.product { display: grid; gap: 32px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.product-visual .preview { border: 1px solid var(--rule); }
.product-info { display: grid; gap: 4px; }
.product-info h1 { margin: 10px 0 6px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 1px; background: var(--gold); }
.editions { width: 100%; border-collapse: collapse; margin-top: 14px; }
.editions th, .editions td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
.editions thead th { font: 600 .7rem/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.editions tbody th { font-weight: 500; }
.editions td:last-child { text-align: right; }

/* ---- Capital Vault page */
.vault-demo { margin: 0; border: 1px solid var(--rule); background: #0b0a08; padding: 18px; display: grid; gap: 14px; box-shadow: 0 30px 80px rgba(214,157,45,.08); }
.vd-head { display: flex; justify-content: space-between; align-items: baseline; }
.vd-head b { font: 600 1.1rem/1 var(--f-display); letter-spacing: .05em; }
.vd-head span { color: var(--muted); font-size: .9rem; }
.vd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.vd-stats div { background: #12100c; padding: 12px 14px; display: grid; gap: 4px; }
.vd-stats small, .vd-card small { color: var(--muted); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.vd-stats b { font-size: clamp(1rem, .8rem + 1vw, 1.4rem); font-variant-numeric: tabular-nums; }
.pos { color: #8fd18f; } .neg { color: #f0a58f; }
.vd-cols { display: grid; gap: 14px; }
@media (min-width: 760px) { .vd-cols { grid-template-columns: 1.2fr 1fr; } }
.vd-card { border: 1px solid var(--rule); background: #12100c; padding: 14px; display: grid; gap: 10px; align-content: start; }
.vd-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .92rem; }
.vd-row b { font-variant-numeric: tabular-nums; }
.vd-row i, .vd-meter i { grid-column: 1 / -1; height: 6px; background: var(--gold); display: block; }
.vd-meter { height: 10px; border: 1px solid var(--rule); }
.vd-meter i { height: 100%; }
.w100 { width: 100%; } .w38 { width: 38%; } .w24 { width: 24%; } .w12 { width: 12%; } .w5 { width: 5%; } .w31 { width: 31%; }
.vd-big { margin: 0; font-size: 1.4rem; font-variant-numeric: tabular-nums; } .vd-big span { color: var(--muted); font-size: .95rem; }
.vd-tip { margin: 0; color: var(--cream); font-size: .92rem; border-left: 2px solid var(--gold); padding-left: 10px; }
.vault-demo figcaption { color: var(--muted); font-size: .8rem; text-align: right; }
.feature-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-grid li { background: var(--void); padding: 20px; display: grid; gap: 8px; }
.num { font: 600 .9rem/1 var(--f-display); color: var(--gold); }

/* ---- Design page */
.services { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: 1fr; }
@media (min-width: 700px) { .services { grid-template-columns: repeat(2, 1fr); } }
.service { background: var(--void); padding: 24px; display: grid; gap: 8px; align-content: start; }
.service .h3 { margin: 0; }
.service p { margin: 0; color: var(--muted); }
.service .price { font-size: 1.15rem; color: var(--gold-hi); }
.cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; border: 1px solid var(--rule); padding: 22px; }
.cta p { margin: 0; max-width: 50ch; }
@media (max-width: 640px) { .filter { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; } .filter button { flex: none; } }
