/* ================================================================
   SimbIoT — Main Stylesheet
   Palette:
     --navy   #0A1628  bg utama
     --slate  #1E293B  card bg
     --border #2D3D52  border
     --teal   #0D9488  accent utama
     --sky    #38BDF8  highlight / link
     --white  #F0F9FF  teks utama
     --muted  #94A3B8  teks sekunder
     --dim    #64748B  teks tersier
================================================================ */

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

:root {
  --navy:    #0A1628;
  --slate:   #1E293B;
  --border:  #2D3D52;
  --teal:    #0D9488;
  --sky:     #38BDF8;
  --white:   #F0F9FF;
  --muted:   #94A3B8;
  --dim:     #64748B;
  --radius:  12px;
  --shadow:  0 8px 32px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--navy);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

.accent { color: var(--teal); }

/* ----------------------------------------------------------------
   Typography
---------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  line-height: 1.2;
  font-weight: 700;
}

/* ----------------------------------------------------------------
   Layout Utilities
---------------------------------------------------------------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: rgba(30, 41, 59, 0.45);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.25);
  padding: 0.3rem 0.875rem;
  border-radius: 100px;
  margin-bottom: 0.875rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--white);
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ----------------------------------------------------------------
   Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease,
              transform 0.15s ease, box-shadow 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn-primary:hover {
  background: #0f766e;
  border-color: #0f766e;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--sky);
  border-color: rgba(56, 189, 248, 0.35);
}
.btn-outline:hover {
  background: rgba(56, 189, 248, 0.07);
  border-color: rgba(56, 189, 248, 0.6);
}

.btn-full { width: 100%; }

/* ----------------------------------------------------------------
   Hero
---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  /* Radial gradient vignette on top of canvas */
  background: radial-gradient(ellipse 80% 60% at 50% 40%,
    rgba(13, 148, 136, 0.07) 0%,
    transparent 70%);
}

#iot-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 2rem 1.5rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--sky);
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.75rem;
}

.hero-title {
  font-size: clamp(4.5rem, 12vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.hero-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1.75rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  z-index: 1;
  animation: scroll-hint 2.4s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.9; transform: translateX(-50%) translateY(5px); }
}

/* ----------------------------------------------------------------
   About
---------------------------------------------------------------- */
.about-desc {
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.about-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.pillar {
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.pillar:hover {
  border-color: var(--teal);
  transform: translateY(-4px);
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.pillar h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pillar p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ----------------------------------------------------------------
   Apps Portal
---------------------------------------------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.app-card {
  position: relative;
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

/* Top accent line */
.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--sky));
  opacity: 0;
  transition: opacity 0.2s;
}

a.app-card:hover {
  border-color: rgba(13, 148, 136, 0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

a.app-card:hover::before { opacity: 1; }

.app-card-soon {
  opacity: 0.6;
  cursor: default;
}

.app-icon { font-size: 1.75rem; line-height: 1; }

.app-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.app-sub {
  display: block;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.75rem;
  color: var(--dim);
  margin-bottom: 0.4rem;
}

.app-info p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.625rem;
  border-radius: 4px;
  align-self: flex-start;
}

.badge-active {
  background: rgba(13, 148, 136, 0.12);
  color: #2dd4bf;
  border: 1px solid rgba(13, 148, 136, 0.28);
}

.badge-soon {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.badge-offline {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.app-arrow {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  color: var(--dim);
  font-size: 1.1rem;
  transition: transform 0.2s, color 0.2s;
}

a.app-card:hover .app-arrow {
  transform: translateX(4px);
  color: var(--teal);
}

/* ----------------------------------------------------------------
   Feedback Section
---------------------------------------------------------------- */
.feedback-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

.feedback-col-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--white);
}

/* Form */
.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-hint {
  color: var(--dim);
  font-weight: 400;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--slate);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 0.65rem 0.875rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-group select option { background: var(--slate); }

.fb-status {
  margin-top: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.fb-status.success {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.3);
  color: #86efac;
}

.fb-status.error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

/* Public feedback cards */
#feedback-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-loading {
  color: var(--dim);
  font-size: 0.875rem;
  text-align: center;
  padding: 2.5rem 1rem;
}

.fb-public-card {
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.fb-public-card:hover {
  border-color: rgba(13, 148, 136, 0.28);
}

.fb-public-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.fb-public-name { font-weight: 600; font-size: 0.93rem; }

.fb-public-role {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sky);
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.15);
  padding: 0.18rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}

.fb-public-date {
  font-size: 0.75rem;
  color: var(--dim);
  margin-left: auto;
}

.fb-public-message {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.fb-public-response {
  margin-top: 0.875rem;
  padding: 0.75rem 1rem;
  background: rgba(13, 148, 136, 0.05);
  border-left: 2px solid var(--teal);
  border-radius: 0 8px 8px 0;
}

.fb-public-response-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.fb-public-response-text {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

.fb-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--dim);
  font-size: 0.875rem;
  background: var(--slate);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  line-height: 1.7;
}

/* ----------------------------------------------------------------
   Footer
---------------------------------------------------------------- */
.footer {
  background: var(--slate);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-small { color: var(--dim) !important; font-size: 0.78rem !important; margin-top: 0.25rem; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--sky); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  text-align: center;
  color: var(--dim);
  font-size: 0.8rem;
}

.footer-bottom a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: var(--muted); }

/* ----------------------------------------------------------------
   Responsive
---------------------------------------------------------------- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .apps-grid { grid-template-columns: 1fr; }
  .feedback-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}

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

/* ----------------------------------------------------------------
   Navbar
---------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.navbar-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--white);
}

.navbar-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--teal); }

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: all 0.2s;
}

@media (max-width: 600px) {
  .navbar-toggle { display: flex; }

  .navbar-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
  }

  .navbar-links.open { display: flex; }
}

/* ----------------------------------------------------------------
   Back to Top
---------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  pointer-events: none;
  z-index: 99;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover { background: #0f766e; }

.hero-logo {
  max-width: min(480px, 85vw);
  height: auto;
  margin: 0 auto 0.5rem;
  display: block;
}

.navbar-logo img { display: block; height: 14px; width: auto; }

.footer-logo-img {
  height: 40px;
  width: auto;
  margin-bottom: 0.5rem;
}