/* Rivex static site — Wix visual parity */
@font-face {
  font-family: "Alfabet";
  src: url("../assets/fonts/alfabet.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Madefor";
  src: url("../assets/fonts/madefor-text.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #FFFFFF;
  --pale: #E2E8F0;
  --light: #F5F7FA;
  --navy: #010C23;
  --black: #000000;
  --muted: #4A5568;
  --header-h: 100px;
  --radius-card: 10px;
  --max: 1105px;
  --font: "Madefor", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-logo: "Alfabet", "Madefor", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: auto;
  scroll-padding-top: var(--header-h);
  overflow-x: hidden;
  max-width: 100%;
}
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  font-size: 16px;
  line-height: 25.6px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-x: none;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ========== Header ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  /* Transparent over the pale hero; solid white once scrolled (matches Wix) */
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-solid {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(1, 12, 35, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: min(100% - 2.5rem, 1200px);
  margin-inline: auto;
}
.logo {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  color: var(--black);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  width: 44px;
  height: 44px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 1px;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--navy);
  color: var(--white) !important;
  width: 150px;
  height: 48px;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-download:hover { opacity: 0.92; }
.btn-download svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-download .btn-label { display: inline; }

/* Hide in-header text nav — drawer only */
.site-header .nav-inline { display: none !important; }

@media (max-width: 749px) {
  :root { --header-h: 80px; }
  .logo { font-size: 28px; }
  .btn-download {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 8px;
  }
  .btn-download .btn-label { display: none; }
}

/* ========== Mobile nav drawer (right panel + dim overlay) ========== */
.nav-overlay[hidden],
.nav-drawer[hidden] {
  display: none !important;
}
.nav-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(1, 12, 35, 0.85);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.nav-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  z-index: 310;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  padding: 40px;
  text-align: left;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.645, 0.045, 0.355, 1), visibility 0.4s ease;
  overflow-y: auto;
}
.nav-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
.nav-close {
  align-self: flex-end;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.nav-close svg { width: 22px; height: 22px; }
.nav-drawer a {
  display: block;
  text-decoration: none;
  color: var(--black);
  font-family: var(--font);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.4;
  padding: 14px 0;
  letter-spacing: 0;
}
.nav-drawer a.is-active,
.nav-drawer a[aria-current="page"] {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ========== Cloud dividers ========== */
.cloud-divider {
  display: block;
  width: 100%;
  height: 100px;
  margin: 0;
  padding: 0;
  overflow: visible;
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: 709px 100%;
}
.hero .cloud-divider {
  background-image: url('../assets/wix-cloud-1.svg');
}
.features .cloud-divider {
  background-image: url('../assets/wix-cloud-2.svg');
}
.how .cloud-divider {
  background-image: url('../assets/wix-cloud-3.svg');
}
.cloud-divider--footer {
  background-image: url('../assets/wix-cloud-4.svg');
  background-color: transparent;
}

/* ========== Pills ========== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--pale);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.pill-icon {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--navy);
  flex-shrink: 0;
  transform: rotate(-16deg);
}

/* ========== Hero ========== */
.hero {
  background: var(--pale);
  padding: calc(var(--header-h) + 3rem) 0 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: 3.5rem;
}
.hero-copy h1 {
  font-family: var(--font);
  font-size: 48px;
  line-height: 62.4px;
  letter-spacing: normal;
  margin: 1rem 0 1.1rem;
  font-weight: 700;
  max-width: 527px;
  color: var(--black);
}
.hero-copy p {
  color: var(--muted);
  font-size: 16px;
  line-height: 25.6px;
  max-width: 34rem;
  margin: 0 0 1.5rem;
  font-weight: 500;
}
.app-badge {
  display: inline-block;
  transition: opacity 0.15s;
}
.app-badge:hover { opacity: 0.85; }
.app-badge img {
  height: 53px;
  width: 170px;
  object-fit: contain;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 520px;
  padding-bottom: 0;
  /* Clip at the full-width .hero section, not this inset column — otherwise
     rotated blobs become a solid grey-blue rectangle around the phone. */
  overflow: visible;
  min-width: 0;
  background: transparent;
}
.blob {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  left: 50%;
  top: 50%;
  transform-origin: center center;
}
.blob img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}
.blob-gray {
  opacity: 0.5;
  transform: translate(-50%, -50%) rotate(-40deg);
}
.blob-navy {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-16deg);
}
.hero-visual .blob {
  width: 70%;
  max-width: 400px;
  height: 70%;
}
.phone {
  position: relative;
  z-index: 1;
  width: min(270px, 70%);
  background: transparent;
  filter: drop-shadow(0 25px 50px rgba(1, 12, 35, 0.25));
}
.phone img {
  width: 100%;
  height: auto;
  background: transparent;
  /* PNGs already include the device silhouette + alpha; a CSS radius paints
     an opaque rounded rect over the transparent corners. */
  border-radius: 0;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy h1 {
    font-size: 36px;
    line-height: 1.25;
    max-width: none;
    margin-inline: auto;
  }
  .hero-copy p { margin-inline: auto; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-visual { min-height: 400px; order: 2; }
}

/* ========== Features ========== */
.features {
  background: var(--white);
  padding: 7.5rem 0 0;
  position: relative;
  overflow-x: hidden;
}
.section-intro {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 5.5rem;
}
.section-intro h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  letter-spacing: normal;
  line-height: 1.25;
  margin: 1rem 0 0;
  font-weight: 700;
}

.feature-card {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--pale);
  border-radius: var(--radius-card);
  padding: 3rem 3.25rem;
  margin-bottom: 5.5rem;
  overflow: visible;
  min-height: 600px;
  width: 100%;
}
.feature-card.reverse { grid-template-columns: 1.05fr 1fr; }
.feature-card.reverse .feature-media { order: 2; }
.feature-card.reverse .feature-text { order: 1; }

