/* nasmac.app — dark, black & white, Apple-inspired. */

:root {
  --bg: #000;
  --surface: #101012;
  --text: #f5f5f7;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.4);
  --hairline: rgba(255, 255, 255, 0.09);
  --amber: #ed9e38;
  --radius: 22px;
  --col: 980px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: clip; /* the hero glow bleeds past the viewport by design */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

a { color: inherit; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 max(24px, calc((100% - var(--col)) / 2));
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark span { color: var(--text-3); font-weight: 500; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
}

.lang-toggle button {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 2px;
  font: inherit;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.25s ease;
}

.lang-toggle button:hover { color: var(--text-2); }
.lang-toggle button[aria-pressed="true"] { color: var(--text); }

/* ---------- Hero ---------- */

main { display: block; }

section {
  max-width: var(--col);
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 9rem) 24px;
  scroll-margin-top: 76px; /* anchors land clear of the sticky nav */
}

.hero {
  position: relative;
  text-align: center;
  padding-top: clamp(6rem, 14vw, 11rem);
  padding-bottom: clamp(5rem, 10vw, 8rem);
}

.hero-glow {
  position: absolute;
  inset: -20% -40% auto;
  height: 130%;
  background: radial-gradient(ellipse 60% 50% at 50% 42%,
    rgba(255, 255, 255, 0.055), transparent 70%);
  pointer-events: none;
}

.brandmark {
  width: 66px;
  height: 66px;
  margin-bottom: 26px;
  /* A arte original é colorida; isto a achata em uma silhueta branca sólida. */
  filter: brightness(0) invert(1);
}

.eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.7rem, 7.5vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.05;
  max-width: 15ch;
  margin: 0 auto 26px;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--text-2);
  max-width: 44ch;
  margin: 0 auto 42px;
  line-height: 1.55;
}

/* ---------- Buttons ---------- */

/* Vale para <a> e <button>: sem o reset, o botão nativo do macOS vem com
   fundo claro e o texto branco some. */
.btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.35s var(--ease-out), background 0.25s ease,
    color 0.25s ease, border-color 0.25s ease;
}

.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--text);
  color: #000;
}

.btn-primary:hover { background: #fff; }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
}

.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.45); }

/* ---------- Apps grid ---------- */

.apps { padding-top: 0; }

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 720px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 28px 36px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  transition: transform 0.5s var(--ease-out), border-color 0.3s ease;
}

.app-card.is-live:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}

.app-icon {
  width: 128px;
  height: 128px;
  margin-bottom: 22px;
}

.app-card h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.app-desc {
  font-size: 15px;
  color: var(--text-2);
  max-width: 30ch;
  margin-bottom: 26px;
  flex-grow: 1;
}

.fine {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 14px;
}

/* Coming soon */

.app-card.is-soon { opacity: 0.5; }

.app-card.is-soon .app-desc { margin-bottom: 0; }

.placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 29px;
}

.placeholder svg {
  width: 48px;
  height: 48px;
  fill: rgba(255, 255, 255, 0.35);
}

.placeholder svg .ring { stroke: rgba(255, 255, 255, 0.35); }

.soon-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- Manifesto ---------- */

.manifesto {
  text-align: center;
  border-top: 1px solid var(--hairline);
}

.manifesto h2 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
  margin: 0 auto 20px;
}

.manifesto p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-2);
  max-width: 46ch;
  margin: 0 auto;
}

/* ---------- How to open ---------- */

.howto { padding-top: 0; max-width: 640px; }

.howto details {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 18px 22px;
}

.howto summary {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  list-style-position: inside;
}

.howto summary:hover { color: var(--text); }

.howto-body { padding: 16px 4px 6px; color: var(--text-2); font-size: 14px; }

.howto-body ol { margin: 12px 0 12px 20px; display: grid; gap: 6px; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 24px 56px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

footer p + p { margin-top: 6px; }

footer a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.25s ease;
}

footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }


/* ---------- Versões anteriores ---------- */

.versions {
  width: 100%;
  margin-top: 14px;
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
}

.versions summary {
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  list-style-position: inside;
  transition: color 0.25s ease;
}

.versions summary:hover { color: var(--text-2); }

.version-list {
  list-style: none;
  margin: 12px 0 2px;
  display: grid;
  gap: 8px;
}

.version-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.version-list a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.25s ease;
}

.version-list a:hover { border-color: var(--text); }

.version-meta {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

/* ---------- Contribuir ---------- */

.contribute {
  text-align: center;
  border-top: 1px solid var(--hairline);
}

.contribute h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contribute-sub {
  font-size: 1.02rem;
  color: var(--text-2);
  max-width: 46ch;
  margin: 0 auto 40px;
  line-height: 1.55;
}

.wallet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  max-width: 620px;
  margin: 0 auto;
}

.wallet-qr {
  width: 150px;
  height: 150px;
  border-radius: 10px;
  background: #fff;   /* o QR precisa de fundo claro para ser lido */
  padding: 8px;
}

.wallet-info {
  text-align: left;
  min-width: 0;
}

.wallet-network {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.wallet-address {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-all;
  margin-bottom: 16px;
  max-width: 34ch;
}

.btn-small {
  padding: 8px 18px;
  font-size: 13px;
}

@media (max-width: 560px) {
  .wallet { flex-direction: column; gap: 20px; }
  .wallet-info { text-align: center; }
  .wallet-address { margin-inline: auto; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }

  .reveal.is-visible { opacity: 1; transform: none; }

  /* keep the coming-soon cards dimmed after their reveal */
  .app-card.is-soon.is-visible { opacity: 0.5; }

  .app-grid .app-card:nth-child(2) { transition-delay: 0.08s; }
  .app-grid .app-card:nth-child(3) { transition-delay: 0.16s; }
  .app-grid .app-card:nth-child(4) { transition-delay: 0.24s; }

  .hero > * { animation: rise 0.9s var(--ease-out) both; }
  .hero .eyebrow { animation-delay: 0.05s; }
  .hero h1 { animation-delay: 0.12s; }
  .hero .hero-sub { animation-delay: 0.22s; }
  .hero .btn { animation-delay: 0.32s; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }

  .hero-cup { animation: rise 0.9s var(--ease-out) both; }

  .hero-cup .steam {
    animation: steam 3.6s ease-in-out infinite;
    transform-origin: center 60%;
  }

  .hero-cup .s2 { animation-delay: 1.1s; }

  @keyframes steam {
    0%, 100% { opacity: 0.45; transform: translateY(0); }
    45% { opacity: 1; transform: translateY(-1.6px); }
  }
}

@media (max-width: 640px) {
  .hero { padding-top: 4.5rem; }
  .app-card { padding: 36px 22px 30px; }
}
