/*
Theme Name: MS Enterprises AH-BOND
Theme URI: https://example.com/
Author: Custom Website Conversion
Description: WordPress conversion of supplied MS Enterprises AH-BOND HTML website.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: ms-enterprises
*/
/* ==========================================================================
   MS ENTERPRISES — SHARED STYLESHEET
   Used by every page. Sections are labelled so you can find things fast.
   ========================================================================== */

/* ---- 1. Design tokens (CSS variables) ---- */
:root {
  --off-white: #FAF7F1;
  --cream: #F1EAD9;
  --beige: #D9C9AE;
  --charcoal: #26221D;
  --charcoal-soft: #55503F;
  --border: #E0D3B8;
  --bronze: #8C5A2B;
  --white: #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', Arial, sans-serif;

  --max-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 10px;

  --shadow-card: 0 1px 2px rgba(38, 34, 29, 0.06), 0 8px 24px rgba(38, 34, 29, 0.06);
  --shadow-hover: 0 4px 8px rgba(38, 34, 29, 0.08), 0 16px 32px rgba(38, 34, 29, 0.10);
}

/* ---- 2. Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 3. Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.5rem); font-weight: 400; }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem); margin-bottom: 32px; }
h3 { font-size: 1.15rem; margin-bottom: 10px; }

p { color: var(--charcoal-soft); max-width: 62ch; }

.text-link {
  color: var(--bronze);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.text-link:hover { border-color: var(--bronze); }

/* ---- 4. Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--charcoal);
  color: var(--off-white);
}
.btn-primary:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--charcoal);
}
.btn-secondary:hover {
  background: var(--charcoal);
  color: var(--off-white);
}

/* ---- 5. Header / Navbar ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal-soft);
  transition: color 0.15s var(--ease);
  padding-bottom: 2px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-whatsapp {
  padding: 8px 16px;
  background: var(--charcoal);
  color: var(--off-white) !important;
  border-radius: var(--radius-sm);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--charcoal);
}

/* ---- 6. Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34,31,27,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,31,27,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
.hero-copy, .hero-visual { position: relative; z-index: 1; }
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 96px 24px 80px;
}

.hero-sub {
  font-size: 1.1rem;
  margin-top: 20px;
  color: var(--charcoal-soft);
}

.hero-pillars {
  margin-top: 12px;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--bronze);
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
}

/*barrel */
.barrel-body {
  width: 210px;
  height: 230px;
  margin: -20px auto 0;
  border-radius: 14px;
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 22px),
    linear-gradient(90deg, #161513 0%, var(--graphite) 16%, var(--graphite-light) 45%, var(--graphite) 74%, #161513 100%);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}
.barrel-base {
  width: 224px;
  height: 20px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--charcoal);
  opacity: 0.3;
  filter: blur(4px);
}


/* Product preview grid (home page) */
.preview-card { position: relative; }
.preview-card::before,
.preview-card::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--gold);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  z-index: 2;
}
.preview-card::before { left: 10px; border-left: 2px solid var(--gold); }
.preview-card::after  { right: 10px; border-right: 2px solid var(--gold); }
.preview-card:hover::before,
.preview-card:hover::after { opacity: 1; }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.preview-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.preview-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.preview-image {
  aspect-ratio: 4 / 3;
  background-color: var(--beige);
  background-size: cover;
  background-position: center;
}

.preview-card h3 {
  font-size: 1rem;
  padding: 16px;
  margin-bottom: 0;
}

/* Feature grid (why us) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature {
  border-top: 2px solid var(--bronze);
  padding-top: 16px;
}

.feature p { font-size: 0.92rem; }

/* Industries grid */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.industry {
  border: 1px solid rgba(250, 247, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

/* CTA */
.cta-section {
  background: var(--charcoal);
  text-align: left;
}
.cta-section h2,
.cta-section p { color: var(--off-white); }
.cta-inner p { margin: 16px 0 28px; opacity: 0.85; }
.cta-section .btn-secondary {
  border-color: var(--off-white);
  color: var(--off-white);
}
.cta-section .btn-secondary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--charcoal);
}

