/* ============================================================
   HAKAYA GP CHILD — hakaya.css
   Palette: cream #ede8de | ink #1c1a17 | ink-light #3d3a35 | muted #8c897f
   Fonts:   IBM Plex Sans Arabic (400,700) + PT Serif (400)
   Layout:  100dvh, no scroll — fully fluid across all screen sizes
   ============================================================ */

:root {
  --cream: #ede8de;
  --cream-dark: #e4ddd1;
  --ink: #1c1a17;
  --ink-light: #3d3a35;
  --ink-muted: #8c897f;

  /* Fluid card sizing: 200px on 1280px screens → 280px on 1920px+ */
  --card-w: clamp(200px, 14vw, 300px);
  --card-gap: clamp(40px, 4vw, 80px);
  --vp-w: calc(var(--card-w) * 2 + var(--card-gap));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: var(--cream) !important;
  color: var(--ink) !important;
  font-family: "IBM Plex Sans Arabic", "PT Serif", serif !important;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

/* Hide GP theme chrome */
.main-navigation,
.nav-menu,
#site-navigation,
.navigation-branding,
.site-description,
.site-footer .copyright,
.generated-columns-container,
#footer-widgets {
  display: none !important;
}

.site-header {
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  border: none !important;
}
.inside-header {
  padding: 0 !important;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

/* ── Wrap ───────────────────────────────────────────────────── */
.hk-wrap {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────── */
.hk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Fluid padding: 26px at 1280px → 48px at 2560px */
  padding: clamp(20px, 2.2vh, 48px) clamp(36px, 3.5vw, 80px);
}

.hk-logo {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}
.hk-logo img {
  /* Fluid logo height: 52px → 80px */
  height: clamp(52px, 4.5vw, 80px);
  width: auto;
  display: block;
}

.hk-logo-arabic {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  /* Fluid: 20px → 30px */
  font-size: clamp(20px, 1.6vw, 30px);
  letter-spacing: 1px;
  direction: rtl;
}
.hk-logo-latin {
  font-family: "PT Serif", serif;
  font-weight: 400;
  /* Fluid: 12px → 18px */
  font-size: clamp(12px, 0.9vw, 18px);
  letter-spacing: 6px;
  margin-top: 2px;
}

.hk-insta-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.hk-insta-link:hover {
  opacity: 0.5;
}
.hk-insta-link svg {
  /* Fluid icon: 24px → 36px */
  width: clamp(24px, 1.8vw, 36px);
  height: clamp(24px, 1.8vw, 36px);
  display: block;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hk-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: 0 6%;
}

.hk-intro-arabic {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 400;
  /* Fluid: 12px → 20px */
  font-size: clamp(12px, 1.1vw, 20px);
  line-height: 2.1;
  direction: rtl;
  color: var(--ink-light);
  max-width: 900px;
  margin: 0 auto clamp(12px, 1.2vh, 24px);
}

.hk-intro-english {
  font-family: "PT Serif", serif;
  font-weight: 400;
  font-style: italic;
  /* Fluid: 12px → 19px */
  font-size: clamp(12px, 1vw, 19px);
  line-height: 1.9;
  color: var(--ink-light);
  max-width: 800px;
  margin: 0 auto;
}

/* ── Books ──────────────────────────────────────────────────── */
.hk-books {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-bottom: clamp(20px, 2.5vh, 48px);
}

/* ── Stage: arrow | viewport | arrow ───────────────────────── */
.hk-stage {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 28px);
}

