/* ============================================================
   Matlac Technologies — landing page
   Rebuilt from the Claude Design prototype (Matlac Landing.dc.html)
   ============================================================ */

:root {
  --bg: #05080f;
  --bg-alt: #081120;
  --panel: rgba(8, 17, 32, .9);
  --text: #e8eef7;
  --cyan: #38d6ff;
  --cyan-light: #7ae4ff;
  --violet: #7a8bff;
  --green: #9ef0a8;
  --wa: #25d366;
  --wa-hover: #4ae381;
  --line: rgba(56, 214, 255, .1);
  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(56, 214, 255, .3); }
input::placeholder, textarea::placeholder { color: rgba(232, 238, 247, .35); }

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* The `hidden` attribute must win over components that set an explicit display. */
[hidden] { display: none !important; }

@keyframes pulseGlow { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
@keyframes drift { 0% { transform: translateY(0); } 50% { transform: translateY(-14px); } 100% { transform: translateY(0); } }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--cyan);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* ── NAV ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(5, 8, 15, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(56, 214, 255, .12);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0a1626, #0d2438);
  border: 1px solid rgba(56, 214, 255, .45);
  border-radius: 8px;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(56, 214, 255, .25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .04em; color: var(--text); }
.brand-sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: .32em; color: var(--cyan); margin-top: 3px; }

.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-link {
  color: rgba(232, 238, 247, .72);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .02em;
  transition: color .2s, background .2s, transform .2s;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--cyan); }
.nav-cta {
  color: var(--bg);
  background: var(--cyan);
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  box-shadow: 0 0 22px rgba(56, 214, 255, .35);
}
.nav-cta:hover, .nav-cta:focus-visible { color: var(--bg); background: var(--cyan-light); }

