/* ============================================================
   ARCMED · Link in bio
   Stack: vanilla HTML + CSS, mobile-first. Tema escuro.
   Paleta e tipos espelhados de arcmed-site (src/app/globals.css):
   o navy do chrome do site (#0B202A), a linha teal do navbar
   (#4EBEE5), o azul da marca e o céu da logo, ease out-expo e os
   papéis tipográficos (display, corpo, acento em serifa itálica).
   ============================================================ */

/* ---------- Fonts (subset latin, self-hosted) ---------- */
@font-face { font-family: "Inter";           src: url("fonts/Inter-Variable.woff2")           format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Variable.woff2")  format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces";        src: url("fonts/Fraunces-Italic-Variable.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --arc-blue:   #0066ff;   /* brand */
  --arc-cobalt: #002da7;   /* arco direito da logo */
  --arc-sky:    #63d0ff;   /* arco claro da logo */
  --arc-teal:   #4ebee5;   /* linha do chrome do site */

  --bg-canvas: #061219;    /* fundo atrás do card no desktop */
  --bg:        #0b202a;    /* navy do chrome do site */
  --bg-deep:   #08171f;

  --surface:       rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --line:          rgba(78, 190, 229, 0.14);
  --line-hover:    rgba(78, 190, 229, 0.42);

  --text:   #f3f7fa;
  --text-2: #a7bac8;
  --text-3: #6d8695;

  --wa-green: #25d366;

  --font-display: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-accent:  "Fraunces", Georgia, serif;

  --ease-arcmed: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; }
img { max-width: 100%; display: block; }
::selection { background: rgba(99, 208, 255, 0.3); }
a:focus-visible {
  outline: 2px solid var(--arc-sky);
  outline-offset: 3px;
}

/* ---------- Page shell ---------- */
.page {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, transparent 0%, var(--bg-deep) 100%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 64px 24px 30px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-glow {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: -1;
}
.hero-glow::before,
.hero-glow::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(48px);
  animation: glowDrift 10s var(--ease-arcmed) infinite;
}
.hero-glow::before {          /* halo azul atrás do avatar */
  top: -10px; left: 50%;
  width: 300px; height: 240px;
  margin-left: -150px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.55) 0%, transparent 70%);
  opacity: .55;
}
.hero-glow::after {           /* céu, deslocado, dá profundidade */
  top: 70px; right: -90px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(99, 208, 255, 0.45) 0%, transparent 70%);
  opacity: .28;
  animation-delay: -5s;
}
@keyframes glowDrift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(4%, -3%, 0); }
}

/* Anéis concêntricos centrados no avatar (64px de padding + 56px de raio) */
.hero-rings {
  position: absolute;
  top: calc(64px + 56px - 220px);
  left: 50%;
  width: 440px; height: 440px;
  margin-left: -220px;
  pointer-events: none;
  z-index: -1;
  fill: none;
  stroke: var(--arc-teal);
  stroke-width: 1;
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 72%);
          mask-image: radial-gradient(circle, #000 30%, transparent 72%);
}
.hero-rings circle { opacity: .16; }
.hero-rings circle:nth-child(2) { opacity: .11; }
.hero-rings circle:nth-child(4) { opacity: .07; }
.hero-rings .ring-dash {
  opacity: .22;
  stroke: var(--arc-sky);
  stroke-dasharray: 2 9;
  stroke-linecap: round;
  transform-origin: 220px 220px;
  animation: ringSpin 90s linear infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* ---------- Avatar (símbolo oficial: o A com o arco) ---------- */
.avatar {
  width: 112px; height: 112px;
  border-radius: 50%;
  margin: 0 auto 26px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 28%, #143a52 0%, #0c2533 62%, #0a1d28 100%);
  border: 1px solid rgba(78, 190, 229, 0.32);
  box-shadow:
    0 0 0 7px rgba(78, 190, 229, 0.05),
    0 22px 50px rgba(0, 102, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.avatar-mark {
  width: 62px; height: auto;
  margin-top: -3px;           /* centro óptico: o símbolo pesa embaixo */
}
.verified {
  position: absolute;
  bottom: 3px; right: 3px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--arc-blue);
  border: 3px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.5);
}

/* ---------- Logo (wordmark oficial, versão branca) ---------- */
.logo-wrap {
  margin: 0 0 18px;
  display: flex; align-items: center; justify-content: center;
}
.logo-img {
  height: 30px;
  width: auto;
}

/* ---------- Tagline ----------
   O H1 do site com o tique da casa: UMA palavra em serifa itálica,
   sublinhada por uma régua que se desenha (traço + dois ticks). */
.tag {
  font: 600 21px/1.28 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 auto;
  max-width: 330px;
}
.accent {
  position: relative;
  display: inline-block;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  letter-spacing: 0;
  color: var(--arc-sky);
}
.accent::before,
.accent::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -0.1em;
  height: 0.28em;
  pointer-events: none;
}
/* régua */
.accent::after {
  background: linear-gradient(currentColor, currentColor) center / 100% 1.6px no-repeat;
  transform: scaleX(0);
  transform-origin: left center;
  animation: rulerDraw .75s var(--ease-arcmed) .7s forwards;
}
/* ticks das pontas, entram depois da régua */
.accent::before {
  background:
    linear-gradient(currentColor, currentColor) left  center / 1.6px 100% no-repeat,
    linear-gradient(currentColor, currentColor) right center / 1.6px 100% no-repeat;
  opacity: 0;
  animation: rulerTicks .3s var(--ease-arcmed) 1.35s forwards;
}
@keyframes rulerDraw  { to { transform: scaleX(1); } }
@keyframes rulerTicks { to { opacity: 1; } }

