/* =========================================================
   Gabriel Cardoso: painel de links "Céu aberto"
   Tons verdes · verde floresta + esmeralda + lima
   Mobile-first · tokens no :root · sem dependências
   ========================================================= */

:root {
  --ink: #03120c;                          /* verde floresta profundo */
  --surface: rgba(10, 36, 26, 0.66);
  --surface-2: #0a2219;
  --line: rgba(170, 255, 205, 0.10);
  --line-strong: rgba(170, 255, 205, 0.20);
  --text: #effaf3;
  --muted: #8fae9f;
  --sky: #4fe39a;                          /* verde menta */
  --sky-2: #c8f7dd;
  --sun: #b6f25c;                          /* verde lima (destaque) */
  --sun-2: #2fd37a;
  --sun-ink: #04170c;

  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, Consolas, monospace;

  --gutter: 16px;
  --radius: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, p, figure { margin: 0; }
em { font-style: italic; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 3px;
  border-radius: 12px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--sun);
  color: var(--sun-ink);
  font-weight: 700;
  border-radius: 10px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* ---------- Fundo: céu + sol no horizonte ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  height: 100lvh;
  overflow: hidden;
  background:
    radial-gradient(70% 40% at 85% 0%, rgba(79, 227, 154, 0.18), transparent 70%),
    linear-gradient(180deg, #04190f 0%, var(--ink) 45%, #061510 78%, #0c2016 100%);
}

.bg__sun {
  position: absolute;
  left: 50%;
  bottom: -38vmax;
  width: 70vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 242, 92, 0.55) 0%, rgba(47, 211, 122, 0.28) 32%, rgba(47, 211, 122, 0.08) 52%, transparent 68%);
  transform: translateX(-50%);
  animation: sunrise 2.8s var(--ease) both, breathe 7s ease-in-out 2.8s infinite alternate;
}

.bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Estrutura (mobile-first) ---------- */

.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--gutter) max(28px, env(safe-area-inset-bottom));
}

/* ---------- Topo: foto em tela cheia + nome sobreposto ---------- */

.hero {
  position: relative;
  margin: 0 calc(var(--gutter) * -1);
  container-type: inline-size;
}

.photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 76svh;
  width: 100%;
  overflow: hidden;
  background: var(--surface-2);
  isolation: isolate;
  /* a foto se dissolve no fundo da página */
  -webkit-mask-image: linear-gradient(to bottom, #000 52%, rgba(0, 0, 0, 0.6) 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 52%, rgba(0, 0, 0, 0.6) 76%, transparent 100%);
}
.photo picture { display: contents; }
.photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}
/* degradê verde sobre a foto */
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(3, 18, 12, 0.55) 0%, transparent 20%),
    linear-gradient(to top, rgba(3, 18, 12, 0.95) 0%, rgba(10, 70, 40, 0.55) 38%, transparent 70%),
    linear-gradient(210deg, rgba(182, 242, 92, 0.28) 0%, transparent 38%),
    linear-gradient(30deg, rgba(47, 211, 122, 0.30) 0%, transparent 50%);
  pointer-events: none;
}

.top {
  position: absolute;
  z-index: 3;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(14px, env(safe-area-inset-top));
}

.top__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, var(--sun) 0 54%, transparent 56%), rgba(3, 18, 12, 0.55);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.02em;
}

