/*
Theme Name: M&M Orloff
Theme URI: https://orloff.ca
Author: Michael Orloff
Description: Custom block theme for M&M Orloff.
Version: 0.3.6
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: mm-orloff
*/

:root {
  --mm-navy: #102A43;
  --mm-deep-navy: #071A2B;
  --mm-gold: #C9A227;
  --mm-soft-gold: #E1C768;
  --mm-cream: #F7F3E8;
  --mm-white: #FFFFFF;
  --mm-charcoal: #262626;
  --mm-muted: #667085;
  --mm-border: #DED7C8;
  --mm-shadow: 0 16px 40px rgba(7, 26, 43, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; }
a { text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--mm-gold); outline-offset: 3px; }

.mm-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: .75rem 1rem;
}
.mm-skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.mm-site-header {
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(7, 26, 43, .08);
}
.mm-header-inner {
  min-height: 94px;
  max-width: 1440px;
  margin: 0 auto;
  gap: 2rem;
}
.mm-wordmark {
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: .065em;
  line-height: .84;
  white-space: nowrap;
}
.mm-wordmark strong {
  color: var(--mm-navy);
  display: block;
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
  font-weight: 500;
}
.mm-wordmark span { color: var(--mm-gold); }
.mm-tagline {
  color: var(--mm-navy);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(.59rem, .8vw, .72rem);
  letter-spacing: .13em;
  line-height: 1.25;
  margin-top: .48rem;
  text-transform: uppercase;
}
.mm-site-header .wp-block-navigation { gap: clamp(1rem, 2.2vw, 2rem); }
.mm-site-header .wp-block-navigation-item__content {
  color: var(--mm-navy);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}
