﻿/* ============================================================
   Adazil Engineering — tema escuro (verde + dourado da marca)
   ============================================================ */

:root {
  --bg: #071f1a;
  --bg-alt: #0a2921;
  --surface: #0f3329;
  --surface-2: #144031;
  --border: #1e4d3c;
  --text: #eaf4ee;
  --text-dim: #9cb8ab;
  --accent: #eab258;
  --accent-2: #d98e35;
  --accent-glow: rgba(234, 178, 88, 0.3);
  --danger: #f87171;
  --success: #34d399;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --radius: 14px;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(7, 31, 26, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.scrolled {
  background: rgba(7, 31, 26, 0.85);
  border-bottom-color: var(--border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-word {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.14em;
}
.brand-sub {
  color: var(--accent);
  opacity: 0.75;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.44em;
}

.main-nav { display: flex; gap: 1.6rem; }
.main-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.9rem; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-btn.active { background: var(--accent); color: #14261c; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(234, 178, 88, 0.1), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(52, 211, 153, 0.06), transparent),
    var(--bg);
}
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-content { position: relative; z-index: 2; padding: 7rem 0 5rem; }
.hero-kicker {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.gradient-text {
  background: linear-gradient(90deg, #f3cd85, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.08rem;
  margin: 1.4rem 0 2.2rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(transparent, var(--bg));
  z-index: 1;
}

/* ===== Botões ===== */
/* O atributo `hidden` tem de ganhar a qualquer `display` vindo de uma classe: o `.btn` diz
   `display: inline-block`, e isso sozinho fazia um botao escondido continuar a aparecer. */
[hidden] {
  display: none !important;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #14261c;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 38px var(--accent-glow); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-full { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ===== Secções ===== */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-kicker {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2.4rem;
}

/* ===== Cartões de serviço ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.service-icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(234, 178, 88, 0.12);
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--text-dim); font-size: 0.94rem; }

/* ===== Produtos ===== */
.filter-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #14261c;
  font-weight: 600;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.product-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.product-photo {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background: var(--surface-2);
}
.product-info { padding: 1.1rem 1.2rem 1.3rem; }
.product-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(234, 178, 88, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}
.product-info h3 { font-size: 1.02rem; font-weight: 600; }
.products-empty { color: var(--text-dim); text-align: center; padding: 2rem 0; }

/* ===== Sobre ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-text { color: var(--text-dim); margin-bottom: 1rem; }
.about-points { list-style: none; display: grid; gap: 1rem; }
.about-points li {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  font-size: 0.95rem;
}
.point-num {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

/* ===== Contactos ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
}
.contact-item { margin-bottom: 1.4rem; }
.contact-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}
.contact-value {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
}
a.contact-value:hover { color: var(--accent); }
.contact-note { color: var(--text-dim); font-size: 0.9rem; margin-top: 1.6rem; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-field { margin-bottom: 1rem; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234, 178, 88, 0.18);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin-top: 0.9rem; font-size: 0.9rem; min-height: 1.2em; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== Modal ===== */
.modal-overlay[hidden] { display: none; }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 18, 15, 0.8);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  overflow-y: auto;
}
.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(680px, 100%);
  max-height: calc(100svh - 2.4rem);
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(7, 31, 26, 0.7);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: var(--accent); color: #14261c; }
.modal-gallery { position: relative; background: var(--surface-2); }
.modal-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(7, 31, 26, 0.7);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gallery-nav:hover { background: var(--accent); color: #14261c; }
.gallery-nav.prev { left: 0.7rem; }
.gallery-nav.next { right: 0.7rem; }
.gallery-dots {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.gallery-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(230, 237, 247, 0.4);
  transition: background 0.2s;
}
.gallery-dots span.active { background: var(--accent); }
.modal-body { padding: 1.6rem 1.8rem 1.8rem; }
.modal-body h3 { font-size: 1.4rem; margin: 0.6rem 0 0.6rem; }
.modal-body p { color: var(--text-dim); margin-bottom: 1.4rem; }

body.modal-open { overflow: hidden; }

/* ===== Conta (botão no cabeçalho) ===== */
.btn-account {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
}
.btn-account:hover { background: var(--accent); color: #14261c; }
.btn-account.is-logged { background: var(--accent); color: #14261c; box-shadow: 0 0 18px var(--accent-glow); }

/* ===== Datalogger ===== */
.dl-lead {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 720px;
  margin: -0.6rem 0 2.2rem;
}
.dl-features { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.dl-feature h3 { margin: 0.4rem 0 0.5rem; font-size: 1.05rem; }
.dl-feature p { color: var(--text-dim); font-size: 0.95rem; }
.dl-feature-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
}
.dl-privacy {
  margin: 1.6rem 0 3rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
}

.dl-plans-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}
.dl-plans-title { font-size: 1.4rem; font-weight: 800; }

.billing-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.billing-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.billing-btn.active { background: var(--accent); color: #14261c; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: border-color 0.2s, transform 0.2s;
}
.plan-card:hover { transform: translateY(-3px); border-color: rgba(234, 178, 88, 0.45); }
.plan-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(234, 178, 88, 0.25), 0 18px 44px rgba(0, 0, 0, 0.35);
}
.plan-head { display: flex; align-items: center; gap: 0.6rem; }
.plan-name {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.plan-popular { font-size: 0.78rem; color: var(--text-dim); }
.plan-price { font-family: var(--mono); font-size: 2.1rem; font-weight: 700; }
.plan-price small { font-family: var(--font); font-size: 0.85rem; font-weight: 500; color: var(--text-dim); }
.plan-tagline { color: var(--text-dim); font-size: 0.92rem; }
.plan-list { list-style: none; display: grid; gap: 0.45rem; font-size: 0.92rem; flex: 1; }
.plan-list li::before { content: "▸"; color: var(--accent); margin-right: 0.55rem; }
.plans-note {
  grid-column: 1 / -1;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}

.dl-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2.2rem; }

/* ===== Rodapé: link da privacidade ===== */
.footer-link { color: var(--text-dim); text-decoration: none; }
.footer-link:hover { color: var(--accent); }

/* ===== Página de privacidade e termos ===== */
.legal { padding-top: calc(var(--header-h) + 3rem); }
.legal-body { max-width: 780px; }
.legal-body h2 {
  font-size: 1.15rem;
  margin: 2.2rem 0 0.7rem;
  color: var(--text);
}
.legal-body p, .legal-body li { color: var(--text-dim); }
.legal-body p { margin-bottom: 0.8rem; }
.legal-body ul { padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.legal-body strong { color: var(--text); }
.legal-body a { color: var(--accent); }
.legal-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05rem 0.35rem;
  color: var(--text);
}
.legal-lead {
  font-size: 1.05rem;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin: 1.4rem 0 0.4rem;
}
.legal-draft {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
}

/* ===== Responsivo ===== */
@media (max-width: 820px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 31, 26, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    z-index: -1;
  }
  .main-nav.open { transform: none; }
  .main-nav a { padding: 0.9rem 1.5rem; font-size: 1rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .section { padding: 4rem 0; }
  .btn-account { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
  .header-actions { gap: 0.55rem; }
}
