/* ===========================================================
   grosirlabel.com — Ceria & Ramah UMKM
   Palet: krem hangat + oranye brand + aksen teal & kuning
   Font: Fredoka (heading bulat ramah) + Plus Jakarta Sans (body)
   =========================================================== */

:root {
  --bg:          #FFF8F1;   /* krem hangat */
  --bg-2:        #FFEFE2;   /* krem sedikit lebih tua */
  --surface:     #FFFFFF;
  --primary:     #F2641E;   /* oranye brand */
  --primary-dark:#D7500D;
  --primary-soft:#FFE3D2;
  --teal:        #0FA89A;   /* aksen teal */
  --teal-soft:   #D6F3EF;
  --yellow:      #FFC23C;   /* aksen kuning */
  --wa:          #25D366;   /* hijau WhatsApp */
  --wa-dark:     #1EB855;
  --ink:         #2A2118;   /* teks gelap hangat */
  --muted:       #7A6F64;   /* teks abu hangat */
  --line:        #F0E2D4;
  --radius:      22px;
  --radius-sm:   14px;
  --shadow:      0 14px 34px rgba(73, 45, 18, .10);
  --shadow-sm:   0 6px 16px rgba(73, 45, 18, .08);
  --maxw:        1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;   /* cegah iOS perbesar teks otomatis */
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;               /* tidak ada scroll samping di HP */
  width: 100%;
  max-width: 100%;
  /* hormati area aman iOS (notch) tapi tetap full-width di portrait */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* semua media & elemen tidak boleh melebihi lebar layar */
img, canvas, svg, video { max-width: 100%; }

h1, h2, h3, .brand-text { font-family: 'Fredoka', sans-serif; line-height: 1.15; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head .kicker {
  display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary);
  background: var(--primary-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: .98rem;
  padding: 13px 24px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(242,100,30,.32); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 20px rgba(37,211,102,.32); }
.btn-wa:hover { background: var(--wa-dark); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,248,241,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand-text { font-size: 1.25rem; font-weight: 600; }
.brand-text span { color: var(--primary); }
.brand-text small { display: block; font-family: 'Plus Jakarta Sans'; font-size: .6rem;
  letter-spacing: .14em; color: var(--muted); font-weight: 600; text-transform: uppercase; margin-top: -3px; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-weight: 600; font-size: .96rem; color: var(--ink); transition: color .15s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content:""; position: absolute; inset: 0;
  background: radial-gradient(900px 500px at 85% -10%, var(--primary-soft), transparent 60%),
              radial-gradient(700px 500px at 0% 110%, var(--teal-soft), transparent 55%);
  z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 50px; align-items: center; padding: 70px 0 80px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line); padding: 7px 15px; border-radius: 999px; font-weight: 600;
  font-size: .85rem; box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.hero-badge b { color: var(--primary); }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 600; letter-spacing: -.01em; }
.hero h1 .hl { color: var(--primary); position: relative; }
.hero h1 .hl-2 { color: var(--teal); }
.hero p.lead { font-size: 1.12rem; color: var(--muted); margin: 20px 0 30px; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 36px; }
.hero-stats .stat b { font-family: 'Fredoka'; font-size: 1.7rem; font-weight: 600; color: var(--ink); display: block; }
.hero-stats .stat span { font-size: .85rem; color: var(--muted); font-weight: 600; }

.hero-visual { position: relative; }
.hero-visual .main-img { border-radius: var(--radius); box-shadow: var(--shadow);
  aspect-ratio: 4/5; object-fit: cover; width: 100%; transform: rotate(1.5deg);
  transition: opacity .6s ease; }
/* Kanvas 3D menimpa foto; foto = fallback */
#hero3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
  opacity: 0; transition: opacity .8s ease; cursor: grab; }
#hero3d:active { cursor: grabbing; }
.hero-visual.has3d #hero3d { opacity: 1; }
.hero-visual.has3d .main-img { opacity: 0 !important; animation: none !important; pointer-events: none; }
.hero-float { position: absolute; z-index: 3; background: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.hero-float .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.2rem; }
.hero-float.f1 { top: 24px; left: -18px; }
.hero-float.f1 .ico { background: var(--teal-soft); }
.hero-float.f2 { bottom: 28px; right: -14px; }
.hero-float.f2 .ico { background: var(--primary-soft); }
.hero-float small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); }