/* ── Arrows ─────────────────────────────────────────────────── */
.hk-arrow {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  padding: clamp(6px, 0.5vw, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  opacity: 0.5;
}
.hk-arrow:hover,
.hk-arrow:focus {
  opacity: 1;
}
.hk-arrow svg {
  /* Fluid: 18px → 28px */
  width: clamp(18px, 1.4vw, 28px);
  height: clamp(18px, 1.4vw, 28px);
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* ── Viewport: clips the track ──────────────────────────────── */
.hk-viewport {
  overflow: hidden;
  width: var(--vp-w);
  flex-shrink: 0;
}

/* ── Track ──────────────────────────────────────────────────── */
.hk-track {
  display: flex;
  gap: var(--card-gap);
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  flex-wrap: nowrap;
}

/* ── Card ───────────────────────────────────────────────────── */
.hk-card {
  flex: 0 0 var(--card-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 0.7vh, 14px);
}

.hk-card-number {
  /* Fluid: 11px → 15px */
  font-size: clamp(11px, 0.75vw, 15px);
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--ink-muted);
}

/* ── Card cover ─────────────────────────────────────────────── */
.hk-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
}

.hk-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.hk-no-cover {
  position: absolute;
  inset: 0;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(9px, 0.6vw, 13px);
  letter-spacing: 3px;
  color: var(--ink-muted);
}

.hk-card-cover:hover img {
  transform: scale(1.025);
}

.hk-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 26, 23, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 1;
}
.hk-card-cover:hover .hk-card-overlay {
  background: rgba(28, 26, 23, 0.15);
}

.hk-btn-preview {
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 0.25s,
    transform 0.25s;
  background: var(--cream);
  border: none;
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", sans-serif;
  /* Fluid: 9px → 13px */
  font-size: clamp(9px, 0.65vw, 13px);
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: clamp(8px, 0.6vw, 13px) clamp(16px, 1.4vw, 26px);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  position: relative;
  z-index: 2;
}
.hk-card-cover:hover .hk-btn-preview {
  opacity: 1;
  transform: translateY(0);
}

.hk-btn-download {
  /* Fluid: 9px → 13px */
  font-size: clamp(9px, 0.65vw, 13px);
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  margin-top: clamp(2px, 0.3vh, 6px);
  cursor: pointer;
  font-family: "PT Serif", serif;
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  transition: letter-spacing 0.2s;
}
.hk-btn-download:hover,
.hk-btn-download:focus {
  letter-spacing: 2.5px;
  outline: none;
}

/* ── Footer ─────────────────────────────────────────────────── */
.hk-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.2vh, 22px) clamp(36px, 3.5vw, 80px);
  border-top: 1px solid rgba(28, 26, 23, 0.08);
}

.hk-footer-text {
  /* Fluid: 9px → 13px */
  font-size: clamp(9px, 0.65vw, 13px);
  letter-spacing: 4px;
  color: var(--ink-muted);
  text-transform: uppercase;
}

/* footer insta only used in old mobile layout — hidden everywhere now */
.hk-footer-insta {
  display: none !important;
}

/* ── Hidden Real3D holder ───────────────────────────────────── */
.hk-r3d-holder {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hk-wrap {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  /* Header: logo left, insta right */
  .hk-header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 20px 24px !important;
    flex-shrink: 0 !important;
  }

  .hk-logo img {
    height: 60px;
  }
  .hk-logo-arabic {
    font-size: 20px;
  }
  .hk-logo-latin {
    font-size: 11px;
    letter-spacing: 5px;
  }
  .hk-insta-link svg {
    width: 24px;
    height: 24px;
  }

  /* Hero: narrower text */
  .hk-hero {
    padding: 0 40px !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .hk-intro-arabic {
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 10px;
  }
  .hk-intro-english {
    font-size: 14px;
    line-height: 1.5;
  }

  /* Books */
  .hk-books {
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  .hk-stage {
    gap: 6px;
  }

  .hk-viewport {
    width: calc(100vw - 80px);
  }

  .hk-track {
    gap: 20px;
  }

  .hk-card {
    flex: 0 0 calc(100vw - 80px);
  }

  .hk-card-cover {
    max-height: 46vh;
  }

  /* Footer: same as desktop */
  .hk-footer {
    padding: 10px 24px 14px !important;
    border-top: 1px solid rgba(28, 26, 23, 0.08) !important;
    flex-shrink: 0 !important;
  }
  .hk-footer-text {
    display: block !important;
    font-size: 9px;
  }
}
