/* ==========================================================================
   Damatex Technologies Limited — Global Stylesheet
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg:            #060a14;
  --bg-2:          #0a1020;
  --bg-3:          #0d1428;

  --surface:       rgba(255, 255, 255, 0.04);
  --surface-2:     rgba(255, 255, 255, 0.06);
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text:          #e9eef8;
  --text-soft:     #c3cde0;
  --muted:         #8fa0bd;

  --primary:       #2563eb;
  --primary-2:     #3b82f6;
  --cyan:          #22d3ee;
  --grad:          linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  --grad-soft:     linear-gradient(135deg, rgba(59,130,246,.18), rgba(34,211,238,.14));

  --radius:        16px;
  --radius-lg:     24px;
  --radius-pill:   999px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,.35);
  --shadow:        0 12px 34px rgba(0,0,0,.45);
  --shadow-lg:     0 28px 70px rgba(0,0,0,.55);
  --glow:          0 0 0 1px rgba(59,130,246,.35), 0 18px 50px rgba(37,99,235,.28);

  --container:     1200px;
  --header-h:      76px;

  --font:          "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
                   "Helvetica Neue", Arial, sans-serif;

  --ease:          cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* subtle ambient glow behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(37,99,235,.22), transparent 60%),
    radial-gradient(760px 480px at 92% 4%, rgba(34,211,238,.14), transparent 62%);
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: rgba(59,130,246,.38); color: #fff; }

/* ---------- Typography ---------- */
.h1, .h2, .h3 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #fff;
}

.h1 { font-size: clamp(2.15rem, 5.2vw, 3.9rem); }
.h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
.h3 { font-size: 1.175rem; line-height: 1.3; }

.lead {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--text-soft);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34,211,238,.08);
  border: 1px solid rgba(34,211,238,.22);
  border-radius: var(--radius-pill);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---------- Layout ---------- */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
}

.section { padding: clamp(64px, 9vw, 118px) 0; }

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.022) 18%, rgba(255,255,255,.022) 82%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 760px; margin-bottom: clamp(38px, 5vw, 58px); }
.section-head .lead { margin-top: 16px; }
.section-cta { margin-top: 42px; text-align: center; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  --btn-py: 14px;
  --btn-px: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--btn-py) var(--btn-px);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease), opacity .25s;
}

.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 30px rgba(37,99,235,.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(37,99,235,.5);
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: rgba(59,130,246,.5);
}

