/* filepath: public/css/landing.css */
/* ═══════════════════════════════════════
   CMMS - Landing Page (standalone)
   ═══════════════════════════════════════ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Outfit', 'Noto Sans Thai', sans-serif; background: #fff; color: #1a202c; line-height: 1.6; }
a { color: #00b14f; text-decoration: none; }
a:hover { color: #008c3e; }
img { max-width: 100%; height: auto; }
input, textarea, select, button, option { font-family: inherit; font-size: inherit; }

/* ── Design Tokens ── */
:root {
  --color-primary: #00b14f;
  --color-border: #e2e8f0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  border: 1px solid transparent; border-radius: 8px;
  cursor: pointer; transition: all 0.2s; text-decoration: none; line-height: 1.4;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn--primary { background: #00b14f; color: #fff; border-color: #00b14f; }
.btn--primary:hover { background: #008c3e; border-color: #008c3e; color: #fff; }
.btn--outline { background: transparent; border-color: #e2e8f0; color: #1a202c; }
.btn--outline:hover { border-color: #00b14f; color: #00b14f; }
.btn--sm { padding: 5px 12px; font-size: 13px; }
.btn--block { width: 100%; }

/* ── Keyframes ── */
@keyframes scanLine {
  0% { top: 0; opacity: 1; }
  50% { opacity: 0.6; }
  100% { top: calc(100% - 3px); opacity: 1; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,177,79,0.3); }
  50% { box-shadow: 0 0 20px 6px rgba(0,177,79,0.12); }
}
@keyframes slideResultRow {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ── Container ── */
.landing-container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, #00b14f 0%, #10b981 50%, #06b6d4 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navbar ── */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.landing-nav__inner { display: flex; align-items: center; height: 64px; gap: 16px; }
.landing-nav__logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 22px; color: #1e293b; flex-shrink: 0;
}
.landing-nav__logo:hover { color: #00b14f; }

.landing-nav__center {
  display: none; flex-direction: row; align-items: center; gap: 24px; margin-left: auto;
}
.landing-nav__center a { font-size: 14px; font-weight: 500; color: #64748b; transition: color 0.2s; }
.landing-nav__center a:hover { color: #00b14f; }

.landing-nav__right { display: none; align-items: center; gap: 8px; margin-left: auto; }

.lang-btn {
  background: none; border: 1px solid var(--color-border); border-radius: 6px;
  padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
  color: #64748b; transition: all 0.2s;
}
.lang-btn:hover { color: #00b14f; border-color: #00b14f; }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  z-index: 300;
  overflow: hidden;
  min-width: 160px;
}
.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  color: #1e293b;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s;
}
.lang-dropdown-item:last-child { border-bottom: none; }
.lang-dropdown-item:hover { background: #ecfdf5; color: #00b14f; }
.lang-dropdown-item--active { background: #ecfdf5; color: #00b14f; font-weight: 700; }

.landing-nav__toggle {
  display: flex; background: none; border: none; cursor: pointer;
  color: #1e293b; padding: 4px; margin-left: auto;
}

/* Mobile nav */
.landing-nav__center--open {
  display: flex !important; flex-direction: column;
  position: absolute; top: 64px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--color-border);
  padding: 16px 20px; gap: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* ── Hero ── */
.landing-hero {
  padding: 100px 0 60px;
  background: linear-gradient(135deg, #00b14f 0%, #008c3e 60%, #1a202c 100%);
  overflow: hidden;
  position: relative;
}
.landing-hero__grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; position: relative; }
.landing-hero__content { text-align: center; }

.landing-hero__badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.15); color: #d1fae5;
  font-size: 13px; font-weight: 600; margin-bottom: 20px; letter-spacing: 0.5px;
}
.landing-hero__title { font-size: 36px; font-weight: 800; line-height: 1.2; color: #fff; }
.landing-hero__subtitle { font-size: 16px; color: #bbf7d0; max-width: 520px; margin: 16px auto 0; line-height: 1.7; }
.landing-hero__actions {
  display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap;
}
.btn--lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; font-weight: 600; }
.btn--lg svg { margin-left: 6px; vertical-align: middle; }
.btn--ghost {
  background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; font-weight: 600; cursor: pointer; border-radius: 12px;
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

/* Hero Stats */
.landing-hero__stats {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-top: 36px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 24px; font-weight: 800; color: #fff; }
.hero-stat span { font-size: 12px; color: #bbf7d0; text-transform: uppercase; letter-spacing: 0.5px; }
.hero-stat__divider { width: 1px; height: 32px; background: rgba(255,255,255,0.2); }

/* ── Hero Visual — iPhone Frame ── */
.landing-hero__visual { display: flex; justify-content: center; align-items: center; }

.iphone-frame {
  width: 260px;
  background: #fff;
  border-radius: 36px;
  border: 4px solid #1a1a1a;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.1);
  animation: float 4s ease-in-out infinite;
}

/* Notch */
.iphone-notch {
  width: 100px; height: 22px;
  background: #1a1a1a;
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: relative; z-index: 2;
}

/* Status bar */
.iphone-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 18px; height: 18px;
  background: #00b14f;
  margin-top: -8px;
  font-size: 11px; font-weight: 700; color: #fff;
}
.iphone-statusbar__icons { display: flex; gap: 6px; align-items: center; }

/* App header */
.iphone-app-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: #00b14f;
  font-size: 13px; font-weight: 700; color: #fff;
}

/* Screen */
.iphone-screen { padding: 14px 16px; background: #f8fafc; }

.iphone-wo-title { font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.iphone-wo-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.iphone-badge {
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}
.iphone-badge--site { background: #f1f5f9; color: #475569; }
.iphone-badge--cat { background: #ecfdf5; color: #059669; }

/* Status flow */
.iphone-flow {
  display: flex; align-items: center;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px 10px; margin-bottom: 12px;
}
.iphone-flow-step { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 4px; }
.iphone-flow-step span { font-size: 8px; color: #94a3b8; font-weight: 500; white-space: nowrap; }
.iphone-flow-step--done span { color: #64748b; }
.iphone-flow-step--active span { color: #00b14f; font-weight: 700; }
.iphone-flow-dot { width: 8px; height: 8px; border-radius: 50%; background: #e2e8f0; }
.iphone-flow-dot--done { background: #10b981; }
.iphone-flow-dot--active { background: #00b14f; box-shadow: 0 0 6px rgba(0,177,79,0.4); }
.iphone-flow-line { width: 16px; height: 2px; background: #e2e8f0; flex-shrink: 0; }
.iphone-flow-line--done { background: #10b981; }
.iphone-flow-line--active { background: linear-gradient(90deg, #10b981, #00b14f); }

/* Info rows */
.iphone-info {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 4px 12px; margin-bottom: 12px;
}
.iphone-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px;
}
.iphone-info-row:last-child { border-bottom: none; }
.iphone-info-label { color: #94a3b8; font-size: 11px; }
.iphone-info-val { color: #0f172a; font-weight: 600; font-size: 12px; }
.iphone-info-priority {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
  background: #fef2f2; color: #dc2626;
}

/* Checklist */
.iphone-checklist {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 8px 12px;
}
.iphone-chk {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #64748b; padding: 6px 0;
  border-bottom: 1px solid #f8fafc;
}
.iphone-chk:last-child { border-bottom: none; }
.iphone-chk--done { color: #94a3b8; text-decoration: line-through; }
.iphone-chk--active { color: #0f172a; font-weight: 600; }

/* Bottom nav */
.iphone-nav {
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 0 2px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}
.iphone-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 9px; color: #94a3b8; font-weight: 500;
}
.iphone-nav-item--active { color: #00b14f; }
.iphone-nav-item svg { width: 18px; height: 18px; }

/* Home indicator */
.iphone-home-indicator {
  width: 100px; height: 4px;
  background: #1a1a1a; border-radius: 2px;
  margin: 6px auto 8px;
}

.result-label { color: rgba(255,255,255,0.5); font-weight: 500; }
.result-value { font-weight: 600; color: #fff; }

/* ── Sections ── */
.landing-section { padding: 64px 0; }
.landing-section--alt { background: #f8fafc; }
.landing-section__title { font-size: 28px; font-weight: 800; text-align: center; color: #0f172a; margin-bottom: 8px; }
.landing-section__subtitle { font-size: 15px; color: #64748b; text-align: center; margin-bottom: 40px; }

/* ── Features ── */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.feature-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover { box-shadow: 0 8px 24px rgba(0,177,79,0.1); transform: translateY(-2px); }
.feature-card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.feature-card__icon--blue { background: #ecfdf5; color: #00b14f; }
.feature-card__icon--green { background: #dcfce7; color: #16a34a; }
.feature-card__icon--purple { background: #d1fae5; color: #10b981; }
.feature-card__icon--orange { background: #ffedd5; color: #ea580c; }
.feature-card__icon--cyan { background: #cffafe; color: #0891b2; }
.feature-card__icon--pink { background: #fce7f3; color: #db2777; }
.feature-card__icon--indigo { background: #e0e7ff; color: #4338ca; }
.feature-card__title { font-size: 17px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.feature-card__desc { font-size: 14px; color: #64748b; line-height: 1.6; }

/* ── Steps ── */
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 800px; margin: 0 auto; }
.step-card { text-align: center; padding: 24px; }
.step-card__number {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, #00b14f, #10b981); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; margin-bottom: 16px;
}
.step-card__title { font-size: 18px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.step-card__desc { font-size: 14px; color: #64748b; line-height: 1.6; }

/* ── Pricing ── */
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 900px; margin: 0 auto; }
.pricing-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 32px 24px; position: relative; transition: box-shadow 0.2s;
}
.pricing-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.pricing-card--featured { border-color: #00b14f; border-width: 2px; box-shadow: 0 8px 32px rgba(0,177,79,0.12); }
.pricing-card__badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #00b14f, #10b981); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 16px; border-radius: 999px;
}
.pricing-card__header { text-align: center; margin-bottom: 24px; }
.pricing-card__name { font-size: 18px; font-weight: 700; color: #0f172a; }
.pricing-card__price { font-size: 40px; font-weight: 800; color: #00b14f; margin-top: 8px; }
.pricing-card__price span { font-size: 16px; font-weight: 400; color: #94a3b8; }
.pricing-card__period { font-size: 13px; color: #94a3b8; margin-top: 2px; }
.pricing-card__features { list-style: none; margin-bottom: 24px; }
.pricing-card__features li {
  padding: 8px 0; font-size: 14px; color: #334155; border-bottom: 1px solid #f1f5f9;
}
.pricing-card__features li::before { content: "\2713 "; color: #16a34a; font-weight: 700; }
.pricing-card__features li:last-child { border-bottom: none; }

/* ── CTA ── */
.landing-cta {
  padding: 80px 0; text-align: center;
  background: linear-gradient(180deg, #fff 0%, #ecfdf5 50%, #ecfdf5 100%);
}
.landing-cta__title { font-size: 28px; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.landing-cta__subtitle { font-size: 16px; color: #64748b; margin-bottom: 28px; }

/* ── Footer ── */
.landing-footer { padding: 28px 0; border-top: 1px solid #e2e8f0; background: #fff; }
.landing-footer__inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.landing-footer__brand { display: flex; flex-direction: column; gap: 2px; }
.landing-footer__brand strong { font-size: 16px; color: #00b14f; }
.landing-footer__brand span { color: #94a3b8; font-size: 13px; }
.landing-footer__links { display: flex; gap: 20px; }
.landing-footer__links a { font-size: 13px; color: #64748b; text-decoration: none; }
.landing-footer__links a:hover { color: #00b14f; text-decoration: underline; }
.landing-footer__copy { font-size: 12px; color: #94a3b8; }

/* ── Alpine.js ── */
[x-cloak] { display: none !important; }

/* ═══ Responsive: md (>= 640px) ═══ */
@media (min-width: 640px) {
  .landing-nav__toggle { display: none; }
  .landing-nav__center { display: flex; }
  .landing-nav__right { display: flex; }

  .landing-hero { padding: 120px 0 80px; }
  .landing-hero__title { font-size: 48px; }
  .landing-hero__subtitle { font-size: 18px; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }

  .landing-footer__inner { flex-direction: row; justify-content: space-between; }
}

/* ═══ Responsive: lg (>= 1024px) ═══ */
@media (min-width: 1024px) {
  .landing-hero__grid { grid-template-columns: 1fr 1fr; }
  .landing-hero__content { text-align: left; }
  .landing-hero__subtitle { margin: 16px 0 0; }
  .landing-hero__actions { justify-content: flex-start; }
  .landing-hero__stats { justify-content: flex-start; }
  .landing-hero__title { font-size: 52px; }

  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .landing-section { padding: 80px 0; }
}

/* ═══ Reduced motion ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
