/* ═══════════════════════════════════════════
   QtCoCo — Design System
   Palette: Cream · Rust · Deep Teal · Gold
═══════════════════════════════════════════ */

:root {
  --cream:      #F5F0E8;
  --cream-dark: #EBE4D6;
  --rust:       #C45C26;
  --rust-dark:  #A34B1E;
  --teal:       #1B4D4A;
  --teal-light: #2A6B67;
  --gold:       #D4A843;
  --gold-light: #E8C060;
  --brown:      #3A2010;
  --text:       #2C1A0E;
  --text-muted: #7A6050;
  --white:      #FFFFFF;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lato', system-ui, sans-serif;

  --shadow-sm: 0 2px 8px rgba(58,32,16,.10);
  --shadow-md: 0 6px 24px rgba(58,32,16,.14);
  --shadow-lg: 0 16px 48px rgba(58,32,16,.18);

  --radius:    8px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

[x-cloak] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ──────────────────────────────── */
.qtc-nav {
  background: var(--teal);
  padding: .9rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.qtc-nav .navbar-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
}

.brand-icon {
  display: flex;
  align-items: center;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
  transition: transform .2s ease;
}
.navbar-brand:hover .brand-icon { transform: rotate(15deg); }

.brand-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: .02em;
}

.qtc-nav .nav-link {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(245,240,232,.75) !important;
  padding: .4rem .9rem !important;
  transition: color .15s;
}
.qtc-nav .nav-link:hover,
.qtc-nav .nav-link.active { color: var(--gold) !important; }

.nav-add { color: var(--gold) !important; }
.nav-add:hover { color: var(--gold-light) !important; }

.btn-nav-signup {
  background: var(--rust);
  color: var(--cream) !important;
  border: none;
  border-radius: 4px;
  padding: .4rem 1.1rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn-nav-signup:hover {
  background: var(--rust-dark);
  transform: translateY(-1px);
  color: var(--cream) !important;
}

.qtc-nav .dropdown-menu {
  background: var(--teal);
  border: 1px solid rgba(212,168,67,.25);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  min-width: 180px;
}
.qtc-nav .dropdown-item {
  color: rgba(245,240,232,.85);
  font-size: .88rem;
  padding: .55rem 1.1rem;
  transition: background .12s;
}
.qtc-nav .dropdown-item:hover {
  background: rgba(212,168,67,.12);
  color: var(--gold);
}
.qtc-nav .dropdown-divider { border-color: rgba(245,240,232,.15); }
.qtc-nav .navbar-toggler { border-color: rgba(245,240,232,.3); padding: .3rem .6rem; }
.qtc-nav .navbar-toggler-icon { filter: invert(1); }

/* ── HERO ─────────────────────────────────── */
.hero {
  background: var(--cream);
  padding: 5rem 0 4rem;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(27,77,74,.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(196,92,38,.05) 0%, transparent 60%);
  pointer-events: none;
}

.min-vh-80 { min-height: 80vh; }

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--teal);
  margin-bottom: 1.6rem;
}
.hero-title em {
  font-style: italic;
  color: var(--rust);
}

.hero-body {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 42ch;
  margin-bottom: 2.4rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-hero-primary {
  background: var(--rust);
  color: var(--cream);
  border: none;
  border-radius: 4px;
  padding: .85rem 2rem;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s, transform .12s, box-shadow .15s;
  display: inline-block;
  box-shadow: var(--shadow-sm);
}
.btn-hero-primary:hover {
  background: var(--rust-dark);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-hero-secondary {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
  border-radius: 4px;
  padding: .85rem 2rem;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s, color .15s, transform .12s;
  display: inline-block;
}
.btn-hero-secondary:hover {
  background: var(--teal);
  color: var(--cream);
  transform: translateY(-2px);
}

/* SVG Quilt Art */
.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 2rem 1rem;
}

.quilt-svg {
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: var(--radius);
  filter: drop-shadow(0 12px 32px rgba(58,32,16,.22));
  animation: quiltFloat 6s ease-in-out infinite;
}

@keyframes quiltFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-8px) rotate(.4deg); }
}

.quilt-label {
  margin-top: 1rem;
  background: var(--teal);
  color: var(--cream);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 20px;
  opacity: .8;
}

/* Entrance animations */
[data-animate="fadeUp"] {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp .75s ease forwards .1s;
}
[data-animate="fadeIn"] {
  opacity: 0;
  animation: fadeIn .9s ease forwards .3s;
}
@keyframes fadeUp { to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { to { opacity:1; } }

/* ── STATS BAR ────────────────────────────── */
.stats-bar {
  background: var(--teal);
  padding: 2.2rem 0;
}
.stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 3rem;
  text-align: center;
}
.stats-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stats-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(245,240,232,.65);
  margin-top: .3rem;
}
.stats-divider {
  width: 1px;
  background: rgba(245,240,232,.2);
  align-self: stretch;
  margin: .5rem 0;
}

