/* =========================================================
   Xeroplus - Full style.css (Light Theme Update)
   - Light is now the default background
   - Premium surfaces, borders, shadows
   - Scroll reveal animations (paired with data-animate JS)
   ========================================================= */

/* -----------------------------
   1) Theme Tokens (Light Default)
------------------------------ */
:root{
  --primary-color: #5b6cff;
  --primary-hover: #7b88ff;

  --bg: #ffffff;          /* page background */
  --surface: #f8f9fa;     /* cards/header/footer */
  --surface-2: #e9ecef;   /* subtle panels */
  --text: #212529;       /* main text */
  --text-muted: #6c757d;  /* muted text */
  --border: rgba(0,0,0,0.10);

  --shadow-1: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-2: 0 14px 40px rgba(0,0,0,0.12);

  --focus-ring: rgba(91,108,255,0.35);

  --text-dark: var(--text);  /* compatibility w/ older inline usage */
  --text-light: #ffffff;
  --bg-light: var(--bg);

  --font-heading: 'Kanit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1280px;
  --spacing: 2rem;

  --radius-sm: 10px;
  --radius-md: 14px;

  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root{ scroll-behavior: auto; }
}

/* -----------------------------
   2) Base / Reset
------------------------------ */
*{ box-sizing: border-box; margin: 0; padding: 0; }

html, body{
  background: var(--bg);
  color: var(--text);
}