.lang-switch {
  display: flex;
  border: 1px solid rgba(56, 214, 255, .3);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
}
.lang-btn {
  padding: 7px 14px;
  border: none;
  cursor: pointer;
  font: inherit;
  background: transparent;
  color: rgba(232, 238, 247, .6);
  transition: background .2s, color .2s;
}
.lang-btn.is-active { background: var(--cyan); color: var(--bg); font-weight: 600; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid rgba(56, 214, 255, .3);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--cyan);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 110px 48px 130px;
  text-align: center;
  background-image:
    linear-gradient(rgba(56, 214, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 214, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
}
.hero-glow {
  position: absolute; top: -160px; left: 50%;
  transform: translateX(-50%);
  width: 820px; height: 480px; max-width: 100%;
  background: radial-gradient(ellipse at center, rgba(56, 214, 255, .16), transparent 65%);
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite;
}
.hero-inner {
  position: relative;
  max-width: 900px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px;
  border: 1px solid rgba(56, 214, 255, .35);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em;
  color: var(--cyan);
  background: rgba(56, 214, 255, .06);
}
.hero-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero-title {
  margin: 0;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.08; font-weight: 700; letter-spacing: -.02em;
}
.grad {
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin: 0; max-width: 640px;
  font-size: clamp(16px, 2.4vw, 19px); line-height: 1.65;
  color: rgba(232, 238, 247, .68);
}
.hero-actions { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

.btn {
  text-decoration: none;
  font-size: 16px;
  padding: 15px 34px;
  border-radius: 10px;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn-primary {
  background: var(--cyan); color: var(--bg); font-weight: 600;
  box-shadow: 0 0 34px rgba(56, 214, 255, .4);
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--cyan-light); transform: translateY(-2px); }
.btn-ghost {
  color: var(--text); font-weight: 500;
  border: 1px solid rgba(232, 238, 247, .25);
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--cyan); color: var(--cyan); }

.hero-stats { display: flex; gap: 56px; margin-top: 44px; font-family: var(--font-mono); flex-wrap: wrap; justify-content: center; }
.stat { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.stat-value { font-size: 30px; font-weight: 600; color: var(--cyan); }
.stat-label { font-size: 11px; letter-spacing: .16em; color: rgba(232, 238, 247, .5); text-transform: uppercase; }

/* ── SECTIONS (shared) ───────────────────────────────── */
.section { padding: 100px 48px; }
.section--bordered { border-top: 1px solid var(--line); }
.section--alt { background: linear-gradient(180deg, #05080f, #081120 50%, #05080f); }
.container { max-width: 1160px; margin: 0 auto; }

.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 56px; }
.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .28em; color: var(--cyan); }
.section-title { margin: 0; font-size: clamp(28px, 4.5vw, 42px); font-weight: 700; letter-spacing: -.01em; }
.section-sub { margin: 0; max-width: 560px; font-size: 16.5px; line-height: 1.6; color: rgba(232, 238, 247, .62); }

/* ── SERVICES ────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.service-card {
  position: relative;
  padding: 32px 28px;
  background: linear-gradient(160deg, rgba(13, 24, 40, .9), rgba(8, 14, 24, .9));
  border: 1px solid rgba(56, 214, 255, .14);
  border-radius: 14px;
  display: flex; flex-direction: column; gap: 16px;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.service-card:hover {
  border-color: rgba(56, 214, 255, .5);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(56, 214, 255, .12);
}
.service-glyph { font-family: var(--font-mono); font-size: 26px; color: var(--cyan); }
.service-title { margin: 0; font-size: 20px; font-weight: 600; }
.service-desc { margin: 0; font-size: 14.5px; line-height: 1.6; color: rgba(232, 238, 247, .6); }
.service-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: rgba(56, 214, 255, .7); margin-top: auto; }

/* ── ABOUT / WHY US ──────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.about-copy { display: flex; flex-direction: column; gap: 14px; }
.why-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-check {
  flex: none; width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 1px solid rgba(56, 214, 255, .4);
  border-radius: 6px; color: var(--cyan);
  font-family: var(--font-mono); font-size: 12px;
}
.why-body { display: flex; flex-direction: column; gap: 4px; }
.why-body strong { font-size: 15.5px; }
.why-body span { font-size: 14px; line-height: 1.55; color: rgba(232, 238, 247, .58); }

.about-visual { position: relative; display: grid; place-items: center; animation: drift 7s ease-in-out infinite; }
.about-glow { position: absolute; width: 380px; height: 380px; max-width: 100%; background: radial-gradient(circle, rgba(56, 214, 255, .14), transparent 70%); }
.code-card {
  position: relative; width: 340px; max-width: 100%;
  padding: 28px;
  background: var(--panel);
  border: 1px solid rgba(56, 214, 255, .25);
  border-radius: 16px;
  font-family: var(--font-mono); font-size: 13px; line-height: 2;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.code-dots { display: flex; gap: 7px; margin-bottom: 16px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--red { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green { background: #28c840; }
.code-indent { padding-left: 18px; }
.tok-comment { color: rgba(232, 238, 247, .45); }
.tok-kw { color: var(--violet); }
.tok-text { color: var(--text); }
.tok-key { color: var(--cyan); }
.tok-str { color: var(--green); }

/* ── PROCESS ─────────────────────────────────────────── */
.process-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.process-line {
  position: absolute; top: 23px; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 214, 255, .45), rgba(56, 214, 255, .45), transparent);
}
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 0 20px; }
.step-num {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--bg-alt);
  border: 1px solid rgba(56, 214, 255, .5);
  border-radius: 50%;
  font-family: var(--font-mono); font-size: 15px; color: var(--cyan);
  box-shadow: 0 0 20px rgba(56, 214, 255, .2);
}
.step-title { font-size: 17px; }
.step-desc { font-size: 13.5px; line-height: 1.6; color: rgba(232, 238, 247, .58); }

/* ── PROJECTS ────────────────────────────────────────── */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
  display: flex; flex-direction: column;
  background: rgba(8, 17, 32, .8);
  border: 1px solid rgba(56, 214, 255, .14);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.project-card:hover { border-color: rgba(56, 214, 255, .5); transform: translateY(-4px); }
.project-media {
  position: relative;
  height: 210px;
  display: grid; place-items: center; gap: 12px;
  background-image:
    linear-gradient(rgba(56, 214, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 214, 255, .06) 1px, transparent 1px);
  background-size: 26px 26px;
}
.project-media::before {
  content: ""; position: absolute; inset: 0; opacity: .9;
}
.project-media--1::before { background: radial-gradient(120% 120% at 30% 20%, rgba(56, 214, 255, .18), transparent 60%); }
.project-media--2::before { background: radial-gradient(120% 120% at 70% 20%, rgba(122, 139, 255, .2), transparent 60%); }
.project-media--3::before { background: radial-gradient(120% 120% at 50% 30%, rgba(45, 212, 191, .16), transparent 60%); }
.project-media-icon { position: relative; font-size: 46px; color: rgba(56, 214, 255, .55); }
.project-media-tag {
  position: relative;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(232, 238, 247, .55);
  padding: 5px 12px; border: 1px solid rgba(56, 214, 255, .25); border-radius: 999px;
  background: rgba(5, 8, 15, .5);
}
.project-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; }
.project-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; color: var(--cyan); text-transform: uppercase; }
.project-title { font-size: 17px; }
.project-desc { font-size: 13.5px; line-height: 1.55; color: rgba(232, 238, 247, .58); }

