/**
 * Hipopo Design System v5 — tokens, typography, buttons, layout shell
 * Mobile-first · RTL · WCAG-friendly contrast targets
 */

:root {
  /* Brand — sampled from official Hipopo logo */
  --hp-brand: #017aa8;
  --hp-brand-hover: #015a92;
  --hp-brand-deep: #015a92;
  --hp-accent: #4af0f2;
  --hp-accent-mid: #06d2e6;
  --hp-brand-soft: #e8fcfd;
  --hp-accent-glow: rgba(74, 240, 242, 0.22);
  --hp-ink: #12343b;
  --hp-text: #263238;
  --hp-text-muted: #5f6b73;
  --hp-sale: #f97316;
  --hp-sale-hover: #ea580c;
  --hp-wa: #25d366;
  --hp-bg: #f7fbfc;
  --hp-surface: #ffffff;
  --hp-border: #ddecef;
  --hp-border-strong: #b8d4db;

  /* Layout */
  --hp-container: min(1280px, 100% - 2rem);
  --hp-section-pad: 2rem;
  --hp-radius: 16px;
  --hp-radius-pill: 999px;

  /* Type scale (rem) */
  --hp-font: "Assistant", "Heebo", "Noto Sans Hebrew", system-ui, sans-serif;
  --hp-h1: clamp(1.875rem, 4vw, 3.25rem);
  --hp-h2: clamp(1.5rem, 2.5vw, 2.25rem);
  --hp-h3: 1.125rem;
  --hp-body: 1rem;
  --hp-body-lg: 1.0625rem;
  --hp-small: 0.875rem;

  /* Elevation */
  --hp-shadow-sm: 0 2px 8px rgba(18, 52, 59, 0.06);
  --hp-shadow-md: 0 8px 24px rgba(18, 52, 59, 0.08);
  --hp-shadow-lg: 0 16px 40px rgba(18, 52, 59, 0.1);

  /* Motion */
  --hp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hp-dur: 0.25s;
}

@media (min-width: 768px) {
  :root {
    --hp-section-pad: 3rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --hp-section-pad: 4.5rem;
  }
}

/* Page shell */
.hipopo-hp-v5,
.hipopo-hp-v5 * {
  box-sizing: border-box;
}

.hipopo-hp-v5 {
  font-family: var(--hp-font);
  font-size: var(--hp-body);
  line-height: 1.55;
  color: var(--hp-text);
  background: var(--hp-bg);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(74, 240, 242, 0.28);
}

/* Override WP/Elementor pink (#f78da7) on tap/focus — Hipopo aqua/navy only */
.hipopo-hp-v5 a,
.hipopo-hp-v5 button {
  -webkit-tap-highlight-color: rgba(74, 240, 242, 0.28);
}

.hipopo-hp-v5 a:focus,
.hipopo-hp-v5 a:active,
.hipopo-hp-v5 button:focus,
.hipopo-hp-v5 button:active {
  outline-color: var(--hp-accent-mid) !important;
}

.hipopo-hp-v5 a:focus-visible,
.hipopo-hp-v5 button:focus-visible {
  outline: 2px solid var(--hp-accent-mid) !important;
  outline-offset: 2px;
}

.hipopo-hp-v5 a:active:not(.hp-btn) {
  color: var(--hp-brand-deep) !important;
}

.hipopo-hp-v5 input:focus,
.hipopo-hp-v5 select:focus,
.hipopo-hp-v5 textarea:focus {
  border-color: var(--hp-accent-mid) !important;
  outline: none;
  box-shadow: 0 0 0 3px var(--hp-accent-glow) !important;
}

body.hipopo-v5-page {
  -webkit-tap-highlight-color: rgba(74, 240, 242, 0.28);
}

body.hipopo-v5-page a:focus-visible,
body.hipopo-v5-page button:focus-visible {
  outline-color: var(--hp-accent-mid) !important;
}

.hipopo-hp-v5 img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hp-container {
  width: var(--hp-container);
  margin-inline: auto;
}

.hp-section {
  padding-block: var(--hp-section-pad);
}

.hp-section__head {
  margin-bottom: 1.5rem;
  text-align: center;
}

.hp-section__head h2 {
  margin: 0 0 0.5rem;
  font-size: var(--hp-h2);
  font-weight: 700;
  color: var(--hp-ink);
  line-height: 1.2;
}

.hp-section__head p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--hp-text-muted);
  font-size: var(--hp-body-lg);
}

.hp-eyebrow {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: var(--hp-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hp-brand);
}

/* Buttons — only 3 variants site-wide */
.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.75rem;
  border-radius: var(--hp-radius-pill);
  font-family: inherit;
  font-size: var(--hp-body);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background var(--hp-dur) var(--hp-ease),
    border-color var(--hp-dur) var(--hp-ease),
    color var(--hp-dur) var(--hp-ease),
    transform var(--hp-dur) var(--hp-ease),
    box-shadow var(--hp-dur) var(--hp-ease);
  white-space: nowrap;
}

.hp-btn:focus-visible {
  outline: 3px solid var(--hp-brand);
  outline-offset: 2px;
}

.hp-btn--primary {
  background: var(--hp-brand);
  color: #fff;
  border-color: var(--hp-brand);
}

.hp-btn--primary:hover {
  background: var(--hp-brand-hover);
  border-color: var(--hp-brand-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--hp-shadow-md);
}

.hp-btn--secondary {
  background: var(--hp-surface);
  color: var(--hp-brand);
  border-color: var(--hp-accent-mid);
  box-shadow: 0 0 0 1px var(--hp-accent-glow);
}

.hp-btn--secondary:hover {
  background: var(--hp-brand-soft);
  color: var(--hp-brand-deep);
  border-color: var(--hp-accent);
}

.hp-btn--sale {
  background: var(--hp-sale);
  color: #fff;
  border-color: var(--hp-sale);
}

.hp-btn--sale:hover {
  background: var(--hp-sale-hover);
  border-color: var(--hp-sale-hover);
  color: #fff;
}

.hp-btn--wa {
  background: var(--hp-wa);
  color: #fff;
  border-color: var(--hp-wa);
}

.hp-btn--ghost {
  background: transparent;
  color: var(--hp-brand);
  border-color: transparent;
  padding-inline: 0.5rem;
  min-height: auto;
}

.hp-btn--sm {
  min-height: 40px;
  padding: 0.5rem 1.25rem;
  font-size: var(--hp-small);
}

.hp-btn--lg {
  min-height: 48px;
  padding: 0.875rem 2rem;
  font-size: var(--hp-body-lg);
}

/* Trust badge */
.hp-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-pill);
  font-size: var(--hp-small);
  font-weight: 500;
  color: var(--hp-text);
  box-shadow: var(--hp-shadow-sm);
}

.hp-trust svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: var(--hp-accent-mid);
}

/* Reveal */
.hp-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--hp-ease), transform 0.5s var(--hp-ease);
}

.hp-reveal.is-visible {
  opacity: 1;
  transform: none;
}
