/* homestyle — modern minimalist, warm editorial */
:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --text: #2b2823;
  --muted: #8a8478;
  --line: #e7e1d6;
  --accent: #b8865a;
  --accent-soft: #d9c0a6;
  --accent-ink: #7a5a3a;
  --shadow: 0 1px 2px rgba(43,40,35,.04), 0 8px 24px rgba(43,40,35,.06);
  --radius: 16px;
  --maxw: 1200px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -999px; top: 12px; background: var(--text); color: var(--bg);
  padding: 8px 14px; border-radius: 8px; z-index: 200;
}
.skip-link:focus { left: 12px; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,244,238,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.5rem; letter-spacing: -.02em;
  text-decoration: none;
}
.brand-dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: .95rem; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 500; }
.nav-links a:hover { color: var(--accent-ink); }
.nav-count {
  font-size: .78rem; color: var(--accent-ink);
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px;
  font-weight: 500;
}

/* Hero */
.hero {
  padding: 64px 0 0;
}
.hero-copy { text-align: left; position: relative; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 600; color: var(--accent-ink); margin: 0 0 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400; font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.03; letter-spacing: -.02em; margin: 0 0 20px;
}
.hero-title em {
  font-style: italic; color: var(--accent);
}
.hero-sub {
  max-width: 560px; color: var(--muted); font-size: 1.12rem;
  font-weight: 300; margin: 0 0 32px;
}
.btn {
  display: inline-block; background: var(--text); color: var(--bg);
  padding: 14px 26px; border-radius: 999px; font-weight: 500;
  text-decoration: none; border: 1px solid var(--text); cursor: pointer;
  font-family: var(--font-body); font-size: .95rem;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); transform: translateY(-1px); }
.btn.ghost {
  background: transparent; color: var(--text); border-color: var(--line);
}
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.hero-media {
  margin-top: 56px; height: clamp(320px, 54vw, 620px); border-radius: 24px;
  background-image: url('/images/scandi-living.webp');
  background-size: cover; background-position: center;
}

/* Strip */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 28px; padding-bottom: 8px;
}
.strip-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 22px;
}
.strip-item strong { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--accent-ink); }
.strip-item span { color: var(--muted); font-size: .82rem; }

/* Sections */
.library { padding-top: 72px; }
.section-head { margin-bottom: 32px; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.01em; margin: 0 0 8px;
}
.section-sub { color: var(--muted); font-weight: 300; max-width: 520px; margin: 0; }

/* Filters */
.filters {
  position: sticky; top: 72px; z-index: 60;
  background: rgba(247,244,238,.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 18px 20px; margin-bottom: 36px;
  box-shadow: var(--shadow);
}
.search-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.search-row input[type="search"] {
  flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); font-family: var(--font-body); font-size: .95rem;
  color: var(--text);
}
.search-row input::-webkit-search-cancel-button { -webkit-appearance: none; }
.result-count { font-size: .85rem; color: var(--muted); white-space: nowrap; font-weight: 500; }
.reset {
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; color: var(--accent-ink); font-weight: 500; font-size: .85rem;
}
.reset:hover { border-color: var(--accent); background: var(--accent-soft); }
.facet { margin-bottom: 12px; }
.facet:last-child { margin-bottom: 0; }
.facet-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 600; margin-bottom: 8px;
}
.facet-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: .84rem; cursor: pointer;
  font-family: var(--font-body); transition: all .12s ease;
}
.pill:hover { border-color: var(--accent); }
.pill.active {
  background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 500;
}

/* Grid */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px; padding-bottom: 40px;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(43,40,35,.10); }
.card-media { aspect-ratio: 1 / 1; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  color: var(--accent-ink); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px;
}
.tag.room { color: var(--muted); background: #efebe3; }
.card-title { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; letter-spacing: -.01em; margin: 0; }
.card-tagline { color: var(--muted); font-size: .9rem; font-weight: 300; margin: 0; }
.card-meta { margin-top: auto; font-size: .76rem; color: var(--muted); }

/* Empty state */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty p { font-size: 1.05rem; margin-bottom: 20px; }

/* Styles taxonomy */
.styles { padding: 88px 0 40px; }
.styles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.style-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; transition: border-color .15s ease, transform .15s ease; text-align: left;
  font-family: var(--font-body);
}
.style-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.style-card.active { border-color: var(--accent); background: #faf6f0; }
.style-card.active h3 { color: var(--accent-ink); }
.style-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; margin: 0; }
.style-card p { color: var(--muted); font-size: .9rem; font-weight: 300; margin: 0; }
.style-card .style-meta { margin-top: auto; font-size: .76rem; color: var(--accent-ink); }
.style-card .style-source { font-size: .76rem; color: var(--muted); }

/* About */
.about { background: var(--surface); border-top: 1px solid var(--line); padding: 72px 0; margin-top: 48px; }
.about-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.about-body p { color: var(--muted); font-weight: 300; margin: 0 0 18px; font-size: 1.05rem; }
.about-body strong { color: var(--text); font-weight: 500; }

/* Footer */
.footer { background: var(--text); color: var(--bg); padding: 48px 0; margin-top: 0; border-top: 1px solid transparent; }
.footer-inner { text-align: center; }
.footer-brand { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; margin: 0 0 12px; }
.footer p { margin: 4px 0; color: rgba(247,244,238,.75); font-weight: 300; }
.footer-note { font-size: .8rem; opacity: .65; margin-top: 14px !important; }

/* Modal */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(30,27,22,.5); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; background: var(--surface); border-radius: 24px; max-width: 860px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.25);
  display: grid; grid-template-columns: 1fr 1fr;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.9);
  font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--text);
}
.modal-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px 0 0 24px; }
.modal-body { padding: 36px 32px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.modal-tags .tag.room { color: var(--accent-ink); background: var(--accent-soft); }
.modal-body h2 { font-family: var(--font-display); font-weight: 500; font-size: 2rem; letter-spacing: -.01em; margin: 0 0 6px; }
.modal-tagline { color: var(--accent-ink); font-style: italic; font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 16px; }
.modal-blurb { color: var(--muted); font-weight: 300; margin: 0 0 22px; line-height: 1.7; }
.modal-credit {
  border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 14px;
  font-size: .84rem; color: var(--muted);
}
.modal-credit a { color: var(--accent-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.modal-shop h4 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; }
.modal-shop ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.modal-shop ul li a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px;
  text-decoration: none; color: var(--text); font-size: .9rem; font-weight: 500;
  transition: border-color .12s ease, background .12s ease;
}
.modal-shop ul li a:hover { border-color: var(--accent); background: #faf6f0; }
.modal-shop ul li a span { color: var(--accent); font-size: 1.1rem; }
.modal-body .btn.up { margin-top: 20px; width: 100%; }

/* Responsive */
@media (max-width: 760px) {
  .nav-links { gap: 16px; font-size: .88rem; }
  .nav-links .nav-count { display: none; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 24px; }
  .modal-card { grid-template-columns: 1fr; max-height: 92vh; }
  .modal-media img { border-radius: 24px 24px 0 0; max-height: 260px; }
  .filters { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card-media img, .btn { transition: none; }
}
