/* Sam's Custom Framing — Redesign Demo */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --ink-body: #3A3A3A;
  --muted: #707070;
  --red: #B91C1C;
  --red-dark: #8B1818;
  --green: #166534;
  --green-dark: #0E4A24;
  --soft: #FFF5F0;
  --hair: #E5E5E5;
  --hair-strong: #D6D6D2;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.6;
}

.display { font-family: 'Manrope', 'Inter', sans-serif; color: var(--ink); letter-spacing: -0.02em; line-height: 1.05; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-red { background: transparent; color: var(--red); border-color: var(--red); }
.btn-ghost-red:hover { background: var(--red); color: #fff; }
.btn-link { background: transparent; color: var(--ink); padding: 0; border-radius: 0; }
.btn-link:hover { color: var(--red); }
.btn-lg { padding: 16px 26px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.hairline { border: 0; border-top: 1px solid var(--hair); margin: 0; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Image placeholder (striped) ---- */
.imgph {
  position: relative;
  width: 100%;
  background: repeating-linear-gradient(
    45deg,
    #EEEAE3,
    #EEEAE3 8px,
    #F4F0EA 8px,
    #F4F0EA 16px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  overflow: hidden;
  border-radius: 4px;
}
.imgph span {
  background: rgba(255,255,255,0.85);
  padding: 6px 10px;
  border-radius: 3px;
  border: 1px solid var(--hair);
  text-align: center;
  max-width: 80%;
}

/* ---- Tag pills ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--red);
  border: 1px solid #F5D6CC;
  text-transform: uppercase;
}
.pill-green { background: #ECFDF3; color: var(--green); border-color: #C8E9D3; }
.pill-ink { background: #1A1A1A; color: #fff; border-color: #1A1A1A; }
.pill-soft { background: #F1F0EC; color: var(--ink-body); border-color: var(--hair); }

/* ---- Form inputs ---- */
.input, .select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--hair-strong);
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.06);
}
.input-lg {
  font-size: 22px;
  font-weight: 600;
  padding: 18px 16px;
  font-family: 'Manrope', sans-serif;
  letter-spacing: -0.01em;
}
.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.helper { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---- Cards ---- */
.card {
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 10px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -18px rgba(0,0,0,0.18);
  border-color: var(--hair-strong);
}

/* ---- Scroll-driven fade-up (light, no JS) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: revealUp .5s ease forwards;
  }
  @keyframes revealUp { to { opacity: 1; transform: none; } }
}

/* ---- Step pip indicator ---- */
.steppip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.steppip .pip {
  width: 26px; height: 26px;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--muted); background: #fff;
  font-size: 12px;
}
.steppip .pip.done { background: var(--green); border-color: var(--green); color: #fff; }
.steppip .pip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.steppip .seg { width: 28px; height: 1px; background: var(--hair-strong); }
.steppip .seg.done { background: var(--green); }

/* ---- Utility ---- */
.divider-dot::before {
  content: '·';
  margin: 0 8px;
  color: var(--muted);
}

/* Smooth transition between routes */
.page-fade {
  animation: pageFade .25s ease;
}
@keyframes pageFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox img, .lightbox .imgph {
  max-width: min(1100px, 90vw);
  max-height: 85vh;
  width: auto;
}

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.4);
}
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(360px, 85vw);
  background: #fff;
  padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
}

/* Hover for image cards */
.media-card { overflow: hidden; border-radius: 10px; position: relative; }
.media-card img, .media-card .imgph { transition: transform .4s ease; }
.media-card:hover img, .media-card:hover .imgph { transform: scale(1.03); }

/* TV before/after slider */
.tv-compare { position: relative; overflow: hidden; border-radius: 8px; }
.tv-compare > img, .tv-compare > .imgph { display: block; width: 100%; height: 100%; object-fit: cover; }
.tv-compare .overlay { position: absolute; inset: 0; }

.kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: #F1F0EC;
  border: 1px solid var(--hair);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
}

/* ── Mobile top bar fix ── */
@media (max-width: 768px) {
  html, body { overflow-x: hidden !important; }
  [class*="topbar"], [class*="top-bar"], .topbar, .announcement, .utility-bar {
    flex-wrap: wrap !important;
    font-size: 10px !important;
    padding: 6px 12px !important;
    gap: 8px !important;
  }
  [class*="topbar"] > *, .topbar > * {
    font-size: 10px !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap !important;
  }
}
