/* =========================================================
   XOPTOOZ — Brand stylesheet
   Warm cream bg · charcoal text · amber-orange accents
   Palette sourced from xoptooz.com live site
   ========================================================= */

/* ── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ─────────────────────────────── */
:root {
  /* Backgrounds — warm cream palette from xoptooz.com */
  --clr-white:      #FFFDF6;   /* warm cream — replaces pure white */
  --clr-bg-alt:     #FFF5DF;   /* light amber tint for alternating sections */
  --clr-bg-card:    #FFFFFF;   /* pure white inside cards for contrast */

  /* Text */
  --clr-charcoal:   #1C1C1E;   /* near-black body text */
  --clr-text-muted: #6B6059;   /* warm mid-grey muted text */
  --clr-text-light: #B0A090;   /* warm light placeholder / secondary */

  /* Amber-orange accent — primary brand colour from xoptooz.com */
  --clr-gold:       #F5A623;   /* bright amber — decorative / hero accent */
  --clr-gold-btn:   #E8890D;   /* button fill — AA-accessible on white text */
  --clr-gold-dark:  #C97008;   /* hover / pressed state */

  /* Borders */
  --clr-border:     #EAE0CE;   /* warm off-white border */

  /* Typography */
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* Shape */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(30,20,0,.06), 0 1px 2px rgba(30,20,0,.04);
  --shadow-md:  0 4px 14px rgba(30,20,0,.09);
  --shadow-lg:  0 12px 36px rgba(30,20,0,.11);

  --transition: .2s ease;
}

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--clr-charcoal);
}

p { color: var(--clr-charcoal); }

a {
  color: var(--clr-gold-btn);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--clr-gold-dark); }

code, pre, .mono { font-family: var(--font-mono); }

/* ── Layout helpers ─────────────────────────────────────── */
.section-alt { background-color: var(--clr-bg-alt); }
.section-py  { padding: 5rem 0; }
.section-py-sm { padding: 3rem 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary-gold {
  background-color: var(--clr-gold-btn);
  color: #FFFFFF !important;
  border: 2px solid var(--clr-gold-btn);
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: .625rem 1.5rem;
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: inline-block;
}
.btn-primary-gold:hover {
  background-color: var(--clr-gold-dark);
  border-color: var(--clr-gold-dark);
  box-shadow: 0 4px 16px rgba(200,112,8,.32);
  color: #FFFFFF !important;
}

.btn-outline-charcoal {
  background-color: transparent;
  color: var(--clr-charcoal) !important;
  border: 2px solid var(--clr-charcoal);
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: .625rem 1.5rem;
  transition: background-color var(--transition), color var(--transition);
  display: inline-block;
}
.btn-outline-charcoal:hover {
  background-color: var(--clr-charcoal);
  color: #FFFFFF !important;
}

/* ── Navbar ─────────────────────────────────────────────── */
.xo-navbar {
  background-color: var(--clr-white) !important;
  border-bottom: 1px solid var(--clr-border);
  padding: .75rem 0;
  box-shadow: var(--shadow-sm);
}

.xo-navbar .navbar-brand img,
.xo-navbar .navbar-brand svg {
  height: 40px;
  width: auto;
}

.xo-navbar .nav-link {
  color: var(--clr-charcoal) !important;
  font-weight: 500;
  font-size: .9rem;
  padding: .35rem .75rem !important;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition);
}
.xo-navbar .nav-link:hover,
.xo-navbar .nav-link.active {
  color: var(--clr-gold-btn) !important;
  background-color: rgba(232,137,13,.09);
}

.xo-navbar .nav-cta {
  margin-left: .5rem;
}

/* ── Footer ─────────────────────────────────────────────── */
.xo-footer {
  background-color: var(--clr-white);
  border-top: 1px solid var(--clr-border);
  padding: 4rem 0 2rem;
}

.xo-footer .footer-logo img,
.xo-footer .footer-logo svg {
  height: 36px;
  width: auto;
}

.xo-footer-links a {
  color: var(--clr-text-muted);
  font-size: .875rem;
  display: block;
  margin-bottom: .35rem;
  transition: color var(--transition);
}
.xo-footer-links a:hover { color: var(--clr-gold-btn); }

