/* ============================================================
   Norcola Indústrias — Linktree
   Design tokens + responsive layout (mobile-first → desktop card)
   ============================================================ */

:root {
  /* Brand — paleta em tons de cinza (antes vermelho) */
  --red: #3f4347;
  --red-hover: #4b5054;
  --red-active: #313538;
  --red-inner: #454a4e;
  --red-edge: #3a3e42;
  --charcoal: #232526;

  /* Ink (all pass WCAG AA on the surfaces they're used on) */
  --ink: #1a1c1d;
  --ink-2: #44474a;
  --ink-eyebrow: #595b5d;
  --ink-footer: #565859;

  /* Surfaces */
  --page: #ececec;
  --surface: #f3f3f3;
  --surface-hover: #e9e9e9;
  --card: #ffffff;
  --line: #e2e2e2;
  --border: #000000;

  /* Accent cue */
  --wa: #25d366;

  /* Geometry */
  --pill-radius: 64px;
  --card-radius: 28px;
  --card-max: 460px;
  --gap: 14px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* ---------- Card shell ---------- */
.card {
  position: relative;
  width: 100%;
  max-width: var(--card-max);
  background: var(--page);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Hero: blurred gradient banner (gray w/ rust glow, per Figma) ---------- */
.hero {
  position: absolute;
  inset: 0 0 auto 0;
  height: 188px;
  z-index: 0;
  pointer-events: none;
}
.hero__rings {
  position: absolute;
  inset: 0;
  background-color: #3a3d40;
  background-image: url('../assets/banner.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* corte seco — sem fade na base */
}

/* ---------- Content column ---------- */
.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 112px 28px 40px;
  gap: 40px;
}

/* ---------- Profile ---------- */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  width: 100%;
  max-width: 320px;
}
.profile__avatar-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--charcoal);
  padding: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}
.profile__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.profile__name-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile__handle {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.profile__verified {
  width: 18px;
  height: 18px;
  color: var(--red);
  flex-shrink: 0;
}
.profile__tagline {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-2);
  max-width: 28ch;
}
.profile__specialties {
  list-style: none;
  display: none; /* mobile: replaced by plain text below; pills return on desktop */
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.profile__specialties-text {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-2);
  text-align: center;
  margin-top: -14px; /* cancela o gap do flex → fica à distância de uma quebra de linha */
}
.profile__specialties li {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* ---------- Links ---------- */
.links {
  width: 100%;
}
.links__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  width: 100%;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 12px 22px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--pill-radius);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s var(--ease), background 0.14s var(--ease),
    box-shadow 0.18s var(--ease), border-color 0.14s var(--ease);
}
/* Icons removed — text-only, centered layout */
.btn__icon,
.btn__chevron { display: none; }
.btn__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.2;
}
.btn__label { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: break-word; }
.btn__sub { font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-top: 2px; overflow-wrap: break-word; }
.btn__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ink-2);
  transition: transform 0.16s var(--ease);
}

.btn:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.btn:hover .btn__chevron { transform: translateX(3px); }
.btn:active { transform: translateY(0); box-shadow: none; }

/* WhatsApp brand cue on light pills */
.btn__icon--wa { color: var(--wa); }

