/* ============================================================
   Ops365 marketing site — standalone, no build step.
   Design language borrows the app's own brand gradient palette
   (see client/src/styles/variables.css) for visual continuity,
   restyled here for a long-scroll, Apple-product-page feel.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --ink: #0e1116;
  --ink-muted: #5b6472;
  --border: #e7e9ed;

  --primary: #2f6fed;
  --primary-dark: #1f4fb8;
  --purple: #7c3aed;
  --green: #12b76a;
  --orange: #f2a900;

  --gradient-primary: linear-gradient(135deg, #2f6fed 0%, #7c3aed 100%);
  --gradient-warm: linear-gradient(135deg, #f2a900 0%, #ef5a50 100%);
  --gradient-cool: linear-gradient(135deg, #12b76a 0%, #14b8a6 100%);
  --gradient-text: linear-gradient(135deg, #2f6fed 0%, #7c3aed 55%, #ef5a50 100%);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 10px rgba(14, 17, 22, 0.06);
  --shadow-md: 0 12px 40px rgba(14, 17, 22, 0.10);
  --shadow-lg: 0 24px 70px rgba(14, 17, 22, 0.16);

  --container: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c0f;
    --bg-alt: #131519;
    --ink: #f2f4f7;
    --ink-muted: #a2acba;
    --border: #22262d;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(47, 111, 237, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgba(47, 111, 237, 0.6); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-large { padding: 16px 30px; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  /* Already positioned (sticky), which is enough for the ::before below to
     anchor against — backdrop-filter lives on that pseudo-element, not
     here, since backdrop-filter/transform/filter on an element establishes
     the containing block for any position:fixed descendant. Applying it
     directly to .site-header broke the mobile .main-nav overlay (its
     `inset` resolved against the 64px-tall header instead of the
     viewport). This still gives the header its glassy blur look. */
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 1px solid var(--border);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand img { height: 34px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.85;
}
.main-nav a:not(.btn):hover { opacity: 1; }
.nav-toggle { display: none; background: none; border: none; width: 36px; height: 28px; flex-direction: column; justify-content: space-between; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
}
.blob-1 { width: 480px; height: 480px; background: var(--gradient-primary); top: -160px; left: -120px; }
.blob-2 { width: 380px; height: 380px; background: var(--gradient-warm); top: 40px; right: -140px; opacity: 0.35; }
.blob-3 { width: 320px; height: 320px; background: var(--gradient-cool); bottom: -180px; left: 40%; opacity: 0.3; }

