@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --navy: #0f151d;
  --navy-2: #171f2a;
  --panel: #1b2530;
  --line: #2a3644;
  --brass: #c9a24b;
  --brass-dim: #8a723a;
  --ivory: #eee8dc;
  --ivory-dim: #a9b0ba;
  --green: #3c5a48;
  --radius: 2px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ivory);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: rgba(15,21,29,0.9);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: 1120px;
  margin: 0 auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--brass);
  position: relative;
  transition: background .15s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--brass);
  transition: transform .2s ease, top .2s ease, opacity .2s ease;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open span::after { top: 0; transform: rotate(-45deg); }

.mark {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ivory);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.mark span { color: var(--brass); }

nav.main-nav {
  display: flex;
  gap: 34px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
nav.main-nav a {
  color: var(--ivory-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: color .15s ease, border-color .15s ease;
}
nav.main-nav a:hover, nav.main-nav a.active {
  color: var(--brass);
  border-color: var(--brass);
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow {
  color: var(--brass);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  max-width: 780px;
}
.hero h1 em {
  font-style: normal;
  color: var(--brass);
}
.hero p.lede {
  max-width: 560px;
  color: var(--ivory-dim);
  font-size: 18px;
  margin-top: 22px;
}

/* Ticker */
.ticker {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.ticker .tick {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.ticker .tick .num {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  color: var(--brass);
}
.ticker .tick .lbl {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ivory-dim);
}

/* ---------- Ledger rows (category sections on home) ---------- */
.ledger {
  border-top: 1px solid var(--line);
}
.ledger-row {
  display: grid;
  grid-template-columns: 140px 1fr 220px;
  gap: 32px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.ledger-row .code {
  font-family: 'Fraunces', serif;
  color: var(--brass-dim);
  font-size: 14px;
  letter-spacing: 0.08em;
}
.ledger-row h3 { font-size: 26px; }
.ledger-row p { color: var(--ivory-dim); margin-top: 8px; font-size: 15px; }
.ledger-row .go {
  justify-self: end;
  border: 1px solid var(--brass-dim);
  color: var(--brass);
  padding: 10px 22px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  transition: background .15s ease, color .15s ease;
}
.ledger-row .go:hover { background: var(--brass); color: var(--navy); }

/* ---------- Section header (category pages) ---------- */
.section-head {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--line);
}
.section-head .eyebrow {
  color: var(--brass);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head h1 { font-size: clamp(32px, 4.5vw, 48px); }
.section-head p { color: var(--ivory-dim); margin-top: 14px; max-width: 560px; }

/* ---------- Listing grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding: 40px 0 80px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
.card .thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--navy-2) url('data:image/svg+xml,') center/cover;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.card .body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 19px; }
.card .price { color: var(--brass); font-family: 'Fraunces', serif; font-size: 20px; }
.card .meta { color: var(--ivory-dim); font-size: 13px; letter-spacing: 0.02em; }
.card .desc { color: var(--ivory-dim); font-size: 14px; margin-top: 4px; flex: 1; }
.card .contact-line {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ivory-dim);
}
.whatsapp-cta {
  display: block;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--brass);
  text-decoration: none;
  transition: color .15s ease;
}
.whatsapp-cta:hover { color: var(--ivory); }

.empty {
  padding: 60px 0;
  color: var(--ivory-dim);
  border: 1px dashed var(--line);
  text-align: center;
  border-radius: var(--radius);
  margin: 40px 0 80px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding: 48px 0 90px;
}
.contact-card {
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: var(--radius);
}
.contact-card .lbl {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  margin-bottom: 10px;
}
.contact-card .val { font-size: 17px; word-break: break-word; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  color: var(--ivory-dim);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site a:hover { color: var(--brass); }

/* ---------- Admin ---------- */
.admin-shell { padding: 56px 0 90px; }
.admin-login {
  max-width: 380px;
  margin: 96px auto;
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: var(--radius);
}
.admin-login h2 { margin-bottom: 22px; }
label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brass); margin: 16px 0 6px; }
input, select, textarea {
  width: 100%;
  background: var(--navy-2);
  border: 1px solid var(--line);
  color: var(--ivory);
  padding: 11px 12px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
}
textarea { min-height: 90px; resize: vertical; }
button {
  cursor: pointer;
  border: none;
  background: var(--brass);
  color: var(--navy);
  padding: 12px 20px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  font-weight: 600;
  margin-top: 20px;
}
button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ivory-dim);
  margin-left: 10px;
}
button.danger {
  background: transparent;
  border: 1px solid #7a3b3b;
  color: #d98787;
}
.admin-form {
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: var(--radius);
  margin-bottom: 40px;
}
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.admin-table th { color: var(--brass); text-transform: uppercase; font-size: 12px; letter-spacing: 0.06em; }
.row-actions { display: flex; gap: 8px; }
.msg { font-size: 13px; margin-top: 12px; }
.msg.error { color: #d98787; }
.msg.ok { color: #8fbf9a; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }

/* ---------- Live indicator ---------- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
  margin-bottom: 10px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brass);
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--brass);
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hover motion ---------- */
.ledger-row {
  transition: background .25s ease, transform .25s ease;
}
.ledger-row:hover {
  background: var(--navy-2);
  transform: translateX(4px);
}
.ledger-row .go {
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.ledger-row:hover .go { transform: translateX(2px); }

.card {
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--brass-dim);
  box-shadow: 0 14px 28px rgba(0,0,0,0.35);
}

.mark, nav.main-nav a { transition: opacity .2s ease; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .live-dot::after { animation: none; }
  .card, .ledger-row { transition: none; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }

  .header-inner { padding: 16px 20px; }
  .mark { font-size: 26px; }
  .nav-toggle { display: flex; }

  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy-2);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  nav.main-nav.open { max-height: 320px; }
  nav.main-nav a {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    border-left: 2px solid transparent;
    width: 100%;
  }
  nav.main-nav a:hover, nav.main-nav a.active {
    border-bottom-color: var(--line);
    border-left-color: var(--brass);
    background: var(--panel);
  }
  header.site { position: sticky; }

  .hero { padding: 56px 0 40px; }
  .hero .lede { font-size: 16px; }
  .ticker { gap: 28px 40px; margin-top: 32px; }
  .ticker .tick .num { font-size: 26px; }

  .ledger-row { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .ledger-row .code { font-size: 13px; }
  .ledger-row h3 { font-size: 22px; }
  .ledger-row .go { justify-self: start; padding: 10px 18px; }

  .section-head { padding: 44px 0 24px; }
  .section-head h1 { font-size: 30px; }

  .grid { grid-template-columns: 1fr; gap: 16px; padding: 28px 0 56px; }
  .card .body { padding: 18px; }

  .contact-grid { grid-template-columns: 1fr; padding: 32px 0 64px; }

  .contact-card { flex-direction: row; align-items: center; }
  .contact-card .thumb {
    aspect-ratio: auto;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1px solid var(--line);
  }
  .contact-card .thumb span { font-size: 22px !important; }
  .contact-card .body { padding: 12px 14px; gap: 2px; }
  .contact-card h3 { font-size: 15px; }
  .contact-card .price { font-size: 14px !important; }
  .contact-card .meta { font-size: 12px; }
  .contact-card .contact-line { margin-top: 6px; padding-top: 6px; font-size: 11px; }

  footer.site { flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px 0; }
  footer.site span { word-break: break-word; }

  /* Admin panel on small screens */
  .admin-shell { padding: 32px 0 60px; }
  .top-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .admin-form { padding: 20px; }
  .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 560px; }
  .admin-login { margin: 48px auto; padding: 28px; max-width: none; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 30px; }
  .ticker { gap: 22px 32px; }
  .ticker .tick { flex-direction: column; align-items: flex-start; gap: 2px; }
}
