/* ========================================
   Dsiji — Design Tokens & Global Styles
   ======================================== */
:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --border: #ECEEF2;
  --text: #0F172A;
  --muted: #6B7280;
  --accent: #2563EB;
  --accent-600: #1D4ED8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 8px 24px rgba(16,24,40,.08);
  --shadow-lg: 0 16px 40px rgba(16,24,40,.12);
  --maxw: 1200px;
  --sidebar-w: 240px;
  --transition: 200ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* Focus visible ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--small { padding: .5rem 1.125rem; font-size: .875rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1.0625rem; }

/* ========================================
   Sidebar (fixed left)
   ======================================== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  transition: transform .3s ease;
}

.sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2.5rem;
}
.sidebar__logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.sidebar__link {
  display: flex;
  align-items: center;
  padding: .625rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.sidebar__link:hover {
  color: var(--text);
  background: var(--bg);
}
.sidebar__link.is-active {
  color: var(--text);
  font-weight: 600;
  background: rgba(37,99,235,.06);
}
.sidebar__link.is-active::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

/* Social at bottom of sidebar */
.sidebar__social {
  margin-top: auto;
  display: flex;
  gap: .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.sidebar__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--muted);
  transition: color var(--transition), background var(--transition);
}
.sidebar__social a:hover {
  color: var(--accent);
  background: rgba(37,99,235,.08);
}

/* Hamburger toggle (hidden on desktop) */
.sidebar__toggle {
  display: none;
  position: fixed;
  top: .75rem;
  right: .75rem;
  z-index: 110;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.sidebar__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease;
}
.sidebar__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.sidebar__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.sidebar__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay (mobile) */
.sidebar__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 99;
}

/* ========================================
   Main content area
   ======================================== */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 6rem 2rem;
  overflow: hidden;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  background-image:
    linear-gradient(90deg, var(--accent) 1px, transparent 1px),
    linear-gradient(0deg, var(--accent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 80% at 80% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 40%, black 30%, transparent 70%);
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

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

.hero__sub {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Sections (generic)
   ======================================== */
.section {
  padding: 80px 2rem;
}
.section--alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section--contact {
  text-align: center;
}

.section__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.section__header {
  margin-bottom: 2.5rem;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
}
.section__title--center {
  text-align: center;
}

.section__sub {
  max-width: 480px;
  margin: .75rem auto 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ========================================
   Portfolio Grid
   ======================================== */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__frame {
  position: relative;
  background: #F0F1F3;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.card__frame-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.card__frame-bar span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #E5E7EB;
}
.card__frame-bar span:nth-child(2) { background: #E5E7EB; }
.card__frame-bar span:nth-child(3) { background: #E5E7EB; }

.card__frame-img {
  width: 100%;
  height: auto;
  display: block;
}

.card__body {
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .375rem;
}
.card__title {
  font-size: 1.125rem;
  font-weight: 600;
}
.card__desc {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.55;
}
.card__tag {
  font-size: .75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .02em;
  margin-bottom: .25rem;
}
.card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ========================================
   Stack
   ======================================== */
.stack__intro {
  max-width: 560px;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

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

.stack__item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.stack__item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.stack__label {
  font-size: .9375rem;
  font-weight: 500;
}

/* ========================================
   Pricing
   ======================================== */
.pricing__sub {
  max-width: 560px;
  color: var(--muted);
  margin-top: .75rem;
  font-size: 1rem;
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: visible;
}

.pricing-card--featured {
  border-color: var(--accent);
  border-width: 1.5px;
  box-shadow: var(--shadow-md);
  transform: scale(1.03);
  z-index: 1;
}

.pricing-card__badge {
  position: absolute;
  top: -.625rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.pricing-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.pricing-card__for {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.5;
}

.pricing-card__list {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  margin: 0;
}

.pricing-card__list li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--text);
}

.pricing-card__list svg {
  flex-shrink: 0;
  margin-top: .2em;
  color: var(--accent);
}

.pricing-card__price {
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.4;
}

.pricing-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.pricing__guide {
  text-align: center;
  font-size: .875rem;
  color: var(--muted);
  margin-top: 1.5rem;
  line-height: 1.6;
}

/* ========================================
   Keamanan Data / FAQ
   ======================================== */
.faq__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.faq__question {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.faq__answer {
  font-size: .9375rem;
  color: var(--muted);
  line-height: 1.6;
}

.card__tenant-note {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: .25rem;
  margin-bottom: .25rem;
  line-height: 1.4;
}

/* ========================================
   Contact
   ======================================== */
.contact__social {
  margin-top: 2rem;
}
.contact__social-label {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: .75rem;
}
.contact__social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact__social-links a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--muted);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: color var(--transition), border-color var(--transition);
}
.contact__social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem 2rem;
  text-align: center;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer__links {
  display: flex;
  gap: 1.5rem;
}
.footer__links a {
  font-size: .875rem;
  color: var(--muted);
  transition: color var(--transition);
}
.footer__links a:hover {
  color: var(--accent);
}
.footer__social {
  display: flex;
  gap: .5rem;
}
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--muted);
  transition: color var(--transition), background var(--transition);
}
.footer__social a:hover {
  color: var(--accent);
  background: rgba(37,99,235,.06);
}
.footer__copy {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: .75rem;
}

/* ========================================
   Responsive — <= 1024px (tablet)
   ======================================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    padding: 2rem 1.5rem;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar__toggle {
    display: flex;
  }
  .sidebar__overlay.is-visible {
    display: block;
  }
  .sidebar__link.is-active::before {
    left: -1.5rem;
  }
  .main {
    margin-left: 0;
  }
  .hero {
    min-height: 80vh;
    padding: 5rem 1.5rem;
  }
  .section {
    padding: 48px 1.5rem;
  }
  .portfolio__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stack__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-card--featured {
    transform: none;
  }
}

/* ========================================
   Responsive — <= 640px (mobile)
   ======================================== */
@media (max-width: 640px) {
  .pricing__grid {
    grid-template-columns: 1fr;
  }
  .faq__grid {
    grid-template-columns: 1fr;
  }
  .hero__title {
    font-size: 2rem;
  }
  .hero__sub {
    font-size: .9375rem;
  }
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
  .portfolio__grid {
    grid-template-columns: 1fr;
  }
  .stack__grid {
    grid-template-columns: 1fr;
  }
  .footer__inner {
    flex-direction: column;
    gap: .75rem;
  }
  .footer__links {
    gap: 1rem;
  }
}

/* ========================================
   Reduced motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