/* ── FEATURED SECTION ─────────────────────── */
.featured-section {
  padding: 5rem 0;
  background: var(--cream);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--cream-dark);
  padding-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0;
}
.section-link {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none;
  transition: color .15s;
}
.section-link:hover { color: var(--rust-dark); }

/* Quilt Cards */
.quilt-card {
  display: block;
  text-decoration: none;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  height: 100%;
  border: 1px solid var(--cream-dark);
}
.quilt-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.quilt-card-img {
  height: 220px;
  overflow: hidden;
  background: var(--cream-dark);
  position: relative;
}
.quilt-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.quilt-card:hover .quilt-card-img img { transform: scale(1.04); }

.quilt-card-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--cream) 0px,
    var(--cream) 10px,
    var(--cream-dark) 10px,
    var(--cream-dark) 20px
  );
}

.quilt-card-body { padding: 1.2rem 1.4rem 1.4rem; }
.quilt-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 .5rem;
  line-height: 1.3;
}
.quilt-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}
.quilt-card-maker { font-size: .8rem; font-weight: 700; color: var(--rust); letter-spacing: .04em; }
.quilt-card-date  { font-size: .78rem; color: var(--text-muted); }
.quilt-card-pattern { font-size: .82rem; color: var(--text-muted); margin: 0; }
.quilt-card-pattern .bi { color: var(--teal); margin-right: .2rem; }

/* Empty gallery */
.empty-gallery { text-align: center; padding: 4rem 1rem; }
.empty-gallery-icon { margin-bottom: 1.2rem; opacity: .5; }
.empty-gallery-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── CTA BAND ─────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--rust) 0%, var(--rust-dark) 100%);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 1rem;
  position: relative;
}
.cta-body { font-size: 1.05rem; color: rgba(245,240,232,.8); margin-bottom: 2rem; position: relative; }
.btn-cta {
  background: var(--cream);
  color: var(--rust);
  border: none;
  border-radius: 4px;
  padding: 1rem 2.4rem;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s, transform .12s, box-shadow .15s;
  display: inline-block;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.btn-cta:hover {
  background: var(--white);
  color: var(--rust-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* ── FOOTER ───────────────────────────────── */
.qtc-footer {
  background: var(--brown);
  padding: 2.5rem 0;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}
.footer-tagline { font-size: .8rem; font-style: italic; color: rgba(245,240,232,.5); margin: .2rem 0 0; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; }
.footer-links a {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(245,240,232,.6);
  text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: .78rem; color: rgba(245,240,232,.4); margin: 0; }

/* ── INNER PAGE CHROME ────────────────────── */
.quilt-thumb { height: 220px; object-fit: cover; }
.quilt-thumb-placeholder { height: 220px; display: block; }
.quilt-detail-img { max-height: 500px; object-fit: contain; background: var(--cream-dark); }

/* ── GRAIN TEXTURE ────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
}

/* ── QUILT FRAME ──────────────────────────── */
.quilt-frame {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 480px;
  padding: 14px;
  background: var(--cream);
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.quilt-frame::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1.5px dashed rgba(58, 32, 16, 0.28);
  border-radius: 3px;
  pointer-events: none;
}
.quilt-frame .quilt-svg {
  filter: none;
  box-shadow: none;
  max-width: 100%;
}

/* ── FEATURED CARDS: STAGGERED ENTRANCE ───── */
.featured-section .col:nth-child(1)[data-animate] { animation-delay: 0.05s; }
.featured-section .col:nth-child(2)[data-animate] { animation-delay: 0.15s; }
.featured-section .col:nth-child(3)[data-animate] { animation-delay: 0.25s; }
.featured-section .col:nth-child(4)[data-animate] { animation-delay: 0.35s; }
.featured-section .col:nth-child(5)[data-animate] { animation-delay: 0.45s; }
.featured-section .col:nth-child(6)[data-animate] { animation-delay: 0.55s; }

/* ── REDUCED MOTION ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-animate="fadeUp"],
  [data-animate="fadeIn"] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .quilt-svg { animation: none !important; }
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 991px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-art { padding: 2rem 0 0; }
  .stats-item { padding: 0 1.5rem; }
  .min-vh-80 { min-height: auto; }
}

@media (max-width: 575px) {
  .stats-bar .row { flex-direction: column; align-items: center; }
  .stats-divider { width: 60px; height: 1px; margin: .5rem 0; }
  .stats-item { padding: .8rem 0; }
  .section-header { flex-direction: column; gap: .5rem; }
}