/* The single hero CTA (Whatsapp Vendas) — metallic gradient like the logo */
.btn--accent {
  background: linear-gradient(135deg, #4b5054 0%, #34373a 52%, #1f2123 100%);
  border-color: #2a2c2e;
  color: #fff;
}
.btn--accent .btn__sub { color: #fff; opacity: 0.92; }
.btn--accent .btn__chevron { color: #fff; }
.btn--accent .btn__icon--wa { color: #fff; }
.btn--accent:hover {
  background: linear-gradient(135deg, #565b60 0%, #3c4044 52%, #25282a 100%);
  border-color: #34373a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.btn--accent:active { background: linear-gradient(135deg, #3c4044 0%, #2a2c2e 52%, #161719 100%); border-color: #1f2123; }

/* Incomplete destinations get a subtle dashed hint (dev/owner aid).
   Excluded on the red accent CTA, where a dashed border would be invisible. */
.btn[data-incomplete='true']:not(.btn--accent) { border-style: dashed; }

/* ---------- Secondary actions (share / social) ---------- */
.extras {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}
.share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.14s var(--ease), background 0.14s var(--ease);
}
.share:hover { color: var(--ink); background: rgba(0, 0, 0, 0.05); }
.share svg { width: 18px; height: 18px; }

.social {
  list-style: none;
  display: flex;
  gap: 10px;
}
.social a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--charcoal);
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  transition: transform 0.14s var(--ease), color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.social a:hover { transform: translateY(-2px); color: var(--red); border-color: var(--red); }
.social svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-footer);
  line-height: 1.5;
  max-width: 320px;
  overflow-wrap: break-word;
}
.footer strong { font-weight: 700; color: var(--ink-2); }
.footer .dot { color: var(--red); padding: 0 2px; }

/* ---------- Toast (aria-live) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  background: var(--charcoal);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 50;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Focus visibility (WCAG 2.4.7 / 1.4.11) — works on any surface ---------- */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--red);
  border-radius: var(--pill-radius);
}
.btn--accent:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--charcoal); }
.share:focus-visible,
.social a:focus-visible { border-radius: 999px; }

/* ============================================================
   Desktop / large screens → elevated centered "cartão"
   ============================================================ */
@media (min-width: 600px) {
  body { align-items: center; padding: 40px 20px; }
  .card {
    background: var(--card);
    border-radius: var(--card-radius);
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    min-height: auto;
    overflow: hidden;
  }
  .hero { height: 178px; }
  .content { padding: 104px 40px 36px; gap: 36px; }
  .profile__specialties li { background: #f6f6f6; }
  .social a { background: #fafafa; }
  .share:hover { background: rgba(0, 0, 0, 0.04); }
}

/* ============================================================
   Large screens → two-column "hero": brand panel (left) + actions (right)
   Uses CSS grid placement so DOM/reading order stays profile→links→extras→footer.
   ============================================================ */
@media (min-width: 900px) {
  body { align-items: center; padding: 48px; }

  .card {
    max-width: 1040px;
    width: 100%;
    min-height: min(700px, calc(100dvh - 96px));
    border-radius: var(--card-radius);
    overflow: hidden;
  }

  /* Hero becomes the full-height LEFT brand panel (blurred gradient banner) */
  .hero {
    inset: 0;
    right: 50%;
    height: auto;
  }
  .hero__rings {
    background-color: #3a3d40;
    background-image: url('../assets/banner.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: none;
            mask-image: none;
  }

  /* Two-column grid */
  .content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: start;
    padding: 0;
    gap: 0;
    min-height: inherit;
  }

  /* LEFT column: brand (white text on red) */
  .profile {
    grid-column: 1;
    grid-row: 1;
    align-items: flex-start;
    text-align: left;
    max-width: none;
    margin: 0;
    padding: 56px 44px 20px;
  }
  .profile__avatar-wrap { width: 128px; height: 128px; }
  .profile__handle { color: #fff; font-size: 26px; }
  .profile__verified { color: #fff; width: 20px; height: 20px; }
  .profile__tagline { color: rgba(255, 255, 255, 0.85); font-size: 16px; }
  .profile__specialties { display: flex; justify-content: flex-start; }
  .profile__specialties-text { display: none; }
  .profile__specialties li {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
  }

  .extras {
    grid-column: 1;
    grid-row: 2;
    align-items: flex-start;
    align-self: end;
    padding: 8px 44px;
  }
  .share { color: rgba(255, 255, 255, 0.92); }
  .share:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
  .social a {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.35);
  }
  .social a:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, 0.2); }

  .footer {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
    max-width: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 16px 44px 48px;
  }
  .footer strong { color: rgba(255, 255, 255, 0.9); }

  /* RIGHT column: actions, vertically centered, larger */
  .links {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    padding: 56px 56px;
  }
  .links__list { gap: 16px; }
  .btn { min-height: 74px; padding: 14px 28px; }
  .btn__label { font-size: 18px; }
  .btn__sub { font-size: 13px; }
}

/* ---------- Entrance animation (progressive enhancement only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; animation: rise 0.55s var(--ease) forwards; }
  .reveal[data-delay] { animation-delay: calc(var(--i, 0) * 70ms); }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}