/* ── TECH STACK ──────────────────────────────────────── */
.stack-section { padding: 72px 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack-inner { display: flex; flex-direction: column; gap: 32px; align-items: center; }
.stack-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: .28em; color: rgba(232, 238, 247, .5); text-align: center; }
.stack-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.pill {
  font-family: var(--font-mono); font-size: 13.5px;
  padding: 10px 20px;
  border: 1px solid rgba(56, 214, 255, .2);
  border-radius: 999px;
  color: rgba(232, 238, 247, .75);
  background: rgba(56, 214, 255, .04);
  transition: border-color .2s, color .2s;
}
.pill:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── CONTACT ─────────────────────────────────────────── */
.contact { position: relative; padding: 110px 48px; overflow: hidden; }
.contact-glow {
  position: absolute; bottom: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px; max-width: 100%;
  background: radial-gradient(ellipse at center, rgba(56, 214, 255, .12), transparent 65%);
  pointer-events: none;
}
.contact-grid {
  position: relative;
  max-width: 1000px;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.whatsapp-btn {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 10px;
  text-decoration: none;
  color: var(--bg); background: var(--wa);
  font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 10px; width: fit-content;
  box-shadow: 0 0 26px rgba(37, 211, 102, .3);
  transition: background .2s;
}
.whatsapp-btn:hover, .whatsapp-btn:focus-visible { background: var(--wa-hover); }
.contact-meta { font-family: var(--font-mono); font-size: 13px; color: rgba(232, 238, 247, .5); margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.contact-meta a { text-decoration: none; color: inherit; transition: color .2s; }
.contact-meta a:hover { color: var(--cyan); }

.contact-form {
  display: flex; flex-direction: column; gap: 18px;
  padding: 36px;
  background: var(--panel);
  border: 1px solid rgba(56, 214, 255, .2);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; color: rgba(232, 238, 247, .55); text-transform: uppercase; }
.field-input {
  font-family: var(--font-sans); font-size: 15px; color: var(--text);
  background: rgba(5, 8, 15, .7);
  border: 1px solid rgba(56, 214, 255, .18);
  border-radius: 9px;
  padding: 13px 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea.field-input { resize: vertical; }
.field-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56, 214, 255, .12); }
.btn-submit {
  margin-top: 6px;
  background: var(--cyan); color: var(--bg);
  font-family: var(--font-sans); font-weight: 600; font-size: 16px;
  padding: 15px; border: none; border-radius: 10px; cursor: pointer;
  box-shadow: 0 0 26px rgba(56, 214, 255, .35);
  transition: background .2s;
}
.btn-submit:hover, .btn-submit:focus-visible { background: var(--cyan-light); }

.form-success {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center;
  padding: 80px 40px;
  background: var(--panel);
  border: 1px solid rgba(56, 214, 255, .35);
  border-radius: 16px;
}
.success-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan); font-size: 24px;
  box-shadow: 0 0 26px rgba(56, 214, 255, .3);
}
.form-success strong { font-size: 20px; }
.form-success span { font-size: 14.5px; color: rgba(232, 238, 247, .6); }

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px 48px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: rgba(232, 238, 247, .42);
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 880px) {
  .nav { padding: 16px 20px; position: relative; }
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: 14px 20px 22px;
    background: rgba(5, 8, 15, .97);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(56, 214, 255, .18);
  }
  .nav.open .nav-menu { display: flex; }
  .nav-link { padding: 12px 4px; font-size: 15px; }
  .nav-cta { text-align: center; padding: 12px 20px; }
  .lang-switch { align-self: flex-start; margin-top: 6px; }

  .section { padding: 72px 24px; }
  .stack-section { padding: 60px 24px; }
  .contact { padding: 80px 24px; }
  .hero { padding: 84px 24px 96px; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { order: -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 12px; }
  .process-line { display: none; }
  .projects-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .footer { padding: 24px; }
}

@media (max-width: 540px) {
  .section { padding: 56px 18px; }
  .hero { padding: 64px 18px 80px; }
  .hero-stats { gap: 28px; }
  .hero-actions { width: 100%; flex-direction: column; }
  .hero-actions .btn { text-align: center; }
  .process-grid { grid-template-columns: 1fr; gap: 32px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 26px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
