/* ============================================================
   Square Meter Pvt. Ltd. (M2 Squire)
   Strict palette: WHITE + Logo Teal
   ============================================================ */
:root {
  /* Logo teal — sampled directly from brand image */
  --brand:        #0d6e6a;   /* PRIMARY (logo background teal) */
  --brand-dark:   #0a524f;
  --brand-deep:   #073e3c;
  --brand-light:  #2bb0aa;
  --brand-soft:   #d5edec;
  --brand-tint:   #f0f9f8;

  /* Backwards-compat aliases (legacy templates still work) */
  --teal-900: var(--brand-deep);
  --teal-800: var(--brand-dark);
  --teal-700: var(--brand);
  --teal-600: var(--brand);
  --teal-500: var(--brand-light);
  --teal-400: var(--brand-light);
  --teal-100: var(--brand-soft);
  --teal-50:  var(--brand-tint);
  --green-900: var(--brand-deep);
  --green-800: var(--brand-dark);
  --green-700: var(--brand);
  --green-600: var(--brand);
  --green-500: var(--brand-light);
  --green-400: var(--brand-light);
  --green-50:  var(--brand-tint);

  /* Neutrals */
  --ink:    #0f172a;
  --ink-2:  #475569;
  --muted:  #64748b;
  --line:   #e8ebed;
  --bg:     #ffffff;          /* page bg = pure white */
  --bg-alt: #f7fafa;          /* very faint tint */
  --white:  #ffffff;

  --shadow-sm: 0 1px 2px rgba(13,110,106,.04);
  --shadow:    0 4px 14px rgba(13,110,106,.06);
  --shadow-lg: 0 16px 40px rgba(13,110,106,.10);
  --radius:    10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-dark); }
img, svg { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

#bg-particles {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: .18;
}

h1, h2, h3, h4 { font-weight: 600; color: var(--brand-deep); letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p  { color: var(--ink-2); }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--brand); font-weight: 600; }
.logo-img { width: auto; color: var(--brand); }
.logo-text {
  font-size: 1.05rem; color: var(--brand-deep); letter-spacing: -0.01em;
  display: flex; flex-direction: column; line-height: 1.1;
}
.logo-text small { font-size: .62rem; color: var(--muted); font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }

.main-nav { display: flex; gap: 30px; align-items: center; }
.main-nav a {
  color: var(--ink-2); font-weight: 500; font-size: .92rem;
  position: relative; padding: 8px 0;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--brand);
  transition: width .25s;
}
.main-nav a:hover { color: var(--brand); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--brand); }
.btn-nav {
  background: var(--brand) !important;
  color: #ffffff !important;
  padding: 10px 22px !important;
  border-radius: var(--radius-sm);
  font-size: .9rem !important;
  font-weight: 500 !important;
  transition: background .15s;
}
.btn-nav::after { display: none !important; }
.btn-nav:hover { background: var(--brand-dark) !important; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--brand-deep); margin: 5px 0; border-radius: 2px; }

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 86vh; min-height: 580px;
  overflow: hidden;
  background: var(--brand-deep);
}
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; transition: opacity 1s;
}
.hero-slide.active { opacity: 1; }
.hero-slide::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, rgba(7,62,60,.94) 0%, rgba(13,110,106,.65) 55%, rgba(13,110,106,.25));
  z-index: 1;
}
.hero-slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  transition: transform 9s;
}
.hero-slide.active .hero-slide-bg { transform: scale(1); }
.hero-content {
  position: relative; z-index: 2;
  max-width: 720px; padding: 0 30px; color: white;
  transform: translateY(20px); opacity: 0;
  transition: .8s .3s;
}
.hero-slide.active .hero-content { transform: translateY(0); opacity: 1; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  padding: 7px 16px; border-radius: 999px;
  font-size: .78rem; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 22px;
  font-weight: 500; color: #fff;
}
.hero-tag::before { content: ''; width: 6px; height: 6px; background: var(--brand-light); border-radius: 50%; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.05;
  font-weight: 600;
  margin-bottom: 22px;
  color: white;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--brand-light); font-weight: 400; }