.sub {
  font: 400 14px/1.5 var(--font-body);
  color: var(--text-2);
  max-width: 290px;
  margin: 12px auto 0;
}

/* ---------- BODY ---------- */
.body {
  padding: 10px 20px 110px;
  position: relative;
}

/* ---------- PRIMARY CTA ---------- */
.btn-cta {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 18px 18px 18px 20px;
  margin: 12px 0 12px;
  border-radius: 22px;
  background: linear-gradient(135deg, #1a75ff 0%, var(--arc-blue) 45%, var(--arc-cobalt) 100%);
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 40px -14px rgba(0, 102, 255, 0.75);
  transition: transform .25s var(--ease-arcmed), box-shadow .25s var(--ease-arcmed);
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 24px 48px -14px rgba(0, 102, 255, 0.85);
}
.btn-cta:active { transform: scale(0.985); }
/* reflexo que atravessa o botão de tempos em tempos */
.btn-cta-shine {
  position: absolute; top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.16) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: shine 6s var(--ease-arcmed) 1.6s infinite;
  pointer-events: none;
}
@keyframes shine {
  0%        { left: -60%; }
  30%, 100% { left: 130%; }
}
.btn-cta-ico {
  width: 48px; height: 48px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center;
  flex: none;
  position: relative;
}
.btn-cta-text { flex: 1; min-width: 0; position: relative; }
.btn-cta-eyebrow {
  display: block;
  font: 600 10.5px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 6px;
}
.btn-cta-title { display: block; font: 600 19px/1.1 var(--font-display); letter-spacing: -0.01em; }
.btn-cta-sub   { display: block; font: 400 12.5px/1.3 var(--font-body); color: rgba(255, 255, 255, 0.82); margin-top: 4px; }
.btn-cta-arr {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex; align-items: center; justify-content: center;
  flex: none;
  position: relative;
  transition: transform .25s var(--ease-arcmed), background .25s;
}
.btn-cta:hover .btn-cta-arr { transform: translateX(3px); background: rgba(255, 255, 255, 0.22); }

/* ---------- SECONDARY BUTTONS ---------- */
.btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 14px 18px 14px 14px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  text-align: left;
  transition:
    background .25s var(--ease-arcmed),
    border-color .25s var(--ease-arcmed),
    transform .25s var(--ease-arcmed);
}
.btn:hover {
  background: var(--surface-hover);
  border-color: var(--line-hover);
  transform: translateY(-1px);
}
.btn:active { transform: scale(0.985); }
.btn-ico {
  width: 44px; height: 44px;
  border-radius: 13px;
  background: rgba(78, 190, 229, 0.1);
  box-shadow: inset 0 0 0 1px rgba(78, 190, 229, 0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--arc-sky);
  flex: none;
  transition: background .25s, color .25s, box-shadow .25s;
}
.btn:hover .btn-ico {
  background: var(--arc-blue);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.btn-text { flex: 1; min-width: 0; }
.btn-title {
  display: block;
  font: 600 16px/1.2 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text);
}
.btn-sub {
  display: block;
  font: 400 12.5px/1.35 var(--font-body);
  color: var(--text-2);
  margin-top: 3px;
}
.btn-arr {
  color: var(--text-3);
  flex: none;
  transition: color .25s, transform .25s var(--ease-arcmed);
}
.btn:hover .btn-arr { color: var(--arc-sky); transform: translate(2px, -2px); }

