/*
Theme Name: XlevelRetail Systems
Theme URI: https://xlevelretail.com
Author: XlevelRetail Systems
Author URI: https://xlevelretail.com
Description: A refined single-page block theme (Full Site Editing) for XlevelRetail Systems — retail operations specialists. Deep-green and gold editorial design with scroll-reveal animations. Every section is an editable block pattern; header, footer, colours and fonts are managed in the Site Editor.
Version: 2.0.0
Requires at least: 6.1
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xlevelretail
Tags: business, one-page, full-site-editing, block-patterns, custom-logo, custom-colors, translation-ready
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-deep:  #0B231A;
  --green-mid:   #133226;
  --green-light: #1C4736;
  --gold:        #C9A84C;
  --gold-light:  #E2C47C;
  --cream:       #F5F0E6;
  --cream-dim:   #C8C0AD;
  --white:       #FDFAF5;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--green-deep);
  color: var(--cream);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 5vw;
  background: rgba(11,35,26,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  transition: padding .3s;
}
.nav-logo {
  display: flex; align-items: center;
  text-decoration: none;
}
.nav-logo img,
nav .custom-logo-link img { height: 32px; width: auto; display: block; }
nav .custom-logo-link { display: flex; align-items: center; line-height: 0; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: .85rem; font-weight: 400; letter-spacing: .06em;
  text-transform: uppercase; color: var(--cream-dim); text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  background: var(--gold); color: var(--green-deep);
  font-weight: 500; font-size: .82rem; letter-spacing: .05em; text-transform: uppercase;
  padding: .55rem 1.4rem; border-radius: 2px; text-decoration: none;
  transition: background .2s;
}
.nav-cta:hover { background: var(--gold-light); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 10vh 5vw 6vh;
  position: relative; overflow: hidden;
}
.hero-grid-line {
  position: absolute; top: 0; left: 50%; width: 1px; height: 100%;
  background: rgba(201,168,76,0.08); pointer-events: none;
}
.hero-grid-line:nth-child(2) { left: 25%; }
.hero-grid-line:nth-child(3) { left: 75%; }

.hero-eyebrow {
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: .8rem;
}
.hero-eyebrow::before {
  content: ''; display: block; width: 2.5rem; height: 1px;
  background: var(--gold);
}
.hero-h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 500; line-height: 1.04;
  letter-spacing: -0.03em; color: var(--white);
  max-width: 14ch;
  margin-bottom: 2rem;
}
.hero-h1 em { font-style: italic; color: var(--gold); font-weight: 300; }
.hero-sub {
  font-size: 1.05rem; color: var(--cream-dim); font-weight: 300;
  max-width: 52ch; line-height: 1.75; margin-bottom: 3rem;
}
.hero-actions { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.btn-primary {
  background: var(--gold); color: var(--green-deep);
  font-weight: 500; font-size: .9rem; letter-spacing: .04em;
  padding: .85rem 2rem; border-radius: 2px; text-decoration: none;
  transition: background .2s, transform .15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline {
  border: 1px solid rgba(201,168,76,0.4); color: var(--gold);
  font-size: .9rem; padding: .85rem 2rem; border-radius: 2px;
  text-decoration: none; transition: border-color .2s, color .2s;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-light); }

.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 5vw;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cream-dim); display: flex; align-items: center; gap: .6rem;
}
.hero-scroll::after {
  content: ''; display: block; width: 1px; height: 2.8rem;
  background: var(--gold); opacity: .5;
}

/* ── STATS BAR ── */
#stats {
  background: var(--green-mid);
  border-top: 1px solid rgba(201,168,76,0.2);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  padding: 3rem 5vw;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 2rem;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Fraunces', serif;
  font-size: 2.8rem; font-weight: 700; color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cream-dim); margin-top: .4rem;
}

/* ── SECTION SHARED ── */
section { padding: 7rem 5vw; }
.section-eyebrow {
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
}
.section-h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--white); margin-bottom: 1.5rem;
}
.section-lead {
  font-size: 1rem; color: var(--cream-dim); font-weight: 300;
  max-width: 58ch; line-height: 1.8;
}

