/*
Theme Name: Max Moster
Theme URI: https://abidmajeed.vercel.app/
Author: Abid Majeed
Author URI: https://abidmajeed.vercel.app/
Description: Lightweight custom theme for Max Moster - custom art work, custom spas, custom lobbies and water fountains. Colors inspired by the Max Moster brush-stroke logo.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: max-moster
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, one-column, two-columns, custom-colors
*/

/* ==========================================================================
   1. Design tokens (brand colors from logo)
   ========================================================================== */
:root {
  --mm-dark: #1f2428;        /* charcoal brush stroke */
  --mm-teal: #3e6b6c;        /* teal brush stroke */
  --mm-terracotta: #c3602f;  /* terracotta brush stroke */
  --mm-gold: #c9a24b;        /* gold leaf / triangle */
  --mm-cream: #faf7f2;       /* soft paper background */
  --mm-white: #ffffff;
  --mm-text: #2b2f33;
  --mm-muted: #6b7075;
  --mm-border: #e7e1d6;

  --mm-font-heading: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mm-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --mm-container: 1200px;
  --mm-radius: 4px;
  --mm-shadow: 0 10px 30px rgba(31, 36, 40, .08);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--mm-font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--mm-text);
  background: var(--mm-white);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--mm-teal); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus { color: var(--mm-terracotta); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mm-font-heading);
  color: var(--mm-dark);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
p { margin: 0 0 1.2em; }

.container { width: 100%; max-width: var(--mm-container); margin: 0 auto; padding: 0 20px; }
.site-content { min-height: 50vh; }
.section { padding: 80px 0; }

/* Accessibility */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
  background: var(--mm-dark); color: #fff; clip: auto !important; clip-path: none;
  height: auto; width: auto; left: 10px; top: 10px; padding: 12px 20px; z-index: 100000;
}
:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }

/* Buttons */
.btn, .wp-block-button__link, button[type="submit"], input[type="submit"] {
  display: inline-block; cursor: pointer; border: 2px solid var(--mm-terracotta);
  background: var(--mm-terracotta); color: #fff; padding: 12px 28px;
  font-family: var(--mm-font-body); font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; font-size: .85rem; border-radius: var(--mm-radius);
  transition: all .25s ease;
}
.btn:hover, .wp-block-button__link:hover, button[type="submit"]:hover, input[type="submit"]:hover {
  background: var(--mm-dark); border-color: var(--mm-dark); color: #fff;
}
.btn-outline { background: transparent; color: var(--mm-terracotta); }
.btn-gold { background: var(--mm-gold); border-color: var(--mm-gold); color: var(--mm-dark); }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="tel"], input[type="password"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--mm-border);
  border-radius: var(--mm-radius); font: inherit; background: #fff; color: var(--mm-text);
}
input:focus, textarea:focus, select:focus { border-color: var(--mm-teal); outline: none; }

/* ==========================================================================
   3. Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 999;
  border-bottom: 1px solid rgba(231, 225, 214, .85);
  transition: box-shadow .3s ease;
}
/* Glass layer lives on a pseudo-element so fixed children (mobile drawer) are not affected */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  transition: background .3s ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header::before { background: #fff; }
}
/* Brand gradient hairline */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--mm-teal), var(--mm-gold), var(--mm-terracotta), transparent);
  opacity: 0; transition: opacity .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(31, 36, 40, .08); }