/* ---- 8. Footer ---- */
.site-footer {
  background: var(--charcoal);
  color: var(--beige);
  padding: 32px 0;
}
.footer-inner p {
  color: var(--beige);
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.footer-inner a:hover { color: var(--off-white); }

/* ---- 9. Floating WhatsApp button ---- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  z-index: 200;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }

/* ==========================================================================
   RESPONSIVE — Tablet (<=1024px) and Mobile (<=640px)
   ========================================================================== */

@media (max-width: 1024px) {
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .industry-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { order: -1; }
}

@media (max-width: 720px) {
  .menu-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--off-white);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 16px 24px;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .nav-whatsapp { border-radius: 0; }

  .hero { padding: 56px 20px 56px; }
  .hero-actions { flex-direction: column; }
  .btn { text-align: center; }

  .preview-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}


/* ==========================================================================
   PHONE OPTIMISATIONS (added)
   Everything from here down only affects phones / tablets / touch screens.
   Desktop (wider than 1024px, with a mouse) is NOT changed by anything below.

   Tip: if your live style.css has more rules than the copy this was built
   from, don't replace the file - just paste this whole block (from this
   comment to the end) at the very bottom of your existing file.
   ========================================================================== */

/* Safe everywhere: stops iPhones inflating text in landscape, removes tap delay */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: rgba(140, 90, 43, 0.15); }

/* Touch screens have no real "hover", so don't leave buttons/cards stuck in a
   hovered state after a tap */
@media (hover: none) {
  .btn-primary:hover { box-shadow: none; transform: none; }
  .btn-secondary:hover { background: transparent; color: var(--charcoal); }
  .cta-section .btn-secondary:hover { background: transparent; border-color: var(--off-white); color: var(--off-white); }
  .preview-card:hover { box-shadow: var(--shadow-card); transform: none; }
  .whatsapp-float:hover { transform: none; }
  .text-link:hover { border-color: transparent; }
}

/* Tablet and below: the About-page hero has an empty decorative box that only
   adds blank space once the layout stacks into one column */
@media (max-width: 1024px) {
  .hero-visual:has(.drop-scene) { display: none; }
}

/* Phones */
@media (max-width: 720px) {

  /* never allow a sideways wobble */
  body { overflow-x: clip; }

  /* ---- header: lighter to paint, shorter, bigger tap target ---- */
  .site-header {
    background: var(--off-white);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .navbar { height: 64px; }
  .nav-links { top: 64px; }
  .nav-links.open {
    max-height: min(320px, calc(100vh - 110px));
    overflow-y: auto;
  }
  .nav-links a.active { color: var(--bronze); }

  .menu-toggle {
    width: 44px;
    height: 44px;
    padding: 13px 9px;
    margin-right: -9px;
  }

  /* ---- type + spacing ---- */
  h1 { font-size: clamp(2rem, 8.2vw, 2.25rem); }
  h2 { margin-bottom: 20px; }

  .section { padding-top: 48px; padding-bottom: 48px; }

  .hero { padding: 40px 20px 44px; gap: 28px; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { margin-top: 28px; }

  .preview-grid { gap: 16px; }
  .feature-grid { gap: 24px; }
  .industry { padding: 22px 20px; }

  /* ---- buttons / links: easy to hit with a thumb ---- */
  .cta-inner .btn { display: block; text-align: center; }
  .text-link { overflow-wrap: anywhere; }
  .feature p a.text-link { display: inline-block; padding: 10px 0; }

  /* ---- footer + floating WhatsApp: don't cover each other ---- */
  .site-footer { padding-bottom: 88px; }
  .footer-inner p { overflow-wrap: anywhere; }
  .whatsapp-float {
    width: 52px;
    height: 52px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}
