/* ==========================================================================
   BD TECH OFFICE — main stylesheet
   Design tokens use the colours of the Bangladesh flag:
   primary = bottle green (#006A4E), secondary = crimson red (#CE1126),
   with neutral slate text on white.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --primary: 164 100% 21%;
  --primary-foreground: 210 40% 98%;
  --secondary: 353 85% 44%;
  --secondary-foreground: 210 40% 98%;
  --accent: 164 50% 95%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 164 100% 21%;
  --radius: 0.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --header-height: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 3px;
  border-radius: 4px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: hsl(var(--primary));
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 96px; position: relative; }
.section-muted { background: hsl(var(--muted) / 0.45); }

.text-primary { color: hsl(var(--primary)); }

.section-heading { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 16px; }
.section-heading p { color: hsl(var(--muted-foreground)); }

.badge {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-size: 0.875rem;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 8px 16px; }
.btn-lg { min-height: 48px; padding: 12px 32px; }
.btn-block { width: 100%; }

.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / 0.9); box-shadow: 0 6px 18px hsl(var(--primary) / 0.25); }

.btn-outline { background: hsl(var(--background)); border-color: hsl(var(--input)); color: hsl(var(--foreground)); }
.btn-outline:hover { background: hsl(var(--accent)); color: hsl(var(--primary)); border-color: hsl(var(--primary) / 0.4); }

.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-secondary:hover { background: hsl(var(--secondary) / 0.85); }

.btn-ghost { background: transparent; color: hsl(var(--muted-foreground)); }
.btn-ghost:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-block: 16px;
  background: transparent;
  transition: background-color 0.3s, box-shadow 0.3s, padding 0.3s;
}
.site-header.is-scrolled {
  padding-block: 10px;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 hsl(var(--border)), var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 180px; height: 40px; object-fit: contain; }

.desktop-nav { display: none; align-items: center; gap: 28px; }
.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: hsl(var(--foreground) / 0.75);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: hsl(var(--primary)); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: hsl(var(--foreground));
}
.menu-toggle:hover { background: hsl(var(--accent)); color: hsl(var(--primary)); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px 24px;
  background: hsl(var(--background));
  border-top: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-lg);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav .nav-link { padding: 10px 4px; font-size: 1rem; }
.mobile-nav .btn { margin-top: 8px; }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--header-height) + 56px); padding-bottom: 112px; overflow: hidden; }
.hero-glow {
  position: absolute;
  z-index: -1;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.hero-glow-primary { top: -180px; right: -180px; background: hsl(var(--primary) / 0.1); }
.hero-glow-secondary { bottom: -220px; left: -220px; background: hsl(var(--secondary) / 0.1); }

.hero-grid { display: grid; gap: 56px; align-items: center; }
.hero-copy h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 24px; }
.hero-lead { max-width: 540px; color: hsl(var(--muted-foreground)); font-size: 1.125rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

.clients { display: flex; align-items: center; gap: 16px; margin-top: 32px; }
.avatars { display: flex; padding-left: 8px; }
.avatars span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e5e7eb;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
}
.clients p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.clients strong { color: hsl(var(--foreground)); }

.hero-visual { position: relative; max-width: 500px; margin-inline: auto; width: 100%; }
.hero-image-wrap { aspect-ratio: 1; border-radius: 16px; overflow: hidden; }
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 600;
}
.float-card-bottom { bottom: -24px; left: -24px; }
.float-card-top { top: -24px; right: -24px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: #22c55e; }
.dot-primary { background: hsl(var(--primary)); }

.hero-anim { opacity: 0; animation: fadeUp 0.7s ease-out forwards; }
.hero-anim-1 { animation-delay: 0.05s; }
.hero-anim-2 { animation-delay: 0.15s; }
.hero-anim-3 { animation-delay: 0.25s; }
.hero-anim-4 { animation-delay: 0.35s; }
.hero-anim-5 { animation-delay: 0.45s; }
.hero-anim-6 { animation-name: zoomIn; animation-delay: 0.25s; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

/* ---------- Services carousel ---------- */
.carousel { position: relative; max-width: 900px; margin-inline: auto; }
.carousel-viewport { position: relative; height: 500px; border-radius: 12px; overflow: hidden; outline-offset: 4px; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 40px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.8), rgb(0 0 0 / 0.4) 45%, transparent);
  color: #fff;
}
.slide-overlay h3 { font-size: clamp(1.75rem, 4vw, 2rem); margin-bottom: 8px; }
.slide-overlay p { max-width: 560px; margin-bottom: 20px; color: rgb(255 255 255 / 0.9); }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  box-shadow: var(--shadow-lg);
  transition: background-color 0.2s, transform 0.2s;
}
.carousel-arrow:hover { background: hsl(var(--primary)); transform: translateY(-50%) scale(1.05); }
.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.dot-button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: hsl(var(--muted-foreground) / 0.3);
  transition: width 0.3s, background-color 0.3s;
}
.dot-button.is-active { width: 32px; background: hsl(var(--primary)); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 64px; align-items: center; }
.about-image-wrap { position: relative; max-width: 440px; margin-inline: auto; aspect-ratio: 1; }
.about-frame { position: absolute; inset: 0; border-radius: 16px; background: linear-gradient(135deg, hsl(var(--primary) / 0.2), hsl(var(--secondary) / 0.2)); transform: rotate(3deg); }
.about-image-wrap img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
.experience-badge {
  position: absolute;
  right: -24px;
  bottom: -24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}