.site-header.is-scrolled::before { background: rgba(255, 255, 255, .95); }
.site-header.is-scrolled::after { opacity: .9; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.header-inner { display: flex; align-items: center; gap: 28px; min-height: 92px; transition: min-height .3s ease; }
.site-header.is-scrolled .header-inner { min-height: 74px; }

/* Branding */
.site-branding { flex: 0 0 auto; display: flex; align-items: center; }
.site-branding .custom-logo-link { display: block; line-height: 0; }
.site-branding img, .custom-logo { max-height: 72px; width: auto; transition: max-height .3s ease; }
.site-header.is-scrolled .custom-logo { max-height: 56px; }
.site-title { font-family: var(--mm-font-heading); font-size: 1.8rem; font-weight: 700; margin: 0; line-height: 1; }
.site-title a { color: var(--mm-dark); }
.site-description { margin: 4px 0 0; font-size: .8rem; color: var(--mm-muted); }

/* Desktop navigation */
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.main-nav li { position: relative; }
.main-nav a {
  position: relative; display: block; padding: 10px 16px;
  color: var(--mm-dark); font-weight: 500; font-size: .9rem;
  letter-spacing: .08em; text-transform: uppercase;
}
.main-nav > ul > li > a::before {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px;
  background: linear-gradient(90deg, var(--mm-gold), var(--mm-terracotta));
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current_page_item > a { color: var(--mm-terracotta); }
.main-nav > ul > li > a:hover::before,
.main-nav > ul > li.current-menu-item > a::before,
.main-nav > ul > li.current-menu-ancestor > a::before,
.main-nav > ul > li.current_page_item > a::before { transform: scaleX(1); }

/* Dropdown (sub-menu) */
.main-nav .menu-item-has-children > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}
.main-nav .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; background: #fff;
  border-top: 3px solid var(--mm-gold); border-radius: 0 0 var(--mm-radius) var(--mm-radius);
  box-shadow: var(--mm-shadow); display: block; padding: 10px 0;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .22s ease;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { padding: 9px 22px; text-transform: none; letter-spacing: 0; font-size: .95rem; }
.main-nav .sub-menu a:hover { background: var(--mm-cream); }

/* CTA button */
.header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 50px; border: 2px solid var(--mm-terracotta);
  background: var(--mm-terracotta); color: #fff; font-weight: 600; font-size: .85rem;
  letter-spacing: .07em; text-transform: uppercase; line-height: 1; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(195, 96, 47, .28);
  transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.btn-cta svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
.btn-cta:hover, .btn-cta:focus-visible {
  background: var(--mm-dark); border-color: var(--mm-dark); color: #fff;
  transform: translateY(-2px); box-shadow: 0 12px 24px rgba(31, 36, 40, .25);
}
.main-nav .nav-cta-mobile { display: none; }
.nav-overlay { display: none; }

/* Mobile toggle (hamburger) */
.menu-toggle {
  display: none; position: relative; z-index: 1003; width: 46px; height: 46px; padding: 0;
  background: var(--mm-cream); border: 1px solid var(--mm-border); border-radius: 50%; cursor: pointer;
}
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  position: absolute; left: 50%; width: 20px; height: 2px; margin-left: -10px;
  background: var(--mm-dark); border-radius: 2px; transition: transform .3s ease, background .3s ease, top .3s ease;
}
.menu-toggle .bars { top: 22px; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; left: 0; margin-left: 0; }
.menu-toggle .bars::before { top: -6px; }
.menu-toggle .bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

/* Tablet & mobile */
@media (max-width: 991px) {
  .header-inner { min-height: 76px; justify-content: space-between; }
  .site-header.is-scrolled .header-inner { min-height: 68px; }
  .site-branding img, .custom-logo { max-height: 58px; }
  .site-header.is-scrolled .custom-logo { max-height: 50px; }

  .menu-toggle { display: block; }
  .header-actions .btn-cta { display: none; }

  .nav-overlay {
    display: block; position: fixed; inset: 0; z-index: 1000;
    background: rgba(31, 36, 40, .55); opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .nav-overlay.is-open { opacity: 1; visibility: visible; }

  .main-nav {
    position: fixed; top: 0; right: 0; z-index: 1001; width: min(86vw, 360px); height: 100vh; height: 100dvh;
    margin: 0; padding: 100px 28px 32px; background: #fff; overflow-y: auto;
    transform: translateX(100%); transition: transform .35s cubic-bezier(.2, .7, .2, 1);
    box-shadow: -20px 0 50px rgba(31, 36, 40, .15); border-top: 4px solid var(--mm-gold);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--mm-border); }
  .main-nav a { padding: 16px 4px; font-size: 1rem; }
  .main-nav > ul > li > a::before { display: none; }
  .main-nav .menu-item-has-children > a::after { display: none; }
  .main-nav .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border-top: 0; padding: 0 0 8px 16px; background: transparent;
  }
  .main-nav .sub-menu a { padding: 10px 4px; }
  .main-nav .nav-cta-mobile { display: flex; margin-top: 28px; width: 100%; padding: 15px 26px; color: #fff; }
.main-nav .nav-cta-mobile:hover { color: #fff; }
}
body.menu-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header *, .main-nav, .nav-overlay { transition: none !important; }
}

/* ==========================================================================
   4. Posts / archive / single
   ========================================================================== */
