/* Orion — public site styles */

:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #f1ece2;
  --ink: #1d232b;
  --ink-2: #4a525c;
  --ink-3: #7a828c;
  --line: #e2dccf;
  --accent: #8a6a2f;        /* old gold */
  --accent-ink: #ffffff;
  --accent-soft: #f3ead7;
  --good: #1f7a4d;
  --good-soft: #e3f3ea;
  --warn: #a35a00;
  --warn-soft: #fbefdc;
  --bad: #b3261e;
  --bad-soft: #fbe7e5;
  --focus: #2f6fdb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(29, 35, 43, .06), 0 4px 16px rgba(29, 35, 43, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --surface: #1c2026;
    --surface-2: #232830;
    --ink: #eceae6;
    --ink-2: #b9bcc1;
    --ink-3: #8b9097;
    --line: #2f353e;
    --accent: #d2ad6a;
    --accent-ink: #1a1408;
    --accent-soft: #2e2716;
    --good: #5fcf96;
    --good-soft: #15291f;
    --warn: #f0a94b;
    --warn-soft: #2e2213;
    --bad: #ff8a80;
    --bad-soft: #321716;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }

/* Layout */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 32px; padding-bottom: 64px; }

/* Header: brand, sections, search, language and account in one row; wraps on small screens */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 12px 24px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--ink); letter-spacing: .01em; line-height: 1; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink-2); font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.header-search { position: relative; flex: 1 1 240px; display: flex; align-items: center; max-width: 420px; }
.header-search .search-icon { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.header-search input { border-radius: 999px; padding: 10px 46px 10px 40px; background: var(--surface-2); border-color: transparent; transition: background .15s, border-color .15s; }
.header-search input:focus { background: var(--surface); border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.header-search button { position: absolute; right: 5px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.header-search button:hover { filter: brightness(1.08); }
.header-tools { display: flex; align-items: center; gap: 14px; }
.header-tools form { margin: 0; }
.header-link { color: var(--ink-2); font-weight: 500; }
.header-link:hover { color: var(--ink); }
.lang-switch { margin: 0 0 0 auto; display: flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.lang-switch button { background: none; border: 0; color: var(--ink-3); padding: 4px 10px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; border-radius: 999px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.header-tools .btn.small { padding: 8px 16px; border-radius: 999px; }
@media (max-width: 760px) {
  .site-header { position: static; }
  .header-row { gap: 10px 12px; }
  .brand { order: 1; }
  .header-tools { order: 2; margin-left: auto; gap: 10px; }
  .nav { order: 3; margin-left: -12px; }
  .lang-switch { order: 4; }
  .header-search { order: 5; flex-basis: 100%; max-width: none; }
}

/* Footer: dark band at the bottom of every page */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main.wrap { flex: 1 0 auto; width: 100%; }
.site-footer { --f-bg: #1d232b; --f-ink: #eceae6; --f-mute: #9aa1aa; --f-line: rgba(255, 255, 255, .1); background: var(--f-bg); color: var(--f-mute); font-size: .9rem; padding: 48px 0 28px; }
@media (prefers-color-scheme: dark) { .site-footer { --f-bg: #0e1013; } }
.site-footer a { color: var(--f-ink); }
.site-footer .brand { color: #fff; font-size: 1.5rem; display: inline-block; margin-bottom: 12px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
.footer-about p { margin: 0 0 12px; max-width: 28rem; }
.footer-about address { font-style: normal; line-height: 1.7; }
.site-footer h2 { font-family: var(--sans); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--f-mute); margin: 6px 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-base { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; border-top: 1px solid var(--f-line); margin-top: 36px; padding-top: 20px; font-size: .82rem; }
.footer-base p { margin: 0; }

/* Forms and buttons */
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; width: 100%;
}
input[type="checkbox"] { width: auto; }
label { display: block; font-weight: 500; margin-bottom: 4px; font-size: .925rem; }
.field { margin-bottom: 14px; }
.field .help { color: var(--ink-3); font-size: .825rem; margin-top: 4px; }
.field .errors, .form-errors { color: var(--bad); font-size: .875rem; margin: 4px 0 0; padding: 0; list-style: none; }
.field-check { display: flex; gap: 8px; align-items: flex-start; }
.field-check label { font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent);
  color: var(--accent-ink); cursor: pointer; text-decoration: none; transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.small { padding: 6px 12px; font-size: .875rem; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); cursor: not-allowed; filter: none; transform: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.narrow { max-width: 560px; margin: 0 auto; }
.medium { max-width: 820px; margin: 0 auto; }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li, .notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; background: var(--accent-soft); }
.messages .success, .notice.good { background: var(--good-soft); color: var(--good); }
.messages .error, .notice.bad { background: var(--bad-soft); color: var(--bad); }
.messages .warning, .notice.warn { background: var(--warn-soft); color: var(--warn); }

.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.live { background: var(--bad); color: #fff; }
.badge.open { background: var(--good-soft); color: var(--good); }
.badge.sold { background: var(--accent-soft); color: var(--accent); }
.badge.lead { background: var(--good); color: #fff; }
.badge.outbid { background: var(--warn-soft); color: var(--warn); }

/* Home */
.hero { padding: 24px 0 8px; }
.hero p { color: var(--ink-2); max-width: 640px; }
.auction-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 16px 0 32px; }
.auction-card { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.auction-card h3 a { color: var(--ink); }
.auction-card .when { color: var(--ink-2); font-size: .925rem; }
.auction-card .actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Listing */
.listing { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .listing { grid-template-columns: 1fr; } }
.filters { padding: 16px; position: sticky; top: 80px; }
@media (max-width: 900px) { .filters { position: static; } }
.filters h2 { font-size: 1rem; font-family: var(--sans); }
.filters .field { margin-bottom: 10px; }
.filters .row { display: flex; gap: 8px; }
.listing-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.listing-bar select { width: auto; }
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.lot-card { overflow: hidden; display: flex; flex-direction: column; }
.lot-card .thumb { aspect-ratio: 1 / 1; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.lot-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.lot-card .thumb .placeholder { color: var(--ink-3); font-size: .875rem; }
.lot-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lot-card .lot-no { font-size: .8rem; color: var(--ink-3); display: flex; justify-content: space-between; gap: 6px; }
.lot-card .title { color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.35; }
.lot-card .price-row { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lot-card .price { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lot-card .price-label { font-size: .75rem; color: var(--ink-3); }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-3); }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 24px 0; align-items: center; }

/* Lot detail */
.breadcrumbs { font-size: .875rem; color: var(--ink-3); margin-bottom: 12px; }
.lot-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .lot-layout { grid-template-columns: 1fr; } }
.gallery .main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery .thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--surface); cursor: pointer; width: 72px; height: 72px; overflow: hidden; }
.gallery .thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lot-head .lot-no { color: var(--ink-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.specs dt { color: var(--ink-3); }
.specs dd { margin: 0; }
.description { white-space: pre-line; color: var(--ink-2); }
.lot-nav { display: flex; justify-content: space-between; margin-top: 24px; gap: 8px; }
.history { width: 100%; border-collapse: collapse; font-size: .9rem; }
.history td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.history td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* Bid panel */
.bid-panel { padding: 20px; position: relative; }
.bid-panel .status-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.bid-panel .price-label { color: var(--ink-3); font-size: .85rem; }
.bid-panel .price { font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bid-panel .meta { color: var(--ink-2); font-size: .9rem; margin: 6px 0 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.bid-panel .clock { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.1rem; }
.bid-panel .clock.urgent { color: var(--bad); }
.bid-panel .bid-btn { font-size: 1.15rem; padding: 14px 18px; width: 100%; }
.bid-panel .feedback { min-height: 1.5em; margin: 10px 0 0; font-size: .925rem; }
.bid-panel .feedback.good { color: var(--good); }
.bid-panel .feedback.bad { color: var(--bad); }
.bid-panel .feedback.warn { color: var(--warn); }
.bid-panel .more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.bid-panel .more .row { display: flex; gap: 8px; }
.bid-panel .more .row input { flex: 1; min-width: 0; }
.bid-panel .your-max { font-size: .875rem; color: var(--good); margin-top: 6px; }
.bid-panel .login-cta { display: grid; gap: 8px; }
.bid-panel .result { font-size: 1.1rem; font-weight: 600; }

/* 3-2-1 countdown messages */
.countdown { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.countdown-msg {
  font-family: var(--serif); font-size: 5rem; font-weight: 700; color: var(--bad);
  background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: 50%; width: 140px; height: 140px;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  animation: pop .9s ease-out forwards;
}
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 20% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .countdown-msg { animation: none; } }

/* Live page */
.live-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .live-layout { grid-template-columns: 1fr; } }
.live-banner { padding: 12px 16px; border-radius: 8px; background: var(--surface-2); margin-bottom: 16px; font-weight: 600; }
.live-banner.live { background: var(--bad-soft); color: var(--bad); }
.live-banner.paused { background: var(--warn-soft); color: var(--warn); }
.live-current { padding: 16px; }
.live-current .image { aspect-ratio: 4 / 3; background: var(--surface-2); border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.live-current .image img { width: 100%; height: 100%; object-fit: contain; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini-list img, .mini-list .ph { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--surface-2); flex: none; }
.mini-list .t { flex: 1; min-width: 0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .p { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .9rem; }

/* Account */
.dash-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.table { width: 100%; border-collapse: collapse; font-size: .925rem; }
.table th { text-align: left; color: var(--ink-3); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.r, .table th.r { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.bidder-number { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--accent); }
section + section { margin-top: 28px; }

/* Live password checklist (static/js/password-rules.js) */
.pw-rules{list-style:none;margin:.6rem 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(11.5rem,1fr));gap:.35rem .9rem;font-size:.86rem}
.pw-rules li{display:flex;align-items:center;gap:.5rem;color:var(--pw-todo);transition:color .3s}
.pw-mark{flex:none;width:1.1rem;height:1.1rem;border-radius:50%;display:grid;place-items:center;border:1.5px solid var(--pw-line);color:transparent;transition:background .25s,border-color .25s,color .25s,transform .35s cubic-bezier(.34,1.56,.64,1)}
.pw-text{position:relative}
.pw-text::after{content:"";position:absolute;left:-2px;right:-2px;top:55%;height:1.5px;background:currentColor;transform:scaleX(0);transform-origin:left;transition:transform .35s cubic-bezier(.16,1,.3,1)}
.pw-rules li.met{color:var(--pw-done-text)}
.pw-rules li.met .pw-mark{background:var(--pw-done);border-color:var(--pw-done);color:#fff;transform:scale(1.12)}
.pw-rules li.met .pw-text::after{transform:scaleX(1)}
.pw-rules li.met .pw-mark svg path{stroke-dasharray:14;stroke-dashoffset:14;animation:pw-tick .35s .05s forwards}
@keyframes pw-tick{to{stroke-dashoffset:0}}
@media (prefers-reduced-motion:reduce){.pw-rules *{transition:none!important;animation:none!important}.pw-rules li.met .pw-mark svg path{stroke-dashoffset:0}}
.pw-rules{--pw-todo:var(--ink-2);--pw-line:var(--line);--pw-done:var(--good);--pw-done-text:var(--ink-3)}

/* Timed lots: the final-minute note in the bid panel */
.final-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: .85rem; }
