/* ===========================================================
   JustInCase — cream + serif aesthetic
   =========================================================== */
:root {
  --cream:        #F5EFE5;
  --cream-warm:   #F0E9DB;
  --cream-card:   #FAF5EC;
  --ink:          #1E1B17;
  --ink-soft:     #3A3530;
  --ink-muted:    #6F6457;
  --brand:        #3b28cc;
  --brand-dark:   #2a1d9e;
  --brand-soft:   rgba(59,40,204,0.08);
  --accent:       #C7724E;       /* warm terracotta accent for ornament strokes */
  --rule:         #E6DECB;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--cream); color: var(--ink); }

body.cream-body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* Stays at top while children scroll over it for a parallax base */
  background-attachment: fixed;
  background-image:
    radial-gradient(900px 600px at 12% 18%, rgba(199,114,78,0.10), transparent 60%),
    radial-gradient(900px 600px at 92% 78%, rgba(59,40,204,0.10), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 100%);
}

/* =================================================================
   Parallax background layers — full-viewport, fixed, ignore pointer
   events, sit behind page content (z:-1). Each layer holds different
   decorative SVG content; the JS engine translates each at a
   different speed via [data-parallax] (see <script> in index.html).
   ================================================================= */
.bg-layer {
  position: fixed;
  inset: -10vh -5vw;          /* slight bleed so transforms don't expose edges */
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
.bg-layer svg { width: 100%; height: 100%; display: block; }
.bg-layer-1 { /* warm + indigo blobs, slowest drift */ }
.bg-layer-2 { opacity: 0.9; }
.bg-layer-3 { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  /* still show the layers, just don't animate */
  .bg-layer { transform: none !important; }
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 1.6rem; }

/* ---------- Serif headlines ---------- */
.hero-headline,
.section-headline {
  font-family: 'DM Serif Display', 'Times New Roman', serif;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.hero-headline em,
.section-headline em {
  font-style: italic;
  color: var(--brand);
  font-family: 'DM Serif Display', serif;
}
.hero-headline { font-size: clamp(2.6rem, 6vw, 5rem); }
.section-headline { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 0.85rem;
}
.section-lede { font-size: 1.05rem; color: var(--ink-soft); margin: 1rem 0 1.2rem; }

/* ===========================================================
   Floating pill nav
   =========================================================== */
.pill-nav-shell {
  position: sticky; top: 1rem; z-index: 100;
  padding: 0 1.4rem;
  margin-top: 1rem;
}
.pill-nav {
  max-width: 1100px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 0.55rem 0.75rem 0.55rem 1.4rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 6px 24px -10px rgba(30,27,23,0.12);
}
.pn-logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--ink); font-weight: 800;
  font-size: 1.05rem;
}
.pn-logo img {
  width: 32px; height: 32px; border-radius: 8px; object-fit: contain;
  background: transparent;
}
.pn-links {
  flex: 1; display: flex; justify-content: center; gap: 1.6rem;
}
.pn-links a {
  text-decoration: none; color: var(--ink-soft);
  font-size: 0.92rem; font-weight: 500;
  padding: 0.35rem 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color .15s;
}
.pn-links a:hover { color: var(--ink); }
.pn-links a.active { color: var(--brand); border-bottom-color: var(--brand); }
.pn-right { display: flex; align-items: center; gap: 0.55rem; }
.pn-right .user-name {
  font-size: 0.82rem; color: var(--ink-soft); font-weight: 500;
}

/* ===========================================================
   Pill buttons
   =========================================================== */
.btn-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.95rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .15s, background .15s, color .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-pill:hover { transform: translateY(-1px); }
.btn-pill i { font-size: 0.85em; }