.hero p {
  font-size: 1.05rem; margin-bottom: 34px;
  max-width: 560px; color: rgba(255,255,255,.88);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: .92rem; cursor: pointer; border: none;
  transition: all .15s; text-align: center;
  font-family: inherit;
}
.btn-primary { background: var(--brand); color: #ffffff; }
.btn-primary:hover { background: var(--brand-dark); color: #ffffff; }
.btn-outline { background: transparent; color: #ffffff; border: 1.5px solid rgba(255,255,255,.45); }
.btn-outline:hover { background: #ffffff; color: var(--brand); border-color: #ffffff; }

.slider-controls {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%); z-index: 5;
  display: flex; gap: 8px;
}
.slider-dot {
  width: 32px; height: 3px;
  background: rgba(255,255,255,.3);
  border: none; cursor: pointer;
  transition: .25s; border-radius: 2px; padding: 0;
}
.slider-dot.active { background: #ffffff; width: 48px; }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  color: #ffffff; width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer; font-size: 1.2rem;
  transition: .15s;
  display: flex; align-items: center; justify-content: center;
}
.hero-arrow:hover { background: rgba(255,255,255,.18); }
.hero-arrow.prev { left: 24px; }
.hero-arrow.next { right: 24px; }

/* ===== SECTIONS ===== */
.section { padding: 90px 0; position: relative; background: #ffffff; }
.section-alt, .section + .section { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 56px; max-width: 720px; margin-left: auto; margin-right: auto; }
.section-head .eyebrow {
  color: var(--brand); font-size: .76rem;
  letter-spacing: 3px; text-transform: uppercase; font-weight: 600;
}
.section-head h2 { margin: 12px 0 14px; color: var(--brand-deep); }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ===== TABS ===== */
.tabs {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 4px; margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  background: transparent; border: none;
  padding: 12px 22px;
  font-family: inherit; font-weight: 500;
  font-size: .92rem; cursor: pointer;
  color: var(--muted);
  transition: .15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--brand); }
.tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* ===== GRID + CARDS ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card-3d {
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card-3d:hover {
  border-color: var(--brand-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card-img {
  height: 220px; background-size: cover; background-position: center;
  position: relative;
}
.card-body { padding: 22px; }
.card-cat {
  display: inline-block; background: var(--brand-tint);
  color: var(--brand); padding: 4px 12px;
  border-radius: 999px; font-size: .7rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px;
}
.card-title { color: var(--brand-deep); margin-bottom: 8px; font-weight: 600; }
.card-meta { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.card-link {
  color: var(--brand); font-weight: 500; font-size: .9rem;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .15s;
}
.card-link:hover { gap: 10px; }

/* ===== ABOUT ===== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }
.about-img {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.about-img img { width: 100%; }
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; margin-top: 32px;
}
.stat {
  background: #ffffff;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.stat .num { font-size: 2rem; font-weight: 600; color: var(--brand); letter-spacing: -0.02em; }
.stat .lbl { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* ===== SERVICES ===== */
.service {
  text-align: left; padding: 30px;
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: border-color .2s, transform .2s;
}
.service:hover { border-color: var(--brand-light); transform: translateY(-3px); }
.service-icon {
  width: 52px; height: 52px; margin-bottom: 22px;
  background: var(--brand-tint);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-size: 1.4rem;
}
.service h3 { margin-bottom: 10px; }
.service p { color: var(--muted); font-size: .92rem; }

/* ===== 3D VIEWER ===== */
.viewer-3d {
  background: var(--brand-deep);
  padding: 90px 0; color: #ffffff;
  position: relative; overflow: hidden;
}
.viewer-3d::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(43,176,170,.18), transparent 50%);
}
.viewer-3d .section-head { position: relative; z-index: 1; }
.viewer-3d .section-head h2 { color: #ffffff; }
.viewer-3d .section-head p { color: rgba(255,255,255,.75); }
.viewer-3d .section-head .eyebrow { color: var(--brand-light); }
#three-canvas {
  width: 100%; height: 480px;
  border-radius: var(--radius);
  background: rgba(0,0,0,.2);
  position: relative; z-index: 1;
}

/* ===== TESTIMONIALS ===== */
.testimonial {
  background: #ffffff;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  position: relative;
}
.testimonial::before {
  content: '"'; position: absolute; top: 6px; left: 22px;
  font-size: 4.5rem; color: var(--brand-tint);
  line-height: 1; font-family: Georgia, serif;
}
.testimonial p { font-size: .97rem; margin-bottom: 18px; color: var(--ink-2); position: relative; }
.testimonial .author { font-weight: 600; color: var(--brand-deep); font-size: .95rem; }
.testimonial .role { color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
.contact-card {
  background: #ffffff; padding: 36px; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 8px; color: var(--ink); font-size: .88rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .94rem;
  background: #ffffff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13,110,106,.12);
}
.info-item {
  display: flex; gap: 16px; margin-bottom: 16px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.info-item .icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--brand-tint);
  color: var(--brand); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.info-item h4 { color: var(--brand-deep); margin-bottom: 2px; font-size: .98rem; }
.info-item p { color: var(--muted); font-size: .88rem; }

/* ===== AUTH ===== */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: var(--bg-alt);
}
.auth-card {
  background: #ffffff; padding: 44px; border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  width: 100%; max-width: 440px;
}
.auth-logo {
  display: flex; justify-content: center; margin-bottom: 24px;
  color: var(--brand);
}
.auth-logo svg { height: 48px; }
.auth-card h2 { color: var(--brand-deep); margin-bottom: 6px; text-align: center; font-size: 1.5rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 26px; font-size: .9rem; text-align: center; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .9rem; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--brand-tint); color: var(--brand-dark); border: 1px solid var(--brand-soft); }

/* ===== ADMIN ===== */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--brand-deep);
  color: #ffffff;
  padding: 28px 0;
}
.admin-sidebar .logo {
  color: #ffffff; padding: 0 24px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 18px;
}
.admin-sidebar .logo-img { color: #ffffff; }
.admin-sidebar .logo-text { color: #ffffff; }
.admin-sidebar .logo-text small { color: var(--brand-light); }
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 24px; color: rgba(255,255,255,.72);
  font-size: .9rem; transition: .15s;
  border-left: 2px solid transparent;
  font-weight: 500;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,.06); color: #ffffff;
  border-left-color: var(--brand-light);
}
.admin-main { padding: 32px 40px; background: var(--bg-alt); }
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px; padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.admin-topbar h1 { color: var(--brand-deep); font-size: 1.5rem; font-weight: 600; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } }
.kpi {
  background: #ffffff; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.kpi .num { font-size: 1.9rem; font-weight: 600; color: var(--brand); letter-spacing: -0.02em; }
.kpi .lbl { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 6px; font-weight: 500; }

table.data-table {
  width: 100%; background: #ffffff; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); border-collapse: collapse;
}
.data-table th, .data-table td { padding: 14px 18px; text-align: left; font-size: .92rem; }
.data-table th { background: var(--bg-alt); color: var(--brand-deep); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: 1.5px; }
.data-table tr { border-bottom: 1px solid var(--line); }
.data-table tr:last-child { border-bottom: none; }
.data-table tr:hover { background: var(--brand-tint); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.badge-ok { background: var(--brand-tint); color: var(--brand-dark); }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }

.btn-sm { padding: 6px 14px; font-size: .78rem; border-radius: 6px; font-weight: 500; }
.btn-danger { background: #ef4444; color: #ffffff; }
.btn-danger:hover { background: #dc2626; }
.btn-edit { background: var(--brand); color: #ffffff; }
.btn-edit:hover { background: var(--brand-dark); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--brand-deep);
  color: rgba(255,255,255,.78);
  padding: 70px 0 22px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-brand .logo-img { color: #ffffff; }
.footer-brand .footer-tag { color: var(--brand-light); font-size: .72rem; letter-spacing: 3px; text-transform: uppercase; margin-top: 12px; font-weight: 500; }
.footer-brand p { color: rgba(255,255,255,.65); font-size: .9rem; margin-top: 14px; max-width: 340px; line-height: 1.65; }
.site-footer h4 { color: #ffffff; margin-bottom: 18px; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; }
.site-footer a { color: rgba(255,255,255,.62); display: block; margin-bottom: 8px; font-size: .9rem; }
.site-footer a:hover { color: #ffffff; }
.site-footer p { color: rgba(255,255,255,.62); font-size: .9rem; margin-bottom: 8px; }
.socials a { display: inline-block; margin-right: 14px; margin-bottom: 0; }
.copyright { text-align: center; padding-top: 22px; font-size: .82rem; color: rgba(255,255,255,.45); }

/* ===== MOBILE ===== */
@media (max-width: 800px) {
  .hamburger { display: block; }
  .main-nav {
    position: fixed; top: 74px; right: 0;
    flex-direction: column; align-items: flex-start;
    background: #ffffff; width: 280px;
    height: calc(100vh - 74px); padding: 30px;
    transform: translateX(100%); transition: .3s;
    border-left: 1px solid var(--line);
  }
  .main-nav.open { transform: translateX(0); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; left: -260px; width: 260px; height: 100vh; z-index: 50; transition: .3s; }
  .admin-sidebar.open { left: 0; }
}

/* ===== ANIMATIONS ===== */
.fade-in { opacity: 0; transform: translateY(20px); transition: .7s cubic-bezier(.2,.8,.2,1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
