/* =========================================
   Ambiso Bio — Linktree (brutalist edition)
   Mobile-first · max-width 460px
   ========================================= */

:root {
  --bg:     #050505;
  --card:   #f7f4ed;
  --ink:    #050505;
  --muted:  #5b5650;
  --line:   rgba(5, 5, 5, .14);
  --white:  #fffaf0;
  --whatsapp: #A6FD28;     /* verde Ambiso */
  --whatsapp-hover: #93e51e;
  --shadow: 0 28px 90px rgba(0, 0, 0, .44);
  --radius: 28px;
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--white);
  /* Mobile-first: bg vertical da modelo, full-bleed */
  background:
    linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.15) 35%, rgba(0,0,0,.15) 65%, rgba(0,0,0,.40) 100%),
    url('bg-mobile.jpg') center/cover no-repeat fixed,
    #2a0e08;
  display: grid;
  place-items: center;
  padding: 24px 26px;
  padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 24px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Desktop: bg horizontal (modelo à esquerda) */
@media (min-width: 768px) {
  body {
    background:
      linear-gradient(90deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.10) 30%, rgba(0,0,0,.30) 100%),
      url('bg-desktop.jpg') left center/cover no-repeat fixed,
      #2a0e08;
    padding: 32px 24px;
  }
}

/* Vignette sutil pra concentrar foco no card */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.30) 100%);
  z-index: 0;
}

main {
  width: min(100%, 460px);
  position: relative;
  z-index: 1;
}

/* ========== CARD ========== */
.card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 22px;
  position: relative;
  isolation: isolate;
}

/* ========== BRAND ========== */
.brand {
  text-align: center;
  margin-bottom: 4px;
}

.logo-wrap {
  width: min(50%, 170px);
  margin: 2px auto 8px;
  background: transparent;
  display: grid;
  place-items: center;
}

.logo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0); /* forca logo preta no card creme, independente da cor original */
}

.tag {
  margin: 0 auto;
  max-width: 340px;
  font-size: .86rem;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
}

.tag strong {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.01em;
}

/* ========== LINKS ========== */
.links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 16px 0 14px;
}

/* Por padrao todos os links ocupam linha inteira */
.link { grid-column: 1 / -1; }

/* Itens marcados com link--half ocupam metade (auto-fluem em pares) */
.link--half {
  grid-column: auto;
  padding: 10px 12px;
  min-height: 50px;
}
.link--half .label { gap: 10px; }
.link--half .label-main { font-size: .92rem; }
.link--half .arrow { display: none; }
.link--half .icon { width: 28px; height: 28px; }
.link--half .icon svg { width: 14px; height: 14px; }

.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 16px;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  font-weight: 800;
  letter-spacing: -.01em;
  -webkit-tap-highlight-color: transparent;
}

.link:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
  background: #f1eee6;
}
.link:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 var(--ink);
}
.link:focus-visible {
  outline: 4px solid rgba(0,0,0,.18);
  outline-offset: 4px;
}

/* WhatsApp = destaque verde Ambiso */
.link--whatsapp {
  background: var(--whatsapp);
  color: var(--ink);
  border-color: var(--ink);
}
.link--whatsapp:hover { background: var(--whatsapp-hover); }
.link--whatsapp .icon {
  background: var(--ink);
  color: var(--whatsapp);
}

/* Social media (TikTok + Instagram) = fundo preto invertido */
.link--dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.link--dark:hover { background: #2a2a2a; }
.link--dark .icon {
  background: #fff;
  color: var(--ink);
}
.link--dark .arrow { color: #fff; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  flex: 1;
  min-width: 0;
}

.label-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.label-main {
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.label-sub {
  font-size: .76rem;
  font-weight: 500;
  opacity: .7;
  letter-spacing: 0;
  line-height: 1.2;
}
.link--whatsapp .label-sub { opacity: .85; }

.icon {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  flex: 0 0 auto;
}
.icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.arrow {
  flex: 0 0 auto;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  transition: transform .18s ease;
}
.link:hover .arrow { transform: translateX(4px); }

/* ========== SKELETON ========== */
.skeleton {
  height: 62px;
  border: 2px solid rgba(5,5,5,.15);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(5,5,5,.04), rgba(5,5,5,.10), rgba(5,5,5,.04));
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== NOTE / FOOTER ========== */
.note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}
.note a {
  color: var(--ink);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.footer {
  text-align: center;
  margin-top: 12px;
  color: rgba(255,250,240,.66);
  font-size: .68rem;
  line-height: 1.3;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== RESPONSIVE ========== */

/* Telas muito pequenas (iPhone SE, Galaxy A series) */
@media (max-width: 380px) {
  body { padding: 16px 18px; }
  .card { padding: 14px 16px 18px; }
  .logo-wrap { width: min(45%, 140px); margin-bottom: 6px; }
  .tag { font-size: .8rem; }
  .link { min-height: 50px; padding: 8px 14px; }
  .label-main { font-size: .92rem; }
  .label-sub { font-size: .7rem; }
}

/* Tablet portrait + landscape (600-1023px) */
@media (min-width: 600px) {
  body { padding: 28px 32px; }
  main { width: min(100%, 520px); }
  .card { padding: 26px 30px 28px; border-radius: 32px; }
  .logo-wrap { width: min(55%, 220px); margin: 6px auto 14px; }
  .tag { font-size: .96rem; line-height: 1.5; max-width: 380px; }
  .links { gap: 11px; margin: 22px 0 18px; }
  .link { min-height: 60px; padding: 12px 18px; gap: 14px; }
  .link--half { min-height: 56px; padding: 12px 14px; }
  .label-main { font-size: 1rem; }
  .label-sub { font-size: .76rem; }
  .note { font-size: .85rem; padding-top: 16px; }
  .footer { font-size: .8rem; margin-top: 16px; }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  main { width: min(100%, 480px); }
  .card { padding: 28px 32px 30px; }
  .logo-wrap { width: min(60%, 240px); }
}

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