/* Public home page (home.html, served at /) and its promo pages (feature.html, at
   /features/<slug>). Everything below the header is rendered from one
   content object (GET /api/public/homepage -- edited on the admin's Homepage tab):
   the banner, the blocks under it, and which optional sections show. Kept to its own
   styles, like catalog.html, since none of the logged-in app's layout applies here. */
body { background: var(--bg); }
.home-wrap { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

.home-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 249, 240, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.home-header.scrolled { border-bottom-color: var(--border); }
.home-header .home-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.home-header .brand img { display: block; height: 52px; width: auto; margin-left: -14px; }
.home-nav { display: flex; align-items: center; gap: 10px; }
.home-nav a { text-decoration: none; }
.home-nav .nav-link { font-size: 14px; font-weight: 600; color: var(--ink); padding: 10px 14px; border-radius: 999px; }
.home-nav .nav-link:hover { background: var(--accent-soft); }
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 600;
  text-decoration: none; border: 1.5px solid var(--accent); white-space: nowrap;
  transition: opacity 0.15s, background 0.15s;
}
.btn-pill.solid { background: var(--accent); color: var(--white); }
.btn-pill.solid:hover { opacity: 0.9; }
.btn-pill.outline { background: transparent; color: var(--accent); }
.btn-pill.outline:hover { background: var(--accent-soft); }
.btn-pill.light { background: #fff9f0; color: var(--accent); border-color: #fff9f0; }
.btn-pill.light:hover { opacity: 0.92; }
.btn-pill.ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.8); }
.btn-pill.ghost-light:hover { background: rgba(255,255,255,0.12); }
.home-nav .btn-pill { padding: 10px 20px; }

/* ---- Banner ---- */
.home-hero { padding: 12px 0 0; }
.hero-frame {
  position: relative; overflow: hidden; border-radius: 22px;
  min-height: clamp(420px, 62vh, 640px);
  display: flex; background: #1f3d33;
}
.hero-frame .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Stand-in until a real banner image is uploaded: soft, layered brand greens so the
   overlay text still has something to sit on. */