/* ---------- Trust strip ---------- */
.trust { background: var(--ink); color: #fff; }
.trust .wrap { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 18px; padding: 22px 20px; }
.trust .item { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; }
.trust .item .ico { font-size: 1.3rem; }
.trust .item span.t { color: rgba(255,255,255,.65); font-weight: 500; }

/* ---------- Category chips ---------- */
.cats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.chip { border: 2px solid var(--line); background: #fff; color: var(--ink); font-weight: 700;
  padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: .18s; font-size: .95rem; }
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 26px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-img { position: relative; aspect-ratio: 1/1; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.06); }
.card-tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.94);
  color: var(--primary); font-weight: 700; font-size: .72rem; padding: 5px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em; }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.18rem; font-weight: 600; }
.card-body p { color: var(--muted); font-size: .9rem; margin: 7px 0 14px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.badge { font-size: .76rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.badge-moq { background: var(--teal-soft); color: var(--teal); }
.badge-price { background: var(--bg-2); color: var(--primary-dark); }

/* ---------- Range / kategori showcase ---------- */
.range-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.range-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 230px;
  display: flex; align-items: flex-end; box-shadow: var(--shadow-sm); color: #fff; }
.range-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.range-card::after { content:""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(20,12,5,.85), rgba(20,12,5,.05)); }
.range-card .rc-body { position: relative; z-index: 2; padding: 22px; }
.range-card .rc-body h3 { font-size: 1.5rem; font-weight: 600; }
.range-card .rc-body p { font-size: .9rem; opacity: .85; margin-top: 4px; }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.why-card { background: #fff; border-radius: var(--radius); padding: 28px 24px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); }
.why-card .ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.7rem; margin-bottom: 16px; }
.why-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 7px; }
.why-card p { color: var(--muted); font-size: .94rem; }

