/* ==========================================================================
   Components — PT Inklusi Teknologi Strategis
   Aesthetics Aligned with GEOAI Indonesia (geoai.id)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Site Header & Nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--motion-ui) var(--ease-press);
}

.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-emblem {
  height: 38px;
  width: 38px;
  object-fit: contain;
  border-radius: var(--radius-xs);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.brand-dot {
  color: var(--brand);
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding-inline: 1rem;
  border-radius: var(--radius-action);
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color var(--motion-ui), color var(--motion-ui);
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--surface-warm);
  color: var(--brand);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Switcher (geoai.id style) */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  background-color: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  min-width: 38px;
  padding-inline: 0.65rem;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: all var(--motion-ui);
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.active {
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--ink);
}

.mobile-menu-cta {
  display: none;
}

/* --------------------------------------------------------------------------
   2. Buttons (.g-btn — geoai.id style)
   -------------------------------------------------------------------------- */
.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-action);
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--motion-press) var(--ease-press),
              color var(--motion-press) var(--ease-press),
              border-color var(--motion-press) var(--ease-press),
              transform var(--motion-press) var(--ease-press),
              box-shadow var(--motion-press) var(--ease-press);
}

.g-btn:active {
  transform: scale(0.98) translateY(1px);
}

.g-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand);
}

.g-btn-primary {
  background-color: var(--brand);
  color: var(--ink-inverse);
}

.g-btn-primary:hover {
  background-color: var(--brand-deep);
  color: var(--ink-inverse);
}

.g-btn-secondary {
  background-color: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.g-btn-secondary:hover {
  border-color: var(--ink);
}

.g-btn-inverse {
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.g-btn-inverse:hover {
  background-color: #f0fdf4;
  color: var(--brand-deep);
}

.g-btn-ghost-inverse {
  background-color: transparent;
  color: var(--ink-inverse);
  border-color: rgba(255, 255, 255, 0.45);
}

.g-btn-ghost-inverse:hover {
  border-color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--ink-inverse);
}

.g-btn-sm {
  min-height: 38px;
  padding: 8px 18px;
  font-size: 14px;
}

.g-btn-lg {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   3. Cards & Pills (.g-card, .g-pill — geoai.id style)
   -------------------------------------------------------------------------- */
.g-card {
  position: relative;
  background-color: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.8rem;
  box-shadow: inset 0 1px #fff, 0 1px 2px rgba(20, 20, 20, 0.03);
  transition: border-color var(--motion-ui) var(--ease-press),
              box-shadow var(--motion-ui) var(--ease-press),
              transform var(--motion-ui) var(--ease-press);
}

.g-card:hover {
  border-color: var(--line-strong);
  box-shadow: inset 0 1px #fff, 0 8px 24px -12px rgba(20, 20, 20, 0.12);
}

.g-card-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  background-color: var(--brand-tint);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(15, 125, 91, 0.15);
}

.g-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background-color: var(--surface);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.g-pill-brand {
  background-color: var(--brand-tint);
  color: var(--brand);
  border-color: rgba(15, 125, 91, 0.2);
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* --------------------------------------------------------------------------
   4. Form Styles (Clean & Architectural)
   -------------------------------------------------------------------------- */
.form-card {
  position: relative;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 2.4rem;
  box-shadow: inset 0 1px #fff, 0 4px 20px -8px rgba(0, 0, 0, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
}

.form-label .required {
  color: var(--cat-disaster);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background-color: var(--surface);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: all var(--motion-press) var(--ease-press);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 125, 91, 0.15);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

/* --------------------------------------------------------------------------
   5. Toast Notification
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 1.1rem 1.4rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 420px;
  border-left: 4px solid var(--brand);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.35s var(--ease-press);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast--error {
  border-left-color: var(--cat-disaster);
}

.toast-content h5 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.toast-content p {
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   6. Footer (geoai.id style clean tabular)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--surface-warm);
  border-top: 1px solid var(--line);
  padding-top: 4.5rem;
  padding-bottom: 2.5rem;
}

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

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  transition: color var(--motion-ui);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.contact-card-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Responsive Overrides */
@media (min-width: 1025px) and (max-width: 1180px) {
  .nav-link {
    padding-inline: 0.65rem;
    font-size: 14px;
  }
  .nav-container {
    gap: 0.75rem;
  }
}

@media (max-width: 1024px) {
  #navContactBtn {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-action);
    background-color: var(--surface-warm);
    border: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    padding: 0;
    transition: background-color var(--motion-ui);
    flex-shrink: 0;
  }

  .mobile-toggle:hover,
  .mobile-toggle:active {
    background-color: var(--line-strong);
  }

  .mobile-menu-cta {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
  }

  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.25rem 1.5rem 1.75rem;
    gap: 0.35rem;
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    z-index: 100;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu .nav-link {
    width: 100%;
    height: 44px;
    font-size: 15px;
    padding-inline: 0.75rem;
    border-radius: var(--radius-control);
    justify-content: flex-start;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .contact-card-list .g-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .contact-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .brand-sub {
    display: none;
  }
  .brand-emblem {
    width: 32px;
    height: 32px;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .nav-actions {
    gap: 0.45rem;
  }
  .lang-btn {
    min-width: 34px;
    height: 30px;
    font-size: 12px;
    padding-inline: 0.5rem;
  }
}
