/* ============================================================
   FACILITASK — Light Mode Stylesheet
   ============================================================

   ✏️  HOW TO CHANGE THE BACKGROUND (Easy Guide for Non-Coders)
   ============================================================

   OPTION A — Use a background IMAGE:
   ------------------------------------------------------------
   Find the  body { }  block below and replace the
   "background:" line with:

       background: url('your-image-filename.jpg') no-repeat center center fixed;
       background-size: cover;

   Make sure the image file is in the same folder as this CSS file.
   Example:  background: url('my-photo.jpg') no-repeat center center fixed;

   OPTION B — Use a solid background COLOR:
   ------------------------------------------------------------
   Replace the background line inside  body { }  with:

       background: #f5f5f0;

   Just change #f5f5f0 to any hex color code you like.
   Find colors at: https://coolors.co

   OPTION C — Use a gradient background:
   ------------------------------------------------------------
   Replace the background line inside  body { }  with:

       background: linear-gradient(135deg, #fff8f0, #ffeedd);

   ============================================================ */

/* ---- Google Font Import ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --orange:        #f27405;
  --orange-light:  #ff9a30;
  --orange-dark:   #c45d00;
  --bg-page:       #f9f6f1;
  --bg-card:       #ffffff;
  --bg-card2:      #f3efe9;
  --border:        rgba(0, 0, 0, 0.08);
  --border-orange: rgba(242, 116, 5, 0.2);
  --text-primary:  #1a1208;
  --text-secondary:#3d3020;
  --text-muted:    #7a6e60;
  --radius-lg:     18px;
  --radius-pill:   999px;
  --font-brand:    'Inter', sans-serif;
  --font-body:     'Plus Jakarta Sans', sans-serif;
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-orange: 0 0 40px rgba(242, 116, 5, 0.12);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Body ---- */
body {
  font-family: var(--font-body);
  /* ▼ BACKGROUND — see instructions at top of file ▼ */
  background: linear-gradient(160deg, #fff8f0 0%, #f9f6f1 50%, #fdf3e7 100%);
  /* ▲ BACKGROUND ▲ */
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  animation: fadeIn 1.5s ease-in-out both;
}

/* Subtle dot-grid texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, rgba(242,116,5,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none; z-index: 0;
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-28px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50%       { transform: translateY(-10px) rotate(-1deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ---- Header / Nav ---- */
header {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(249, 246, 241, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 38px; height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(242,116,5,0.25));
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  line-height: 1;
}

.nav-btn-signin {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1.5px solid var(--border);
  padding: 10px 26px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
  letter-spacing: 0.3px;
}

.nav-btn-signin:hover {
  border-color: var(--orange);
  background: rgba(242, 116, 5, 0.06);
  color: var(--orange-dark);
}

/* ---- Hero Section ---- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 100vh;
  padding: 120px 48px 60px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Warm orange glow blob */
.hero::before {
  content: '';
  position: absolute;
  top: 20%; left: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(242, 116, 5, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

/* ---- Hero Left ---- */
.hero-left {
  flex: 1;
  max-width: 580px;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--orange-dark);
  background: rgba(242, 116, 5, 0.08);
  border: 1px solid rgba(242, 116, 5, 0.2);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  margin-bottom: 24px;
  animation: fadeIn 1.5s ease-in-out 0.1s both;
}

.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulseGlow 1.8s infinite;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  animation: slideIn 1s ease-in-out both;
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 40px;
  animation: fadeIn 1.5s ease-in-out 0.3s both;
}

/* ---- CTA Buttons ---- */
.hero-ctas {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  animation: fadeIn 1.5s ease-in-out 0.5s both;
}

.btn-primary {
  font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border: none;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(242, 116, 5, 0.35);
  display: inline-flex; align-items: center; gap: 7px;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 28px rgba(242, 116, 5, 0.5);
}

.btn-secondary {
  font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s, box-shadow 0.25s;
  display: inline-flex; align-items: center; gap: 7px;
  box-shadow: var(--shadow-card);
}

.btn-secondary:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: rgba(242, 116, 5, 0.04);
  box-shadow: 0 4px 16px rgba(242, 116, 5, 0.15);
}

/* ---- Hero Right — Graphic Card ---- */
.hero-right {
  flex: 0 0 auto;
  width: 400px;
}

.graphic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card), 0 20px 60px rgba(242,116,5,0.07);
  animation: floatCard 6s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.graphic-card::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(242, 116, 5, 0.08), transparent 70%);
  pointer-events: none;
}

.graphic-card-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
}

.graphic-card-logo img {
  width: 30px; height: 30px; object-fit: contain;
}

.graphic-card-logo span {
  font-family: var(--font-brand);
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-primary);
}

.task-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.task-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.task-item:hover {
  border-color: rgba(242, 116, 5, 0.25);
  box-shadow: 0 2px 10px rgba(242,116,5,0.06);
}

.task-check {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}

.task-check.done { background: rgba(242, 116, 5, 0.12); color: var(--orange); border: 1.5px solid rgba(242,116,5,0.4); }
.task-check.todo { background: transparent; border: 1.5px solid rgba(0,0,0,0.15); }

.task-text { font-size: 0.85rem; font-weight: 500; flex: 1; color: var(--text-secondary); }
.task-text.done-text { text-decoration: line-through; color: var(--text-muted); }

.task-tag {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.task-tag.orange { background: rgba(242, 116, 5, 0.1); color: var(--orange-dark); }
.task-tag.blue   { background: rgba(59, 110, 210, 0.1); color: #2d6abf; }
.task-tag.green  { background: rgba(34, 160, 80, 0.1);  color: #1a8a42; }

.progress-bar-wrap {
  margin-top: 18px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.progress-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
}

.progress-label strong { color: var(--orange-dark); font-size: 0.82rem; }

.progress-track {
  height: 8px; border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.progress-fill {
  height: 100%; width: 72%;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  border-radius: var(--radius-pill);
  box-shadow: 0 0 10px rgba(242, 116, 5, 0.3);
}

/* ============================================================
   MODAL SYSTEM — Robust open/close with CSS transitions
   No transitionend listener needed; uses .is-open class.
   ============================================================ */

/* Overlay */
.overlay {
  position: fixed; inset: 0;
  background: rgba(30, 20, 5, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

body.modal-open .overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Modal base */
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -44%) scale(0.96);
  background: var(--bg-card);
  border: 1px solid var(--border-orange);
  border-radius: var(--radius-lg);
  padding: 32px 32px 28px;
  max-width: 460px; width: calc(100% - 40px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 30px rgba(242,116,5,0.06);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}

.modal-icon {
  width: 32px; height: 32px;
  background: rgba(242, 116, 5, 0.1);
  border: 1px solid rgba(242, 116, 5, 0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--orange);
  flex-shrink: 0;
}

.modal-close {
  width: 30px; height: 30px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 18px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.modal-close:hover { background: rgba(200, 40, 40, 0.08); color: #cc2222; }

.modal-divider {
  height: 1px; background: var(--border); margin-bottom: 16px;
}

.modal-body {
  font-size: 0.93rem; line-height: 1.75;
  color: var(--text-muted);
}

/* ---- Accept Policy button inside modal ---- */
.modal-body .btn-primary {
  margin-top: 20px;
  width: 100%;
  justify-content: center;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero {
    flex-direction: column;
    padding: 110px 24px 60px;
    text-align: center;
  }
  .hero-right { width: 100%; max-width: 420px; }
  .hero-ctas  { justify-content: center; }
  .hero-eyebrow { margin: 0 auto 24px; }
  header { padding: 16px 24px; }
}