.mm-site-header .wp-block-navigation-item__content:hover { color: #8B6E12; }

/* Hero */
.mm-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(330px, 40vh, 430px);
  background:
    linear-gradient(90deg, rgba(7,26,43,.98) 0%, rgba(7,26,43,.92) 42%, rgba(7,26,43,.55) 70%, rgba(7,26,43,.25) 100%),
    linear-gradient(145deg, #163A59, #071A2B);
  color: #fff;
}
.mm-hero::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .72;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 800'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23d8c68a' stop-opacity='.12'/%3E%3Cstop offset='1' stop-color='%23ffffff' stop-opacity='.03'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M620 770 930 300l110 140 118-190 442 520z'/%3E%3Cpath fill='%23ffffff' fill-opacity='.07' d='m900 770 285-370 90 110 100-145 225 405z'/%3E%3Cpath fill='none' stroke='%23c9a227' stroke-opacity='.45' stroke-width='3' d='M720 720 930 300l110 140 118-190 280 390'/%3E%3C/svg%3E");
  background-position: right center;
  background-repeat: no-repeat;
  background-size: cover;
}
.mm-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -8%;
  top: -30%;
  width: min(48vw, 720px);
  aspect-ratio: 1;
  border: 1px solid rgba(225,199,104,.24);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(225,199,104,.025), 0 0 0 160px rgba(225,199,104,.02);
}
.mm-hero-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.mm-hero-copy { max-width: 760px; }
.mm-eyebrow {
  color: var(--mm-soft-gold);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.mm-hero h1 {
  max-width: 780px;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.mm-hero-lead {
  max-width: 660px;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.65;
  opacity: .96;
}
.mm-hero .wp-block-buttons { margin-top: 1.5rem; }

/* Buttons */
.wp-element-button,
.wp-block-button__link {
  border: 1px solid transparent;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(7, 26, 43, .15);
}
.mm-button-outline .wp-block-button__link {
  background: transparent;
  border-color: rgba(255,255,255,.75);
  color: #fff;
}

/* Sections */
.mm-section { padding: clamp(2.5rem, 4.5vw, 4.5rem) clamp(1rem, 4vw, 3rem); }
.mm-section-inner { max-width: 1320px; margin: 0 auto; }
.mm-section-kicker {
  color: #8B6E12;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.mm-section-title { max-width: 780px; }
.mm-section-title::after {
  content: '';
  display: block;
  width: 68px;
  height: 3px;
  background: var(--mm-gold);
  margin-top: .85rem;
}
.mm-section-intro { max-width: 760px; color: #4B5563; }

/* Gateway cards */
.mm-gateway-grid { margin-top: 0; }
.mm-card {
  border: 1px solid var(--mm-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(7,26,43,.045);
  height: 100%;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--mm-shadow);
  border-color: rgba(201,162,39,.55);
}
.mm-card-body { min-height: 270px; display: flex; flex-direction: column; }
.mm-card-body .wp-block-buttons {
  margin-top: auto;
  padding-top: 1.5rem;
}
.mm-card-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mm-cream);
  border: 1px solid var(--mm-border);
  color: var(--mm-gold);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  line-height: 1;
}
.mm-card h3 {
  margin-top: 1.2rem;
  font-weight: 700;
}
.mm-card p {
  color: #4B5563;
  font-size: .98rem;
  line-height: 1.55;
}

/* Blue M */
.mm-blue-m-section {
  position: relative;
  overflow: hidden;
  background: var(--mm-deep-navy);
  color: #fff;
}
.mm-blue-m-section::after {
  content: '';
  position: absolute;
  inset: 0 0 0 auto;
  width: 40%;
  background: radial-gradient(circle at center, rgba(225,199,104,.16), transparent 65%);
  pointer-events: none;
}
.mm-blue-m-logo-wrap {
  background: #fff;
  border-radius: 18px;
  padding: clamp(1rem, 2vw, 2rem);
  box-shadow: var(--mm-shadow);
}
.mm-blue-m-logo-wrap img { max-height: 250px; object-fit: contain; }
.mm-blue-m-copy { position: relative; z-index: 1; }
.mm-blue-m-copy h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  margin-bottom: .8rem;
}
.mm-blue-m-copy p {
  color: rgba(255,255,255,.83);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  max-width: 760px;
}

/* Footer */
.mm-footer { background: var(--mm-deep-navy); color: #fff; }
.mm-footer-inner { max-width: 1320px; margin: 0 auto; }
.mm-footer h3 { color: #fff !important; letter-spacing: .04em; }
.mm-footer ul { list-style: none; padding-left: 0; }
.mm-footer li { margin-bottom: .55rem; }
.mm-footer a { color: rgba(255,255,255,.88); text-decoration: none; }
.mm-footer a:hover { color: var(--mm-soft-gold); text-decoration: underline; }
.mm-footer-meta { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; margin-top: 1rem; }

/* Interior pages and affiliate */
.mm-page-shell { padding: clamp(3rem, 6vw, 6rem) clamp(1rem, 4vw, 3rem); }
.mm-page-shell > * { max-width: 1000px; }
.mm-affiliate-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 1.4rem; }
.mm-affiliate-card { border: 1px solid var(--mm-border); border-radius: 16px; padding: 1.5rem; background: #fff; box-shadow: 0 8px 24px rgba(7,26,43,.045); }
.mm-affiliate-card h3 { margin-top: 0; }
.mm-meta { color: var(--mm-muted); font-size: .875rem; }

@media (max-width: 1023px) {
  .mm-header-inner { min-height: 82px; }
  .mm-hero { min-height: 360px; }
  .mm-hero::before { background-position: 62% center; opacity: .5; }
  .mm-card-body { min-height: 255px; }
}

@media (max-width: 781px) {
  .mm-header-inner { align-items: center !important; }
  .mm-tagline { display: none; }
  .mm-site-header .wp-block-navigation__responsive-container.is-menu-open {
    background: var(--mm-deep-navy);
    color: #fff;
    padding: 2rem;
  }
  .mm-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff; font-size: 1.15rem; }
  .mm-hero { min-height: auto; }
  .mm-hero::before { opacity: .28; background-position: 70% bottom; }
  .mm-hero-copy { max-width: none; }
  .mm-hero h1 { font-size: clamp(2.35rem, 11vw, 4rem) !important; }
  .mm-gateway-grid.wp-block-columns { display: grid; grid-template-columns: 1fr; }
  .mm-blue-m-section .wp-block-columns { gap: 2.2rem; }
}

@media (max-width: 480px) {
  .mm-wordmark strong { font-size: 1.45rem; }
  .mm-hero .wp-block-buttons { display: grid; width: 100%; }
  .mm-hero .wp-block-button { width: 100%; }
  .mm-hero .wp-block-button__link { width: 100%; }
  .mm-section { padding-left: 1rem; padding-right: 1rem; }
  .mm-card-body { min-height: 0; }
}

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


/* Launch content pages */
.mm-page-hero {
  background: linear-gradient(135deg, #071A2B 0%, #102A43 70%, #183E5E 100%);
  color: #fff;
  padding: clamp(3rem, 6vw, 5.5rem) clamp(1rem, 4vw, 3rem);
}
.mm-page-hero .wp-block-heading {
  color: #fff;
  max-width: 900px;
  margin-bottom: 1rem;
}
.mm-page-hero p {
  color: rgba(255,255,255,.86);
  max-width: 820px;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
}
.mm-page-section {
  padding: clamp(2.75rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3rem);
}
.mm-page-section.is-alt {
  background: #F7F3E8;
}
.mm-page-section h2 {
  margin-bottom: 1rem;
}
.mm-page-section h3 {
  font-weight: 700;
}
.mm-content-narrow {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.mm-service-grid {
  gap: 1.25rem;
}
.mm-service-card {
  height: 100%;
  background: #fff;
  border: 1px solid rgba(201,162,39,.24);
  border-radius: 18px;
  padding: 1.6rem;
}
.mm-service-card p {
  color: #4B5563;
}
.mm-credential {
  background: #F7F3E8;
  border-left: 4px solid #C9A227;
  padding: 1.2rem 1.4rem;
  border-radius: 0 12px 12px 0;
}
.mm-legal-page {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
}
.mm-legal-page h1 {
  margin-bottom: .5rem;
}
.mm-legal-page h2 {
  margin-top: 2rem;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
}
.mm-legal-page p,
.mm-legal-page li {
  line-height: 1.75;
}
.mm-effective-date {
  color: #667085;
  font-size: .95rem;
  margin-bottom: 2rem;
}
@media (max-width: 781px) {
  .mm-page-hero {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .mm-service-card {
    padding: 1.25rem;
  }
}


/* Manual affiliate launch page */
.mm-affiliate-intro {
  max-width: 860px;
}
.mm-affiliate-disclosure {
  background: #F7F3E8;
  border-left: 4px solid #C9A227;
  border-radius: 0 12px 12px 0;
  padding: 1.1rem 1.35rem;
  margin-top: 1.5rem;
}
.mm-affiliate-category {
  margin-top: 2.5rem;
}
.mm-affiliate-category:first-child {
  margin-top: 0;
}
.mm-affiliate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.mm-affiliate-card {
  background: #fff;
  border: 1px solid rgba(201,162,39,.24);
  border-radius: 18px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.mm-affiliate-card h3 {
  font-weight: 700;
  margin-bottom: .55rem;
}
.mm-affiliate-card p {
  color: #4B5563;
}
.mm-affiliate-card .wp-block-buttons {
  margin-top: auto;
  padding-top: 1.35rem;
}
.mm-affiliate-note {
  font-size: .9rem;
  color: #667085;
}
.mm-code-box {
  display: inline-block;
  background: #071A2B;
  color: #fff;
  border-radius: 8px;
  padding: .35rem .6rem;
  font-family: monospace;
  letter-spacing: .03em;
}
@media (max-width: 781px) {
  .mm-affiliate-grid {
    grid-template-columns: 1fr;
  }
  .mm-affiliate-card {
    min-height: auto;
  }
}


/* Theme-controlled navigation */
.mm-site-header {
  position: relative;
  z-index: 1000;
}

.mm-primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.mm-primary-nav a {
  color: var(--mm-navy);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}

.mm-primary-nav a:hover,
.mm-primary-nav a:focus-visible {
  color: #8B6E12;
}

.mm-menu-toggle,
.mm-menu-close {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mm-navy);
  cursor: pointer;
  padding: .55rem;
  line-height: 1;
}

.mm-menu-toggle svg,
.mm-menu-close svg {
  display: block;
  width: 30px;
  height: 30px;
  fill: currentColor;
}

@media (max-width: 781px) {
  .mm-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mm-primary-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow-y: auto;
    background: var(--mm-deep-navy);
    padding: 5.5rem 2rem 2rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: .3rem;
  }

  .mm-primary-nav.is-open {
    display: flex;
  }

  .mm-primary-nav a {
    display: block;
    width: 100%;
    color: #fff;
    font-size: 1.2rem;
    padding: 1rem .25rem;
    border-bottom: 1px solid rgba(255,255,255,.16);
  }

  .mm-primary-nav a:hover,
  .mm-primary-nav a:focus-visible {
    color: var(--mm-soft-gold);
  }

  .mm-menu-close {
    display: inline-flex;
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    color: #fff;
    z-index: 1101;
  }

  html.mm-mobile-menu-open,
  body.mm-mobile-menu-open {
    overflow: hidden;
  }
}
