/*
 * morgallion.css
 * Global stylesheet for all Morgallion pages.
 *
 * TABLE OF CONTENTS
 * -----------------
 * 1.  CSS Variables (colours, spacing tokens)
 * 2.  Reset & Base
 * 3.  Navigation
 * 4.  Mobile Menu
 * 5.  Hero Section
 * 6.  Buttons
 * 7.  AnyRec Demo Widget (hero visual)
 * 8.  Section Wrappers & Typography
 * 9.  Product Cards
 * 10. Feature Grid
 * 11. Audience Pills
 * 12. CTA Band
 * 13. Footer
 * 14. Page Switcher (single-file SPA helper)
 * 15. Product Page — Hero Banner
 * 16. Product Page — Feature List
 * 17. Product Page — How It Works / Steps
 * 18. Animations
 * 19. Responsive Breakpoints
 *
 * HOW TO ADD A NEW PRODUCT PAGE
 * ------------------------------
 * 1. Copy the AnyRec page block in index.html as a starting template.
 * 2. Give it a unique id, e.g. id="page-newproduct".
 * 3. Use the shared classes below (.product-page-hero, .product-feature-list,
 *    .steps, .cta-band, etc.) — no new CSS needed for a standard product page.
 * 4. For page-specific overrides, add a small <style> block in that page's
 *    HTML file and scope rules with a unique class, e.g. .page-newproduct.
 */


/* ============================================================
   1. CSS Variables
   ============================================================ */
:root {
  /* Colour palette */
  --white:        #ffffff;
  --off-white:    #f5f5f5;
  --light-grey:   #d4d4d4;
  --mid-grey:     #8a8a8a;
  --grey:         #5a5a5a;
  --dark-grey:    #2a2a2a;
  --black:        #111111;
  --border:       #e0e0e0;

  /* Match-status dot colours */
  --match-ok:     #6b9e6b;
  --match-warn:   var(--light-grey);

  /* Layout */
  --nav-h:        68px;
  --max-w:        1160px;
  --page-pad:     24px;
}


/* ============================================================
   2. Reset & Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--dark-grey);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}


/* ============================================================
   3. Navigation
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--mid-grey); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  text-decoration: none;
  color: var(--grey);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--black); }

/* CTA button inside nav */
.nav-cta {
  background: var(--black) !important;
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 0.875rem !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--dark-grey) !important; }

/* Hamburger toggle */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
}


/* ============================================================
   4. Mobile Menu
   ============================================================ */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px var(--page-pad) 24px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none;
  color: var(--dark-grey);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }


/* ============================================================
   5. Hero Section (home page split layout)
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 100px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: italic;
  color: var(--mid-grey);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}


/* ============================================================
   6. Buttons
   ============================================================ */
.btn-primary {
  background: var(--black);
  color: var(--white);
  padding: 13px 28px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--dark-grey);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--dark-grey);
  padding: 13px 28px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1.5px solid var(--light-grey);
  display: inline-block;
  transition: border-color 0.2s, transform 0.15s;
}
.btn-secondary:hover {
  border-color: var(--grey);
  transform: translateY(-1px);
}

/* Light button (for use on dark backgrounds) */
.btn-light {
  background: var(--white);
  color: var(--black);
  padding: 13px 30px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.btn-light:hover {
  background: var(--off-white);
  transform: translateY(-1px);
}


/* ============================================================
   7. AnyRec Demo Widget (hero visual)
   ============================================================ */
.hero-visual {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Small pill label used inside the visual and on product pages */
.chip {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 4px;
  width: fit-content;
}

.mock-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.7fr;
  gap: 10px;
  font-size: 0.82rem;
  padding: 10px 14px;
  border-radius: 7px;
  background: var(--white);
  border: 1px solid var(--border);
  align-items: center;
  color: var(--grey);
}
.mock-row.header {
  background: none;
  border-color: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mid-grey);
}

.match-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--match-ok);
  display: inline-block;
}
.match-dot.warn { background: var(--match-warn); }

.hero-visual .caption {
  font-size: 0.78rem;
  color: var(--mid-grey);
  text-align: center;
  margin-top: 4px;
}


/* ============================================================
   8. Section Wrappers & Typography
   ============================================================ */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--page-pad);
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 var(--page-pad);
}

/* Overline label above a section heading */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-bottom: 14px;
}

.section-heading {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--black);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--grey);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 48px;
}


