/* EXODUS public website. Artwork is decoration only (border-image / backgrounds); all text and controls are live HTML. */
:root {
  --bronze: #c6a16c; --bronze-dim: #57452f; --ivory: #f3e4c9; --muted: #b9a88a; --red: #a71418; --red-hi: #e83236; --dark: #071019; --ink: #0b1624;
  --err: #ff7b7b; --ok: #7fd49a;
  --serif: Georgia, 'Palatino Linotype', 'Book Antiqua', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ivory); font: 16px/1.6 var(--sans); background: #050b12;
  display: flex; flex-direction: column;
}
body::before { /* page scenery, darkened so text stays readable */
  content: ''; position: fixed; inset: 0; z-index: -1; background: #050b12 center / cover no-repeat;
}
body[data-bg='home']::before { background-image: linear-gradient(rgba(5,11,18,.15), rgba(5,11,18,.55)), url(/img/bg-home.webp); background-position: 70% center; }
body[data-bg='store']::before { background-image: linear-gradient(rgba(5,11,18,.45), rgba(5,11,18,.8)), url(/img/bg-store.webp); }
body[data-bg='account']::before { background-image: linear-gradient(rgba(5,11,18,.3), rgba(5,11,18,.65)), url(/img/bg-account.webp); }
body[data-bg='plain']::before { background-image: linear-gradient(rgba(5,11,18,.6), rgba(5,11,18,.88)), url(/img/bg-store.webp); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .02em; text-shadow: 0 2px 8px #000; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); } h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: #f0c98a; } a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--dark); padding: 8px 14px; border: 1px solid var(--bronze); }
.skip:focus { left: 8px; }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
main { flex: 1; }
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; vertical-align: -4px; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 20; padding: 8px 0 0; }
.header-bar {
  display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 0 10px; margin-inline: auto; width: min(1240px, 100% - 16px);
  border: solid transparent; border-width: 0 70px; border-image: url(/img/header.webp) 0 140 0 140 fill / 0 70px 0 70px stretch;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.6));
}
.brand img { height: 48px; width: auto; display: block; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a, .nav button.linklike { color: var(--ivory); text-decoration: none; padding: 8px 16px; border-radius: 4px; font-family: var(--serif); letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button.linklike:hover { color: #fff; background: rgba(198,161,108,.14); }
.nav a[aria-current='page'] { color: var(--bronze); border-bottom: 2px solid var(--red-hi); border-radius: 4px 4px 0 0; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; font-size: .75rem; line-height: 20px; text-align: center; background: var(--red); border: 1px solid var(--bronze); border-radius: 10px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--bronze); color: var(--ivory); padding: 8px 12px; border-radius: 4px; cursor: pointer; }

/* ---- buttons / inputs (art as 9-slice, text stays live) ---- */
.btn, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 12px; margin: 0;
  color: var(--ivory); font: 700 1rem var(--serif); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; text-shadow: 0 2px 4px #000;
  background: transparent; border: solid transparent; border-width: 0 24px; cursor: pointer; transition: filter .15s, transform .1s;
}
.btn { border-image: url(/img/button-primary.webp) 0 50 0 50 fill / 0 24px 0 24px stretch; }
.btn-secondary { border-image: url(/img/button-secondary.webp) 0 50 0 50 fill / 0 24px 0 24px stretch; }
.btn:hover, .btn-secondary:hover { filter: brightness(1.16); color: #fff; }
.btn:active, .btn-secondary:active { filter: brightness(.85); transform: translateY(1px); }
.btn:disabled, .btn-secondary:disabled, [aria-disabled='true'].btn, [aria-disabled='true'].btn-secondary { opacity: .5; cursor: not-allowed; filter: grayscale(.6); transform: none; }
.btn-sm { min-height: 42px; font-size: .85rem; border-width: 0 18px; border-image-width: 0 18px; }
.btn img { width: 20px; height: 20px; }
.btn-link { background: none; border: 0; color: #f0c98a; text-decoration: underline; cursor: pointer; font: inherit; padding: 4px 0; }
.btn-link[disabled] { color: var(--muted); text-decoration: none; cursor: not-allowed; }

.field { margin-bottom: 16px; }
.field label, .field .lbl { display: block; margin-bottom: 6px; font-size: .9rem; color: var(--ivory); letter-spacing: .04em; }
.input {
  width: 100%; min-height: 50px; padding: 0 4px; color: var(--ivory); font: 1rem var(--sans); background: transparent;
  border: solid transparent; border-width: 0 22px; border-image: url(/img/input.webp) 0 55 0 55 fill / 0 22px 0 22px stretch;
}
.input::placeholder { color: #8d7e66; }
.input[aria-invalid='true'] { filter: drop-shadow(0 0 0 var(--err)) hue-rotate(-20deg) saturate(1.6); outline: 1px solid var(--err); outline-offset: -2px; }
.pw { position: relative; }
.pw .input { padding-right: 36px; }
.pw .toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; background: none; border: 0; cursor: pointer; border-radius: 4px; }
.pw .toggle img { width: 22px; height: 22px; }
.err { color: var(--err); font-size: .85rem; margin: 4px 0 0; min-height: 0; }
.hint { color: var(--muted); font-size: .82rem; margin: 4px 0 0; }
.alert { padding: 12px 14px; border: 1px solid var(--bronze-dim); background: rgba(7,16,25,.85); border-radius: 4px; margin-bottom: 16px; }
.alert.error { border-color: var(--err); color: #ffd0d0; } .alert.ok { border-color: var(--ok); color: #d4f5df; } .alert.warn { border-color: #d6a23a; color: #f6e2b0; }

/* custom checkbox (native input remains for keyboard + screen readers) */
.check { position: relative; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.check input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; cursor: pointer; }
.check label { cursor: pointer; padding-left: 40px; position: relative; min-height: 30px; }
.check label::before { content: ''; position: absolute; left: 0; top: -1px; width: 30px; height: 30px; background: url(/img/checkbox-off.webp) center / contain no-repeat; }
.check input:checked + label::before { background-image: url(/img/checkbox-on.webp); }
.check input:focus-visible + label::before { outline: 2px solid var(--bronze); outline-offset: 3px; }

/* ---- panels (9-slice frames) ---- */
.panel-login, .panel-register, .box-gallery { color: var(--ivory); border-style: solid; border-color: transparent; }
.panel-login { border-width: 56px; border-image: url(/img/panel-login.webp) 135 fill / 56px stretch; }
.panel-register { border-width: 56px; border-image: url(/img/panel-register.webp) 145 fill / 56px stretch; }
.box-gallery { border-width: 44px 52px; border-image: url(/img/box-gallery.webp) 70 fill / 44px 52px stretch; padding: 4px 6px; }

/* ---- hero ---- */
.hero { min-height: min(78vh, 760px); display: grid; align-items: center; padding: 32px 0 56px; }
.hero-inner { max-width: 640px; }
.hero-logo { width: min(560px, 90%); height: auto; display: block; filter: drop-shadow(0 8px 18px rgba(0,0,0,.7)); margin-bottom: 18px; }
.hero p.lead { font-size: 1.15rem; max-width: 34em; text-shadow: 0 2px 8px #000; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 10px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; padding: 10px 16px; max-width: max-content; background: rgba(7,16,25,.78); border: 1px solid var(--bronze-dim); border-radius: 4px; font-size: .92rem; }
.status-strip b { color: var(--bronze); font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #8a8a8a; margin-right: 6px; }
.dot.on { background: #3ddc84; box-shadow: 0 0 6px #3ddc84; }

/* ---- sections ---- */
section.block { padding: 40px 0; }
.section-title { text-align: center; margin-bottom: 24px; }
.shots { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.shot { margin: 0; border: 1px solid var(--bronze); background: rgba(5,11,18,.8); box-shadow: 0 8px 24px rgba(0,0,0,.6); }
.shot .frame { aspect-ratio: 16 / 9; display: grid; place-items: center; background: linear-gradient(135deg, #0b1624, #111c2b); overflow: hidden; }
.shot .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .frame span { color: var(--muted); font-size: .9rem; padding: 12px; text-align: center; }
.shot figcaption { padding: 10px 14px; font-family: var(--serif); letter-spacing: .05em; }
.insights { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); padding: 8px 20px 20px; }
.post { padding: 12px 0; border-bottom: 1px solid var(--bronze-dim); }
.post img { width: 100%; max-height: 220px; object-fit: cover; border: 1px solid var(--bronze-dim); margin-bottom: 8px; }
.post h4 { margin: 0 0 4px; font-family: var(--serif); }
.empty { color: var(--muted); font-style: italic; padding: 14px 0; }

/* ---- gallery ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.exodus-tab { padding: 12px 18px; color: var(--ivory); background: transparent; border: 0; border-bottom: 2px solid var(--bronze-dim); cursor: pointer; font: 1rem var(--serif); letter-spacing: .05em; }
.exodus-tab:hover { background: rgba(198,161,108,.1); }
.exodus-tab[aria-selected='true'] { border-bottom-color: var(--red-hi); color: #fff; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile { padding: 0; border: 1px solid var(--bronze-dim); background: #0b1624; cursor: zoom-in; color: inherit; text-align: left; font: inherit; }
.tile:hover { border-color: var(--bronze); }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.tile span { display: block; padding: 8px 12px; font-size: .9rem; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(2,6,10,.94); display: none; align-items: center; justify-content: center; flex-direction: column; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1200px, 96vw); max-height: 76vh; border: 1px solid var(--bronze); }
.lightbox .cap { margin-top: 12px; text-align: center; max-width: 800px; }
.lightbox .ctl { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(7,16,25,.8); border: 1px solid var(--bronze); color: var(--ivory); width: 48px; height: 64px; font-size: 1.6rem; cursor: pointer; }
.lightbox .prev { left: 12px; } .lightbox .next { right: 12px; }
.lightbox .close { position: absolute; top: 14px; right: 14px; background: rgba(7,16,25,.8); border: 1px solid var(--bronze); color: var(--ivory); width: 44px; height: 44px; cursor: pointer; }

/* ---- store ---- */
.page-head { padding: 36px 0 12px; text-align: center; }
.products { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(270px, 340px)); justify-content: center; padding-bottom: 40px; }
.product-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 11% 11% 12%; aspect-ratio: 993 / 1372; min-height: 420px;
  background: url(/img/box-product.webp) center / 100% 100% no-repeat; filter: drop-shadow(0 10px 18px rgba(0,0,0,.65));
}
.product-card .art { height: 150px; width: auto; max-width: 70%; object-fit: contain; margin: 4px 0 10px; }
.product-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.product-card dl { margin: 0 0 10px; font-size: .88rem; color: var(--muted); }
.product-card dt { display: inline; color: var(--bronze); } .product-card dd { display: inline; margin: 0 0 0 4px; }
.product-card .price { font: 700 1.4rem var(--serif); color: #fff; margin: auto 0 10px; }
.product-card .price.none { font-size: 1rem; color: var(--muted); font-weight: 400; }
.product-card .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.detail { display: grid; gap: 32px; grid-template-columns: minmax(220px, 360px) 1fr; align-items: start; padding: 20px 0 48px; }
.detail .art { width: 100%; max-width: 340px; margin-inline: auto; display: block; }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.detail dt { color: var(--bronze); }
.detail dd { margin: 0; }
.bar { background: rgba(7,16,25,.85); border: 1px solid var(--bronze-dim); padding: 18px 20px; }
table.simple { width: 100%; border-collapse: collapse; }
.simple th, .simple td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bronze-dim); vertical-align: top; }
.simple th { color: var(--bronze); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 34px; height: 34px; background: var(--dark); color: var(--ivory); border: 1px solid var(--bronze); cursor: pointer; font-size: 1.1rem; }
.pill { display: inline-block; padding: 1px 10px; border: 1px solid var(--bronze-dim); border-radius: 99px; font-size: .8rem; }
.pill.ok { border-color: var(--ok); color: var(--ok); } .pill.warn { border-color: #d6a23a; color: #f1cf86; } .pill.bad { border-color: var(--err); color: var(--err); }
.scroll-x { overflow-x: auto; }
.bar + .bar { margin-top: 20px; }

/* ---- account page ---- */
.account-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 18px var(--gutter) 40px; }
.account-top { width: min(1100px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.account-top .brand img { height: 60px; }
.account-top .back { display: inline-flex; align-items: center; gap: 8px; color: var(--ivory); text-decoration: none; padding: 10px 14px; border: 1px solid var(--bronze-dim); background: rgba(7,16,25,.7); border-radius: 4px; }
.account-top .back img { width: 20px; height: 20px; transform: scaleX(-1); }
.account-top .back:hover { border-color: var(--bronze); }
.account-main { width: min(560px, 100%); margin: 28px auto 0; }
.account-main .card { padding: 4px 8px 8px; }
.account-main .tabs { margin: 0 0 18px; }
.account-main .tabs .exodus-tab { flex: 1; text-align: center; padding: 14px 6px; }
.form-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.account-main .btn { width: 100%; }
.code-box { font: 700 1.8rem var(--serif); letter-spacing: .3em; text-align: center; padding: 14px; border: 1px dashed var(--bronze); background: rgba(0,0,0,.4); margin: 12px 0; }
[hidden] { display: none !important; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(243,228,201,.35); border-top-color: var(--ivory); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } html { scroll-behavior: auto; } .btn, .btn-secondary { transition: none; } }

/* ---- footer ---- */
.site-footer { margin-top: 40px; padding: 28px 0 36px; background: linear-gradient(transparent, rgba(3,7,12,.92) 40%); border-top: 1px solid var(--bronze-dim); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.footer-links .off { color: var(--muted); cursor: help; text-decoration: line-through; text-decoration-color: var(--bronze-dim); }
.small { font-size: .85rem; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .header-bar { min-height: 64px; border-width: 0 40px; border-image-width: 0 40px; flex-wrap: wrap; padding: 6px 4px; }
  .brand img { height: 40px; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; flex-direction: column; align-items: stretch; width: 100%; margin: 0; padding: 4px 0 8px; }
  .nav.open { display: flex; }
  .nav a, .nav button.linklike { padding: 12px 14px; text-align: left; }
  .detail { grid-template-columns: 1fr; }
  .panel-login, .panel-register { border-width: 40px; border-image-width: 40px; }
  .box-gallery { border-width: 30px 32px; border-image-width: 30px 32px; }
}
@media (max-width: 520px) {
  .hero-actions .btn, .hero-actions .btn-secondary { width: 100%; }
  .account-top .brand img { height: 44px; }
  .panel-login, .panel-register { border-width: 30px; border-image-width: 30px; }
  .product-card { min-height: 0; aspect-ratio: auto; padding: 56px 38px 60px; }
}
