/* =====================================================================
   SoleFlow — Laundry Shoe Tracking System (FSA)
   style.css — Stylesheet utama
   Struktur file:
     1. Root variables & reset
     2. Typography
     3. Navbar
     4. Hero
     5. Buttons
     6. Sections (umum)
     7. Statistik cards
     8. Tentang (about) cards
     9. Diagram FSA
     10. Dashboard (form, order card, progress, timeline, history)
     11. Footer & Toast
     12. Scroll-reveal animation
     13. Responsive
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. ROOT VARIABLES & RESET
--------------------------------------------------------------------- */
:root{
  --primary:      #2563EB;
  --primary-dark: #1D4ED8;
  --success:      #22C55E;
  --bg:           #F8FAFC;
  --dark:         #0F172A;
  --slate-500:    #64748B;
  --slate-300:    #CBD5E1;
  --slate-100:    #E2E8F0;
  --white:        #FFFFFF;

  --font-display: 'Poppins', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-lift: 0 20px 45px rgba(15, 23, 42, 0.12);

  --transition-base: all .3s cubic-bezier(.4,0,.2,1);
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono{ font-family: var(--font-mono); }

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

/* ---------------------------------------------------------------------
   2. TYPOGRAPHY
--------------------------------------------------------------------- */
.section-eyebrow{
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(37,99,235,.08);
  padding: 6px 14px;
  border-radius: 999px;
}

.section-title{
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: .6rem 0 1rem;
  letter-spacing: -.02em;
}

.section-text{
  color: var(--slate-500);
  font-size: 1.03rem;
  line-height: 1.75;
}

.text-gradient{
  background: linear-gradient(135deg, var(--primary), var(--success));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------------
   3. NAVBAR
--------------------------------------------------------------------- */
.glass-nav{
  background: rgba(248, 250, 252, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  padding: .9rem 0;
  transition: var(--transition-base);
}

.brand-logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dark) !important;
  text-decoration: none;
}

.brand-mark{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: #fff;
  font-size: 1rem;
}

.navbar-nav .nav-link{
  font-weight: 500;
  color: var(--dark);
  opacity: .75;
  padding: .5rem .9rem !important;
  transition: var(--transition-base);
}
.navbar-nav .nav-link:hover{ opacity: 1; color: var(--primary); }

/* ---------------------------------------------------------------------
   4. HERO
--------------------------------------------------------------------- */
.hero-section{
  position: relative;
  padding: 160px 0 110px;
  overflow: hidden;
}

.hero-glow{
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  z-index: 0;
  pointer-events: none;
}
.hero-glow-1{
  width: 420px; height: 420px;
  background: var(--primary);
  top: -120px; right: -100px;
}
.hero-glow-2{
  width: 320px; height: 320px;
  background: var(--success);
  bottom: -100px; left: -80px;
  opacity: .25;
}

.hero-section .container{ position: relative; z-index: 1; }

.eyebrow-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--white);
  border: 1px solid var(--slate-100);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.hero-title{
  font-size: clamp(3rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  margin: 0;
}

.hero-subtitle{
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  color: var(--slate-500);
  margin-top: .6rem;
}

.hero-desc{
  color: var(--slate-500);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 540px;
  margin-top: 1.2rem;
}

.hero-meta{
  display: flex;
  align-items: center;
  gap: 22px;
}
.hero-meta-item{ display: flex; flex-direction: column; }
.hero-meta-item strong{ font-size: 1.4rem; font-weight: 700; line-height: 1; }
.hero-meta-item span{ font-size: .8rem; color: var(--slate-500); margin-top: 4px; }
.hero-meta-divider{ width: 1px; height: 34px; background: var(--slate-300); }

.hero-art-wrap{ position: relative; max-width: 520px; margin: 0 auto; }
.hero-shoe-svg{ width: 100%; height: auto; display: block; filter: drop-shadow(0 25px 35px rgba(37,99,235,.12)); }

.shoe-outline{ animation: dashFlow 6s linear infinite; }
.shoe-lace{ stroke: var(--dark); stroke-width: 2.5; stroke-linecap: round; opacity: .55; }

.flow-path{ animation: dashFlow 3.5s linear infinite; }
.flow-node{ fill: var(--primary); animation: nodePulse 2.4s ease-in-out infinite; }
.flow-node-final{ fill: var(--success); }

@keyframes dashFlow{ to{ stroke-dashoffset: -200; } }
@keyframes nodePulse{
  0%, 100%{ opacity: .55; r: 6; }
  50%{ opacity: 1; r: 9; }
}

.hero-art-badge{
  position: absolute;
  left: -8px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  animation: floatY 4s ease-in-out infinite;
}
.hero-art-badge i{ color: var(--success); font-size: 1.4rem; }
.hero-art-badge strong{ display: block; font-size: .82rem; }
.hero-art-badge span{ font-size: .78rem; color: var(--slate-500); }

@keyframes floatY{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-10px); }
}

.scroll-cue{
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--slate-500);
  font-size: 1.3rem;
  animation: floatY 2.2s ease-in-out infinite;
  z-index: 1;
}

