/* ============================================================
   AGRODIA — Landing Page Styles
   Palm Oil ERP Platform | Landing & Intro Screen
   Version: 1.0.0
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
/* Google Fonts loaded via <link> in HTML for non-blocking render */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Plantation Dark Backgrounds */
  --bg:           #081610;
  --bg-alt:       #0C1E14;
  --card:         #0F2419;
  --card-alt:     #122A1D;
  --card-hover:   #163222;
  --border:       #1B3D28;
  --border-soft:  #235035;

  /* Text */
  --text:         #E2EEE4;
  --text-soft:    #A0BFA6;
  --muted:        #608A68;
  --muted-dark:   #3A5E42;

  /* Palm Gold — Premium Accent */
  --gold:         #C9A84C;
  --gold-light:   #E8C96B;
  --gold-dark:    #956C1A;
  --gold-bg:      rgba(201,168,76,0.08);

  /* Brand Green — Palm / Estate */
  --green:        #2D7D46;
  --green-mid:    #3A9A5A;
  --green-light:  #4CB870;
  --green-bg:     rgba(76,184,112,0.1);

  /* Status Colors */
  --success:      #4CB870;
  --info:         #28B4CC;
  --info-bg:      rgba(40,180,204,0.12);

  /* Shadows */
  --shadow:       0 2px 16px rgba(0,0,0,0.5);

  /* Transitions */
  --transition:   0.2s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* clip instead of hidden — won't create implicit scroll container */
}

a { color: var(--green-light); text-decoration: none; }

