/* Rytual Homepage - Retail Operations Platform */
:root {
  --primary: #2776EA;
  --primary-dark: #1a5bb5;
  --accent: #22c55e;
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --border: #e5e7eb;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.site-header .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.35rem;
  flex-shrink: 0;
}

/* Logo image: 40% larger than original (52px → 73px). flex-shrink:0 keeps header width stable. */
.site-logo img {
  height: 100px;
  width: auto;
}

.header-ctas {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover {
  filter: brightness(1.05);
  color: white;
}

/* Nav — use > ul (direct child only) so .nav-dropdown is NOT affected */
.site-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--primary);
}

.nav-item-has-dropdown {
  position: relative;
}

.nav-item-toggle {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-item-toggle:hover {
  color: var(--primary);
}

.nav-item-toggle:after {
  content: "▾";
  font-size: 0.7rem;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  padding: 0.75rem 0.75rem;
  list-style: none;
  margin: 0;
  display: none;
  z-index: 120;
}

.nav-dropdown li {
  margin: 0;
}

.nav-dropdown a {
  display: block;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--text);
  font-weight: 400;
}

.nav-dropdown a:hover {
  background: #eff6ff;
  color: var(--primary);
}

@media (min-width: 769px) {
  .nav-item-has-dropdown:hover .nav-dropdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    column-gap: 1.5rem;
  }
}

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text);
}

.nav-toggle::before {
  content: "☰";
}

.site-nav.open ~ .nav-toggle::before,
.nav-toggle[aria-expanded="true"]::before {
  content: "✕";
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .header-ctas { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    z-index: 99;
  }
  .site-nav.open { display: block; }
  .site-nav > ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .nav-item-has-dropdown {
    width: 100%;
  }
  .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    border-radius: 0;
    padding-left: 0.75rem;
    margin-top: 0.5rem;
  }
  .nav-item-has-dropdown.open .nav-dropdown {
    display: block;
  }
}

/* Hero */
.hero {
  padding: 3rem 1rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 100%);
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  color: var(--text);
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-ctas .btn {
  min-width: 160px;
}

/* Sections */
.section {
  padding: 3rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

/* Modules grid - one by one blocks */
.module-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.module-block:last-of-type { border-bottom: none; }

.module-block:nth-child(even) .module-img { order: 2; }
.module-block:nth-child(even) .module-content { order: 1; }

.module-img {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-alt);
}

.module-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.module-content h2 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.module-content p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.module-content .btn {
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .module-block {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .module-block:nth-child(even) .module-img,
  .module-block:nth-child(even) .module-content { order: unset; }
}

/* CTA strip — blue background section */
.cta-strip {
  background: var(--primary);
  color: white;
  padding: 2.5rem 1rem;
  text-align: center;
}

.cta-strip h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  color: white;
}

.cta-strip p {
  margin: 0 0 1.5rem;
  color: rgba(255,255,255,0.9);
}

.cta-strip-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Override default .btn colours for the blue CTA strip */
.cta-strip .btn-outline {
  background: white;
  color: #2776EA;
  border-color: white;
}

.cta-strip .btn-outline:hover {
  background: #e5efff;
  color: #2776EA;
  border-color: #e5efff;
}

.cta-strip .btn-primary {
  background: #2776EA;
  color: white;
  border-color: #2776EA;
}

.cta-strip .btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}

/* Footer */
.site-footer {
  background: var(--text);
  color: #9ca3af;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.site-footer .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.site-footer .footer-ctas {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Ensure footer buttons keep their colours on the dark background */
.site-footer .btn-outline {
  color: white;
  border-color: white;
  background: transparent;
}

.site-footer .btn-outline:hover {
  background: rgba(255,255,255,0.12);
  color: white;
}

.site-footer .btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.site-footer .btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.site-footer a {
  color: #d1d5db;
  text-decoration: none;
}

.site-footer a:hover {
  color: white;
}

/* Module page layout */
.page-header {
  padding: 2rem 1rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb span { color: var(--text-muted); }

.module-page .content-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.module-page h2 { font-size: 1.35rem; margin: 1.5rem 0 0.75rem; }
.module-page h3 { font-size: 1.15rem; margin: 1.25rem 0 0.5rem; }
.module-page p { margin: 0 0 1rem; color: var(--text); }
.module-page ul { margin: 0 0 1rem; padding-left: 1.5rem; }

.module-page .lead-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  background: var(--bg-alt);
}

.benefits-list {
  list-style: none;
  padding-left: 0;
}

.benefits-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.benefits-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.page-ctas {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