/* ---------------------------------------------------------------------
   5. BUTTONS
--------------------------------------------------------------------- */
.btn-primary-glow{
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(37,99,235,.28);
  transition: var(--transition-base);
}
.btn-primary-glow:hover, .btn-primary-glow:focus{
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(37,99,235,.36);
  color: #fff;
}

.btn-outline-soft{
  background: var(--white);
  border: 1px solid var(--slate-300);
  color: var(--dark);
  font-weight: 600;
  transition: var(--transition-base);
}
.btn-outline-soft:hover{
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible{
  outline: 3px solid rgba(37,99,235,.4);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   6. SECTIONS (umum)
--------------------------------------------------------------------- */
.section-py{ padding: 100px 0; }
.section-alt{ background: var(--white); }
.section-divider{ border-color: var(--slate-100); margin: 1.6rem 0; }

/* ---------------------------------------------------------------------
   7. STATISTIK CARDS
--------------------------------------------------------------------- */
.stat-card{
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  height: 100%;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-base);
}
.stat-card:hover{
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
}

.stat-icon{
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.bg-primary-tint{ background: rgba(37,99,235,.1); color: var(--primary); }
.bg-success-tint{ background: rgba(34,197,94,.12); color: var(--success); }
.bg-dark-tint{ background: rgba(15,23,42,.08); color: var(--dark); }

.stat-number{ font-size: 2.4rem; font-weight: 800; margin: 0; }
.stat-label{ font-weight: 600; margin: 6px 0 8px; }
.stat-desc{ color: var(--slate-500); font-size: .92rem; margin: 0; line-height: 1.6; }

/* ---------------------------------------------------------------------
   8. TENTANG (ABOUT)
--------------------------------------------------------------------- */
.fsa-tuple-card{
  background: var(--dark);
  color: #E2E8F0;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.fsa-tuple-head{
  font-family: var(--font-mono);
  font-size: .82rem;
  color: #93C5FD;
  margin-bottom: 14px;
  letter-spacing: .02em;
}
.fsa-tuple-list{
  list-style: none;
  padding: 0; margin: 0;
  font-family: var(--font-mono);
  font-size: .86rem;
  line-height: 2;
}
.fsa-tuple-list span{ color: var(--success); font-weight: 600; margin-right: 8px; }
.fsa-tuple-list em{ color: #94A3B8; font-style: normal; }

.about-card{
  background: var(--bg);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 100%;
  transition: var(--transition-base);
}
.about-card:hover{
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transform: translateY(-4px);
}
.about-icon{
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(37,99,235,.1);
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.about-card h5{ font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.about-card p{ color: var(--slate-500); font-size: .92rem; line-height: 1.7; margin: 0; }

/* ---------------------------------------------------------------------
   9. DIAGRAM FSA
--------------------------------------------------------------------- */
.diagram-panel{
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.diagram-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  font-size: .85rem;
  color: var(--slate-500);
}
.diagram-legend span{ display: flex; align-items: center; gap: 8px; }

.legend-dot{
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot-idle{ background: var(--white); border: 2px solid var(--slate-300); }
.legend-dot-done{ background: rgba(37,99,235,.18); border: 2px solid var(--primary); }
.legend-dot-active{ background: var(--primary); border: 2px solid var(--primary); }
.legend-dot-final{ background: var(--white); border: 2px solid var(--success); }

.diagram-scroll{ overflow-x: auto; }
.fsa-diagram-svg{ width: 100%; min-width: 720px; height: auto; }

.fsa-edge{ stroke: #CBD5E1; stroke-width: 2; transition: var(--transition-base); }
.fsa-edge.edge-active{ stroke: var(--primary); stroke-width: 2.6; }

.fsa-node circle{
  fill: var(--white);
  stroke: var(--slate-300);
  stroke-width: 2.5;
  transition: var(--transition-base);
}
.fsa-node .fsa-outer-ring{
  fill: none;
  stroke: var(--slate-300);
  stroke-width: 2;
}
.fsa-node-code{
  text-anchor: middle;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  fill: var(--dark);
}
.fsa-node-label{
  text-anchor: middle;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11.5px;
  fill: var(--slate-500);
}

/* State: telah dilalui */
.fsa-node.state-done circle{ fill: rgba(37,99,235,.08); stroke: var(--primary); }

/* State: sedang aktif */
.fsa-node.state-active circle{
  fill: var(--primary);
  stroke: var(--primary-dark);
  filter: drop-shadow(0 0 10px rgba(37,99,235,.55));
}
.fsa-node.state-active .fsa-node-code,
.fsa-node.state-active .fsa-node-label{ fill: #fff; }
.fsa-node.state-active circle{ animation: nodeActivePulse 1.8s ease-in-out infinite; }

@keyframes nodeActivePulse{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.045); }
}

/* Final state default style */
.fsa-node-final .fsa-outer-ring{ stroke: var(--success); }
.fsa-node-final circle:not(.fsa-outer-ring){ stroke: var(--success); }

/* Final state aktif (proses selesai) */
.fsa-node-final.state-active circle{
  fill: var(--success);
  stroke: #16A34A;
  filter: drop-shadow(0 0 12px rgba(34,197,94,.6));
}
.fsa-node-final.state-active .fsa-outer-ring{ stroke: #16A34A; }

/* ---------------------------------------------------------------------
   10. DASHBOARD
--------------------------------------------------------------------- */
.glass-card{
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.form-card .form-label{ font-weight: 600; font-size: .9rem; }
.form-card .form-control,
.form-card .form-select{
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-300);
  padding: 11px 14px;
}
.form-card .form-control:focus,
.form-card .form-select:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.status-badge{
  display: inline-flex;
  align-items: center;
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(37,99,235,.1);
  color: var(--primary);
  white-space: nowrap;
}
.status-badge.is-final{ background: rgba(34,197,94,.14); color: #16A34A; }

.order-info-list{ list-style: none; padding: 0; margin: 0; }
.order-info-list li{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--slate-100);
  gap: 12px;
}
.order-info-list li:last-child{ border-bottom: none; }
.order-info-label{ color: var(--slate-500); font-size: .88rem; }
.order-info-value{ font-weight: 600; font-size: .92rem; text-align: right; }

.progress-wrap{ display: flex; align-items: center; gap: 14px; }
.custom-progress{
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: var(--slate-100);
  overflow: hidden;
}
.custom-progress .progress-bar{
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.progress-percent{ font-weight: 700; font-family: var(--font-mono); font-size: .9rem; min-width: 44px; text-align: right; }

.sub-heading{ font-size: .92rem; font-weight: 700; margin-bottom: 14px; }

.timeline-list{ list-style: none; padding: 0; margin: 0; }
.timeline-list li{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: .88rem;
  color: var(--slate-500);
  transition: var(--transition-base);
}
.timeline-list li .tl-icon{
  width: 22px; height: 22px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--slate-300);
  font-size: .7rem;
}
.timeline-list li.tl-done{ color: var(--dark); font-weight: 500; }
.timeline-list li.tl-done .tl-icon{ background: var(--primary); border-color: var(--primary); color: #fff; }
.timeline-list li.tl-current{ color: var(--primary); font-weight: 700; }
.timeline-list li.tl-current .tl-icon{ border-color: var(--primary); color: var(--primary); animation: nodeActivePulse 1.6s ease-in-out infinite; }
.timeline-list li.tl-final.tl-done .tl-icon{ background: var(--success); border-color: var(--success); }

.history-list{
  list-style: none;
  padding: 0; margin: 0;
  max-height: 210px;
  overflow-y: auto;
}
.history-list li{
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: 8px;
  font-size: .82rem;
  animation: fadeInSlide .35s ease;
}
.history-list li strong{ font-size: .84rem; }
.history-list li span{ color: var(--slate-500); font-family: var(--font-mono); font-size: .74rem; margin-top: 2px; }
.history-empty{ color: var(--slate-500); background: transparent !important; }

@keyframes fadeInSlide{
  from{ opacity: 0; transform: translateY(-6px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   11. FOOTER & TOAST
--------------------------------------------------------------------- */
.footer-section{
  background: var(--dark);
  color: #94A3B8;
  padding: 70px 0 24px;
}
.footer-brand{ color: #fff !important; margin-bottom: 14px; }
.footer-desc{ font-size: .9rem; line-height: 1.7; max-width: 380px; }
.footer-heading{ color: #fff; font-size: .88rem; font-weight: 700; margin-bottom: 16px; }
.footer-links{ list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a{ color: #94A3B8; text-decoration: none; font-size: .9rem; transition: var(--transition-base); }
.footer-links a:hover{ color: #fff; }

.footer-bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .82rem;
}
.footer-bottom i{ font-size: 1.1rem; color: #94A3B8; transition: var(--transition-base); cursor: pointer; }
.footer-bottom i:hover{ color: #fff; }

.custom-toast{
  background: var(--dark);
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
}
.custom-toast i{ color: var(--success); }

/* ---------------------------------------------------------------------
   12. SCROLL-REVEAL ANIMATION
--------------------------------------------------------------------- */
.reveal-up{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.4,0,.2,1);
}
.reveal-up.revealed{ opacity: 1; transform: translateY(0); }
.reveal-delay-1.revealed{ transition-delay: .12s; }
.reveal-delay-2.revealed{ transition-delay: .24s; }

/* ---------------------------------------------------------------------
   13. RESPONSIVE
--------------------------------------------------------------------- */
@media (max-width: 991.98px){
  .hero-section{ padding: 140px 0 90px; text-align: left; }
  .section-py{ padding: 70px 0; }
  .hero-art-wrap{ max-width: 420px; }
}

@media (max-width: 767.98px){
  .glass-card{ padding: 24px; }
  .hero-meta{ flex-wrap: wrap; row-gap: 14px; }
  .diagram-panel{ padding: 18px; }
  .footer-bottom{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 575.98px){
  .hero-title{ font-size: 2.6rem; }
  .stat-card{ padding: 26px 20px; }
}
