/* Postius — For Sale. A small public storefront, not an ops tool: warmer,
   simpler, no internal state. Palette leans toward a considered warm
   neutral (not the AI-cliché cream) with a single ink-blue accent. */

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

:root {
  --paper: #f2efe9;
  --surface: #ffffff;
  --surface-2: #eae5db;
  --ink: #24211c;
  --ink-soft: #5c574c;
  --ink-faint: #948d7c;
  --line: #ded7c8;
  --accent: #2f4a5c;
  --accent-soft: #e4eaec;
  --ok: #3f6b4f;
  --err: #a8551f;
  --shadow: 0 1px 2px rgba(36,33,28,0.06), 0 8px 24px -10px rgba(36,33,28,0.18);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1c1a16;
    --surface: #262319;
    --surface-2: #302c22;
    --ink: #f0ece2;
    --ink-soft: #b8b0a0;
    --ink-faint: #7c7566;
    --line: #3c3729;
    --accent: #8fb3c9;
    --accent-soft: #2a3438;
    --ok: #7fb896;
    --err: #e2965c;
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 10px 28px -10px rgba(0,0,0,0.6);
  }
}
:root[data-theme="dark"] {
  --paper: #1c1a16;
  --surface: #262319;
  --surface-2: #302c22;
  --ink: #f0ece2;
  --ink-soft: #b8b0a0;
  --ink-faint: #7c7566;
  --line: #3c3729;
  --accent: #8fb3c9;
  --accent-soft: #2a3438;
  --ok: #7fb896;
  --err: #e2965c;
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 10px 28px -10px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}
::selection { background: var(--accent); color: var(--surface); }
img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 22px; color: var(--ink); text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark span { font-family: 'Karla', sans-serif; font-weight: 400; font-size: 14px; color: var(--ink-faint); margin-left: 8px; }

.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 100px; overflow: hidden; }
.lang-btn {
  appearance: none; border: none; background: transparent; color: var(--ink-soft);
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  padding: 6px 14px; cursor: pointer;
}
.lang-btn.active { background: var(--accent); color: var(--surface); }

/* intro / footer */
.intro { padding: 28px 20px 8px; }
.intro p, .footer p { color: var(--ink-soft); font-size: 15px; max-width: 62ch; }
.site-footer { padding: 40px 20px 60px; border-top: 1px solid var(--line); margin-top: 40px; }
.manager-link {
  display: inline-block; margin-top: 18px; font-size: 11.5px;
  color: var(--ink-faint); text-decoration: none;
}
.manager-link:hover { color: var(--ink-soft); text-decoration: underline; }

/* contact */
.contact-section { padding: 44px 20px 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.contact-section h2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 22px;
  margin: 0 0 6px;
}
.contact-sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 20px; }
.contact-form { display: flex; flex-direction: column; gap: 14px; max-width: 440px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.contact-form .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form button {
  align-self: flex-start; appearance: none; border: none; background: var(--accent);
  color: var(--surface); font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 22px; border-radius: 100px; cursor: pointer;
}
.contact-form button:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.contact-form button:disabled { opacity: 0.6; cursor: default; }
.contact-status { font-size: 13px; color: var(--ink-faint); margin: 0; min-height: 1.2em; }
.contact-status.is-ok { color: var(--ok); }
.contact-status.is-err { color: var(--err); }

/* filters */
.filters { padding: 8px 20px 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 100px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.chip .count { opacity: 0.7; margin-left: 4px; }

/* grid */
main.wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; padding-bottom: 60px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card-photo { aspect-ratio: 4/5; background: var(--surface-2); cursor: zoom-in; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 600; margin: 0; text-wrap: balance; }
.card-meta { font-size: 12.5px; color: var(--ink-faint); }
.card-price { font-family: 'Karla', sans-serif; font-weight: 700; font-size: 20px; color: var(--accent); margin-top: auto; }
.card-cond { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 100px; background: var(--accent-soft); color: var(--accent); width: fit-content; }
.card-desc { font-size: 13.5px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.card-thumbs { display: flex; gap: 5px; padding: 0 18px 4px; overflow-x: auto; }
.card-thumbs button { all: unset; flex: none; width: 38px; height: 38px; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: 0.6; }
.card-thumbs button.active { opacity: 1; border-color: var(--accent); }
.card-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.listing-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.listing-links a {
  font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none;
  border: 1px solid var(--accent); border-radius: 100px; padding: 4px 11px;
}
.listing-links a:hover { background: var(--accent-soft); }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20,18,14,0.92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 32px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(90vw, 880px); max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,0.1); color: #f0ece2; border: none;
  border-radius: 100px; cursor: pointer; font-size: 20px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.lb-close { top: 24px; right: 24px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.2); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
