/* Kenview House catalog. Paper and olive, from the brand sheet. */
:root {
  --paper: #f4efe4;
  --paper-2: #ebe4d4;
  --paper-3: #e1d9c5;
  --ink: #2b301a;
  --ink-2: #3c4a2c;
  --muted: #6f735f;
  --rule: #d5cdb7;
  --accent: #2b301a;
  --accent-ink: #f4efe4;
  --shadow: 0 1px 2px rgba(43, 48, 26, 0.08), 0 12px 32px -16px rgba(43, 48, 26, 0.25);
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1d2013;
    --paper-2: #262a1a;
    --paper-3: #313621;
    --ink: #efe9da;
    --ink-2: #d9d2bf;
    --muted: #a7a58f;
    --rule: #3d4229;
    --accent: #efe9da;
    --accent-ink: #1d2013;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.brand img { width: clamp(118px, 14vw, 150px); height: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img, :root:not([data-theme="light"]) .foot-emblem { filter: invert(0.92) hue-rotate(180deg) saturate(0.4); } }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-size: 14px; font-weight: 500; letter-spacing: 0.02em; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }
.nav-cta { border: 1px solid var(--ink) !important; border-radius: 999px; padding: 7px 16px !important; }
.nav-cta:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- shared */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 500; }
.section-title { font-size: clamp(26px, 3vw, 34px); margin: 0 0 18px; }
.page-title { font-size: clamp(36px, 5.5vw, 60px); margin: 0 0 20px; }
.lede { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 24px); line-height: 1.35; margin: 0 0 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 13px 24px; font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--paper-2); opacity: 1; }
.ext { font-size: 13px; margin-left: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.actions.center { justify-content: center; }
.narrow { max-width: 680px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) 0; }
.narrow.center { text-align: center; }
.prose p { margin: 0 0 1em; }
.prose-lg p { font-size: 18px; }
.ribbon {
  position: absolute; top: 12px; left: 12px;
  background: var(--paper); color: var(--ink);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  padding: 5px 10px; border-radius: 3px; box-shadow: var(--shadow);
}
.ribbon-lg { font-size: 13px; padding: 8px 14px; top: 16px; left: 16px; }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(44px, 9vw, 110px) 0 clamp(28px, 5vw, 56px); max-width: 880px; }
.hero-title { font-size: clamp(38px, 6.4vw, 72px); margin: 0 0 18px; text-wrap: balance; }
.hero-sub { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 600px; margin: 0; }