.btn-pill-primary {
  background: var(--brand); color: white;
  box-shadow: 0 8px 20px -8px rgba(59,40,204,0.55);
}
.btn-pill-primary:hover { background: var(--brand-dark); color: white; }
.btn-pill-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--ink);
}
.btn-pill-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-pill-light {
  background: var(--cream); color: var(--ink);
}
.btn-pill-light:hover { background: white; color: var(--brand); }
.btn-pill-tiny {
  padding: 0.45rem 0.95rem; font-size: 0.78rem;
}
.btn-pill-danger { background: #DC2626; color: white; }
.btn-pill-danger:hover { background: #B91C1C; color: white; }

/* ===========================================================
   HERO
   =========================================================== */
.hero-cream {
  position: relative;
  padding: 4rem 0 5rem;
  overflow: hidden;
}
.hero-cream-grid {
  display: grid;
  /* Left column shrinks to fit, right column is locked to 420px so the
     3D orb can't be squeezed to nothing by a wide serif headline. */
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 3rem;
  align-items: center;
}
.hero-cream-text {
  position: relative;
  max-width: 560px;
  min-width: 0; /* let the grid column shrink instead of being held wide */
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--brand);
  background: white;
  border: 1px solid var(--rule);
  padding: 0.4rem 0.95rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}
.hero-eyebrow i { color: var(--accent); }

.headline-underline {
  display: block;
  width: 220px; max-width: 60%;
  height: 14px;
  margin-top: -0.4rem;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 1.2rem 0 1.8rem;
  max-width: 480px;
}

.hero-ctas {
  display: flex; gap: 0.7rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-mini-trust {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.88rem; color: var(--ink-soft);
}
.trust-avatars { display: flex; }
.trust-avatars .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--cream-card);
  border: 2px solid var(--cream);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  margin-left: -10px;
}
.trust-avatars .avatar:first-child { margin-left: 0; }

/* hero visual side — column is locked to 420px so width is now real */
.hero-cream-visual {
  position: relative;
  width: 420px;
  height: 440px;          /* explicit, since all children are absolute */
  margin: 0 auto;
}
.hero-orb {
  position: absolute; inset: 5% 5% 5% 5%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(199,114,78,0.12), transparent 60%),
    var(--cream-warm);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.hero-3d-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.hero-3d-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-3d-tag {
  position: absolute; top: 1rem; left: 1rem;
  background: white;
  padding: 0.4rem 0.95rem;
  border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; color: var(--brand);
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--rule);
}
.hero-price-chip {
  position: absolute; bottom: 1rem; right: 1rem;
  background: var(--ink); color: var(--cream);
  padding: 0.7rem 1rem;
  border-radius: 18px;
  display: flex; flex-direction: column;
  line-height: 1;
  box-shadow: 0 10px 24px -8px rgba(30,27,23,0.35);
}
.hp-label { font-size: 0.62rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.hp-amount { font-family: 'DM Serif Display', serif; font-size: 1.6rem; }

/* Decorative ornaments */
.orn { position: absolute; pointer-events: none; }
.orn-leaf-tl   { top: 8%;  left: 2%;  width: 90px;  opacity: 0.55; }
.orn-sparkle-tr{ top: 6%;  right: 2%; width: 70px;  opacity: 0.7; }
.orn-curve-bl  { bottom: 6%; left: 4%; width: 180px; opacity: 0.5; }
.orn-leaf-r    { top: -4%; right: -4%; width: 90px; opacity: 0.45; }

/* ===========================================================
   Trusted strip
   =========================================================== */
.trusted-strip {
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  padding: 1.6rem 0;
  margin: 0 0 1rem;
  background: var(--cream-warm);
}
.trusted-label {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.trusted-label strong { color: var(--ink); }
.trusted-grid {
  display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center;
}
.trust-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.55rem 1.1rem;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-size: 0.86rem; font-weight: 600;
  color: var(--ink-soft);
}
.trust-pill i { color: var(--brand); }

/* ===========================================================
   Who We Are
   =========================================================== */
.who-section { padding: 5rem 0 4rem; }
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: center;
}
.who-illust {
  background: var(--cream-card);
  border-radius: 32px;
  padding: 2rem;
  border: 1px solid var(--rule);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.who-svg { width: 100%; height: auto; max-width: 320px; }
.who-text { max-width: 540px; }
.who-points {
  list-style: none; padding: 0; margin-top: 1.2rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}
.who-points li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.98rem; color: var(--ink-soft);
}
.who-points i { color: var(--brand); font-size: 1.05rem; margin-top: 2px; }
.who-points strong { color: var(--ink); font-weight: 700; }

/* ===========================================================
   Explore (brand grid + dark CTA card)
   =========================================================== */
