/* =====================================================
   J3D_Lab_PT — estilos partilhados de blog.html e post.html
   (mesmos tokens e componentes de portefolio.html)
   ===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --white-60: rgba(255,255,255,0.6);
  --white-30: rgba(255,255,255,0.3);
  --white-10: rgba(255,255,255,0.1);
  --black-60: rgba(0,0,0,0.6);
  --black-90: rgba(0,0,0,0.9);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background: var(--black);
  overflow-x: hidden;
}

/* =====================
   HEADER
   ===================== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.4s ease, background 0.4s ease;
  border-bottom: 1px solid transparent;
}

#site-header.scrolled {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: rgba(255,255,255,0.08);
}

#header-logo {
  height: 40px;
  width: auto;
}

#header-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

#header-nav a {
  color: var(--white-60);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

#header-nav a:hover,
#header-nav a[aria-current="page"] {
  color: var(--white);
}

#header-nav a:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 4px;
}

#header-nav a:active {
  opacity: 0.7;
}

.section-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-30);
  font-weight: 500;
  margin-bottom: 40px;
}

.section-label h1 {
  display: inline;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.section-heading {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 48px;
}

.section-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--white-60);
  max-width: 560px;
}

/* =====================
   BUTTONS (dark surface)
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--white);
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.2s ease;
}

.btn:hover {
  background: transparent;
  color: var(--white);
}

.btn:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 4px;
}

.btn:active {
  opacity: 0.7;
}

.btn:disabled {
  opacity: 0.4;
  cursor: wait;
}

.btn--ghost {
  background: transparent;
  color: var(--white-60);
  border-color: var(--white-30);
}

.btn--ghost:hover {
  border-color: var(--white);
  color: var(--white);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

/* =====================
   FORM FIELDS
   ===================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-30);
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 14px 16px;
  border-radius: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--white-30);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}

/* Honeypot — invisível para pessoas */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--white-60);
  min-height: 1.6em;
}

.form-status.is-error { color: #ff8a80; }
.form-status.is-success { color: var(--white); }

/* =====================
   NEWSLETTER
   ===================== */
#newsletter {
  padding: 96px 8vw;
  border-top: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(255,255,255,0.05), transparent 60%),
    var(--black);
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: end;
}

#newsletter .section-heading {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  margin-bottom: 20px;
}

#newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.newsletter-row {
  display: flex;
  gap: 12px;
}

.newsletter-row .field {
  flex: 1;
}

/* =====================
   NOTICE (banner de estado)
   ===================== */
.notice {
  margin-bottom: 40px;
  padding: 16px 20px;
  border: 1px solid var(--white-30);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--white);
  background: rgba(255,255,255,0.04);
}

/* =====================
   FOOTER
   ===================== */
#footer {
  padding: 32px 8vw;
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#footer-logo {
  height: 32px;
  width: auto;
  filter: invert(1);
}

.footer-copy {
  font-size: 0.7rem;
  color: rgba(0,0,0,0.35);
  letter-spacing: 0.05em;
}

/* =====================
   HAMBURGER + MOBILE MENU
   ===================== */
#hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 200;
}

#hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#hamburger:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 4px;
}

#hamburger:active {
  opacity: 0.6;
}

#hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#hamburger.open span:nth-child(2) { opacity: 0; }
#hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

#mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 0 8vw;
}

#mobile-menu a {
  display: block;
  color: var(--white);
  text-decoration: none;
  font-size: clamp(2.8rem, 11vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: opacity 0.2s ease;
}

#mobile-menu ul li:first-child a {
  border-top: 1px solid rgba(255,255,255,0.07);
}

#mobile-menu a:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: -1px;
}

#mobile-menu a:active {
  opacity: 0.4;
}

#mobile-menu-footer {
  position: absolute;
  bottom: 40px;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--white-30);
  text-transform: uppercase;
}

/* =====================
   MOBILE
   ===================== */
@media (max-width: 768px) {
  #hamburger { display: flex; }
  #header-nav { display: none; }
  #site-header { padding: 20px 24px; }

  .section-heading {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  #newsletter {
    padding: 72px 6vw;
  }

  .newsletter-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .newsletter-row {
    flex-direction: column;
  }

  #footer {
    padding: 24px 6vw;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