/* ── SERVICES ── */
#services { background: var(--green-deep); }
.services-header { margin-bottom: 4rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 1.5px;
  border: 1.5px solid rgba(201,168,76,0.15);
}
.service-card {
  padding: 3rem 2.5rem;
  background: var(--green-deep);
  border: 1px solid rgba(201,168,76,0.12);
  position: relative; overflow: hidden;
  transition: background .25s;
}
.service-card:hover { background: var(--green-mid); }
.service-card::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--gold);
  transition: width .35s ease;
}
.service-card:hover::after { width: 100%; }
.service-num {
  font-family: 'Fraunces', serif;
  font-size: .8rem; color: var(--gold); opacity: .6;
  letter-spacing: .12em; margin-bottom: 2rem;
}
.service-icon {
  width: 2.8rem; height: 2.8rem; margin-bottom: 1.5rem;
  stroke: var(--gold); fill: none; stroke-width: 1.5;
}
.service-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem; font-weight: 500; color: var(--white);
  margin-bottom: 1rem; letter-spacing: -0.01em;
}
.service-body { font-size: .92rem; color: var(--cream-dim); font-weight: 300; line-height: 1.8; }
.service-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.tag {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(201,168,76,0.3); color: var(--gold);
  padding: .3rem .75rem; border-radius: 1px;
}

/* ── WHY XLEVEL ── */
#why { background: var(--green-mid); }
.why-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start; margin-top: 4rem;
}
.why-list { list-style: none; display: flex; flex-direction: column; gap: 2rem; }
.why-item { display: flex; gap: 1.5rem; }
.why-bullet {
  width: 2px; min-height: 4rem; background: rgba(201,168,76,0.4);
  flex-shrink: 0; margin-top: .25rem; position: relative;
}
.why-bullet::before {
  content: ''; position: absolute; top: 0; left: -4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold);
}
.why-item-title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem; font-weight: 500; color: var(--white);
  margin-bottom: .4rem;
}
.why-item-body { font-size: .9rem; color: var(--cream-dim); font-weight: 300; line-height: 1.75; }
.why-aside {
  background: var(--green-light);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 3rem;
}
.why-aside-quote {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem; font-style: italic; font-weight: 300;
  color: var(--white); line-height: 1.45; margin-bottom: 2rem;
}
.why-aside-quote span { color: var(--gold); }
.why-aside-line { height: 1px; background: rgba(201,168,76,0.25); margin-bottom: 2rem; }
.metric-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.metric { flex: 1; min-width: 100px; }
.metric-val {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem; font-weight: 700; color: var(--gold);
}
.metric-desc { font-size: .78rem; color: var(--cream-dim); margin-top: .2rem; text-transform: uppercase; letter-spacing: .07em; }

/* ── WHO WE SERVE ── */
#serve { background: var(--green-deep); }
.serve-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 1rem; margin-top: 3.5rem;
}
.serve-card {
  padding: 2rem 1.75rem;
  border: 1px solid rgba(201,168,76,0.14);
  position: relative;
  transition: border-color .25s, background .25s;
}
.serve-card:hover {
  border-color: rgba(201,168,76,0.45);
  background: rgba(28,71,54,0.4);
}
.serve-card-icon { font-size: 1.5rem; color: var(--gold); opacity: .7; margin-bottom: 1rem; }
.serve-card-title {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem; color: var(--white); margin-bottom: .5rem;
}
.serve-card-body { font-size: .85rem; color: var(--cream-dim); font-weight: 300; }

/* ── CLIENTS ── */
#clients { background: var(--green-mid); padding: 4.5rem 5vw; }
.clients-label {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cream-dim); text-align: center; margin-bottom: 2.5rem;
}
.clients-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1rem 3rem; align-items: center;
}
.client-name {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem; font-weight: 500;
  color: rgba(245,240,230,0.35);
  letter-spacing: .03em;
  transition: color .25s;
  cursor: default;
}
.client-name:hover { color: rgba(201,168,76,0.7); }

/* ── CTA ── */
#contact {
  background: var(--green-light);
  padding: 7rem 5vw;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; overflow: hidden;
}
#contact::before {
  content: '';
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.contact-h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 500; line-height: 1.1; letter-spacing: -0.03em;
  color: var(--white); max-width: 16ch; margin-bottom: 1.5rem;
}
.contact-sub {
  font-size: 1rem; color: var(--cream-dim); font-weight: 300;
  max-width: 50ch; margin-bottom: 3rem; line-height: 1.75;
}
.contact-info {
  display: flex; gap: 3rem; flex-wrap: wrap; justify-content: center;
  margin-top: 4rem; padding-top: 3rem;
  border-top: 1px solid rgba(201,168,76,0.2);
}
.contact-item { text-align: center; }
.contact-item-label {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .5rem;
}
.contact-item-val { font-size: .95rem; color: var(--cream-dim); }
.contact-item-val a { color: var(--cream-dim); text-decoration: none; }
.contact-item-val a:hover { color: var(--gold); }