.hero-frame .hero-placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 600px at 85% 20%, rgba(214, 190, 150, 0.55), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(120, 160, 135, 0.55), transparent 60%),
    linear-gradient(135deg, #16342b 0%, #2c5646 55%, #8b7a5c 100%);
}
.hero-frame .hero-shade { position: absolute; inset: 0; }
.hero-content {
  position: relative; z-index: 1; align-self: flex-end;
  padding: clamp(28px, 5vw, 64px); max-width: 720px; color: #fff;
}
.hero-content.align-center { margin: 0 auto; text-align: center; align-self: center; }
.hero-content.align-center .hero-actions { justify-content: center; }
.hero-eyebrow { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; opacity: 0.85; margin-bottom: 14px; }
.hero-content h1 {
  font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.02em;
  font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; margin: 0 0 16px;
}
.hero-content p { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; margin: 0 0 28px; opacity: 0.92; max-width: 560px; }
.hero-content.align-center p { margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
/* Image-only mode: the uploaded banner already has its own text baked in, so the
   whole banner is just the picture (optionally a link), shown at its own shape. */
.hero-frame.image-only { min-height: 0; background: none; display: block; }
.hero-frame.image-only img { display: block; width: 100%; height: auto; }

/* ---- Blocks under the banner ---- */
.home-section { padding: clamp(56px, 8vw, 96px) 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.01em; margin: 0; line-height: 1.1; }
.section-head p { margin: 8px 0 0; color: var(--muted); font-size: 16px; max-width: 560px; }
.section-head .see-all { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.section-head .see-all:hover { text-decoration: underline; }
.block-grid { display: grid; gap: clamp(16px, 2.2vw, 28px); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.home-block { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.home-block .block-media {
  aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; margin-bottom: 18px;
  background: linear-gradient(135deg, #efe6d6, #e3eadf);
}
.home-block .block-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
a.home-block:hover .block-media img { transform: scale(1.03); }
.home-block .block-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.home-block .block-icon svg { width: 26px; height: 26px; }
.home-block h3 { font-size: 19px; font-weight: 650; margin: 0 0 8px; letter-spacing: -0.01em; }
.home-block p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.home-block .block-link { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---- Marketplace preview ---- */
.brand-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px;
  border: 1px solid var(--border); border-radius: 999px; background: #fffdf8; font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--ink);
}
.brand-chip img, .brand-chip .chip-initial { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--accent); }
.preview-grid { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.preview-card { text-decoration: none; color: inherit; }
.preview-card .pc-img { aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #efe6d6, #e3eadf); margin-bottom: 12px; }
.preview-card .pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.preview-card:hover .pc-img img { transform: scale(1.03); }
.preview-card .pc-brand { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.preview-card .pc-name { font-size: 15px; font-weight: 600; line-height: 1.35; }
.preview-card .pc-price { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 6px; }

/* ---- Closing call to action + footer ---- */
.home-cta {
  margin-top: clamp(56px, 8vw, 96px); border-radius: 22px; background: var(--accent); color: #fff9f0;
  padding: clamp(36px, 6vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.home-cta h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 42px); margin: 0 0 8px; line-height: 1.1; }
.home-cta p { margin: 0; opacity: 0.85; font-size: 16px; }
.home-cta .hero-actions { flex-shrink: 0; }
.preview-note {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 30;
  background: var(--ink); color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.home-footer { padding: 48px 0 40px; color: var(--muted); font-size: 13px; }
.home-footer .home-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 28px; }
.home-footer img { height: 40px; width: auto; display: block; margin-left: -10px; }
.home-footer nav { display: flex; gap: 20px; }
.home-footer a { color: var(--muted); text-decoration: none; }
.home-footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .block-grid { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); }
  .preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .home-wrap { width: calc(100% - 32px); }
  .home-header .home-wrap { height: 64px; }
  .home-header .brand img { height: 42px; }
  .home-nav .nav-link { padding: 8px 10px; }
  .home-nav .btn-pill { padding: 9px 16px; }
  /* No room for three header items next to the logo on a phone -- the marketplace
     stays reachable from the banner, the preview section and the footer. */
  .home-nav .nav-link[href="/catalog.html"] { display: none; }
  .block-grid { grid-template-columns: 1fr; }
  .hero-frame { border-radius: 16px; }
  .home-cta { border-radius: 16px; }
}

/* ---- Feature pages (feature.html) ---- */
.feature-hero { min-height: clamp(380px, 52vh, 560px); }
.feature-intro { max-width: 780px; text-align: center; }
.feature-intro h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 16px; }
.feature-intro p { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; color: var(--muted); margin: 0 0 14px; }
.feature-rows { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 104px); }
.feature-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature-row.flip .feature-shot { order: 2; }
.feature-num { font-family: var(--font-serif); font-size: 15px; color: #8b7a5c; letter-spacing: 0.08em; margin-bottom: 10px; }
.feature-copy h3 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 14px; }
.feature-copy p { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0 0 12px; }
/* Screenshots sit in a soft browser-window frame on a warm backdrop. */
.feature-shot { padding: clamp(14px, 2.4vw, 32px); border-radius: 22px; background: linear-gradient(135deg, #efe6d6, #e3eadf); }
.shot-frame { border-radius: 12px; overflow: hidden; background: #fffdf8; box-shadow: 0 18px 50px rgba(22, 52, 43, 0.16), 0 2px 6px rgba(22, 52, 43, 0.08); }
.shot-bar { display: flex; gap: 6px; padding: 10px 12px; background: #f3efe8; border-bottom: 1px solid var(--border); }
.shot-bar span { width: 9px; height: 9px; border-radius: 50%; background: #d9d2c5; }
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-frame.shot-empty { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; color: var(--accent); background: var(--accent-soft); }
.shot-frame.shot-empty svg { width: 56px; height: 56px; opacity: 0.6; }
.feature-cta { padding: clamp(44px, 7vw, 88px); }
.feature-cta h2 { font-size: clamp(30px, 3.8vw, 48px); }
.feature-more { padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: #fffdf8; transition: border-color 0.15s, transform 0.15s; }
.feature-more:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-missing { text-align: center; padding: 60px 0; }
.feature-missing h1 { font-family: var(--font-serif); font-weight: 500; font-size: 36px; margin: 0 0 10px; }
.feature-missing p { color: var(--muted); margin: 0 0 24px; }
@media (max-width: 900px) {
  .feature-row { grid-template-columns: minmax(0, 1fr); }
  .feature-row.flip .feature-shot { order: 0; }
}
