/*
Theme Name: MOCA365
Theme URI: https://moca365.com
Author: Pointwork A/S
Author URI: https://pointwork.com
Description: Custom block theme for moca365.com — governance for Microsoft 365. Endorsed product brand of Pointwork.
Version: 0.1.37
Requires at least: 6.6
Requires PHP: 8.1
License: Proprietary
Text Domain: moca365
Tags: block-theme, full-site-editing
*/

html { overflow-x: clip; }
h1, h2, h3, h4 { overflow-wrap: break-word; text-wrap: balance; }

/* --- Eyebrow --- */
.moca-eyebrow {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--wp--preset--color--blue); margin: 0 0 0.75rem;
}
/* On dark/colour bands the brand-blue eyebrow is unreadable - inherit the band's white text */
.has-white-color .moca-eyebrow { color: #fff; opacity: 0.85; }

/* --- Header --- */
.moca-header { position: relative; z-index: 50; }
.moca-header__inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 1.5rem; }
.moca-logo { display: inline-flex; align-items: center; }
.moca-logo img { height: 44px; display: block; }
.moca-nav { display: flex; gap: 1.75rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.moca-nav a { color: var(--wp--preset--color--ink); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.moca-nav a:hover { color: var(--wp--preset--color--blue); }
.moca-header__cta { display: inline-block; padding: 0.6rem 1.1rem; background: var(--moca-cta-bg, var(--wp--preset--color--blue)); color: #fff; border-radius: 9999px; font-size: 0.9375rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.moca-header__cta:hover { background: var(--moca-cta-hover, #28488c); color: #fff; }
@media (max-width: 880px) { .moca-nav { display: none; } }

/* Dark-hero pages (front page, products, partners): overlay the header so the banner bleeds to the top (behind the nav) */
body.has-overlay-hero .moca-header { position: absolute; left: 0; right: 0; top: 0.75rem; }
body.has-overlay-hero .moca-logo img { filter: brightness(0) invert(1); }
body.has-overlay-hero .moca-nav a { color: #fff; }
body.has-overlay-hero .moca-nav a:hover { color: rgba(255, 255, 255, 0.75); }
body.has-overlay-hero .wp-site-blocks > :first-child + * { margin-block-start: 0; } /* hero flush to the very top (behind the nav) */

/* --- Mobile nav (disclosure, no JS) --- */
.moca-nav-toggle { display: none; color: var(--wp--preset--color--ink); }
body.has-overlay-hero .moca-nav-toggle { color: #fff; }
.moca-nav-toggle > summary { list-style: none; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; }
.moca-nav-toggle > summary::-webkit-details-marker { display: none; }
.moca-nav-toggle > summary > span, .moca-nav-toggle > summary > span::before, .moca-nav-toggle > summary > span::after { content: ""; display: block; width: 24px; height: 2px; background: currentColor; }
.moca-nav-toggle > summary > span { position: relative; }
.moca-nav-toggle > summary > span::before { position: absolute; top: -7px; }
.moca-nav-toggle > summary > span::after { position: absolute; top: 7px; }
.moca-nav-panel { position: absolute; right: 1rem; left: 1rem; top: calc(100% + 0.25rem); background: #fff; border: 1px solid #e7eaf0; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.14); padding: 0.5rem; display: flex; flex-direction: column; z-index: 60; }
.moca-nav-panel a { padding: 0.75rem 1rem; color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 500; border-radius: 8px; }
.moca-nav-panel a:hover { background: var(--wp--preset--color--light); color: var(--wp--preset--color--blue); }
.moca-nav-panel__cta { background: var(--moca-cta-bg, var(--wp--preset--color--blue)); color: #fff !important; font-weight: 700 !important; text-align: center; margin-top: 0.35rem; }
@media (max-width: 880px) { .moca-nav-toggle { display: block; } .moca-header__cta { display: none; } }

/* --- Buttons --- */
.wp-block-button.is-style-pill .wp-block-button__link { border-radius: 9999px; font-weight: 700; padding: 0.85rem 1.6rem; }
.wp-block-button.is-style-ghost .wp-block-button__link { border-radius: 9999px; font-weight: 700; padding: 0.85rem 1.6rem; background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.7); }

/* --- GeoGrid hero / cover tweaks --- */
.moca-hero .wp-block-cover__inner-container { max-width: 1180px; margin-inline: auto; width: 100%; }
.moca-hero h1 { color: #fff; font-weight: 200; letter-spacing: -0.01em; }
.moca-hero .moca-eyebrow { color: #fff; opacity: 0.85; }

/* --- Cards (value + products) --- */
.moca-cards { max-width: 1180px; margin-inline: auto; display: grid; gap: 1.25rem; }
.moca-cards--4 { grid-template-columns: repeat(4, 1fr); }
.moca-cards--auto { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.moca-cards--3 { grid-template-columns: repeat(3, 1fr); }
.moca-cards--2 { grid-template-columns: repeat(2, 1fr); }
.moca-card { background: #fff; border: 1px solid #e7eaf0; border-top: 3px solid transparent; border-radius: 16px; padding: 1.75rem; box-shadow: 0 4px 18px rgba(20,30,80,0.06); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.moca-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(20,30,80,0.14); }
.moca-card h3 { margin: 0 0 0.5rem; font-size: 1.25rem; color: var(--wp--preset--color--ink); }
.moca-card p { margin: 0; font-size: 0.9375rem; color: var(--wp--preset--color--gray); line-height: 1.55; }
/* Rotating brand accent (top bar + icon chip share the colour) - lifts the flat white boxes */
.moca-cards > .moca-card:nth-child(4n+1) { border-top-color: var(--wp--preset--color--foundation); }
.moca-cards > .moca-card:nth-child(4n+2) { border-top-color: var(--wp--preset--color--magenta); }
.moca-cards > .moca-card:nth-child(4n+3) { border-top-color: var(--wp--preset--color--extensions); }
.moca-cards > .moca-card:nth-child(4n+4) { border-top-color: var(--wp--preset--color--evo); }
.moca-card__icon { width: 52px; height: 52px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem; background: var(--wp--preset--color--blue); }
.moca-card__icon img { width: 30px; height: 30px; display: block; }
.moca-cards > .moca-card:nth-child(4n+1) .moca-card__icon { background: var(--wp--preset--color--foundation); }
.moca-cards > .moca-card:nth-child(4n+2) .moca-card__icon { background: var(--wp--preset--color--magenta); }
.moca-cards > .moca-card:nth-child(4n+3) .moca-card__icon { background: var(--wp--preset--color--extensions); }
.moca-cards > .moca-card:nth-child(4n+4) .moca-card__icon { background: var(--wp--preset--color--evo); }
/* Native-block cards (Model 1): neutralize the group block flow gap so .moca-cards grid + .moca-card spacing stay clean */
.moca-cards.wp-block-group > * + *, .moca-card.wp-block-group > * + * { margin-block-start: 0; }
.moca-card.wp-block-group { display: block; }
.moca-card__tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.25rem 0.7rem; border-radius: 9999px; color: #fff; margin-bottom: 0.875rem; }
@media (max-width: 980px) { .moca-cards--4, .moca-cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .moca-cards--4, .moca-cards--3, .moca-cards--2 { grid-template-columns: 1fr; } }
.moca-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.moca-split.wp-block-group > * + * { margin-block-start: 0; } /* native group flow gap off; grid gap owns spacing */
@media (max-width: 760px) { .moca-split { grid-template-columns: 1fr; gap: 2rem; } }

/* --- Product screenshots (native wp:image, Model 1) --- */
.moca-shot { margin-inline: auto; }
.moca-shot img { width: 100%; border-radius: 14px; border: 1px solid #e7eaf0; box-shadow: 0 12px 40px rgba(0,0,0,0.12); display: block; }
.moca-shot figcaption, figcaption.moca-figcap { text-align: center; font-size: 0.85rem; color: var(--wp--preset--color--gray); margin-top: 0.9rem; }

/* --- Trust stats band (native, Model 1) --- */
.moca-stats { max-width: 1180px; margin-inline: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.moca-stats.wp-block-group > * + * { margin-block-start: 0; }
.moca-stat__num { font-weight: 200; font-size: 3rem; line-height: 1; color: #fff; margin: 0; }
.moca-stat__label { opacity: 0.8; font-size: 0.9rem; margin: 0.5rem 0 0; }
@media (max-width: 760px) { .moca-stats { grid-template-columns: repeat(2, 1fr); } }

/* --- Comparison tables: let wide tables scroll horizontally on small screens --- */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { min-width: 520px; }

/* --- Newsletter signup --- */
.moca-newsletter-form { display: flex; gap: 0.6rem; max-width: 460px; margin: 0 auto; }
.moca-newsletter-form input { flex: 1; min-width: 0; padding: 0.8rem 1.1rem; border: 1.5px solid #d8dded; border-radius: 9999px; font: inherit; background: #fff; }
.moca-newsletter-form button { background: var(--wp--preset--color--blue); color: #fff; font-weight: 700; padding: 0.8rem 1.5rem; border: 0; border-radius: 9999px; font: inherit; cursor: pointer; white-space: nowrap; }
.moca-newsletter-form button:hover { background: #28488c; }
/* White button on the magenta newsletter band */
.has-magenta-gradient-background .moca-newsletter-form button { background: #fff; color: var(--wp--preset--color--magenta); }
.has-magenta-gradient-background .moca-newsletter-form button:hover { background: rgba(255,255,255,0.85); }
.has-magenta-gradient-background .moca-newsletter-form input { border-color: transparent; }
@media (max-width: 480px) { .moca-newsletter-form { flex-direction: column; } }
.moca-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* --- Product card top (GeoGrid) - legacy, superseded by .moca-prod tiles --- */
.moca-prod__top { height: 96px; border-radius: 12px; background-size: cover; background-position: center; margin: -0.25rem 0 1rem; display: flex; align-items: flex-end; padding: 0.75rem 1rem; }
.moca-prod__top span { color: #fff; font-weight: 200; font-size: 1.6rem; }

/* --- Product tiles (full-colour GeoGrid, vibrant) --- */
.moca-prods { max-width: 1180px; margin-inline: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.25rem; }
@media (min-width: 1040px) { .moca-prods { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 520px) { .moca-prods { grid-template-columns: 1fr; } }
.moca-prod {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 240px; border-radius: 18px; overflow: hidden; padding: 1.6rem;
  color: #fff; text-decoration: none; background-size: cover; background-position: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.moca-prod::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,25,0.05) 0%, rgba(0,0,25,0.62) 100%); }
/* Distinct hue per green product (same GeoGrid texture, different shade) */
.moca-prod--teal::before { background: linear-gradient(165deg, rgba(0,120,128,0.50) 0%, rgba(0,22,28,0.66) 100%); }
.moca-prod--leaf::before { background: linear-gradient(165deg, rgba(52,170,40,0.45) 0%, rgba(8,28,8,0.64) 100%); }
.moca-prod--emerald::before { background: linear-gradient(165deg, rgba(6,112,62,0.55) 0%, rgba(0,20,12,0.70) 100%); }
.moca-prod > * { position: relative; z-index: 1; }
.moca-prod:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0,0,0,0.24); }
.moca-prod__name { font-weight: 200; font-size: 1.9rem; line-height: 1.05; margin: 0 0 0.45rem; color: #fff; letter-spacing: -0.01em; }
.moca-prod__desc { font-size: 0.94rem; line-height: 1.5; margin: 0; color: rgba(255,255,255,0.93); }
.moca-prod__arrow { margin-top: 0.95rem; font-weight: 700; font-size: 0.9rem; color: #fff; }
.moca-prod:hover .moca-prod__arrow { text-decoration: underline; }

/* --- Testimonials --- */
.moca-quotes { max-width: 1180px; margin-inline: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.moca-quote { background: #fff; border: 1px solid #e7eaf0; border-radius: 16px; padding: 1.75rem; }
.moca-quote p { font-style: italic; color: var(--wp--preset--color--ink); margin: 0 0 1rem; line-height: 1.5; }
.moca-quote cite { font-style: normal; font-size: 0.875rem; color: var(--wp--preset--color--gray); }
@media (max-width: 980px) { .moca-quotes { grid-template-columns: 1fr; } }

/* --- Footer --- */
.moca-footer { background: linear-gradient(110deg, #1f52ff 0%, #911cc0 52%, #a13876 100%); color: rgba(255,255,255,0.9); }
.moca-footer a { color: #fff; text-decoration: none; }
.moca-footer a:hover { color: rgba(255,255,255,0.78); }
.moca-footer .moca-newsletter-form button { background: #fff; color: var(--wp--preset--color--blue); }
.moca-footer .moca-newsletter-form button:hover { background: rgba(255,255,255,0.85); }
.moca-footer__stripe { height: 6px; background: linear-gradient(90deg, var(--wp--preset--color--foundation), var(--wp--preset--color--evo), var(--wp--preset--color--magenta)); }