.feature-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 480px;
  overflow: visible;
  min-width: 0;
}
.feature-media .blob {
  width: 100%;
  max-width: 350px;
  height: 100%;
}
.feature-media .phone {
  width: 250px;
  max-width: 75%;
  margin-top: 0;
}
.feature-float {
  position: absolute;
  width: 225px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(1, 12, 35, 0.18);
  z-index: 2;
  background: var(--white);
}
.feature-float.right { right: -4%; bottom: 10%; }
.feature-float.left { left: -4%; bottom: 8%; }
.feature-card.reverse .feature-float.left {
  left: auto;
  right: -2%;
  top: 22%;
  bottom: auto;
}
.feature-text h3 {
  font-size: 1.55rem;
  letter-spacing: normal;
  margin: 0.85rem 0 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}
.feature-text > p {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 16px;
  line-height: 25.6px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
  font-size: 16px;
  line-height: 25.6px;
}
.feature-list li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23010C23'/%3E%3Cpath fill='%23FFFFFF' d='M5.4 9.1l2 2.1 5.4-5.7 1.1 1.1-6.5 6.8-3.1-3.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 800px) {
  .feature-card,
  .feature-card.reverse {
    grid-template-columns: 1fr;
    padding: 1.75rem;
    min-height: 0;
    margin-bottom: 2rem;
  }
  .feature-card.reverse .feature-media,
  .feature-card.reverse .feature-text { order: unset; }
  .feature-media { min-height: 360px; }
  .feature-float { width: 160px; }
}

/* Mobile: flatten Key Features cards — no floating rounded chrome */
@media (max-width: 749px) {
  .feature-card,
  .feature-card.reverse {
    border-radius: 0;
    width: calc(100% + 2.5rem);
    max-width: none;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding: 2.25rem 1.25rem 2rem;
  }
}

/* ========== How it works ========== */
.how {
  background: var(--light);
  padding: 7.5rem 0 0;
  position: relative;
  overflow-x: hidden;
}
.how-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.75rem;
  align-items: center;
  margin-top: 2.5rem;
  padding-bottom: 4.5rem;
}
.how-col {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.how-phone {
  width: min(270px, 100%);
  max-width: 270px;
  justify-self: center;
  filter: drop-shadow(0 20px 40px rgba(1, 12, 35, 0.18));
}
.how-phone img { border-radius: 0; width: 100%; background: transparent; }

.step-card {
  position: relative;
  background: var(--pale);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.5rem 1.5rem;
}
.step-num {
  position: absolute;
  top: -12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 25.6px;
}

@media (max-width: 900px) {
  .how-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .how-col { width: 100%; max-width: 420px; }
  .how-phone { order: -1; margin-bottom: 0.5rem; }
}

/* ========== Download ========== */
.download {
  background: var(--pale);
  padding: 6rem 0 0;
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
}
.download-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: 4.5rem;
  overflow: visible;
}
.download-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 480px;
  align-items: flex-end;
  overflow: visible;
  padding-right: 2.5rem;
  min-width: 0;
}
/* Keep blobs behind the phone column. 140%/520px plus rotation
   spilled the navy shape under the copy (dark-on-dark). */