body{
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

img{ max-width: 100%; height: auto; display: block; }

a{
  text-decoration: none;
  color: inherit;
  transition: 0.25s ease;
}

ul{ list-style: none; }

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

.section-padding{ padding: 80px 0; }

h1,h2,h3,h4,h5,h6{
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

p, li{ color: var(--text-muted); }

/* Better default focus */
:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
  border-radius: 10px;
}

/* Accessibility */
.skip-link{
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 9999;
}
.skip-link:focus{ left: 10px; }

/* -----------------------------
   3) Buttons
------------------------------ */
.btn{
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid rgba(91,108,255,0.75);
  box-shadow: 0 8px 22px rgba(91,108,255,0.14);
  transition: 0.25s ease;
}

.btn:hover{
  background-color: var(--primary-hover);
  border-color: rgba(123,136,255,0.85);
  transform: translateY(-1px);
}

.btn:active{ transform: translateY(0); }

.btn-sm{
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.btn-outline{
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-outline:hover{
  background: rgba(0,0,0,0.04);
  border-color: rgba(91,108,255,0.55);
  color: var(--text);
}

.btn:focus,
.btn-outline:focus{
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Helpers used by updated contact page */
.btn-block{ width: 100%; text-align: center; }

/* -----------------------------
   4) Header / Nav
------------------------------ */
header{
  background: rgba(248,249,250,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  gap: 18px;
}

.logo a{ display: inline-flex; align-items: center; }
.site-logo{ display: block; color: var(--text); }

.nav-links{
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav-links a{
  font-weight: 600;
  color: var(--text);
  opacity: 0.9;
}

.nav-links a:hover,
.nav-links a.active{
  color: var(--primary-color);
  opacity: 1;
}

.nav-cta{ margin-left: 6px; }

.mobile-menu-btn{
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-menu-btn:hover{
  background: rgba(0,0,0,0.04);
  border-color: var(--border);
}

/* -----------------------------
   5) Hero
------------------------------ */
.hero{
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 100px 0;
  background: var(--bg);
}

.hero-content{ flex: 1; padding-right: 10px; }

.hero h1{
  font-size: 3.25rem;
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero-sub{
  font-size: 1.05rem;
  max-width: 56ch;
}

.accent{ color: var(--primary-color); }

.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-proof{
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.proof-item{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 999px;
  background: rgba(0,0,0,0.03);
}

.hero-image{ flex: 1; }

.hero-image img{
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}

/* Hero floating card */
.hero-media{ position: relative; }
.hero-float-card{
  position: absolute;
  right: -10px;
  bottom: -14px;
  width: 230px;
  background: rgba(248,249,250,0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-1);
}
.float-title{
  color: var(--text);
  font-weight: 700;
  margin-bottom: 10px;
  font-family: var(--font-heading);
}
.float-row{
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  margin-top: 8px;
}
.float-row strong{ color: var(--text); }

/* -----------------------------
   6) Section headings + badges
------------------------------ */
.section-head{
  margin-bottom: 26px;
  max-width: 72ch;
}

.eyebrow{
  margin-bottom: 12px;
  color: var(--primary-color);
  letter-spacing: 0.10em;
  font-size: 0.85rem;
}

.badge{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  color: var(--text);
}

/* -----------------------------
   7) Features
------------------------------ */
.features-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  text-align: center;
}

.feature-item{
  padding: 20px;
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-md);
}

.feature-item:hover{
  border-color: rgba(91,108,255,0.28);
  background: rgba(0,0,0,0.03);
}

.feature-item img{
  height: 60px;
  margin: 0 auto 16px auto;
  opacity: 0.95;
}

/* -----------------------------
   8) Services
------------------------------ */
.services-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.service-card{
  background: var(--surface);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.service-card:hover{
  box-shadow: var(--shadow-2);
  transform: translateY(-6px);
  border-color: rgba(91,108,255,0.35);
}

.service-icon{
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.mini-list{
  margin-top: 14px;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
}
.mini-list i{
  color: rgba(91,108,255,0.9);
  margin-right: 8px;
}

.section-cta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 26px;
}

/* Subtle premium background for services preview */
.services-preview{
  background:
    radial-gradient(900px 420px at 20% 10%, rgba(91,108,255,0.08), transparent 60%),
    radial-gradient(700px 380px at 85% 30%, rgba(61,139,255,0.06), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.00));
}

/* -----------------------------
   9) Trust strip cards
------------------------------ */
.trust-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.trust-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.trust-card h4{ margin-bottom: 8px; }
.trust-card h4 i{
  color: rgba(91,108,255,0.95);
  margin-right: 8px;
}

/* -----------------------------
   10) Stats
------------------------------ */
.stats-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.stat{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-1);
  text-align: center;
}

.stat-num{
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text);
}

.stat-label{ margin-top: 6px; }

/* -----------------------------
   11) Process
------------------------------ */
.process-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.process-step{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.step-num{
  font-family: var(--font-heading);
  color: rgba(91,108,255,0.9);
  font-weight: 700;
  margin-bottom: 10px;
}

/* -----------------------------
   12) Testimonials
------------------------------ */
.testimonials-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.testimonial{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.testimonial blockquote{ color: var(--text); }

.testimonial figcaption{
  margin-top: 14px;
  color: var(--text-muted);
  display: grid;
  gap: 4px;
}

.testimonial figcaption strong{ color: var(--text); }

/* -----------------------------
   13) CTA band
------------------------------ */
.cta-band{
  padding: 70px 0;
  background: rgba(0,0,0,0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.cta-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* -----------------------------
   14) About page split sections
------------------------------ */
.about-split{
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 70px;
}

.about-split.reverse{ flex-direction: row-reverse; }

.about-img img{
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  background: var(--surface);
}

.about-text h4{ margin-bottom: 10px; }
.about-text p{ margin-bottom: 12px; }

/* -----------------------------
   15) FAQ (Accordion + Toolbar)
------------------------------ */
/* Container helper (your HTML uses .faq-container) */
.faq-container{ max-width: 900px; margin: 0 auto; }

.faq-item{
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

/* Updated FAQ uses <button class="faq-question"> */
.faq-question{
  width: 100%;
  padding: 18px 20px;
  background: var(--surface-2);
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  border-radius: 12px;

  border: 1px solid rgba(0,0,0,0.06);
  text-align: left;
  font-family: var(--font-body);
}

.faq-question:hover{
  background: rgba(0,0,0,0.03);
  border-color: rgba(91,108,255,0.28);
}

.faq-answer{
  padding: 14px 20px 6px 20px;
  color: var(--text-muted);
}

/* Support new accessible markup using [hidden] */
.faq-answer[hidden]{ display: none; }

/* Legacy support (if any older page still toggles .open) */
.faq-answer.open{ display: block; }

/* FAQ toolbar: search + chips */
.faq-toolbar{
  display: grid;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-search{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border);
}

.faq-search i{ color: var(--text-muted); }

.faq-search input{
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}

.faq-chips{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip{
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
}

.chip:hover{ border-color: rgba(91,108,255,0.35); }

.chip.is-active{
  background: rgba(91,108,255,0.14);
  border-color: rgba(91,108,255,0.45);
  color: var(--text);
}

.faq-empty{
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed rgba(0,0,0,0.20);
  border-radius: 14px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.02);
}

/* -----------------------------
   16) Contact Form
------------------------------ */
.contact-wrapper{
  display: flex;
  gap: 50px;
}

.contact-info, .contact-form{ flex: 1; }

.form-group{ margin-bottom: 20px; }

.form-group label{
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select{
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  background: rgba(0,0,0,0.03);
  color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder{
  color: rgba(0,0,0,0.45);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus{
  outline: none;
  border-color: rgba(91,108,255,0.55);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Contact helpers used by updated contact page */
.form-row{ display: flex; gap: 20px; }
.form-note{ margin-top: 12px; font-size: 0.92rem; color: var(--text-muted); }

/* --- UPDATED: Light-theme <select> fix (prevents white native select UI) --- */
.form-group select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* keep the same light field treatment */
  background-color: rgba(0,0,0,0.03);
  color: var(--text);
  border: 1px solid var(--border);

  /* custom caret (consistent in light theme) */
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.65) 50%),
    linear-gradient(135deg, rgba(0,0,0,0.65) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;

  padding-right: 42px;
}

/* Style dropdown rows (works in most browsers) */
.form-group select option{
  background-color: var(--surface);
  color: var(--text);
}

/* -----------------------------
   17) Footer
------------------------------ */
footer{
  background: var(--surface);
  padding: 60px 0 20px;
  margin-top: 80px;
  border-top: 1px solid var(--border);
}

.footer-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p{ margin-top: 12px; }

.footer-grid h4{ margin-bottom: 12px; }

.footer-grid a:hover{ color: var(--primary-color); }

.footer-grid li{ margin: 10px 0; }

.footer-grid li i{
  margin-right: 10px;
  color: rgba(91,108,255,0.9);
}

.footer-bottom{
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* -----------------------------
   18) Scroll Reveal Animations
   (JS adds .is-revealed + .anim-*)
------------------------------ */
[data-animate]{
  opacity: 0;
  transform: translateY(10px);
}

.is-revealed{
  opacity: 1;
  transform: none;
  transition: opacity 600ms ease, transform 600ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.anim-fade-in{ transform: none; }
.anim-fade-up{ transform: translateY(0); }

.anim-float.is-revealed{ animation: floaty 6s ease-in-out infinite; }

@keyframes floaty{
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* -----------------------------
   19) Responsive
------------------------------ */
@media (max-width: 900px){
  .hero h1{ font-size: 2.8rem; }
}

@media (max-width: 768px){
  .nav-links{
    display: none;
    flex-direction: column;
    position: absolute;
    top: 90px;
    left: 0;
    width: 100%;
    background: rgba(248,249,250,0.95);
    padding: 20px;
    box-shadow: var(--shadow-1);
    border-top: 1px solid var(--border);
    gap: 16px;
  }

  .nav-links.active{ display: flex; }

  .mobile-menu-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero{
    flex-direction: column;
    padding: 70px 0;
  }

  .hero-content{
    padding-right: 0;
    margin-bottom: 28px;
  }

  .hero h1{ font-size: 2.35rem; }

  .hero-float-card{
    right: 10px;
    bottom: 10px;
    width: 200px;
  }

  .contact-wrapper{ flex-direction: column; }

  .about-split{
    flex-direction: column;
    gap: 24px;
    margin-bottom: 50px;
  }

  .about-split.reverse{ flex-direction: column; }

  .form-row{ flex-direction: column; gap: 0; }
}

/* Auth pages */
.auth-wrap{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
  margin-top: 28px;
}

.auth-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-1);
}

.auth-sub{ margin-top: -6px; margin-bottom: 16px; color: var(--text-muted); }

.auth-form .hint{
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.auth-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
}

.auth-link{
  color: var(--primary-color);
  font-weight: 600;
}
.auth-link:hover{ color: var(--primary-hover); }

/* Checkbox label */
.check{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  cursor: pointer;
}
.check input{ width: 16px; height: 16px; }

/* Password input with icon button */
.input-with-action{
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action input{ padding-right: 46px; }

.icon-btn{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.03);
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover{
  border-color: rgba(91,108,255,0.35);
  background: rgba(0,0,0,0.04);
}

/* Divider */
.auth-divider{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-muted);
}
.auth-divider::before,
.auth-divider::after{
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}
.auth-divider span{
  font-size: 0.9rem;
}

@media (max-width: 900px){
  .auth-wrap{ grid-template-columns: 1fr; }
  .auth-aside{ order: 2; }
}