/* ---------- Section label ---------- */
.section-label {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 2px 12px;
  font: 600 10.5px/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.section-label::before,
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.section-label::after { background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- Produtos (grade de 3) ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.product {
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 0;
  padding: 14px 12px 13px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition:
    background .25s var(--ease-arcmed),
    border-color .25s var(--ease-arcmed),
    transform .25s var(--ease-arcmed);
}
.product:hover {
  background: var(--surface-hover);
  border-color: var(--line-hover);
  transform: translateY(-2px);
}
.product:active { transform: scale(0.98); }
.product-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(78, 190, 229, 0.1);
  box-shadow: inset 0 0 0 1px rgba(78, 190, 229, 0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--arc-sky);
  margin-bottom: 12px;
  transition: background .25s, color .25s;
}
.product:hover .product-ico { background: var(--arc-blue); color: #fff; }
.product-name {
  font: 600 15px/1.15 var(--font-display);
  letter-spacing: -0.01em;
}
.product-tag {
  font: 400 11.5px/1.3 var(--font-body);
  color: var(--text-2);
  margin-top: 3px;
}

/* ---------- Footer ---------- */
.foot {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  margin-top: 26px;
  font: 400 12px/1.3 var(--font-body);
  color: var(--text-3);
}
.foot a { color: inherit; text-underline-offset: 3px; text-decoration-color: rgba(109, 134, 149, 0.5); }
.foot a:hover { color: var(--text-2); }
.dot-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- FAB (sticky WhatsApp) ---------- */
.fab {
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  right: 18px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.35), 0 0 0 6px rgba(37, 211, 102, 0.1);
  text-decoration: none;
  z-index: 50;
  animation: floatY 3.5s ease-in-out infinite;
}
.fab > svg { display: block; position: relative; z-index: 1; }
.fab-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--wa-green);
  animation: fabRing 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes fabRing {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Reveal animations ----------
   fill-mode `backwards` (e não `forwards`): o estado inicial vale durante o
   delay, mas ao terminar a animação solta o `transform` — senão ela prenderia
   o translateY(0) e anularia o hover/active dos botões. */
.reveal { animation: rise .7s var(--ease-arcmed) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.d1 { animation-delay: .05s; }
.d2 { animation-delay: .14s; }
.d3 { animation-delay: .22s; }
.d4 { animation-delay: .32s; }
.d5 { animation-delay: .42s; }
.d6 { animation-delay: .52s; }
.d7 { animation-delay: .60s; }
.d8 { animation-delay: .68s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal         { animation: none; }
  .accent::after  { transform: none; animation: none; }
  .accent::before { opacity: 1; animation: none; }
  .hero-glow::before,
  .hero-glow::after,
  .hero-rings .ring-dash,
  .btn-cta-shine,
  .fab,
  .fab-ring       { animation: none; }
  .btn-cta-shine  { display: none; }
}

/* ---------- Telas bem estreitas (≤360px) ---------- */
@media (max-width: 360px) {
  .products { gap: 8px; }
  .product { padding: 12px 10px; }
  .product-tag { font-size: 11px; }
}

/* ---------- Desktop frame ----------
   Mobile (≤480px) fica full-bleed, FAB fixo. No desktop a mesma coluna
   de 440px vira um card sobre um canvas ainda mais fundo. */
@media (min-width: 481px) {
  body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background:
      radial-gradient(circle at 20% 15%, rgba(0, 102, 255, 0.18) 0%, transparent 45%),
      radial-gradient(circle at 85% 85%, rgba(78, 190, 229, 0.12) 0%, transparent 45%),
      var(--bg-canvas);
  }
  .page {
    min-height: 0;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(78, 190, 229, 0.12);
    box-shadow:
      0 40px 100px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(0, 0, 0, 0.3);
  }
  .body { padding-bottom: 92px; }
  /* FAB preso ao card no desktop, não à viewport */
  .fab {
    position: absolute;
    bottom: 18px;
    right: 18px;
  }
}
