/* ============================================================
   AJ VEÍCULOS — Link na Bio Premium
   Custom CSS layer on top of Tailwind utilities.
   ============================================================ */

:root {
  --bg: #05080a;
  --bg-elevated: #0a0f0c;
  --ink: #f3f6f4;
  --ink-muted: #9aa8a1;
  --ink-faint: #5c6b64;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --accent: #22d17a;
  --accent-soft: #5be8a4;
  --accent-dim: rgba(34, 209, 122, 0.16);
  --shadow-color: 150 40% 2%;
  --cursor-mix: screen;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
  transition: background-color .4s ease, color .4s ease;
}

::selection {
  background: var(--accent);
  color: #05100a;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 1rem;
  z-index: 200;
  background: var(--accent);
  color: #05100a;
  padding: .6rem 1rem;
  border-radius: .6rem;
  font-weight: 700;
  transition: top .25s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: .5rem;
}

/* ============================================================
   BACKGROUND LAYERS
   ============================================================ */
.bg-watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../assets/images/fachada.webp");
  background-size: cover;
  background-position: center 35%;
  filter: grayscale(1) contrast(1.05) brightness(.9);
  opacity: .1;
  -webkit-mask-image: radial-gradient(ellipse 65% 50% at 50% 30%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 65% 50% at 50% 30%, #000 0%, transparent 72%);
  mix-blend-mode: luminosity;
}
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}

.bg-grid {
  position: fixed;
  inset: -2px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 10%, transparent 75%);
  opacity: .5;
}

.bg-glow {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  will-change: transform;
}
.bg-glow--one {
  width: 560px;
  height: 560px;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation: drift-a 18s ease-in-out infinite;
}
.bg-glow--two {
  width: 420px;
  height: 420px;
  bottom: -120px;
  right: -80px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  opacity: .2;
  animation: drift-b 22s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50% { transform: translateX(-46%) translateY(30px) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.1); }
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity .6s ease, visibility .6s ease;
}
#loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.loading-logo {
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border-strong), 0 0 40px var(--accent-dim);
  animation: pulse-logo 1.8s ease-in-out infinite;
}
@keyframes pulse-logo {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px var(--accent-dim)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 26px var(--accent-dim)); }
}
.loading-bar {
  width: 160px;
  height: 3px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.loading-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-soft), transparent);
  animation: loading-sweep 1.1s ease-in-out infinite;
}
@keyframes loading-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 150;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
#cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 10px 2px var(--accent-dim);
  transition: opacity .2s ease;
}
#cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(2px);
  transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease, opacity .2s ease;
}
#cursor-ring.is-active {
  width: 56px;
  height: 56px;
  border-color: var(--accent);
  background: var(--accent-dim);
}
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button {
  cursor: none;
}
@media (hover: none), (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none !important; }
}

/* ============================================================
   HERO
   ============================================================ */
main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(3.5rem, 10vh, 5.5rem) 1.35rem 2rem;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(2rem, 5vh, 3rem);
}

.hero-logo-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}
.hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  filter: blur(6px);
  animation: glow-breathe 3.4s ease-in-out infinite;
}
.hero-logo {
  position: relative;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border-strong), 0 18px 40px -12px rgba(0,0,0,.5);
  animation: float-logo 5s ease-in-out infinite;
}
@keyframes float-logo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes glow-breathe {
  0%, 100% { opacity: .6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.hero-title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 2.75rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 .6rem;
}
.hero-title span {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-soft) 60%, var(--ink) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  color: var(--ink-muted);
  font-size: clamp(.95rem, 3vw, 1.05rem);
  max-width: 32ch;
  line-height: 1.5;
}

/* ============================================================
   LINK CARDS
   ============================================================ */
.links {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  border-radius: 1.15rem;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  isolation: isolate;
  transform: translateY(0) scale(1);
  transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s ease, background .35s ease, box-shadow .35s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 30px -22px rgba(0,0,0,.6);
}

.link-card.is-featured {
  background: linear-gradient(160deg, var(--accent-dim), var(--glass) 60%);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

/* sheen sweep */
.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.14) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .7s ease;
  pointer-events: none;
}