/* ============================================================
   9. Product Cards
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.product-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  background: var(--white);
  text-decoration: none;
  display: block;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.product-card:hover {
  border-color: var(--dark-grey);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}
.product-card.coming-soon {
  opacity: 0.6;
  cursor: default;
}
.product-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

/* Status badge on cards */
.card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.badge-available { background: var(--black); color: var(--white); }
.badge-soon      { background: var(--off-white); color: var(--mid-grey); border: 1px solid var(--border); }

/* Icon square on cards */
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--off-white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.product-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 10px;
}
.product-card p {
  font-size: 0.92rem;
  color: var(--grey);
  line-height: 1.65;
}

/* "Learn more →" link inside card */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
}
.card-link svg { transition: transform 0.2s; }
.product-card:hover .card-link svg { transform: translateX(3px); }


/* ============================================================
   10. Feature Grid
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.feature-item h4 {
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--dark-grey);
}
.feature-item p {
  font-size: 0.88rem;
  color: var(--mid-grey);
  line-height: 1.65;
}


/* ============================================================
   11. Audience Pills
   ============================================================ */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.audience-pill {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.audience-pill .aud-icon { font-size: 1.4rem; }
.audience-pill span {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--dark-grey);
}


/* ============================================================
   12. CTA Band
   ============================================================ */
.cta-band {
  background: var(--black);
  color: var(--white);
  border-radius: 16px;
  padding: 64px 48px;
  text-align: center;
}

.cta-band h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  color: var(--white);
}
.cta-band p {
  font-size: 1rem;
  color: var(--light-grey);
  max-width: 480px;
  margin: 0 auto 32px;
}


/* ============================================================
   13. Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  background: var(--off-white);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px var(--page-pad) 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logo { display: inline-block; margin-bottom: 12px; }
.footer-brand p {
  font-size: 0.87rem;
  color: var(--mid-grey);
  line-height: 1.6;
  max-width: 240px;
}

footer h5 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-grey);
  margin-bottom: 14px;
}

footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
footer ul li a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--mid-grey);
  transition: color 0.2s;
}
footer ul li a:hover { color: var(--dark-grey); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--page-pad);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--mid-grey);
}


/* ============================================================
   14. Page Switcher (single-file SPA helper)
   Used when multiple pages live in one HTML file.
   For separate HTML files, remove these rules.
   ============================================================ */
.page { display: none; padding-top: var(--nav-h); }
.page.active { display: block; }


/* ============================================================
   15. Product Page — Hero Banner
   Reusable centred hero for any product page.
   Usage: <div class="product-page-hero"> ... </div>
   ============================================================ */
.product-page-hero {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 72px var(--page-pad) 64px;
  text-align: center;
}

.product-page-hero .chip {
  margin-bottom: 20px;
  /* inherits .chip styles from section 7 */
}

.product-page-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: -0.035em;
  color: var(--black);
  max-width: 640px;
  margin: 0 auto 20px;
  line-height: 1.1;
}

.product-page-hero p {
  font-size: 1.1rem;
  color: var(--grey);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* Narrower content column for product pages */
.product-page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 72px var(--page-pad);
}


/* ============================================================
   16. Product Page — Feature List (2-col grid)
   ============================================================ */
.product-feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 64px;
}

.product-feature {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.product-feature h4 {
  font-weight: 600;
  font-size: 1rem;
  color: var(--black);
  margin-bottom: 8px;
}
.product-feature p {
  font-size: 0.9rem;
  color: var(--grey);
  line-height: 1.65;
}


/* ============================================================
   17. Product Page — How It Works / Steps
   ============================================================ */
.product-how {
  border-top: 1px solid var(--border);
  padding-top: 56px;
  margin-top: 24px;
}

.steps { display: flex; flex-direction: column; }

.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step h4 {
  font-weight: 600;
  color: var(--black);
  margin-bottom: 6px;
}
.step p {
  font-size: 0.9rem;
  color: var(--grey);
  line-height: 1.65;
}


/* ============================================================
   18. Animations
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero > * { animation: fadeUp 0.6s ease both; }
.hero > *:nth-child(2) { animation-delay: 0.12s; }


/* ============================================================
   19. Responsive Breakpoints
   ============================================================ */
@media (max-width: 768px) {
  .nav-links  { display: none; }
  .hamburger  { display: flex; }

  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 40px);
    padding-bottom: 56px;
    gap: 40px;
  }
  .hero-visual { order: -1; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .product-feature-list { grid-template-columns: 1fr; }
  .cta-band { padding: 44px 28px; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
