/* ===========================================================
   CrossApp - AI marketing site — shared stylesheet
   =========================================================== */

:root {
  --color-primary: #1f7a82;
  --color-primary-dark: #0f3a40;
  --color-primary-darker: #0a2a2f;
  --color-primary-light: #5fb8c0;
  --color-accent: #ffb703;
  --color-accent-dark: #e29b00;
  --color-dark: #0b2027;
  --color-text: #223438;
  --color-text-muted: #5b6b6d;
  --color-light: #f6fbfb;
  --color-light-alt: #eaf4f4;
  --color-border: #dfe9e9;
  --color-white: #ffffff;

  --gradient-hero: linear-gradient(135deg, #0a2a2f 0%, #135059 45%, #1f7a82 100%);
  --gradient-accent: linear-gradient(135deg, #ffb703 0%, #ff9a03 100%);

  --shadow-sm: 0 2px 8px rgba(11, 32, 39, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 32, 39, 0.12);
  --shadow-lg: 0 20px 48px rgba(11, 32, 39, 0.18);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --container-width: 1160px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-dark);
}

p {
  margin: 0 0 1em;
  color: var(--color-text-muted);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
}

.section-header {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-light-alt);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 17px;
  margin-bottom: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--color-dark);
  box-shadow: 0 10px 24px rgba(255, 183, 3, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(255, 183, 3, 0.45);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

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

.btn-dark:hover {
  background: var(--color-primary-darker);
}

.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--color-dark);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  object-position: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--color-primary);
}

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

.nav-cta .btn {
  padding: 10px 22px;
  font-size: 14px;
}

.nav-cta .btn-primary {
  color: var(--color-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--gradient-hero);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
  padding: 100px 0 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.08), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(255, 183, 3, 0.18), transparent 45%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-copy .eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
}

.hero-copy h1 {
  color: var(--color-white);
  font-size: clamp(36px, 5.4vw, 56px);
  margin-bottom: 20px;
}

.hero-copy p.lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  max-width: 520px;
  margin-bottom: 32px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0b1d22;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--color-white);
  padding: 10px 18px;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  background: #0f272d;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge .badge-text small {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.store-badge .badge-text strong {
  font-size: 16px;
  font-weight: 700;
}

.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.hero-meta strong {
  color: var(--color-white);
  display: block;
  font-size: 20px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-mock {
  width: 336px;
  border-radius: 46px;
  background: #071518;
  border: 8px solid #0d2529;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  position: relative;
  z-index: 2;
}

.phone-screen {
  background: var(--color-light);
  border-radius: 32px;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.hero-blob {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 183, 3, 0.35), transparent 70%);
  filter: blur(10px);
  top: -60px;
  right: -80px;
  z-index: 1;
}

/* ---------- Screenshot carousel (hero phone frame) ---------- */
.phone-mock.phone-mock--shot {
  padding: 10px;
}

.phone-screen.phone-screen--shot {
  min-height: 0;
  position: relative;
  aspect-ratio: 1290 / 2796;
}

.phone-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.phone-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: phone-carousel-fade 9s infinite;
}

.phone-carousel img:nth-child(1) {
  animation-delay: 0s;
}

.phone-carousel img:nth-child(2) {
  animation-delay: 3s;
}

.phone-carousel img:nth-child(3) {
  animation-delay: 6s;
}

@keyframes phone-carousel-fade {
  0%,
  100% {
    opacity: 0;
  }
  3%,
  30% {
    opacity: 1;
  }
  36% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-carousel img {
    animation: none;
    opacity: 0;
  }

  .phone-carousel img:first-child {
    opacity: 1;
  }
}

.hero-wave {
  display: block;
  width: 100%;
  margin-top: 64px;
}

/* ---------- Logo strip ---------- */
.logo-strip {
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
}

.logo-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ---------- Feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: transparent;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
  background: var(--color-light-alt);
  color: var(--color-primary);
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14.5px;
  margin-bottom: 0;
}

/* ---------- Service grid (mini programs) ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: var(--color-white);
}

.service-emoji {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.service-card h3 {
  font-size: 15.5px;
  margin-bottom: 6px;
}

.service-card p {
  font-size: 13px;
  margin-bottom: 0;
}

/* ---------- Split / alternating sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split-reverse .split-media {
  order: 2;
}

.split-media {
  background: var(--color-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--color-border);
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.step-item {
  display: flex;
  gap: 18px;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-item h4 {
  margin-bottom: 4px;
  font-size: 16px;
}

.step-item p {
  margin-bottom: 0;
  font-size: 14.5px;
}

/* ---------- Stats ---------- */
.stats-bar {
  background: var(--color-primary-darker);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stats-bar strong {
  display: block;
  font-size: 30px;
  color: var(--color-accent);
}

.stats-bar span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--gradient-hero);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  color: var(--color-white);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 520px;
  margin: 0 auto 28px;
}

.cta-banner .store-badges {
  justify-content: center;
  margin-bottom: 0;
}

/* ---------- Merchant form ---------- */
.merchant-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: flex-start;
}

.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}

.benefit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.benefit-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--color-light-alt);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.benefit-item h4 {
  font-size: 15.5px;
  margin-bottom: 2px;
}

.benefit-item p {
  font-size: 14px;
  margin-bottom: 0;
}

.form-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.form-card h3 {
  font-size: 22px;
  margin-bottom: 6px;
}

.form-card > p {
  font-size: 14.5px;
  margin-bottom: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-dark);
}

.form-field .required {
  color: #d64545;
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 14.5px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--color-border);
  background: var(--color-light);
  color: var(--color-text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-white);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-note {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-top: 14px;
}

.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.form-status.success {
  display: block;
  background: #e4f7ee;
  color: #147a4d;
}

.form-status.error {
  display: block;
  background: #fdeaea;
  color: #b23a3a;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-white);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 20px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--color-dark);
  cursor: pointer;
}

.faq-question .plus {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--color-primary);
  font-size: 20px;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 20px;
}

.faq-answer p {
  padding-bottom: 18px;
  margin-bottom: 0;
  font-size: 14.5px;
}

/* ---------- Page hero (secondary pages) ---------- */
.page-hero {
  background: var(--gradient-hero);
  color: var(--color-white);
  padding: 72px 0 88px;
  text-align: center;
}

.page-hero .eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
}

.page-hero h1 {
  color: var(--color-white);
  font-size: clamp(30px, 4.6vw, 44px);
  max-width: 720px;
  margin: 0 auto 16px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 580px;
  margin: 0 auto;
  font-size: 17px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
}

.footer-col h5 {
  color: var(--color-white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 24px;
  font-size: 13px;
}

.footer-store-badges {
  display: flex;
  gap: 10px;
}

.footer-store-badges .store-badge {
  padding: 8px 12px;
  border-radius: 10px;
}

.footer-store-badges svg {
  width: 20px;
  height: 20px;
}

.footer-store-badges .badge-text strong {
  font-size: 13px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .hero-visual {
    order: -1;
  }

  .phone-mock {
    width: 280px;
  }

  .split,
  .split-reverse .split-media {
    grid-template-columns: 1fr;
    order: 0;
  }

  .split {
    gap: 32px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .merchant-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .hero-visual {
    display: none;
  }

  section {
    padding: 64px 0;
  }

  .nav-links,
  .nav-cta .btn-outline {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  body.nav-open .nav-links {
    display: flex;
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
    gap: 20px;
    box-shadow: var(--shadow-md);
    z-index: 90;
  }

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

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
    padding: 28px;
  }

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

  .form-card {
    padding: 26px;
  }

  .cta-banner {
    padding: 36px 22px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