/* ---------------------------------------------------------------- grid */
.pieces { padding-bottom: clamp(40px, 6vw, 80px); scroll-margin-top: 80px; }
.pieces-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 14px 28px; margin-bottom: 22px; border-top: 1px solid var(--rule); padding-top: 22px; }
.pieces-head .section-title { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: transparent; border: 1px solid var(--rule); color: var(--ink-2);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(18px, 3vw, 36px) clamp(14px, 2.4vw, 28px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid-tight { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 719px) { .grid-tight { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-tight .card:nth-child(3) { display: none; } }
.card a { display: block; text-decoration: none; }
.card-img {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 4 / 5; background: var(--paper-2);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease; }
.card a:hover .card-img img { transform: scale(1.03); }
.card-img img.is-swapped { opacity: 0; }
.card-img .alt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s ease; }
.card-img .alt.is-shown { opacity: 1; }
.card-noimg { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(135deg, var(--paper-2) 0 12px, var(--paper-3) 12px 13px); }
.card-body { display: grid; gap: 2px; padding: 12px 2px 0; }
.card-kicker { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.card-title { font-family: var(--serif); font-size: clamp(18px, 1.7vw, 21px); line-height: 1.2; font-weight: 500; }
.card-price { font-size: 14px; color: var(--ink-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.card.is-sold .card-img img { filter: saturate(0.4) brightness(0.98); }
.card.is-sold .card-price { color: var(--muted); }
.card[hidden] { display: none; }
.grid-empty, .empty { color: var(--muted); padding: 40px 0; text-align: center; }
.empty p + p { margin-top: 18px; }

/* ---------------------------------------------------------------- piece */
.crumbs { font-size: 13px; color: var(--muted); padding: 18px 0 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.piece { display: grid; gap: 32px; padding-bottom: clamp(36px, 6vw, 72px); }
@media (min-width: 900px) {
  .piece { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
  .gallery { position: sticky; top: 84px; }
}
.gallery-main { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.gallery-main img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; background: var(--paper-2); cursor: zoom-in; }
.gallery-open { display: block; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: color-mix(in srgb, var(--paper) 85%, transparent); color: var(--ink);
  font-size: 28px; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; transition: opacity 0.15s ease;
}
.gallery-arrow.prev { left: 12px; } .gallery-arrow.next { right: 12px; }
.gallery-main:hover .gallery-arrow, .gallery-arrow:focus-visible { opacity: 1; }
@media (hover: none) { .gallery-arrow { opacity: 0.9; } }
.thumbs { list-style: none; margin: 10px 0 0; padding: 0 0 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.thumb { flex: 0 0 auto; width: 72px; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: var(--paper-2); cursor: pointer; opacity: 0.75; transition: opacity 0.12s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.is-on { border-color: var(--ink); opacity: 1; }
.gallery-empty { aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--muted); border-radius: var(--radius); background: var(--paper-2); }
.piece-title { font-size: clamp(30px, 3.6vw, 44px); margin: 0 0 12px; text-wrap: balance; }
.piece-price { font-size: 26px; font-weight: 500; margin: 0 0 18px; font-variant-numeric: tabular-nums; }
.sold-word { font-family: var(--serif); font-style: italic; }
.piece-info .lede { font-size: clamp(18px, 1.8vw, 21px); }
.details { display: grid; gap: 0; margin: 0 0 24px; border-top: 1px solid var(--rule); }
.details > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.piece-info .prose { font-size: 16px; color: var(--ink-2); margin-bottom: 24px; }
.pickup { background: var(--paper-2); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 28px; font-size: 15px; color: var(--ink-2); }
.pickup h2 { font-size: 20px; margin-bottom: 6px; }
.pickup p { margin: 0; }
.more { border-top: 1px solid var(--rule); padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 8vw, 96px); }
.more-all { margin: 24px 0 0; font-weight: 500; }
.more-all a { text-decoration: none; border-bottom: 1px solid var(--ink); }

/* ---------------------------------------------------------------- inquiry form */
.inquire { scroll-margin-top: 84px; border-top: 1px solid var(--rule); padding-top: 24px; }
.inquire h2 { font-size: 26px; margin-bottom: 4px; }
.inquire > .muted { margin: 0 0 18px; font-size: 15px; }
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
.form-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
.form-2 > div { display: grid; gap: 6px; }
@media (max-width: 480px) { .form-2 { grid-template-columns: 1fr; } }
.form label { font-size: 13px; font-weight: 500; letter-spacing: 0.02em; }
.form input, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 11px 12px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.form textarea { resize: vertical; min-height: 110px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 4px 0 0; }
.form-fine { font-size: 13px; }
.hp { position: absolute; left: -9999px; }

/* ---------------------------------------------------------------- lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20, 22, 12, 0.94); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lightbox-close, .lightbox-arrow {
  position: absolute; border: 0; background: rgba(244, 239, 228, 0.12); color: #f4efe4;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 26px; line-height: 1;
}
.lightbox-close { top: 14px; right: 14px; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); }
.lightbox-arrow.prev { left: 12px; } .lightbox-arrow.next { right: 12px; }
.lightbox-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #c8c2ae; font-size: 13px; letter-spacing: 0.08em; }
body.no-scroll { overflow: hidden; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--rule); margin-top: 24px; padding: 48px var(--gutter) 56px; text-align: center; color: var(--muted); font-size: 14px; }
.foot-emblem { width: 72px; margin: 0 auto 14px; opacity: 0.9; }
.foot-name { font-family: var(--serif); font-size: 22px; color: var(--ink); margin: 0 0 2px; }
.foot-line { margin: 0 0 16px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 0 0 18px; }
.foot-links a { text-decoration: none; color: var(--ink-2); }
.foot-links a:hover { text-decoration: underline; }
.foot-fine { margin: 0; font-size: 12px; }

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