.explore-section { padding: 4rem 0; }
.explore-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.link-arrow {
  text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 0.92rem;
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
}
.link-arrow:hover { color: var(--brand); border-color: var(--brand); }
.link-arrow i { font-size: 0.78em; }

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.brand-card-cream {
  position: relative;
  text-align: left;
  background: var(--cream-card);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 1.6rem 1.4rem 1.4rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.brand-card-cream:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 14px 30px -14px rgba(30,27,23,0.18);
}
.bcc-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: white;
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.bcc-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.45rem; color: var(--ink); margin-bottom: 4px;
  line-height: 1.1;
}
.bcc-tag { font-size: 0.82rem; color: var(--ink-muted); }
.bcc-go {
  position: absolute; bottom: 1.2rem; right: 1.2rem;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  transition: transform .15s;
}
.brand-card-cream:hover .bcc-go { transform: rotate(-30deg); background: var(--brand); }

.cta-dark-card {
  grid-column: span 1;
  background: linear-gradient(160deg, #1E1B4B 0%, #3b28cc 100%);
  border-radius: 24px;
  padding: 1.8rem 1.6rem;
  color: white;
  display: flex; flex-direction: column; gap: 0.7rem;
  position: relative; overflow: hidden;
}
.cta-dark-card::before {
  content: ''; position: absolute;
  top: -40px; right: -40px; width: 140px; height: 140px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent 65%);
  border-radius: 50%;
}
.cta-dark-eyebrow {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.8);
}
.cta-dark-title {
  font-family: 'DM Serif Display', serif;
  font-weight: 400; font-size: 1.7rem;
  line-height: 1.05; color: white;
}
.cta-dark-sub {
  font-size: 0.92rem; color: rgba(255,255,255,0.85);
  margin-bottom: 0.5rem;
}
.cta-dark-card .btn-pill-light { margin-top: auto; align-self: flex-start; }

/* ===========================================================
   Community designs
   =========================================================== */
.community-section { padding: 3rem 0 5rem; }
.community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.comm-card {
  background: var(--cream-card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 0.85rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform .15s, border-color .15s;
}
.comm-card:hover { transform: translateY(-3px); border-color: var(--ink); }
.comm-thumb {
  aspect-ratio: 350 / 640;
  border-radius: 14px; overflow: hidden;
  background: white;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: 1.6rem;
  margin-bottom: 0.6rem;
}
/* object-fit: contain so the whole saved PNG shows — designs are now
   saved at per-model aspects (350x732 iPhone Pro Max, 350x812 Z Fold5
   etc.). cover was cropping the case outline at the top + bottom. */
.comm-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.comm-name {
  font-size: 0.86rem; color: var(--ink); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.comm-skel {
  background: linear-gradient(90deg, var(--cream-card) 0%, var(--cream-warm) 50%, var(--cream-card) 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 20px;
  aspect-ratio: 350 / 760;
}
@keyframes skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.comm-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 3rem 1rem;
  color: var(--ink-muted);
}
.comm-empty i { font-size: 2rem; color: var(--brand); display: block; margin-bottom: 0.6rem; }
.comm-empty a { color: var(--brand); font-weight: 600; }

/* ===========================================================
   Footer
   =========================================================== */
.cream-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 3.5rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.2fr;
  gap: 2rem;
}
.footer-brand .fb-logo {
  display: flex; align-items: center; gap: 9px;
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.footer-brand .fb-logo img {
  width: 36px; height: 36px; border-radius: 8px; object-fit: contain;
  background: transparent;
}
.footer-brand p { font-size: 0.88rem; opacity: 0.75; }
.footer-col h4 {
  font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(245,239,229,0.6);
  margin-bottom: 0.8rem;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 0.92rem;
  color: var(--cream);
  text-decoration: none;
  margin-bottom: 0.45rem;
  opacity: 0.85;
}
.footer-col a:hover { opacity: 1; color: white; }
.footer-bottom {
  max-width: 1160px; margin: 2.2rem auto 0;
  padding: 1.4rem 1.6rem 0;
  border-top: 1px solid rgba(245,239,229,0.15);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.78rem; opacity: 0.65;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 980px) {
  .pn-links { display: none; }
  .hero-cream-grid,
  .who-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-cream-visual { width: 100%; max-width: 420px; height: auto; aspect-ratio: 1 / 1.05; }
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  .community-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .hero-cream { padding: 2rem 0 3rem; }
  .hero-cream-text { text-align: left; }
  .hero-mini-trust { flex-wrap: wrap; }
  .pill-nav { padding: 0.5rem 0.5rem 0.5rem 1rem; }
  .pn-logo span { display: none; }
  .explore-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .who-illust { padding: 1.2rem; }
}