.xo-footer-heading {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--clr-charcoal);
  margin-bottom: 1rem;
}

.xo-footer-bottom {
  border-top: 1px solid var(--clr-border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: .8rem;
  color: var(--clr-text-muted);
}

/* ── Hero ───────────────────────────────────────────────── */
.xo-hero {
  background: linear-gradient(160deg, #FFFDF6 0%, #FFF5DC 60%, #FFEFC0 100%);
  padding: 6rem 0 5rem;
}

.xo-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--clr-charcoal);
}

.xo-hero .hero-accent {
  color: var(--clr-gold-btn);
}

.xo-hero .hero-lead {
  font-size: 1.125rem;
  color: var(--clr-text-muted);
  max-width: 560px;
  margin: 1.25rem 0 2rem;
}

.xo-hero .hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.hero-illustration {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
}

/* ── Section headings ───────────────────────────────────── */
.section-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--clr-gold-btn);
  margin-bottom: .5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ── Cards ──────────────────────────────────────────────── */
.xo-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  height: 100%;
}
.xo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--clr-gold);
}

.xo-card .card-icon {
  width: 48px;
  height: 48px;
  background: rgba(245,166,35,.14);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.375rem;
  color: var(--clr-gold-btn);
}

.xo-card h3, .xo-card h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.xo-card p {
  font-size: .9rem;
  color: var(--clr-text-muted);
  margin-bottom: 1.25rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(245,166,35,.14);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.375rem;
  color: var(--clr-gold-btn);
}

.card-link-arrow {
  font-size: .85rem;
  font-weight: 600;
  color: var(--clr-gold-btn);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: gap var(--transition), color var(--transition);
}
.card-link-arrow:hover { gap: .55rem; color: var(--clr-gold-dark); }

/* ── Stats ──────────────────────────────────────────────── */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.stat-item {
  text-align: center;
  min-width: 120px;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--clr-charcoal);
  line-height: 1;
}

.stat-label {
  font-size: .8125rem;
  color: var(--clr-text-muted);
  margin-top: .35rem;
}

/* ── Testimonials ───────────────────────────────────────── */
.testimonial-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-size: 4rem;
  line-height: 1;
  color: var(--clr-gold);
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  opacity: .35;
  font-family: Georgia, serif;
}

.testimonial-card blockquote {
  font-size: .9375rem;
  color: var(--clr-charcoal);
  line-height: 1.65;
  margin: 1.5rem 0 1.25rem;
  border: none;
  padding: 0;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-gold), var(--clr-gold-dark));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8125rem;
  flex-shrink: 0;
}

/* ── CTA Banner ─────────────────────────────────────────── */
.xo-cta-banner {
  background: linear-gradient(135deg, #2A1F00 0%, #3D2D00 50%, #1C1C1E 100%);
  padding: 5rem 0;
  text-align: center;
}

.xo-cta-banner h2 { color: #FFFFFF; }
.xo-cta-banner p  { color: rgba(255,255,255,.72); max-width: 520px; margin: .75rem auto 2rem; }

/* ── Service detail ─────────────────────────────────────── */
.service-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: 99px;
  padding: .35rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--clr-charcoal);
  transition: background-color var(--transition), border-color var(--transition);
}
.service-chip:hover {
  background-color: rgba(245,166,35,.12);
  border-color: var(--clr-gold);
  color: var(--clr-gold-btn);
}

.service-chip .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-gold-btn);
  flex-shrink: 0;
}

/* ── Contact form ───────────────────────────────────────── */
.contact-section {
  background-color: var(--clr-white);
}

.form-label { font-weight: 500; font-size: .875rem; color: var(--clr-charcoal); }

.form-control, .form-select {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--clr-charcoal);
  background-color: var(--clr-bg-card);
  padding: .625rem .875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--clr-gold-btn);
  box-shadow: 0 0 0 3px rgba(232,137,13,.18);
  outline: none;
}

/* ── Page header ─────────────────────────────────────────── */
.xo-page-header {
  background: linear-gradient(160deg, var(--clr-white) 0%, var(--clr-bg-alt) 100%);
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--clr-border);
}