.download-visual .blob {
  width: 76%;
  max-width: 320px;
  height: 90%;
}
.download-visual .phone { width: 250px; max-width: 70%; }
.download-visual .feature-float {
  right: 4%;
  top: 26%;
  bottom: auto;
  width: 225px;
}
.download-copy {
  position: relative;
  z-index: 2;
}
.download-copy h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  letter-spacing: normal;
  margin: 0.85rem 0 1rem;
  font-weight: 700;
  line-height: 1.25;
}
.download-copy p {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 32rem;
  font-size: 16px;
  line-height: 25.6px;
}

@media (max-width: 800px) {
  .download-grid { grid-template-columns: 1fr; text-align: center; }
  .download-copy { display: flex; flex-direction: column; align-items: center; order: -1; }
  .download-copy p { margin-inline: auto; }
  .download-visual {
    min-height: 420px;
    overflow: visible;
    padding-right: 0;
  }
  /* Frame the phone like the hero — oversized blobs covered the badge
     and clipped into grey fragments at the viewport edge. */
  .download-visual .blob {
    width: 78%;
    max-width: 340px;
    height: 78%;
  }
  .download-visual .feature-float { display: none; }
}

/* ========== Footer ========== */
.site-footer {
  background: #010C23;
  color: var(--white);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-logo);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 1rem;
  letter-spacing: 0;
}
.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 2rem;
  font-size: 1rem;
}
.footer-mail svg { width: 18px; height: 18px; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.95rem;
}
.footer-links a:hover { opacity: 0.8; }

/* ========== Legal pages ========== */
.legal-main {
  background: var(--white);
  padding: calc(var(--header-h) + 1.5rem) 0 4rem;
}
.legal-wrap {
  width: min(100% - 2.5rem, 800px);
  margin-inline: auto;
}
.legal-wrap h1 {
  font-size: 2rem;
  letter-spacing: normal;
  margin: 0 0 0.5rem;
  font-weight: 700;
}
.legal-doc {
  margin-top: 1.5rem;
  color: #595959;
  font-size: 0.95rem;
  line-height: 1.6;
}
.legal-doc h2 {
  color: var(--black);
  font-size: 1.2rem;
  margin: 1.75rem 0 0.75rem;
}
.legal-doc h3 {
  color: var(--black);
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}
.legal-doc a { color: #3030F1; word-break: break-word; }
.legal-doc ul, .legal-doc ol {
  padding-left: 1.4rem;
  margin: 0.5rem 0 1rem;
  list-style: disc;
}
.legal-doc li { margin-bottom: 0.35rem; }
.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
}
.legal-doc td, .legal-doc th {
  border: 1px solid var(--pale);
  padding: 0.5rem;
  vertical-align: top;
}
.back-home {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-home:hover { color: var(--navy); }

/* ========== Blog ========== */
.blog-main {
  background: var(--white);
  padding: calc(var(--header-h) + 1.5rem) 0 4rem;
}
.blog-wrap,
.blog-post-header {
  width: min(100% - 2.5rem, 800px);
  margin-inline: auto;
}
.blog-wrap h1,
.blog-post-header h1 {
  font-size: 2rem;
  letter-spacing: normal;
  margin: 0 0 0.5rem;
  font-weight: 700;
}
.blog-intro,
.blog-empty {
  color: var(--muted);
  margin: 0 0 2rem;
}
.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.blog-card a {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--pale);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.blog-card a:hover {
  border-color: rgba(1, 12, 35, 0.15);
  box-shadow: 0 4px 20px rgba(1, 12, 35, 0.06);
}
.blog-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
}
.blog-card-meta,
.blog-post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.blog-card-desc {
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.blog-tags li {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--light);
  color: var(--muted);
}
.blog-hero {
  width: min(100% - 2.5rem, 800px);
  margin: 1.5rem auto 0;
}
.blog-hero img {
  width: 100%;
  border-radius: var(--radius-card);
}
.blog-content {
  width: min(100% - 2.5rem, 800px);
  margin: 1.5rem auto 0;
  color: #595959;
  font-size: 0.95rem;
  line-height: 1.7;
}
.blog-content h2 {
  color: var(--black);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}
.blog-content h3 {
  color: var(--black);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}
.blog-content a { color: #3030F1; word-break: break-word; }
.blog-content ul,
.blog-content ol {
  padding-left: 1.4rem;
  margin: 0.75rem 0 1rem;
}
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
.blog-content li { margin-bottom: 0.35rem; }
.blog-content blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--navy);
  background: var(--light);
  color: var(--black);
}
.blog-content pre {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: var(--radius-card);
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  line-height: 1.5;
}
.blog-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}
.blog-content :not(pre) > code {
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: var(--light);
  color: var(--navy);
}
.blog-content img {
  margin: 1rem 0;
  border-radius: var(--radius-card);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}
