/* Rt50 Trading Co. — cream, charcoal, barn red. Working trading company, not fake-distressed. */
:root {
  --cream: #f5eedf;
  --paper: #fffaf0;
  --ink: #241d18;
  --ink-2: #5a4d42;
  --espresso: #231c17;
  --red: #8f2a1e;
  --red-dk: #6f1f15;
  --gold: #c9a45c;
  --line: #e2d6bf;
  --ok: #2f6b3a;
  --radius: 10px;
  --head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.55 var(--body); -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--red); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.15; letter-spacing: .01em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); text-transform: uppercase; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-2); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 99; background: var(--paper); padding: 8px 12px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--espresso); color: var(--cream); border-bottom: 3px solid var(--red); }
.bar-brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-family: var(--head); font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
.bar-brand img { width: 40px; height: 40px; object-fit: contain; }
.bar nav { display: flex; gap: 4px; align-items: center; }
.bar nav a { color: var(--cream); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-weight: 600; font-size: .95rem; }
.bar nav a:hover { background: rgba(255,255,255,.08); }
.bar nav .nav-cta { background: var(--red); }
.bar nav .nav-cta:hover { background: var(--red-dk); }
@media (max-width: 640px) {
  .bar-brand span { display: none; }
  .bar nav a:not(.nav-cta):not([href="#finds"]) { display: none; }
}

/* hero */
.hero { background: var(--espresso); color: var(--cream); padding-bottom: 36px; }
.hero-img { width: 100%; max-height: 460px; object-fit: cover; object-position: center; }
@media (max-width: 640px) {
  .hero { padding-top: 20px; }
  .hero-img { width: min(320px, 82%); height: auto; max-height: none; object-fit: contain; margin: 0 auto; }
}
.hero-copy { padding-top: 28px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); text-transform: uppercase; color: var(--cream); }
.hero p { max-width: 640px; color: #e6dcc8; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 8px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: 700 1rem var(--body); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dk); }
.btn-ghost { border-color: var(--gold); color: var(--cream); background: transparent; }
.btn-ghost:hover { background: rgba(201,164,92,.15); }
.btn-dark { background: var(--espresso); color: var(--cream); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }

/* finds */
.finds { padding: 48px 0 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-head p { margin: 0; font-size: .92rem; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 22px; }
.search input { width: min(320px, 100%); min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: inherit; }
.search { flex: 1 1 220px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 .92rem var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem; }
.toggle input { width: 18px; height: 18px; accent-color: var(--red); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); overflow: hidden; cursor: pointer; font: inherit; color: inherit; transition: transform .15s, box-shadow .15s; }
.card:hover, .card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(36,29,24,.14); outline: none; }
.card:focus-visible { outline: 3px solid var(--gold); }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e9dfcb; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-img .noimg { display: grid; place-items: center; height: 100%; font-family: var(--head); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; font: 700 .78rem var(--body); text-transform: uppercase; letter-spacing: .04em; background: var(--ok); color: #fff; }
.badge.coming { background: var(--gold); color: var(--ink); }
.badge.pending { background: #a6620f; }
.badge.sold { background: var(--ink); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-family: var(--head); font-weight: 500; font-size: 1.12rem; line-height: 1.25; }
.card-price { font-weight: 700; font-size: 1.1rem; color: var(--red); }
.card-meta { margin-top: auto; padding-top: 6px; font-size: .86rem; color: var(--ink-2); }
.card.is-sold { opacity: .7; }
.empty { padding: 28px; text-align: center; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); }

/* how */
.how { background: var(--paper); border-block: 1px solid var(--line); padding: 52px 0; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 12px; }
.how-grid article { padding: 18px; border-radius: var(--radius); background: var(--cream); border-top: 4px solid var(--red); }
.how-grid h3 { font-size: 1.15rem; text-transform: uppercase; }
.how-grid p { margin: 0; }
.fine { margin-top: 22px; color: var(--ink-2); max-width: 760px; }

/* about */
.about { padding: 56px 0; max-width: 760px; }
.about p { font-size: 1.08rem; }
.tagline { font-family: var(--head); font-size: 1.4rem; text-transform: uppercase; color: var(--red); margin-top: 18px; }

/* contact */
.contact { background: var(--espresso); color: var(--cream); padding: 52px 0; }
.contact p { color: #e6dcc8; max-width: 640px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.contact .btn-line { border-color: var(--gold); color: var(--cream); }

.foot { padding: 22px 0 36px; font-size: .9rem; color: var(--ink-2); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.foot p { margin: 0; }

/* item dialog */
dialog { width: min(980px, 100% - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(20,15,12,.72); }
.dlg { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; }
@media (max-width: 760px) { .dlg { grid-template-columns: 1fr; } }
.dlg-close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(36,29,24,.8); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.gallery { background: #1d1713; min-width: 0; }
.gallery-main { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; aspect-ratio: 4 / 3; scrollbar-width: none; }
.gallery-main::-webkit-scrollbar { display: none; }
.gallery-main img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; }
.gallery-main .noimg { flex: 1; display: grid; place-items: center; color: #cbbfa8; font-family: var(--head); text-transform: uppercase; }
.gallery-thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.gallery-thumbs button { flex: 0 0 64px; height: 50px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: .65; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--gold); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.dlg-body { padding: 22px 22px 24px; overflow-y: auto; max-height: calc(100dvh - 24px); }
.dlg-meta { margin: 0 0 6px; font-size: .85rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.dlg-body h2 { font-size: 1.5rem; text-transform: none; padding-right: 36px; }
.price { font-size: 1.4rem; font-weight: 700; color: var(--red); margin: 0 0 10px; }
.use { padding: 10px 12px; background: var(--cream); border-left: 4px solid var(--gold); border-radius: 4px; }
.use:empty { display: none; }
.terms { padding-left: 18px; color: var(--ink-2); font-size: .95rem; }
.terms:empty { display: none; }
.dlg-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dlg-actions .btn { width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } }
