/* ==========================================================================
   Baghzy APK Download Portal — Clean White Theme with Black Buttons
   Source of Truth: DESIGN.md & Official Baghzy Brand Assets
   ========================================================================== */

:root {
  /* Color Tokens */
  --canvas: #FAF9F5;
  --surface: #FFFFFF;
  --surface-soft: #F1F2EE;

  --ink-primary: #111814;
  --ink-title-green: #143823;
  --ink-muted: #5A625C;
  --ink-subtle: #8A928C;

  /* Buttons — Solid Black per User Request */
  --btn-black: #111111;
  --btn-black-hover: #262928;
  --btn-black-active: #000000;

  --primary-green: #1B4E32;
  --primary-green-hover: #143B26;
  --primary-deep: #0F2E1E;
  --primary-soft: #E7F1EA;
  --green-accent: #2E7D52;

  --eyebrow-red: #D94B3D;
  --tan-featured: #FDF3E1;
  --harvest-gold: #D8A32A;

  --border-hairline: #E5E7E2;
  --border-subtle: #ECEEEA;
  --border-phone: #122B1C;

  /* Typography */
  --font-display: 'Epilogue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Radii */
  --radius-pill: 9999px;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-button: 0 4px 14px rgba(17, 17, 17, 0.2);
  --shadow-phone: 0 24px 64px rgba(15, 46, 30, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);

  /* Layout */
  --container-max: 1180px;
  --gutter-mobile: 20px;
  --gutter-desktop: 36px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--canvas);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter-mobile);
  padding-right: var(--gutter-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--gutter-desktop);
    padding-right: var(--gutter-desktop);
  }
}

/* In-App Browser Notice */
.in-app-notice {
  background-color: var(--primary-deep);
  color: #FFFFFF;
  font-size: 13px;
  padding: 10px var(--gutter-mobile);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.in-app-notice .notice-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.in-app-notice .notice-icon {
  flex-shrink: 0;
  color: #7CD0A5;
}

.in-app-notice .notice-text {
  flex-grow: 1;
  line-height: 1.4;
}

.in-app-notice .dots-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0 5px;
  border-radius: 4px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

/* Site Header */
.site-header {
  padding-top: 18px;
  padding-bottom: 18px;
  background: var(--canvas);
  border-bottom: 1px solid var(--border-hairline);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand-official-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(18, 52, 32, 0.15);
  transition: transform 0.15s ease;
}

.brand-official-logo:hover {
  transform: scale(1.03);
}

.brand-official-wordmark {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.header-btn-black {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  background-color: var(--btn-black);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-subtle);
  border: none;
  cursor: pointer;
}

.header-btn-black:hover {
  background-color: var(--btn-black-hover);
  transform: translateY(-1px);
}

.header-btn-black:active {
  transform: translateY(1px);
}

.download-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ios-coming-soon {
  background-color: #7a7a7a;
  color: #f5f5f5;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.9;
  box-shadow: none;
}

.ios-coming-soon:hover {
  background-color: #7a7a7a;
  transform: none;
}

/* Tighten header on very small phones (e.g. 320-360px) so the logo
   wordmark and Download button never crowd or wrap awkwardly */
@media (max-width: 400px) {
  .brand-official-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .brand-official-wordmark {
    height: 24px;
  }

  .header-btn-black {
    font-size: 13px;
    padding: 9px 16px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .download-buttons {
    gap: 6px;
  }
}

/* Hero Section */
.hero-section {
  padding-top: 36px;
  padding-bottom: 56px;
}

@media (min-width: 900px) {
  .hero-section {
    padding-top: 52px;
    padding-bottom: 72px;
  }
}

.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

@media (min-width: 900px) {
  .hero-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 52px;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eyebrow-red);
  margin-bottom: 14px;
}

.hero-main-title {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.02;
  font-weight: 900;
  color: var(--primary-green);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

@media (min-width: 600px) {
  .hero-main-title {
    font-size: 72px;
  }
}

@media (min-width: 900px) {
  .hero-main-title {
    font-size: 82px;
  }
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-green);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

@media (min-width: 600px) {
  .hero-tagline {
    font-size: 16px;
  }
}

.hero-sub-title {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

@media (min-width: 600px) {
  .hero-sub-title {
    font-size: 34px;
  }
}

.hero-desc-text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 500px;
  margin-bottom: 20px;
}

/* Hero Key Feature Highlight Bullets (Content-Full Hero) */
.hero-highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-deep);
}

.hero-highlight-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Primary CTA */
.hero-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.btn-black-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--btn-black);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: var(--shadow-button);
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-black-primary:hover {
  background-color: var(--btn-black-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.3);
}

.btn-black-primary:active {
  transform: translateY(1px);
}

.hero-meta-line {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Phone Mockup Frame */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.phone-mockup-frame {
  width: 100%;
  max-width: 270px;
  background: #0B1C12;
  border: 7px solid #14281C;
  border-radius: 38px;
  box-shadow: var(--shadow-phone);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  .phone-mockup-frame {
    max-width: 285px;
  }
}

.phone-top-bar {
  background: #14281C;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.phone-earpiece {
  width: 44px;
  height: 3.5px;
  background: #2C4234;
  border-radius: 2px;
}

.phone-screen-container {
  width: 100%;
  background: #FAF9F5;
  overflow: hidden;
  position: relative;
}

.phone-screenshot-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 0 0 30px 30px;
}

/* Features Section (8 Grid) */
.features-section {
  padding-top: 52px;
  padding-bottom: 60px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}

@media (min-width: 768px) {
  .features-section {
    padding-top: 64px;
    padding-bottom: 72px;
  }
}

.section-title-wrap {
  margin-bottom: 32px;
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-green);
  margin-bottom: 6px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .section-heading {
    font-size: 34px;
  }
}

.section-subtext {
  font-size: 15px;
  color: var(--ink-muted);
  margin-top: 6px;
}

.features-grid-8 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .features-grid-8 {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 992px) {
  .features-grid-8 {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.feature-box {
  background: var(--canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.feature-box:hover {
  transform: translateY(-2px);
  border-color: #CBD0C8;
}

.feature-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  color: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-box-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-deep);
}

.feature-box-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* Install Guide Section */
.install-section {
  padding-top: 48px;
  padding-bottom: 56px;
  background: var(--canvas);
}

@media (min-width: 768px) {
  .install-section {
    padding-top: 64px;
    padding-bottom: 72px;
  }
}

.install-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 28px;
}

@media (min-width: 600px) {
  .install-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 992px) {
  .install-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.install-step-card {
  background: #FFFFFF;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
}

.step-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--btn-black);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 6px;
}

.step-card-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* Bottom Download Strip */
.bottom-banner-strip {
  padding: 48px 0 64px;
  text-align: center;
  background: var(--canvas);
}

.bottom-banner-box {
  background: #FFFFFF;
  border: 1.5px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}

.bottom-banner-box h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 8px;
}

.bottom-banner-box p {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 22px;
}

.bottom-banner-box .download-buttons {
  justify-content: center;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: #FFFFFF;
  border-top: 1px solid var(--border-hairline);
  padding: 24px 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-logo-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
}

.footer-wordmark-img {
  height: 22px;
  width: auto;
  object-fit: contain;
}

/* WhatsApp In-App Browser Guidance Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-deep);
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink-muted);
  cursor: pointer;
}

.modal-step {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.modal-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-green);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
}

/* ==========================================================================
   Compact Mobile Hero — phone mockup sits side-by-side with the hero copy
   (not stacked) so both are visible together on one screen. Secondary
   text (long description, bullet sub-text, meta line) is trimmed on
   phones to make room; full text still shows on tablet/desktop.
   ========================================================================== */
@media (max-width: 640px) {
  .site-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .hero-section {
    padding-top: 16px;
    padding-bottom: 18px;
  }

  .hero-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  .hero-right {
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .hero-eyebrow {
    font-size: 9px;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
  }

  .hero-main-title {
    font-size: 30px;
    line-height: 1;
    margin-bottom: 3px;
  }

  .hero-tagline {
    font-size: 11px;
    margin-bottom: 5px;
  }

  .hero-sub-title {
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  /* Long-form description is dropped on phones to make room for the
     phone mockup sitting alongside the copy; still shown on tablet+ */
  .hero-desc-text {
    display: none;
  }

  .hero-highlights-list {
    gap: 6px;
    margin-bottom: 10px;
  }

  .hero-highlight-item {
    font-size: 10.5px;
    line-height: 1.3;
    gap: 6px;
  }

  /* Keep the bold feature name, drop the trailing description */
  .hero-highlight-desc {
    display: none;
  }

  .hero-highlight-icon {
    width: 16px;
    height: 16px;
    border-radius: 5px;
  }

  .hero-highlight-icon svg {
    width: 9px;
    height: 9px;
  }

  .hero-cta-wrap {
    gap: 4px;
  }

  .btn-black-primary {
    padding: 9px 18px;
    font-size: 12px;
  }

  /* Meta line (APK size / version) dropped on phones — not essential
     next to the download button */
  .hero-meta-line {
    display: none;
  }

  .phone-mockup-frame {
    max-width: 118px;
    border-width: 4px;
    border-radius: 20px;
  }

  .phone-top-bar {
    height: 9px;
  }

  .phone-earpiece {
    width: 26px;
    height: 2.5px;
  }

  .phone-screen-container {
    height: 230px;
  }

  .phone-screenshot-img {
    height: 230px;
    object-fit: cover;
    object-position: top;
    border-radius: 0 0 16px 16px;
  }
}

/* Extra tightening for very narrow phones so the two columns never crowd */
@media (max-width: 340px) {
  .hero-main-title {
    font-size: 26px;
  }

  .hero-sub-title {
    font-size: 13px;
  }

  .phone-mockup-frame {
    max-width: 100px;
  }

  .phone-screen-container {
    height: 200px;
  }

  .phone-screenshot-img {
    height: 200px;
  }
}