/* ── Hero Landing Layout ──────────────────────────────────── */
.landing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Left Panel — Brand & Features ───────────────────────── */
.left-panel {
  background: linear-gradient(160deg, #0A1F12 0%, #0F2A18 40%, #0D2015 100%);
  border-right: 1px solid var(--border);
  padding: 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: '';
  position: absolute; top: -100px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(44,125,70,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.left-panel::after {
  content: '';
  position: absolute; bottom: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Logo Area ────────────────────────────────────────────── */
.logo-area {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 60px; position: relative; z-index: 1;
}
.logo-box {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; border: 1px solid rgba(76,184,112,0.4);
  box-shadow: 0 0 30px rgba(76,184,112,0.2);
}
.logo-text .name { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.logo-text .tag  { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 1px; }

/* ── Hero Heading ─────────────────────────────────────────── */
.hero-heading { position: relative; z-index: 1; margin-bottom: 20px; }
.hero-heading h1 {
  font-size: 2.6rem; font-weight: 800; line-height: 1.15;
  letter-spacing: -0.03em; color: var(--text);
}
.hero-heading h1 span { color: var(--green-light); }
.hero-heading p { font-size: 1rem; color: var(--text-soft); margin-top: 14px; line-height: 1.7; max-width: 480px; }

/* ── Gold Bar Divider ─────────────────────────────────────── */
.gold-bar {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px; margin: 24px 0;
}

/* ── Stat Badges Row ──────────────────────────────────────── */
.stat-badges {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 40px; position: relative; z-index: 1;
}
.stat-badge {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px;
  text-align: center; min-width: 110px;
  transition: var(--transition);
}
.stat-badge:hover { border-color: var(--green); transform: translateY(-2px); }
.stat-badge .val { font-size: 1.4rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--text); }
.stat-badge .val span { font-size: 0.7rem; font-weight: 400; color: var(--muted); }
.stat-badge .lbl { font-size: 0.65rem; color: var(--muted); margin-top: 3px; letter-spacing: 0.04em; }

/* ── Feature Items ────────────────────────────────────────── */
.features { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.feature-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  transition: var(--transition);
}
.feature-item:hover { border-color: var(--green); background: var(--card-hover); }
.feature-ico {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--green-bg); border: 1px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; color: var(--green-light); flex-shrink: 0;
}
.feature-ico.gold { background: var(--gold-bg); border-color: var(--gold-dark); color: var(--gold); }
.feature-ico.info { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.feature-text .title { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.feature-text .desc  { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* ── Certification Pills ──────────────────────────────────── */
.cert-badges {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 32px; position: relative; z-index: 1;
}
.cert-pill {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 14px;
  font-size: 0.7rem; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.cert-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.cert-pill .dot.green { background: var(--success); }
.cert-pill .dot.gold  { background: var(--gold); }
.cert-pill .dot.info  { background: var(--info); }

/* ── Right Panel — Demo Explorer ──────────────────────────── */
.right-panel {
  display: flex; flex-direction: column;
  padding: 32px 40px 24px;
  background: var(--bg-alt);
  height: 100vh;
  overflow-y: auto;
}

.explorer-header { margin-bottom: 16px; flex-shrink: 0; }
.explorer-header .eyebrow {
  font-size: 0.65rem; font-weight: 700; color: var(--green-light);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 4px;
}
.explorer-header h2 { font-size: 1.3rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.explorer-header p  { font-size: 0.75rem; color: var(--text-soft); margin-top: 4px; }

/* ── Demo Sections ────────────────────────────────────────── */
.demo-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.demo-section + .demo-section { margin-top: 12px; }
.demo-section.mobile-card { border-color: var(--border-soft); }

.demo-header {
  background: var(--card); padding: 11px 18px;
  font-size: 0.73rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.demo-section.mobile-card .demo-header { border-color: var(--border-soft); color: var(--gold); }

/* ── Demo Link Tile Grid ──────────────────────────────────── */
.demo-links {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  flex: 1;
  align-content: stretch;
}

.demo-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 0.78rem; font-weight: 600;
  text-decoration: none; transition: 0.18s; cursor: pointer;
  text-align: center; line-height: 1.3;
  min-height: 0;
}
.demo-link:hover {
  border-color: var(--green); color: var(--green-light);
  background: var(--card-hover); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,125,70,0.18);
}
.demo-section.mobile-card .demo-link:hover {
  border-color: var(--gold); color: var(--gold-light);
  background: rgba(201,168,76,0.06);
  box-shadow: 0 6px 20px rgba(201,168,76,0.12);
}
.demo-link i { font-size: 1.6rem; color: var(--muted); transition: 0.18s; }
.demo-link:hover i { color: inherit; }
.demo-link span.lbl { display: block; }

/* ── Desktop-Only Notice (web section, shown only on mobile) ── */
.desktop-only-notice {
  display: none; /* hidden on desktop */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
}
.desktop-only-notice i { font-size: 2rem; color: var(--border-soft); }
.desktop-only-notice .don-title { font-size: 0.85rem; font-weight: 700; color: var(--text-soft); }
.desktop-only-notice .don-desc  { font-size: 0.72rem; color: var(--muted); line-height: 1.5; max-width: 240px; }

/* ── Footer Copy ──────────────────────────────────────────── */
.bottom-copy {
  margin-top: 16px; text-align: center; flex-shrink: 0;
  font-size: 0.65rem; color: var(--muted-dark);
}

/* ── Floating Decoration Blobs ────────────────────────────── */
.blob {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 { width: 300px; height: 300px; top: -100px; right: -80px; background: radial-gradient(circle, rgba(45,125,70,0.06), transparent); }
.blob-2 { width: 200px; height: 200px; bottom: 40px; left: 48%; background: radial-gradient(circle, rgba(201,168,76,0.05), transparent); animation-delay: -4s; }
@keyframes blobFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-20px) scale(1.05); }
}

/* ── Responsive ───────────────────────────────────────────── */

/* 1. Tablet + Mobile (≤1024px)
      - Compact logo-only header, hide left panel body content
      - Right panel flows below as scrollable content
      - Web platform section locked to desktop only               */
@media (max-width: 1024px) {
  /* Fix container — allow full-height scroll, no clipping */
  .landing {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* Left panel → compact content block above demo explorer */
  .left-panel {
    padding: 24px 28px 20px;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .logo-area    { margin-bottom: 20px; }
  .hero-heading { margin-bottom: 14px; }
  .hero-heading h1 { font-size: 1.7rem; }
  .hero-heading p  { font-size: 0.82rem; max-width: 100%; }
  .gold-bar     { margin: 16px 0; }

  /* Stat badges — 4-column grid, full width */
  .stat-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex-wrap: unset;
    overflow-x: unset;
    gap: 10px;
    margin-bottom: 16px;
  }
  .stat-badge { min-width: unset; flex-shrink: unset; padding: 10px 14px; }

  /* Features — 2 column grid */
  .features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .feature-item { padding: 10px 12px; }
  .feature-text .desc { display: none; }

  /* Cert badges */
  .cert-badges { padding-top: 16px; }

  /* Right panel fills remaining space */
  .right-panel {
    height: auto;
    overflow-y: visible;
    padding: 24px 28px 40px;
    flex: 1;
  }

  .demo-section { flex: unset; min-height: unset; }

}

/* ── Tablet Landscape (1025–1366px) ──────────────────────────── */
@media (min-width: 1025px) and (max-width: 1366px) {
  /* Stat badges — 1 row */
  .stat-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex-wrap: unset;
    gap: 8px;
    margin-bottom: 16px;
  }
  .stat-badge { min-width: unset; padding: 8px 10px; }
  .stat-badge .val  { font-size: 1.1rem; }
  .stat-badge .lbl  { font-size: 0.6rem; }

  /* Features — 2 kolom, padding kecil, sembunyikan deskripsi */
  .features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 0;
  }
  .feature-item { padding: 8px 10px; gap: 8px; }
  .feature-ico  { width: 28px; height: 28px; font-size: 0.8rem; flex-shrink: 0; }
  .feature-text .title { font-size: 0.75rem; }
  .feature-text .desc  { display: none; }

  /* Cert badges & gold bar — kompak */
  .gold-bar    { margin: 12px 0; }
  .cert-badges { padding-top: 12px; gap: 6px; }
  .cert-pill   { padding: 4px 10px; font-size: 0.65rem; }

  /* Hero heading */
  .hero-heading    { margin-bottom: 12px; }
  .hero-heading h1 { font-size: 1.9rem; }
  .hero-heading p  { font-size: 0.82rem; margin-top: 8px; }

  /* Left panel padding */
  .left-panel { padding: 28px 32px 20px; }
  .logo-area  { margin-bottom: 20px; }
}

/* ── Desktop-Only Guard ───────────────────────────────────────
   Block web mockup on:
   (a) Any viewport ≤ 1366px  — covers phones, tablets portrait &
       landscape up to iPad Pro 12.9" (widest common tablet)
   (b) Touch device (pointer: coarse) at any width — catches
       foldables/large tablets that exceed 1366px CSS px
   Laptops/desktops (≥1367px + mouse) remain accessible.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 1366px), (pointer: coarse) {
  .web-card .demo-links          { display: none; }
  .web-card .desktop-only-notice { display: flex; }
  .web-card                      { cursor: default; }
}

/* 2. Mobile (≤540px) — tighter sizing, hide heavy left content */
@media (max-width: 540px) {
  .left-panel { padding: 12px 16px 16px; }
  .logo-area  { margin-bottom: 12px; }
  .logo-box   { width: 38px; height: 38px; font-size: 1.2rem; border-radius: 10px; }
  .logo-text .name { font-size: 1.1rem; }
  .logo-text .tag  { font-size: 0.6rem; }

  .hero-heading h1 { font-size: 1.3rem; }
  .hero-heading p  { display: none; }
  .gold-bar        { display: none; }

  /* On small phones, features & cert-badges are too heavy */
  .features,
  .cert-badges     { display: none; }

  /* Stat badges — 4-column single row, very compact */
  .stat-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    flex-wrap: unset;
    overflow-x: unset;
    gap: 6px;
    margin-bottom: 4px;
  }
  .stat-badge         { min-width: unset; padding: 6px 6px; text-align: center; }
  .stat-badge .val    { font-size: 0.9rem; }
  .stat-badge .val span { font-size: 0.6rem; }
  .stat-badge .lbl    { font-size: 0.55rem; margin-top: 2px; }

  .right-panel { padding: 16px 16px 32px; }

  .explorer-header { margin-bottom: 12px; }
  .explorer-header h2 { font-size: 1.0rem; }

  .demo-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px;
  }
  .demo-link {
    padding: 10px 4px;
    font-size: 0.7rem;
    gap: 6px;
    min-height: 72px;
  }
  .demo-link i { font-size: 1.3rem; }

  .blob { display: none; }
}