.hero-inner { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  font-weight: 750;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-mock {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 72px auto 0;
  padding: 0 24px;
}
.mock-window {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-bar { display: flex; gap: 8px; padding: 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
.mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.mock-bar span:nth-child(1) { background: #ef5a50; }
.mock-bar span:nth-child(2) { background: #f2a900; }
.mock-bar span:nth-child(3) { background: #12b76a; }
/* Real product screenshots (see marketing-site/README.md for how they're
   captured — an isolated "Demo Telecom" operator with fictional data, so
   no real customer/business information ever appears here) sit directly
   below the .mock-bar chrome, filling the window's width. */
.mock-window img { display: block; width: 100%; height: auto; }

/* ---------- Capability strip ---------- */
.stats { padding: 56px 0; background: var(--bg-alt); border-block: 1px solid var(--border); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat strong { display: block; font-size: 1.7rem; font-weight: 750; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--ink-muted); font-size: 0.92rem; }

/* ---------- Section shared ---------- */
.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 750;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 12px;
}
.section-sub {
  text-align: center;
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Features (sticky-image rows) ---------- */
.features { padding: 100px 0 40px; }
.features > .container { margin-bottom: 60px; }

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
  margin-bottom: 40px;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse .feature-copy,
.feature-row.reverse .feature-sticky { direction: ltr; }

.feature-sticky { position: sticky; top: 84px; height: 70vh; min-height: 380px; padding: 0 24px; }
.feature-visual {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border);
  /* Real screenshots (see marketing-site/README.md) vary in height, so this
     reuses the hero's .mock-window "browser chrome" frame (top bar + image)
     as a flex column: the bar keeps its own height, the image fills
     whatever's left and crops from the top, where each screenshot's most
     relevant content sits. */
  display: flex;
  flex-direction: column;
}
.feature-visual .mock-bar { flex: none; }
.feature-visual img {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
}

.feature-copy { padding: 40px; min-height: 70vh; display: flex; align-items: center; }
.feature-copy .container { padding: 0; max-width: 460px; }
.feature-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.feature-copy h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0 0 16px; letter-spacing: -0.01em; }
.feature-copy p { color: var(--ink-muted); font-size: 1.05rem; margin: 0 0 20px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feature-list li { position: relative; padding-left: 28px; font-size: 0.98rem; }
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ---------- Roles (Employee / Customer / Operator) ---------- */
.roles { padding: 100px 0; }
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
  align-items: stretch;
}
.role-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.role-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.role-card.featured {
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient-primary) border-box;
  border: 2px solid transparent;
}
.role-icon { font-size: 2.2rem; display: block; margin-bottom: 14px; }
.role-card h3 { margin: 0 0 6px; font-size: 1.3rem; }
.role-tagline { color: var(--ink-muted); font-size: 0.95rem; margin: 0 0 22px; }
.role-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
}
.role-card .feature-list { gap: 14px; }
.role-card .feature-list li { font-size: 0.92rem; }

@media (max-width: 900px) {
  .roles-grid { grid-template-columns: 1fr; }
}

/* ---------- Pricing ---------- */
.pricing { padding: 100px 0; background: var(--bg-alt); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
  align-items: stretch;
}
.price-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.price-card.featured {
  border-color: transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient-primary) border-box;
  border: 2px solid transparent;
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.price-card.featured:hover { transform: scale(1.03) translateY(-6px); }
.price-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  margin: 0;
}
.price-card h3 { margin: 0 0 8px; font-size: 1.3rem; }
.price { font-size: 2.2rem; font-weight: 750; margin: 0 0 4px; }
.price span { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-note { color: var(--ink-muted); font-size: 0.9rem; margin: 0 0 24px; }
.price-card ul { list-style: none; margin: 0 0 28px; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.price-card li { position: relative; padding-left: 26px; font-size: 0.95rem; }
.price-card li::before {
  content: "✓";
  position: absolute; left: 0; top: 1px;
  color: var(--green);
  font-weight: 700;
}
.pricing-disclaimer { text-align: center; color: var(--ink-muted); font-size: 0.85rem; margin-top: 40px; }

/* ---------- FAQ ---------- */
.faq { padding: 100px 0; }
.faq-list { max-width: 760px; margin: 56px auto 0; display: flex; flex-direction: column; gap: 14px; }
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 24px;
  background: var(--bg-alt);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px 0;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 16px;
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { color: var(--ink-muted); margin: 0 0 20px; }

/* ---------- Final CTA ---------- */
.final-cta {
  padding: 110px 0;
  text-align: center;
  background: var(--gradient-primary);
  color: #fff;
}
.final-cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 0 0 14px; font-weight: 750; }
.final-cta p { font-size: 1.1rem; opacity: 0.92; max-width: 520px; margin: 0 auto 32px; }
.final-cta .btn-primary { background: #fff; color: var(--primary-dark); box-shadow: 0 12px 30px -8px rgba(0,0,0,0.3); }
.final-cta .btn-primary:hover { background: #fff; }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; max-width: 320px; }
.footer-brand img { height: 30px; }
.footer-brand p { margin: 0; color: var(--ink-muted); font-size: 0.85rem; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer nav a { color: var(--ink); text-decoration: none; font-size: 0.92rem; opacity: 0.85; }
.site-footer nav a:hover { opacity: 1; }
.footer-copy { width: 100%; text-align: center; color: var(--ink-muted); font-size: 0.82rem; margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; direction: ltr; }
  .feature-sticky { position: static; height: 320px; margin-bottom: 8px; padding: 0 24px; }
  /* .feature-copy's own left/right padding is what keeps its text off the
     screen edge on mobile — .feature-copy .container zeroes its own
     padding deliberately (desktop relies on .feature-copy's 40px instead),
     so dropping the horizontal padding here too left text running edge to
     edge with no inset at all. */
  .feature-copy { min-height: 0; padding: 20px 24px 60px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-6px); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 32px 24px; gap: 20px; transform: translateX(100%); transition: transform 0.3s ease; border-top: 1px solid var(--border); }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .hero { padding: 90px 0 60px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
