/* =============================================================
   INTERSEGURO — Contact Page
   ============================================================= */

/* ─── Tokens ────────────────────────────────────────────────── */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --clr-white:   #ffffff;
  --clr-glass:   rgba(255, 255, 255, 0.10);
  --clr-glass-h: rgba(255, 255, 255, 0.17);
  --clr-border:  rgba(255, 255, 255, 0.14);
  --clr-text:    rgba(255, 255, 255, 0.92);
  --clr-muted:   rgba(255, 255, 255, 0.55);

  /* Per-channel accent (used for glow on hover) */
  --clr-wa:    #25d366;
  --clr-ph:    #818cf8;
  --clr-em:    #fbbf24;
  --clr-wb:    #38bdf8;

  --radius:    1rem;
  --radius-lg: 1.5rem;

  --dur: 260ms;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  color: var(--clr-text);
  overflow-x: hidden;
}

img   { display: block; max-width: 100%; height: auto; }
a     { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; background: none; border: none; color: inherit; }
ul    { list-style: none; }

/* ─── Background ─────────────────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.bg__photo {
  position: absolute;
  inset: 0;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  /* subtle Ken Burns */
  animation: kenburns 24s ease-in-out infinite alternate;
}

.bg__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      170deg,
      rgba(5,  20, 50,  .78)  0%,
      rgba(2,  10, 32,  .88) 55%,
      rgba(0,   5, 20,  .95) 100%
    );
}

@keyframes kenburns {
  from { transform: scale(1);    }
  to   { transform: scale(1.06); }
}

/* ─── Page shell ─────────────────────────────────────────────── */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 2.5rem);
  gap: clamp(2rem, 4vw, 3rem);
}

/* ─── Header / Logo ──────────────────────────────────────────── */
.page-header {
  width: 100%;
  display: flex;
  justify-content: center;
}

.logo-link {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--clr-white);
  border-radius: var(--radius);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, .25),
    0 1px 4px  rgba(0, 0, 0, .15);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.logo-link:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, .3),
    0 2px 8px  rgba(0, 0, 0, .2);
}

.logo {
  height: clamp(2rem, 4vw, 2.75rem);
  width: auto;
}

/* ─── Hero text ──────────────────────────────────────────────── */
.page-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 4vw, 2.75rem);
  width: 100%;
  max-width: 900px;
}

.hero {
  text-align: center;
  animation: rise .6s ease both;
}

.hero__title {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--clr-white);
}

.hero__sub {
  margin-top: 1rem;
  font-size: clamp(.9rem, 2vw, 1.1rem);
  color: var(--clr-muted);
  font-weight: 400;
  line-height: 1.65;
}

/* ─── Channels grid ──────────────────────────────────────────── */
.channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

/* ─── Card ───────────────────────────────────────────────────── */
.card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1.125rem;
  padding: 1.375rem 1.5rem;
  background: var(--clr-glass);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  cursor: pointer;
  text-align: left;

  /* Entrance: start hidden, each card staggered via nth-child */
  opacity: 0;
  animation: cardEnter .55s var(--ease) forwards;

  transition:
    background   .32s var(--ease),
    border-color .32s var(--ease),
    transform    .32s var(--ease),
    box-shadow   .32s var(--ease);
}

/* Staggered entrance delays */
.card:nth-child(1) { animation-delay: .12s; }
.card:nth-child(2) { animation-delay: .22s; }
.card:nth-child(3) { animation-delay: .32s; }
.card:nth-child(4) { animation-delay: .42s; }

/* Shimmer sweep — diagonal light that slides across once on hover */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  left: -80%;
  width: 55%;
  background: linear-gradient(
    105deg,
    transparent  0%,
    rgba(255, 255, 255, .055) 50%,
    transparent 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left .65s cubic-bezier(.25, .46, .45, .94);
}

.card:hover::before {
  left: 130%;
}

.card:hover {
  background: var(--clr-glass-h);
  transform: translateY(-5px) scale(1.015);
}

/* Per-channel glow on hover */
.card--whatsapp:hover { border-color: rgba(37,  211, 102, .45); box-shadow: 0 12px 36px rgba(37,  211, 102, .15), 0 2px 8px rgba(0,0,0,.2); }
.card--phone:hover    { border-color: rgba(129, 140, 248, .45); box-shadow: 0 12px 36px rgba(129, 140, 248, .15), 0 2px 8px rgba(0,0,0,.2); }
.card--email:hover    { border-color: rgba(251, 191,  36, .45); box-shadow: 0 12px 36px rgba(251, 191,  36, .15), 0 2px 8px rgba(0,0,0,.2); }
.card--web:hover      { border-color: rgba(56,  189, 248, .45); box-shadow: 0 12px 36px rgba(56,  189, 248, .15), 0 2px 8px rgba(0,0,0,.2); }

/* Icon bubble */
.card__icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: .875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .32s var(--ease), filter .32s var(--ease);
}

.card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.card--whatsapp .card__icon { background: rgba(37,  211, 102, .18); color: #4ade80; }
.card--phone    .card__icon { background: rgba(129, 140, 248, .18); color: #a5b4fc; }
.card--email    .card__icon { background: rgba(251, 191,  36, .18); color: #fcd34d; }
.card--web      .card__icon { background: rgba(56,  189, 248, .18); color: #7dd3fc; }

.card:hover .card__icon {
  transform: scale(1.14);
  filter: brightness(1.3);
}

/* Text block */
.card__body {
  flex: 1;
  min-width: 0;
  transition: transform .32s var(--ease);
}

.card:hover .card__body {
  transform: translateX(3px);
}

.card__title {
  font-size: 1rem;
  font-weight: 650;
  color: var(--clr-white);
  line-height: 1.3;
}

.card__desc {
  margin-top: .2rem;
  font-size: .8125rem;
  color: var(--clr-muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Arrow */
.card__arrow {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .32s var(--ease), color .32s var(--ease);
}

.card__arrow svg { width: 1.125rem; height: 1.125rem; }

.card:hover .card__arrow {
  transform: translateX(6px);
  color: var(--clr-white);
}

/* ─── Footer ─────────────────────────────────────────────────── */
.page-footer {
  margin-top: auto;
  padding-top: 1rem;
  font-size: .75rem;
  color: rgba(255, 255, 255, .3);
  text-align: center;
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.97);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ─── Focus ──────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .6);
  outline-offset: 3px;
  border-radius: .375rem;
}

:focus:not(:focus-visible) { outline: none; }

/* ─── Responsive ─────────────────────────────────────────────── */

/* Tablet ≤ 640px → single column */
@media (max-width: 640px) {
  .channels {
    grid-template-columns: 1fr;
  }

  .card__desc {
    white-space: normal;
  }
}

/* Small screens */
@media (max-width: 400px) {
  .logo {
    height: 1.75rem;
  }

  .hero__title {
    font-size: 1.75rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