/* ── FOOTER ── */
footer {
  background: var(--green-deep);
  border-top: 1px solid rgba(201,168,76,0.12);
  padding: 2rem 5vw;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo {
  font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.1rem;
  color: var(--white);
}
.footer-logo span { color: var(--gold); }
.footer-logo img,
.footer-logo .custom-logo-link img { height: 28px; width: auto; }
.footer-logo .custom-logo-link { line-height: 0; }
.footer-copy { font-size: .8rem; color: var(--cream-dim); opacity: .6; }
.footer-tagline { font-size: .78rem; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }

/* ── FADE-IN ANIMATION ── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .why-grid { grid-template-columns: 1fr; }
  .hero-h1 { font-size: clamp(2.6rem, 10vw, 4rem); }
}

/* ════════════════════════════════════════════════════════════
   BLOCK-EDITOR COMPATIBILITY
   Maps WordPress block wrappers (Group / Buttons / Navigation /
   Site Logo) back onto the original bespoke design so the
   block theme renders the same as the source HTML.
   ════════════════════════════════════════════════════════════ */

/* Group blocks must not impose their own width/margins on our
   full-bleed sections — let the original id/class rules drive. */
.wp-block-group.xlr-hero,
.wp-block-group.xlr-services,
.wp-block-group.xlr-why,
.wp-block-group.xlr-serve,
.wp-block-group.xlr-contact,
.wp-block-group.xlr-stats,
.wp-block-group.xlr-clients,
.site-main { max-width: none; margin: 0; }
.site-main { display: block; }

/* Neutralise default block-gap on our custom containers; the
   original CSS already defines exact spacing. */
.services-grid > *, .serve-grid > *, .why-list > *,
.clients-row > *, .service-tags > *, .metric-row > *,
.contact-info > *, #stats > * { margin-block: 0; }

/* Buttons → original .btn-primary / .btn-outline anchors */
.wp-block-button.btn-primary .wp-block-button__link {
  background: var(--gold); color: var(--green-deep);
  font-weight: 500; font-size: .9rem; letter-spacing: .04em;
  padding: .85rem 2rem; border-radius: 2px; border: 0;
}
.wp-block-button.btn-primary .wp-block-button__link:hover { background: var(--gold-light); }
.wp-block-button.btn-outline .wp-block-button__link {
  background: transparent; color: var(--gold);
  border: 1px solid rgba(201,168,76,0.4);
  font-size: .9rem; padding: .85rem 2rem; border-radius: 2px;
}
.wp-block-button.btn-outline .wp-block-button__link:hover {
  border-color: var(--gold); color: var(--gold-light);
}
.hero-actions.wp-block-buttons { gap: 1.2rem; align-items: center; }

/* Site navigation block styled like the original .nav-links */
.site-nav { padding: 0; }
.site-nav .wp-block-navigation { gap: 2rem; }
.site-nav .wp-block-navigation a,
.site-nav .wp-block-navigation .wp-block-navigation-item__content {
  font-size: .85rem; font-weight: 400; letter-spacing: .06em;
  text-transform: uppercase; color: var(--cream-dim); text-decoration: none;
}
.site-nav .wp-block-navigation a:hover { color: var(--gold); }
.site-nav .wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--green-deep);
}

/* Nav CTA button */
.nav-cta .wp-block-button__link {
  background: var(--gold); color: var(--green-deep);
  font-weight: 500; font-size: .82rem; letter-spacing: .05em;
  text-transform: uppercase; padding: .55rem 1.4rem;
  border-radius: 2px; border: 0;
}
.nav-cta .wp-block-button__link:hover { background: var(--gold-light); }
.nav-cta-wrap { margin: 0; }

/* Site Logo block sizing in nav + footer */
.site-nav .wp-block-site-logo img { height: 32px; width: auto; }
.footer-logo .wp-block-site-logo img { height: 28px; width: auto; }
.site-nav .wp-block-site-logo, .footer-logo .wp-block-site-logo { margin: 0; }

/* Footer template-part wrapper keeps the original footer styling */
.site-footer { padding: 2rem 5vw; }

@media (max-width: 768px) {
  .site-nav .wp-block-navigation__responsive-container-open { color: var(--gold); }
}