/* glow line on top edge */
.link-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-4px) scale(1.012);
  border-color: var(--border-strong);
  background: var(--glass-hover);
  box-shadow: 0 26px 50px -24px rgba(0,0,0,.55), 0 0 0 1px var(--accent-dim);
}
.link-card:hover::before { transform: translateX(120%); }
.link-card:hover::after { opacity: 1; }

.link-card:active {
  transform: translateY(-1px) scale(.99);
}

.link-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: var(--accent-dim);
  color: var(--accent);
  transition: transform .35s cubic-bezier(.22,1,.36,1), background .35s ease;
}
.link-card:hover .link-icon {
  transform: rotate(-6deg) scale(1.08);
  background: var(--accent);
  color: #05100a;
}
.link-icon svg { width: 22px; height: 22px; }

.link-icon--photo {
  background: transparent;
  padding: 0;
  overflow: hidden;
}
.link-icon--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: .85rem;
  box-shadow: 0 0 0 1px var(--border-strong);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.link-card:hover .link-icon--photo img {
  transform: scale(1.06) rotate(-3deg);
}
.link-card:hover .link-icon--photo {
  background: transparent;
}

.link-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.link-title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.03rem;
  line-height: 1.25;
  display: flex;
  align-items: baseline;
  gap: .4rem;
  flex-wrap: wrap;
}
.link-title small {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: .12rem .45rem;
  border-radius: .4rem;
}
.link-desc {
  color: var(--ink-muted);
  font-size: .87rem;
  margin-top: .15rem;
  line-height: 1.4;
}

.link-arrow {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  transition: transform .35s cubic-bezier(.22,1,.36,1), color .35s ease;
}
.link-card:hover .link-arrow {
  transform: translateX(4px);
  color: var(--accent);
}
.link-arrow svg { width: 18px; height: 18px; }

/* ripple */
.ripple {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: var(--accent-dim);
  transform: scale(0);
  animation: ripple-anim .6s ease-out forwards;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(3.2); opacity: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 1rem auto 0;
  padding: 2.5rem 1.35rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  text-align: center;
}
.footer-social {
  display: flex;
  gap: .6rem;
}
.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  backdrop-filter: blur(14px);
  transition: transform .3s cubic-bezier(.22,1,.36,1), color .3s ease, border-color .3s ease, background .3s ease;
}
.footer-social a:hover {
  transform: translateY(-3px);
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--glass-hover);
}
.footer-social svg { width: 18px; height: 18px; }

.footer-address {
  color: var(--ink-faint);
  font-size: .82rem;
  max-width: 34ch;
}
.footer-copy {
  color: var(--ink-faint);
  font-size: .76rem;
}

/* ============================================================
   REVEAL ON LOAD
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px) scale(.985);
  filter: blur(6px);
  transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1), filter .8s cubic-bezier(.22,1,.36,1);
}
body.is-ready [data-reveal] {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .26s; }

.links .link-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
body.is-ready .links .link-card {
  opacity: 1;
  transform: translateY(0);
}
body.is-ready .links .link-card:nth-child(1) { transition-delay: .32s; }
body.is-ready .links .link-card:nth-child(2) { transition-delay: .38s; }
body.is-ready .links .link-card:nth-child(3) { transition-delay: .44s; }
body.is-ready .links .link-card:nth-child(4) { transition-delay: .50s; }
body.is-ready .links .link-card:nth-child(5) { transition-delay: .56s; }
body.is-ready .links .link-card:nth-child(n+6) { transition-delay: .60s; }

/* ============================================================
   RESPONSIVE FINE-TUNING
   ============================================================ */
@media (max-width: 380px) {
  .link-card { padding: .9rem 1rem; gap: .8rem; }
  .link-icon { width: 42px; height: 42px; }
}

@media (min-width: 768px) {
  main { padding-top: 6rem; }
  .link-card:hover { transform: translateY(-5px) scale(1.015); }
}

/* ============================================================
   ACCESSIBILITY / MOTION PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], .links .link-card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(255,255,255,.35);
    --ink-muted: #cfd8d3;
  }
}