.xo-page-header h1 { font-size: clamp(1.75rem, 3vw, 2.75rem); font-weight: 800; }
.xo-page-header p  { color: var(--clr-text-muted); max-width: 560px; font-size: 1.0625rem; }

/* ── Team card ──────────────────────────────────────────── */
.team-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.team-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--clr-gold), var(--clr-gold-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

/* ── AI Chat Widget ──────────────────────────────────────── */
#chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background-color: var(--clr-gold-btn);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(200,112,8,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  color: white;
  z-index: 1050;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
#chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(200,112,8,.5);
  background-color: var(--clr-gold-dark);
}

#chat-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  width: 360px;
  max-width: calc(100vw - 2rem);
  max-height: 520px;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1049;
  transition: opacity .25s ease, transform .25s ease;
}

#chat-panel.hidden {
  opacity: 0;
  transform: translateY(12px) scale(.97);
  pointer-events: none;
}

#chat-header {
  background: var(--clr-charcoal);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

#chat-header .chat-avatar {
  width: 32px;
  height: 32px;
  background: var(--clr-gold-btn);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  color: white;
  flex-shrink: 0;
}

#chat-header h6 {
  color: white;
  margin: 0;
  font-size: .875rem;
  font-weight: 600;
}

#chat-header .chat-status {
  color: rgba(255,255,255,.6);
  font-size: .75rem;
}

#chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 1.125rem;
  padding: 0;
  line-height: 1;
  transition: color .15s;
}
#chat-close:hover { color: white; }

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.chat-msg {
  display: flex;
  max-width: 85%;
}

.chat-msg.bot  { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }

.chat-bubble {
  padding: .625rem 1rem;
  border-radius: 14px;
  font-size: .875rem;
  line-height: 1.5;
}

.chat-msg.bot .chat-bubble {
  background: var(--clr-bg-alt);
  color: var(--clr-charcoal);
  border-bottom-left-radius: 4px;
}

.chat-msg.user .chat-bubble {
  background: var(--clr-gold-btn);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-typing .chat-bubble {
  display: flex;
  gap: .25rem;
  align-items: center;
  padding: .75rem 1rem;
}

.chat-typing .dot {
  width: 7px;
  height: 7px;
  background: var(--clr-text-muted);
  border-radius: 50%;
  animation: chat-bounce 1.2s infinite;
}
.chat-typing .dot:nth-child(2) { animation-delay: .2s; }
.chat-typing .dot:nth-child(3) { animation-delay: .4s; }

@keyframes chat-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-5px); }
}

#chat-input-row {
  border-top: 1px solid var(--clr-border);
  padding: .875rem 1rem;
  display: flex;
  gap: .5rem;
}

#chat-input {
  flex: 1;
  border: 1px solid var(--clr-border);
  border-radius: 99px;
  padding: .5rem 1rem;
  font-size: .875rem;
  outline: none;
  font-family: var(--font-body);
  background: var(--clr-bg-card);
}
#chat-input:focus { border-color: var(--clr-gold-btn); }

#chat-send {
  width: 36px;
  height: 36px;
  background: var(--clr-gold-btn);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background-color .15s;
}
#chat-send:hover { background: var(--clr-gold-dark); }

/* ── Utilities ───────────────────────────────────────────── */
.text-gold { color: var(--clr-gold-btn) !important; }
.text-muted-xo { color: var(--clr-text-muted); }
.divider-gold { border-top: 3px solid var(--clr-gold); width: 40px; margin: 1rem 0; }

.alert-success-xo {
  background: rgba(245,166,35,.12);
  border: 1px solid rgba(232,137,13,.3);
  color: #7A4A00;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
  .section-py  { padding: 3.5rem 0; }
  .xo-hero     { padding: 4rem 0 3rem; }
  .stats-row   { gap: 1.5rem; }

  #chat-panel {
    bottom: 5rem;
    right: 1rem;
    left: 1rem;
    width: auto;
  }
  #chat-fab {
    bottom: 1.25rem;
    right: 1.25rem;
  }
}