.page-header { background: var(--mm-cream); padding: 60px 0; text-align: center; border-bottom: 1px solid var(--mm-border); }
.page-header h1 { margin: 0; }
.content-area { padding: 60px 0; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.post-card { background: #fff; border: 1px solid var(--mm-border); border-radius: var(--mm-radius); overflow: hidden; transition: box-shadow .25s ease, transform .25s ease; }
.post-card:hover { box-shadow: var(--mm-shadow); transform: translateY(-3px); }
.post-card__body { padding: 24px; }
.post-card__title { font-size: 1.5rem; margin-bottom: .4em; }
.post-card__title a { color: var(--mm-dark); }
.post-card__title a:hover { color: var(--mm-terracotta); }
.entry-meta { font-size: .85rem; color: var(--mm-muted); margin-bottom: 12px; }
.entry-content { max-width: 800px; margin: 0 auto; }
.entry-content > .alignwide { max-width: var(--mm-container); }
.entry-content > .alignfull { max-width: none; }
.post-thumbnail img { width: 100%; }
.pagination, .posts-navigation, .post-navigation { margin-top: 48px; text-align: center; }
.page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid var(--mm-border); margin: 0 3px; color: var(--mm-dark); border-radius: var(--mm-radius); }
.page-numbers.current, .page-numbers:hover { background: var(--mm-dark); color: #fff; border-color: var(--mm-dark); }

/* WordPress core classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: .85rem; color: var(--mm-muted); text-align: center; }
.sticky, .bypostauthor { display: block; }

/* Comments */
.comments-area { max-width: 800px; margin: 60px auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--mm-border); }

/* ==========================================================================
   5. Footer (black)
   ========================================================================== */
.site-footer {
  position: relative; background: #0b0d0e; color: rgba(255, 255, 255, .7);
  padding-top: 80px;
}
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--mm-teal), var(--mm-gold), var(--mm-terracotta));
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr .8fr .9fr 1.3fr; gap: 48px; padding-bottom: 64px;
}

/* Brand column */
.footer-logo .custom-logo-link {
  display: inline-block; line-height: 0; padding: 10px 14px; background: #fff; border-radius: var(--mm-radius);
}
.footer-logo .custom-logo { max-height: 72px; width: auto; }
.footer-title { font-family: var(--mm-font-heading); font-size: 1.8rem; font-weight: 700; color: #fff; }
.footer-desc { margin: 20px 0 24px; max-width: 340px; font-size: .95rem; line-height: 1.8; }
.footer-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social a {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); color: #fff;
  transition: all .25s ease;
}
.footer-social a:hover {
  background: var(--mm-terracotta); border-color: var(--mm-terracotta); color: #fff; transform: translateY(-3px);
}
.footer-social svg, .footer-contact svg { width: 18px; height: 18px; }

/* Headings */
.footer-heading {
  position: relative; margin: 0 0 28px; padding-bottom: 14px; font-size: 1.35rem; color: #fff;
}
.footer-heading::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--mm-gold), var(--mm-terracotta));
}

/* Link lists */
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: 12px; }
.footer-menu a { display: inline-block; color: rgba(255, 255, 255, .7); font-size: .95rem; transition: all .25s ease; }
.footer-menu a:hover { color: var(--mm-gold); transform: translateX(5px); }

/* Contact */
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 14px; }
.footer-contact .icon {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08); color: var(--mm-gold);
}
.footer-contact .label {
  display: block; margin-bottom: 2px; font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255, 255, 255, .5);
}
.footer-contact a, .footer-contact .value {
  color: #fff; font-weight: 500; font-size: .95rem; line-height: 1.5; word-break: break-word;
}
.footer-contact a:hover { color: var(--mm-gold); }

/* Bottom bar */
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding: 24px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem;
}
.footer-copy { margin: 0; color: rgba(255, 255, 255, .6); }
.footer-bottom-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom-menu a { color: rgba(255, 255, 255, .6); }
.footer-bottom-menu a:hover { color: var(--mm-gold); }

/* Tablet */
@media (max-width: 991px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* Mobile: brand full width, Quick Links + Services side by side, contact full width */
@media (max-width: 575px) {
  .site-footer { padding-top: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; padding-bottom: 44px; }
  .footer-brand, .footer-grid > .footer-col:last-child { grid-column: 1 / -1; }
  .footer-heading { font-size: 1.2rem; margin-bottom: 22px; }
  .footer-menu a { font-size: .92rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}