.btn-sm { --btn-py: 10px; --btn-px: 20px; font-size: .875rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(6,10,20,.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(6,10,20,.9);
  border-bottom-color: var(--border);
  box-shadow: 0 12px 34px rgba(0,0,0,.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-logo {
  width: 42px; height: 42px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.075rem; font-weight: 800; letter-spacing: -.015em; color: #fff; }
.brand-text small { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 28px; }

.nav-list { display: flex; align-items: center; gap: 6px; }

.nav-list a {
  position: relative;
  display: block;
  padding: 9px 15px;
  font-size: .93rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: color .22s var(--ease), background-color .22s var(--ease);
}

.nav-list a:hover { color: #fff; background: var(--surface); }

.nav-list a.is-active { color: #fff; background: var(--surface-2); }

.nav-list a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.nav-cta { flex-shrink: 0; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2,5,12,.65);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.nav-scrim.is-visible { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(64px, 10vw, 132px) 0 clamp(70px, 9vw, 120px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../img/bg.png");
  background-size: cover;
  background-position: center;
  opacity: .34;
}

/* fade + tint over the background image */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6,10,20,.72) 0%, rgba(6,10,20,.86) 55%, var(--bg) 100%),
    radial-gradient(760px 460px at 78% 26%, rgba(34,211,238,.16), transparent 62%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(38px, 5vw, 72px);
}

/* Primary heading — company name (5× previous size) */
.hero-brand {
  display: block;
  margin: 0 0 24px;
  font-size: clamp(3.5rem, 23vw, 1.75rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #fff;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Supporting tagline (H3) */
.hero-tagline {
  max-width: 34ch;
  margin: 0 0 24px;
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: #fff;
}

.hero-copy .lead { margin-bottom: 32px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.hero-chips li {
  padding: 7px 15px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}

.hero-chips li:hover { color: #fff; border-color: rgba(59,130,246,.5); }

/* ---------- Glass card ---------- */
.glass-card {
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.028));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

/* ---------- Hero visual ---------- */
.hero-visual { position: relative; }

.hero-card { padding: 22px; }

.hero-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
}
.dot:nth-child(1) { background: #ff5f57; }
.dot:nth-child(2) { background: #febc2e; }
.dot:nth-child(3) { background: #28c840; }

.hero-card-title {
  margin-left: 10px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .76rem;
  letter-spacing: .05em;
  color: var(--muted);
}

.hero-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.hero-list li:last-child { border-bottom: 0; }

.hl-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  font-size: 1.05rem;
  border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
}

.hl-text { display: flex; flex-direction: column; line-height: 1.35; }
.hl-text strong { font-size: .93rem; font-weight: 700; color: #fff; }
.hl-text small { font-size: .76rem; color: var(--muted); }

.hl-tick {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  font-size: .72rem;
  font-weight: 800;
  color: #041018;
  background: var(--grad);
  border-radius: 50%;
}

.float-badge {
  position: absolute;
  z-index: 2;
  padding: 9px 16px;
  font-size: .76rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(10,16,32,.86);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: float 6s ease-in-out infinite;
}

.fb-1 { top: -16px; right: -8px; }
.fb-2 { bottom: -16px; left: -10px; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-11px); }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.018);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 54px;
  animation: scroll-x 34s linear infinite;
}

.marquee-track span {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  white-space: nowrap;
}

@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 30px 26px;
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

/* top gradient hairline on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(59,130,246,.42);
  box-shadow: var(--glow);
}

.card:hover::before { transform: scaleX(1); }

.card-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 20px;
  font-size: 1.35rem;
  border-radius: 15px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
}

.card .h3 { margin-bottom: 10px; }
.card p { font-size: .935rem; color: var(--muted); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(38px, 5vw, 70px);
}

.about-grid .h2 { margin-bottom: 18px; }
.about-grid .lead { margin-bottom: 26px; }

.check-list { display: grid; gap: 12px; margin-bottom: 32px; }

.check-list li {
  position: relative;
  padding-left: 32px;
  font-size: .95rem;
  color: var(--text-soft);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 1px;
  display: grid;
  place-items: center;
  width: 21px; height: 21px;
  font-size: .68rem;
  font-weight: 800;
  color: #041018;
  background: var(--grad);
  border-radius: 50%;
}

.facts { padding: 26px; }

.facts-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.facts-logo {
  width: 50px; height: 50px;
  object-fit: contain;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.facts-head div { display: flex; flex-direction: column; line-height: 1.3; }
.facts-head strong { font-size: 1rem; color: #fff; }
.facts-head small { font-size: .78rem; letter-spacing: .06em; color: var(--cyan); }

.fact-list { display: grid; gap: 4px; }

.fact-list li {
  display: flex;
  gap: 14px;
  padding: 16px 2px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.fact-list li:last-child { border-bottom: 0; }

.fact-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  font-size: .95rem;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.fact-list div { display: flex; flex-direction: column; gap: 3px; }
.fact-list small {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.fact-list span, .fact-list a { font-size: .915rem; color: var(--text-soft); }
.fact-list a { color: var(--cyan); word-break: break-word; }
.fact-list a:hover { text-decoration: underline; }

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 6vw, 74px) clamp(26px, 5vw, 60px);
  text-align: center;
  background: linear-gradient(160deg, rgba(37,99,235,.16), rgba(34,211,238,.08));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.cta::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 320px;
  background: radial-gradient(closest-side, rgba(34,211,238,.28), transparent);
  pointer-events: none;
}

.cta > * { position: relative; }
.cta .h2 { margin-bottom: 14px; }
.cta .lead { margin: 0 auto 30px; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  padding: 34px 0;
  border-top: 1px solid var(--border);
  background: rgba(4,7,14,.7);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.footer-bottom p { font-size: .855rem; color: var(--muted); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible { opacity: 1; transform: none; }

/* stagger children inside a grid */
.grid .reveal:nth-child(2) { transition-delay: .07s; }
.grid .reveal:nth-child(3) { transition-delay: .14s; }
.grid .reveal:nth-child(4) { transition-delay: .21s; }
.grid .reveal:nth-child(5) { transition-delay: .28s; }
.grid .reveal:nth-child(6) { transition-delay: .35s; }

/* ---------- Focus visibility ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero-grid,
  .about-grid { grid-template-columns: 1fr; }

  /* Hero copy now comes first on mobile (source order) — the
     .hero-visual order:-1 rule has been removed so the build.log
     card sits BELOW the hero copy instead of above it. */

  .hero-copy { text-align: left; }
  .hero-copy .lead { max-width: none; }

  .fb-1 { top: -12px; right: 4px; }
  .fb-2 { bottom: -12px; left: 4px; }

  /* Mobile navigation */
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    z-index: 95;
    width: min(320px, 86vw);
    height: calc(100dvh - var(--header-h));
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 26px 22px;
    background: rgba(8,13,26,.98);
    border-left: 1px solid var(--border);
    box-shadow: -24px 0 60px rgba(0,0,0,.5);
    transform: translateX(105%);
    transition: transform .38s var(--ease);
    overflow-y: auto;
  }

  .nav.is-open { transform: translateX(0); }

  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; }

  .nav-list a { padding: 14px 16px; font-size: 1rem; border-radius: 12px; }
  .nav-list a.is-active::after { display: none; }

  .nav-cta { margin-top: 14px; width: 100%; --btn-py: 14px; }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }

  .container { padding-inline: 18px; }

  .grid-3 { grid-template-columns: 1fr; }

  .brand-text small { display: none; }

  .hero-actions .btn { flex: 1 1 auto; }

  .hero-chips { gap: 8px; }
  .hero-chips li { font-size: .72rem; padding: 6px 12px; }

  .hero-card { padding: 18px; }
  .hl-text small { font-size: .72rem; }

  .card { padding: 24px 20px; }

  .float-badge { font-size: .7rem; padding: 7px 12px; }

  .cta { padding: 38px 22px; }

  .footer-bottom { justify-content: center; text-align: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}