/* ==========================================================================
   Foundryline — demo template styles
   Shared by the five example templates in site/templates/.
   Each demo also has its own small <style> block for its personality.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #14140f;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* --- shared chrome ------------------------------------------------------- */

.demo-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--t-line, #e8e4dc);
}
.demo-nav .logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}
.demo-nav a.link {
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.72;
  transition: opacity 0.15s ease;
}
.demo-nav a.link:hover { opacity: 1; }
.demo-nav .cta {
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--t-ink, #14140f);
  color: #fff;
  transition: transform 0.15s ease, background 0.15s ease;
}
.demo-nav .cta:hover { transform: translateY(-1px); background: var(--t-accent, #a35b2a); }

.demo-wrap { max-width: 1040px; margin: 0 auto; padding: 0 26px; }
.demo-hero { padding: 76px 0 60px; }
.demo-hero h1 {
  font-size: clamp(2rem, 5.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  font-weight: 700;
}
.demo-hero p {
  font-size: 1.1rem;
  max-width: 56ch;
  opacity: 0.76;
  margin: 0 0 26px;
}
.demo-btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 10px;
  background: var(--t-ink, #14140f);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.demo-btn:hover { transform: translateY(-2px); background: var(--t-accent, #a35b2a); }
.demo-btn.alt {
  background: transparent;
  color: var(--t-ink, #14140f);
  border: 1.5px solid var(--t-ink, #14140f);
}
.demo-btn.alt:hover { background: var(--t-ink, #14140f); color: #fff; }

.demo-section { padding: 56px 0; }
.demo-section h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  font-weight: 700;
}
.demo-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 10px;
  font-weight: 500;
}

.demo-grid { display: grid; gap: 20px; }
.demo-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.demo-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 800px) {
  .demo-grid.three, .demo-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .demo-grid.two, .demo-grid.three, .demo-grid.four { grid-template-columns: 1fr; }
}

.demo-card {
  border: 1px solid var(--t-line, #e8e4dc);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.demo-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(20, 20, 15, 0.4); }

.demo-foot {
  padding: 40px 0 34px;
  border-top: 1px solid var(--t-line, #e8e4dc);
  margin-top: 40px;
  font-size: 0.86rem;
  opacity: 0.6;
}
.demo-foot .row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

/* --- a "photo" placeholder that looks intentional, not broken ------------ */

.ph {
  background: var(--t-ph, linear-gradient(135deg, #e9e2d6, #d6cdbd));
  position: relative;
  display: grid;
  place-items: center;
  color: rgba(20, 20, 15, 0.34);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  overflow: hidden;
}
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.42) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo-card:hover .ph::after { transform: translateX(100%); }
.ph.tall { aspect-ratio: 4 / 5; }
.ph.wide { aspect-ratio: 16 / 10; }
.ph.square { aspect-ratio: 1 / 1; }
.ph.hero { aspect-ratio: 16 / 9; }

.demo-price { font-weight: 700; letter-spacing: -0.02em; }
.demo-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--t-soft, #f1ece4);
  font-weight: 500;
}

/* --- a badge telling the viewer this is a Foundryline demo --------------- */

.demo-badge {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  background: #14140f;
  color: #f5f0e8;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.6);
  opacity: 0.9;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.demo-badge:hover { opacity: 1; transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