.top__actions { display: flex; gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(3, 18, 12, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn svg.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn:hover { border-color: var(--sun); color: var(--sun); }
.icon-btn.is-done { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }

.hero__text {
  position: relative;
  z-index: 2;
  margin-top: -34cqw;
  padding: 0 var(--gutter);
  text-align: center;
}

.hero__name {
  /* as duas linhas ocupam exatamente esta largura (ajuste fino no main.js) */
  width: 74%;
  margin: 0 auto;
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0 6px 30px rgba(3, 18, 12, 0.6);
}
.hero__line {
  display: table;              /* largura do conteúdo, cada linha em um bloco */
  margin: 0 auto;
  white-space: nowrap;
  font-size: 18.4cqw;          /* valor inicial antes do ajuste */
}
.hero__line--accent {
  font-size: 15.9cqw;
  background: linear-gradient(90deg, var(--sky), var(--sky-2) 60%, var(--sun));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

.hero__user {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--muted);
  transition: color 0.2s;
}
.hero__user:hover { color: var(--sun); }

/* ---------- Links ---------- */

.links { display: grid; gap: 12px; margin-top: 22px; }

/* 1. Conversa no WhatsApp: card de destaque, com brilho passando */
.talk {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 12px 14px 12px 12px;
  border-radius: 22px;
  border: 1px solid rgba(37, 211, 102, 0.6);
  background:
    radial-gradient(120% 160% at 0% 50%, rgba(37, 211, 102, 0.32), transparent 60%),
    linear-gradient(135deg, #0f4429 0%, #08241a 100%);
  box-shadow:
    0 0 0 4px rgba(37, 211, 102, 0.08),
    0 18px 44px -18px rgba(37, 211, 102, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
/* faixa de luz que atravessa o card */
.talk::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.10) 42%, rgba(220, 255, 235, 0.42) 50%, rgba(255, 255, 255, 0.10) 58%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 3.2s ease-in-out 0.9s infinite;
  pointer-events: none;
}
.talk > * { position: relative; z-index: 1; }
a.talk[href]:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 4px rgba(37, 211, 102, 0.14),
    0 24px 54px -18px rgba(37, 211, 102, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
a.talk[href]:active { transform: scale(0.985); }

.talk__avatar { position: relative; flex: none; width: 62px; height: 62px; }
.talk__avatar picture, .talk__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #25d366;
}
/* anel pulsando em volta da foto */
.talk__avatar::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: ping 2.2s ease-out infinite;
}
.talk__badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 0 0 3px #0c3622;
}
.talk__badge svg { width: 14px; height: 14px; }

.talk__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.talk__title { font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.talk__desc { font-size: 0.85rem; color: #b9e9cc; }

.talk__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25d366;
  color: #04210f;
  box-shadow: 0 0 18px rgba(37, 211, 102, 0.6);
  transition: transform 0.3s var(--ease);
}
.talk__go svg { width: 18px; height: 18px; }
a.talk[href]:hover .talk__go { transform: rotate(45deg); }

/* Slots (Royal Binary, Comunidade, Instagram) */
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.slot {
  --c1: #0f2a1f;
  --c2: #08170f;
  --accent: var(--sky);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 70% at 100% 100%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    linear-gradient(160deg, var(--c1), var(--c2));
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.slot--wide { grid-column: 1 / -1; min-height: 128px; }

/* Royal: mesmo formato dos cards, com o degradê lima → esmeralda de antes */
.slot--royal {
  --accent: #04170c;
  color: var(--sun-ink);
  border-color: transparent;
  background:
    radial-gradient(120% 90% at 100% 0%, #ecffb8 0%, transparent 55%),
    linear-gradient(135deg, #c9f76a 0%, var(--sun) 40%, var(--sun-2) 100%);
  box-shadow: 0 22px 46px -24px rgba(47, 211, 122, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.slot--royal .slot__mark { color: var(--sun-ink); opacity: 0.1; }
a.slot--royal[href]:hover { border-color: transparent; }
a.slot--royal[href]:hover .slot__mark { opacity: 0.16; }
.slot--royal .slot__name { color: var(--sun-ink); opacity: 0.75; }
.slot--royal .slot__title em { display: block; color: var(--sun-ink); }
.slot--royal .slot__desc { color: var(--sun-ink); opacity: 0.75; }
.slot--royal .slot__go { border-color: rgba(4, 23, 12, 0.25); color: var(--sun-ink); }
a.slot--royal[href]:hover .slot__go { background: var(--sun-ink); color: var(--sun); }
.slot--royal .slot__chip--logo { box-shadow: 0 0 0 3px rgba(4, 23, 12, 0.12); }
.slot--wa { --c1: #0a2a22; --c2: #07161a; --accent: #25d366; }
.slot--ig { --c1: #2a0f35; --c2: #12091f; --accent: #ff5f7e; }

/* ícone gigante de marca d'água */
.slot__mark {
  position: absolute;
  right: -18px;
  bottom: -22px;
  z-index: -1;
  width: 118px;
  height: 118px;
  color: var(--accent);
  opacity: 0.14;
  transform: rotate(-12deg);
  transition: transform 0.5s var(--ease), opacity 0.3s;
}
.slot--wide .slot__mark { width: 140px; height: 140px; right: 6px; bottom: -34px; }

a.slot[href]:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
a.slot[href]:hover .slot__mark { transform: rotate(0) scale(1.06); opacity: 0.22; }
a.slot[href]:active { transform: scale(0.98); }

.slot__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: auto; }
.slot__chip {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -8px var(--accent);
}
.slot__chip svg { width: 20px; height: 20px; }
.slot__chip--logo {
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 8px 20px -8px var(--accent), 0 0 0 1px var(--line-strong);
}
.slot__chip--logo picture, .slot__chip--logo img { width: 100%; height: 100%; object-fit: cover; }
.slot--ig .slot__chip { background: linear-gradient(45deg, #feda75, #fa7e1e 25%, #d62976 55%, #962fbf 80%, #4f5bd5); }

.slot__go {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.slot__go svg { width: 14px; height: 14px; }
a.slot[href]:hover .slot__go { background: var(--text); color: var(--ink); transform: rotate(45deg); }

.slot__name {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.slot__title {
  margin-top: 4px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.slot__title em { font-weight: 700; color: color-mix(in srgb, var(--accent) 45%, #fff); }
.slot__desc { margin-top: 4px; font-size: 0.8rem; line-height: 1.3; color: var(--muted); max-width: 26ch; }
.slot--wide .slot__title { font-size: 1.4rem; }

/* Link ainda sem destino */
.is-soon { cursor: default; filter: saturate(0.35); opacity: 0.7; }
.soon-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Linha social ---------- */

.social { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.social__btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease);
}
.social__btn svg { width: 19px; height: 19px; }
.social__btn:hover { color: var(--sun); border-color: var(--sun); transform: translateY(-2px); }

/* ---------- Rodapé ---------- */

.foot { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); text-align: center; }
.foot__line {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--sky-2), var(--sun));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.foot__copy { margin-top: 6px; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--sun-ink);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  transition: transform 0.4s var(--ease), visibility 0s 0.4s;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform 0.4s var(--ease); }

/* ---------- Entrada ---------- */

.photo, .hero__text, .talk, .slot, .social, .foot {
  animation: rise 0.8s var(--ease) backwards;
}
.hero__text { animation-delay: 0.1s; }
.talk    { animation-delay: 0.16s; }
.slot:nth-child(1) { animation-delay: 0.22s; }
.slot:nth-child(2) { animation-delay: 0.28s; }
.slot:nth-child(3) { animation-delay: 0.34s; }
.social  { animation-delay: 0.5s; }
.foot    { animation-delay: 0.55s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes sunrise {
  from { transform: translate(-50%, 30%); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes breathe {
  to { transform: translate(-50%, -3%) scale(1.04); }
}
@keyframes glow {
  50% { opacity: 0.45; }
}
@keyframes ping {
  from { transform: scale(1); opacity: 0.8; }
  to   { transform: scale(1.4); opacity: 0; }
}
@keyframes shine {
  0%, 60% { transform: translateX(-120%); }
  100%    { transform: translateX(120%); }
}

/* ---------- Telas maiores: mesma coluna mobile, centralizada ---------- */

@media (min-width: 520px) {
  .hero { margin: 0; }
  .photo { margin-top: 20px; border-radius: 28px 28px 0 0; }
  .top { left: 14px; right: 14px; top: 20px; padding-top: 14px; }
}

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