.experience-badge strong { color: hsl(var(--primary)); font-size: 2.25rem; line-height: 1; }
.experience-badge span { font-size: 0.875rem; line-height: 1.3; }

.about-copy h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 16px; }
.about-intro { color: hsl(var(--muted-foreground)); margin-bottom: 28px; }
.feature-grid { display: grid; gap: 20px; margin-bottom: 24px; }
.feature { display: flex; gap: 10px; align-items: flex-start; }
.feature-icon { width: 22px; height: 22px; margin-top: 2px; color: hsl(var(--primary)); }
.feature h3 { font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.feature p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.about-mission p { margin-bottom: 16px; }
.about-mission p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 48px; }
.contact-form-card { padding: 40px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); }
.contact-form-card h3, .contact-details h3 { font-size: 1.25rem; margin-bottom: 24px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.form-row { display: grid; gap: 24px; }
.form-group label { font-size: 0.875rem; font-weight: 600; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input::placeholder, .form-group textarea::placeholder { color: hsl(var(--muted-foreground) / 0.8); }
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}
.form-group input[aria-invalid="true"], .form-group textarea[aria-invalid="true"] { border-color: #dc2626; }
.field-error { min-height: 0; font-size: 0.8125rem; color: #dc2626; }

.contact-details { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.contact-list { display: grid; gap: 28px; }
.contact-item { display: flex; align-items: flex-start; gap: 16px; }
.contact-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}
.contact-item h4 { font-size: 1rem; margin-bottom: 4px; }
.contact-item p { color: hsl(var(--muted-foreground)); font-size: 0.9375rem; }
.contact-item a:hover { color: hsl(var(--primary)); text-decoration: underline; }

.hours-card { padding: 24px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); }
.hours-card h4 { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin-bottom: 16px; }
.hours-card h4 .icon { color: hsl(var(--primary)); }
.hours-row { display: flex; justify-content: space-between; gap: 16px; padding-block: 6px; font-size: 0.9375rem; color: hsl(var(--muted-foreground)); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 72px 32px; background: hsl(var(--muted)); }
.footer-grid { display: grid; gap: 40px; }
.footer-brand p { max-width: 320px; margin: 16px 0 20px; color: hsl(var(--muted-foreground)); font-size: 0.9375rem; }
.social-links { display: flex; gap: 16px; }
.social-links a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s, background-color 0.2s;
}
.social-links a:hover { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.08); }
.site-footer h3 { font-size: 1rem; margin-bottom: 20px; }
.footer-list { display: grid; gap: 12px; }
.footer-list li { color: hsl(var(--muted-foreground)); font-size: 0.9375rem; }
.footer-list a:hover { color: hsl(var(--primary)); }
.footer-list .with-icon { display: flex; align-items: center; gap: 8px; }
.footer-list .with-icon .icon { width: 16px; height: 16px; color: hsl(var(--primary)); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid hsl(var(--muted-foreground) / 0.2);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: hsl(var(--primary)); }