/* ---------- How to order ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { text-align: center; position: relative; }
.step .num { counter-increment: step; width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%; background: #fff; border: 2px dashed var(--primary); color: var(--primary);
  font-family: 'Fredoka'; font-size: 1.6rem; font-weight: 600; display: grid; place-items: center; }
.step .num::before { content: counter(step); }
.step h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 5px; }
.step p { color: var(--muted); font-size: .9rem; }

/* ---------- CTA banner ---------- */
.cta-banner { background: linear-gradient(120deg, var(--primary), #ff8a4c); color: #fff;
  border-radius: 30px; padding: 56px 40px; text-align: center; box-shadow: var(--shadow); }
.cta-banner h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 600; }
.cta-banner p { font-size: 1.08rem; opacity: .95; margin: 12px auto 26px; max-width: 540px; }
.cta-banner .btn-wa { background: #fff; color: var(--wa-dark); }
.cta-banner .btn-wa:hover { background: #f4fff8; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; margin-bottom: 40px; }
.footer .brand-text { color: #fff; }
.footer h4 { color: #fff; font-family: 'Fredoka'; font-weight: 600; font-size: 1.05rem; margin-bottom: 16px; }
.footer a { display: block; color: rgba(255,255,255,.72); margin-bottom: 9px; font-size: .94rem; transition: color .15s; }
.footer a:hover { color: var(--yellow); }
.footer p.desc { font-size: .92rem; margin: 14px 0; max-width: 280px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.08);
  display: grid; place-items: center; margin: 0; font-size: 1.1rem; }
.socials a:hover { background: var(--primary); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; text-align: center;
  font-size: .86rem; }

/* ---------- Floating WA button ---------- */
.wa-fab { position: fixed; bottom: 22px; right: 22px; z-index: 60; background: var(--wa); color: #fff;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem;
  box-shadow: 0 10px 26px rgba(37,211,102,.45); transition: transform .2s; }
.wa-fab:hover { transform: scale(1.08); }

/* ---------- Page hero (shop) ---------- */
.page-hero { background: var(--bg-2); text-align: center; padding: 56px 0; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; }
.page-hero p { color: var(--muted); margin-top: 10px; font-size: 1.05rem; }
.page-hero .crumb { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.page-hero .crumb a { color: var(--primary); font-weight: 600; }

/* ===========================================================
   ANIMASI — scroll reveal, 3D tilt, parallax, float, blobs
   Prinsip: ringan, 60fps, hormati prefers-reduced-motion
   =========================================================== */

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(34px); will-change: opacity, transform;
  transition: opacity .75s cubic-bezier(.18,.7,.2,1), transform .75s cubic-bezier(.18,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.r-left  { transform: translateX(-40px); }
.reveal.r-right { transform: translateX(40px); }
.reveal.r-zoom  { transform: scale(.92); }
.reveal.r-left.in, .reveal.r-right.in, .reveal.r-zoom.in { transform: none; }

/* Hero load-in */
@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero-copy > * { opacity: 0; animation: heroUp .8s cubic-bezier(.18,.7,.2,1) forwards; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .15s; }
.hero-copy > *:nth-child(3) { animation-delay: .25s; }
.hero-copy > *:nth-child(4) { animation-delay: .35s; }
.hero-copy > *:nth-child(5) { animation-delay: .45s; }
/* entrance foto hero: geser+scale saja (tanpa opacity) → foto SELALU terlihat */
@keyframes heroVisIn { from { transform: rotate(1.5deg) translateY(40px) scale(.96); }
  to { transform: rotate(1.5deg) translateY(0) scale(1); } }
.hero-visual .main-img { animation: heroVisIn 1s cubic-bezier(.18,.7,.2,1) both .3s; }

/* Floating badges gentle motion */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-float { animation: floaty 4.5s ease-in-out infinite; }
.hero-float.f2 { animation-delay: -2.2s; }

/* Animated gradient blobs behind hero */
.hero::before { animation: blobShift 16s ease-in-out infinite alternate; }
@keyframes blobShift {
  0%   { background-position: 0% 0%, 0% 100%; }
  100% { background-position: 12% 8%, -8% 92%; }
}

/* 3D tilt — perspective container set via JS adds .tilt */
.tilt { transform-style: preserve-3d; transition: transform .18s ease; }
.hero-visual { perspective: 1100px; }
.grid { perspective: 1400px; }
.card { transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease; }

/* Marquee strip (logo/keunggulan berjalan) */
.marquee { overflow: hidden; background: var(--ink); color: rgba(255,255,255,.9); padding: 14px 0; }
.marquee-track { display: flex; gap: 50px; width: max-content; animation: marquee 22s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: 'Fredoka'; font-weight: 500; font-size: 1.05rem; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 12px; }
.marquee-track span::before { content: "✦"; color: var(--yellow); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Button shine */
.btn-primary, .btn-wa { position: relative; overflow: hidden; }
.btn-primary::after, .btn-wa::after { content:""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); }
.btn-primary:hover::after, .btn-wa:hover::after { animation: shine .8s ease; }
@keyframes shine { to { left: 130%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-copy > *, .hero-visual .main-img { opacity: 1 !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { max-width: 420px; margin: 0 auto; }
  .range-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; inset: 72px 0 auto 0; background: var(--bg); flex-direction: column;
    align-items: stretch; gap: 0; padding: 10px 20px 20px; border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform .3s ease; box-shadow: var(--shadow); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .burger { display: block; }
  .nav-cta .btn-ghost { display: none; }
  .section { padding: 48px 0; }
  .range-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }

  /* full-width: padding ramping + kartu lega */
  .wrap { padding: 0 16px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .hero-grid { padding: 40px 0 50px; }
  .cta-banner { padding: 38px 22px; border-radius: 22px; }
  .trust .wrap { gap: 14px; padding: 20px 16px; }
  .trust .item { font-size: .88rem; }
}

/* HP kecil (≤400px) — makin ramping biar konten makin lebar */
@media (max-width: 400px) {
  .wrap { padding: 0 14px; }
  .section-head h2 { font-size: 1.6rem; }
  .hero h1 { font-size: 2rem; }
  .hero-stats .stat b { font-size: 1.4rem; }
  .btn { padding: 12px 18px; font-size: .92rem; }
}
