/* ==========================================================================
   HailPOS — Design Tokens & Base Styles
   Dipakai di landing system DAN landing tenant. Warna tenant di-override
   lewat CSS var --tenant-primary (lihat components/tenant/theme-vars).

   CATATAN: Semua rule dibungkus @layer base agar cascade-nya kalah
   dari utility class Tailwind (mis. px-6, py-4) di halaman yang sudah
   pakai Tailwind (backoffice, dsb), tanpa mengubah urutan <link> apapun.
   ========================================================================== */

:root {
  --primary: #0B3B36;
  --primary-light: #12564E;
  --bg: #ffffff;
  --bg-alt: #ffffff;
  --ink: #1A1A18;
  --ink-soft: #5C6B67;
  --accent: #C9A227;
  --border: #DED9CC;
  --white: #FFFFFF;
  --white-soft: #d2d2d2;
  --error: #B3261E;
  --radius: 4px;

  --app-vh: 100vh;
}

@supports (height: 100svh) {
  :root {
    --app-vh: 100svh;
    /* bukan dvh */
  }
}

@layer base {

  /* Konteks tenant memakai warna primer milik toko, fallback ke warna HailPOS
     jika --tenant-primary belum di-set (lihat layouts/tenant.blade.php) */
  body.ctx-tenant {
    --primary: var(--tenant-primary, #0B3B36);
    --primary-light: var(--tenant-primary-light, #12564E);
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  [x-cloak] {
    display: none !important;
  }

  body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  h1,
  h2,
  h3,
  h4 {
    /* font-family: 'IBM Plex Serif', Georgia, serif; */
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  .mono {
    font-family: 'IBM Plex Mono', monospace;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

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

  .wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 32px;
  }

  /* ── Buttons ─────────────────────────────────────────────── */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-size: 14.5px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
  }

  .btn-primary {
    background: var(--primary);
    color: var(--white);
  }

  .btn-primary:hover {
    background: var(--primary-light);
  }

  .btn-primary:disabled {
    background: #B9C4C1;
    cursor: not-allowed;
  }

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

  .btn-ghost:hover {
    color: var(--primary);
  }

  .btn-outline {
    border-color: var(--border);
    color: var(--ink);
  }

  .btn-outline:hover {
    border-color: var(--primary);
  }

  .btn-back {
    background: none;
    color: var(--ink-soft);
    border: none;
    font-weight: 500;
  }

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

  .btn-lg {
    padding: 14px 26px;
    font-size: 15.5px;
  }

  /* ── Nav ─────────────────────────────────────────────────── */
  nav.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
  }

  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    max-width: 1140px;
    margin: 0 auto;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: arial, serif;
    font-weight: 700;
    font-size: 20px;
  }

  .logo-mark {
    height: 30px;
    position: relative;
  }

  .logo-mark::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1.5px solid var(--accent);
    border-radius: 2px;
  }

  .tenant-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
  }

  .nav-links {
    display: flex;
    gap: 36px;
    font-size: 14.5px;
    font-weight: 500;
  }

  .nav-links a {
    color: var(--ink-soft);
    transition: color .15s;
  }

  .nav-links a:hover {
    color: var(--ink);
  }

  .nav-cta {
    display: flex;
    gap: 12px;
    align-items: center;
  }

  /* ── Hero ────────────────────────────────────────────────── */
  .hero {
    padding: 88px 0 100px;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 64px;
    align-items: center;
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 20px;
  }

  .eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
  }

  .hero h1 {
    font-size: 52px;
    line-height: 1.06;
    margin-bottom: 22px;
    letter-spacing: -0.02em;
  }

  .hero h1 em {
    font-style: italic;
    color: var(--primary);
  }

  .hero p {
    font-size: 17.5px;
    color: var(--ink-soft);
    max-width: 460px;
    margin-bottom: 34px;
  }

  .hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
  }

  .hero-note {
    font-size: 13.5px;
    color: var(--ink-soft);
  }

  .hero-note strong {
    color: var(--ink);
  }

  .hero--tenant {
    padding: 64px 0;
    text-align: left;
  }

  .hero--tenant h1 {
    font-size: 38px;
    margin-bottom: 8px;
  }

  .hero--tenant p {
    color: var(--ink-soft);
  }

  /* ── Receipt mock ────────────────────────────────────────── */
  .receipt-wrap {
    position: relative;
  }

  .receipt {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 26px 26px 22px;
    box-shadow: 0 20px 50px -18px rgba(11, 59, 54, 0.28);
    position: relative;
  }

  .receipt-head {
    text-align: center;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 14px;
    margin-bottom: 14px;
  }

  .receipt-head .store {
    font-family: arial, serif;
    font-weight: 600;
    font-size: 17px;
  }

  .receipt-head .addr {
    font-size: 11.5px;
    color: var(--ink-soft);
    margin-top: 3px;
  }

  .r-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 9px;
  }

  .r-row .qty {
    color: var(--ink-soft);
    font-size: 11.5px;
  }

  .r-row .amt {
    font-weight: 500;
  }

  .r-total {
    border-top: 1px dashed var(--border);
    margin-top: 12px;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
  }

  .r-total .amt {
    color: var(--primary);
  }

  .r-status {
    margin-top: 16px;
    padding: 10px 12px;
    background: var(--bg-alt);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
  }

  .r-status .dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.6s infinite;
  }

  .float-badge {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .float-badge.b1 {
    top: -18px;
    right: -24px;
  }

  .float-badge.b2 {
    bottom: 36px;
    left: -30px;
  }

  .float-badge .num {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--primary);
  }

  /* ── Strip ───────────────────────────────────────────────── */
  .strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 22px 0;
  }

  .strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }

  .strip-label {
    font-size: 12.5px;
    color: var(--ink-soft);
    font-weight: 500;
  }

  .strip-items {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    font-family: arial, serif;
    font-weight: 600;
    font-size: 15px;
    color: #B9B3A2;
  }

  /* ── Sections ────────────────────────────────────────────── */
  .section {
    padding: 96px 0;
  }

  .section--alt {
    background: var(--bg-alt);
  }

  .section-head {
    max-width: 560px;
    margin-bottom: 56px;
  }

  .section-head h2 {
    font-size: 36px;
    line-height: 1.16;
    margin-bottom: 14px;
  }

  .section-head p {
    color: var(--ink-soft);
    font-size: 16px;
  }

  /* ── Features ────────────────────────────────────────────── */
  .feat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
  }

  .feat-card {
    background: var(--bg-alt);
    padding: 34px 30px;
  }

  .feat-num {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 18px;
    display: block;
  }

  .feat-card h3 {
    font-size: 19px;
    margin-bottom: 10px;
    font-weight: 600;
  }

  .feat-card p {
    font-size: 14.5px;
    color: var(--ink-soft);
  }

  /* ── Pricing ─────────────────────────────────────────────── */
  .price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .price-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
  }

  .price-card--featured {
    border-color: var(--primary);
    border-width: 2px;
    box-shadow: 0 20px 40px -20px rgba(11, 59, 54, 0.25);
  }

  .price-tag {
    position: absolute;
    top: -13px;
    left: 28px;
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
  }

  .price-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .price-card .desc {
    font-size: 13.5px;
    color: var(--ink-soft);
    margin-bottom: 22px;
  }

  .price-amt {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 34px;
    font-weight: 500;
    margin-bottom: 4px;
  }

  .price-amt span {
    font-size: 14px;
    font-weight: 400;
    color: var(--ink-soft);
  }

  .price-card ul {
    list-style: none;
    margin: 24px 0 28px;
    flex-grow: 1;
  }

  .price-card li {
    font-size: 13.8px;
    color: var(--ink);
    padding: 8px 0;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
  }

  .price-card li:first-child {
    border-top: none;
  }

  .check {
    color: var(--primary);
    font-weight: 700;
  }

  /* ── Testimonials ────────────────────────────────────────── */
  .testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }

  .testi-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px;
  }

  .testi-quote {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .testi-who {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .testi-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: arial, serif;
    font-weight: 600;
    color: var(--primary);
  }

  .testi-name {
    font-size: 13.5px;
    font-weight: 600;
  }

  .testi-role {
    font-size: 12px;
    color: var(--ink-soft);
  }

  /* ── FAQ ─────────────────────────────────────────────────── */
  .faq {
    max-width: 760px;
  }

  .faq-item {
    border-top: 1px solid var(--border);
  }

  .faq-item:last-child {
    border-bottom: 1px solid var(--border);
  }

  .faq-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 22px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: arial, serif;
    font-size: 16.5px;
    font-weight: 500;
    color: var(--ink);
  }

  .faq-q .icon {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    color: var(--accent);
    transition: transform .2s;
  }

  .faq-item--open .icon {
    transform: rotate(45deg);
  }

  .faq-a p {
    padding: 0 4px 22px;
    font-size: 14.5px;
    color: var(--ink-soft);
    max-width: 640px;
  }

  /* ── CTA band ────────────────────────────────────────────── */
  .cta-band {
    background: var(--primary);
    border-radius: 16px;
    padding: 64px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    color: var(--white);
  }

  .cta-band h2 {
    color: var(--white);
    font-size: 30px;
    margin-bottom: 8px;
  }

  .cta-band p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
  }

  .cta-band .btn-primary {
    background: var(--accent);
    color: var(--primary);
  }

  .cta-band .btn-primary:hover {
    background: #DBB53C;
  }

  /* ── Footer ──────────────────────────────────────────────── */
  footer {
    border-top: 1px solid var(--border);
    padding: 56px 0 32px;
  }

  .foot-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
  }

  .foot-grid--tenant {
    grid-template-columns: 1.4fr 1fr;
  }

  .foot-brand p {
    font-size: 13.5px;
    color: var(--ink-soft);
    margin-top: 12px;
    max-width: 240px;
  }

  .foot-col h4 {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ink-soft);
    margin-bottom: 14px;
  }

  .foot-col a {
    display: block;
    font-size: 14px;
    color: var(--ink);
    padding: 6px 0;
  }

  .foot-col a:hover {
    color: var(--primary);
  }

  .foot-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--ink-soft);
  }

  /* ── Error pages ─────────────────────────────────────────── */
  .error-page {
    padding: 140px 0;
  }

  .error-box {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
  }

  .error-box h1 {
    font-size: 30px;
    margin-bottom: 14px;
  }

  .error-box p {
    color: var(--ink-soft);
    margin-bottom: 28px;
  }

  /* ── Responsive ──────────────────────────────────────────── */
  @media(max-width:900px) {
    .hero-grid {
      grid-template-columns: 1fr;
    }

    .receipt-wrap {
      max-width: 400px;
      margin: 0 auto;
    }

    .feat-grid,
    .price-grid,
    .testi-grid {
      grid-template-columns: 1fr;
    }

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

    .cta-band {
      flex-direction: column;
      text-align: center;
    }

    .nav-links {
      display: none;
    }

    .hero h1 {
      font-size: 36px;
    }
  }

  :focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }

}

/* ── About ───────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 26px;
}

.about-item h4 {
  font-family: arial, serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary);
}

.about-item p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ── Help Center ─────────────────────────────────────────── */
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.help-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px 28px;
  transition: border-color .15s, box-shadow .15s;
}

.help-card:hover {
  border-color: var(--primary);
  box-shadow: 0 20px 40px -24px rgba(11, 59, 54, 0.25);
}

.help-card h4 {
  font-family: arial, serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.help-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  line-height: 1.55;
}

.help-card__link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
}

/* ── Contact ─────────────────────────────────────────────── */
.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.contact-cta__email {
  font-size: 14px;
  color: var(--ink-soft);
}

.contact-cta__email:hover {
  color: var(--primary);
}

/* ── Responsive ──────────────────────────────────────────── */
@media(max-width:900px) {

  .about-grid,
  .help-grid {
    grid-template-columns: 1fr;
  }
}