/* ---------- Modals ---------- */
.modal {
  width: min(640px, calc(100vw - 32px));
  max-height: min(90vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.25);
  overflow: auto;
}
.modal::backdrop { background: rgb(15 23 42 / 0.6); backdrop-filter: blur(3px); }
.modal-small { width: min(440px, calc(100vw - 32px)); }
.modal-inner { position: relative; }
.modal-inner > img { width: 100%; height: 220px; object-fit: cover; }
.modal-body { padding: 28px 32px 32px; }
.modal-body h2 { font-size: 1.75rem; margin-bottom: 12px; }
.modal-body > p { color: hsl(var(--muted-foreground)); margin-bottom: 24px; }
.modal-body h3 { font-size: 1rem; margin-bottom: 12px; }
.modal-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
.modal-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.modal-features li::before { content: "✓"; color: hsl(var(--primary)); font-weight: 700; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.9);
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}
.modal-close:hover { background: #fff; color: hsl(var(--primary)); }
.modal-success { padding: 40px 32px 36px; text-align: center; }
.modal-success .modal-close { background: hsl(var(--muted)); box-shadow: none; }
.success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}
.success-icon .icon { width: 36px; height: 36px; }
.modal-success p { margin: 12px 0 28px; color: hsl(var(--muted-foreground)); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  z-index: 60;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(760px, calc(100vw - 32px));
  padding: 18px 22px;
  background: #fff;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner strong { font-size: 0.9375rem; }
.cookie-banner p { margin-top: 4px; font-size: 0.8125rem; color: hsl(var(--muted-foreground)); }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- Scroll reveal ---------- */
.reveal, .reveal-left, .reveal-right { opacity: 0; transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal { transform: translateY(24px); }
.reveal-left { transform: translateX(-24px); }
.reveal-right { transform: translateX(24px); }
.reveal.is-visible, .reveal-left.is-visible, .reveal-right.is-visible { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
.legal-hero { padding: calc(var(--header-height) + 72px) 0 48px; background: hsl(var(--muted) / 0.5); }
.legal-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal-hero p { margin-top: 12px; color: hsl(var(--muted-foreground)); }
.legal-content { max-width: 800px; padding-block: 64px 96px; }
.legal-content h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: hsl(var(--muted-foreground)); }
.legal-content ul { display: grid; gap: 8px; margin-top: 12px; padding-left: 20px; list-style: disc; }
.legal-content a { color: hsl(var(--primary)); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .menu-toggle { display: none; }
  .hero { padding-top: calc(var(--header-height) + 88px); padding-bottom: 144px; }
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
  .section { padding-block: 112px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .slide-overlay { padding: 48px; }
}

@media (min-width: 1024px) {
  .hero-grid { gap: 64px; }
  .hero-image-wrap { aspect-ratio: 1; }
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
  .footer-grid > :first-child { grid-column: auto; }
}

@media (max-width: 640px) {
  .carousel-viewport { height: 440px; }
  .slide-overlay { padding: 24px; }
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
  .float-card { padding: 10px 12px; font-size: 0.75rem; }
  .float-card-bottom { left: -8px; bottom: -20px; }
  .float-card-top { right: -8px; top: -20px; }
  .experience-badge { right: -8px; bottom: -20px; padding: 12px 14px; }
  .experience-badge strong { font-size: 1.75rem; }
  .contact-form-card { padding: 24px; }
  .modal-features { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookie-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-anim, .reveal, .reveal-left, .reveal-right { opacity: 1 !important; transform: none !important; }
}
