/* Portal raiz — hub de produtos */

:root {
  --portal-ink: #102a32;
  --portal-muted: #4a6670;
  --portal-paper: #f3efe6;
  --portal-sea: #0b3d4a;
  --portal-sea-bright: #147a8a;
  --portal-leaf: #1f6b4a;
  --portal-amber: #c47a1a;
  --portal-radius: 1.25rem;
  --portal-shadow: 0 18px 40px rgba(11, 61, 74, 0.14);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body.portal {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--portal-ink);
  background: var(--portal-paper);
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  position: relative;
  overflow-x: hidden;
}

.portal-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(20, 122, 138, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 45% at 95% 15%, rgba(196, 122, 26, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(31, 107, 74, 0.16), transparent 55%),
    linear-gradient(165deg, #e8f2f0 0%, #f3efe6 42%, #efe6d6 100%);
  animation: portal-bg-drift 18s ease-in-out infinite alternate;
}

@keyframes portal-bg-drift {
  from { filter: hue-rotate(0deg) saturate(1); transform: scale(1); }
  to { filter: hue-rotate(8deg) saturate(1.05); transform: scale(1.03); }
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--portal-sea);
}

.portal-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(11, 61, 74, 0.18);
}

.portal-brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.portal-privacy {
  color: var(--portal-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.portal-privacy:hover,
.portal-privacy:focus-visible {
  color: var(--portal-sea);
  text-decoration: underline;
}

.portal-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 2.5rem;
}

.portal-hero {
  text-align: center;
  padding: 1.5rem 0 2rem;
  animation: portal-rise 0.7s ease-out both;
}

.portal-hero__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--portal-sea);
}

.portal-hero__lead {
  margin: 0.85rem auto 0;
  max-width: 28rem;
  font-size: 1.15rem;
  color: var(--portal-muted);
  line-height: 1.45;
}

.portal-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .portal-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
    align-items: stretch;
  }
}

.portal-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: var(--portal-radius);
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 42, 50, 0.08);
  box-shadow: var(--portal-shadow);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: portal-rise 0.75s ease-out both;
  min-height: 100%;
}

.portal-tile:nth-child(1) { animation-delay: 0.08s; }
.portal-tile:nth-child(2) { animation-delay: 0.16s; }
.portal-tile:nth-child(3) { animation-delay: 0.24s; }

.portal-tile:hover,
.portal-tile:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(11, 61, 74, 0.18);
}

.portal-tile--tabaia { border-top: 4px solid var(--portal-sea-bright); }
.portal-tile--farma { border-top: 4px solid var(--portal-leaf); }
.portal-tile--tp { border-top: 4px solid var(--portal-amber); }

.portal-tile__visual {
  margin-bottom: 0.55rem;
}

.portal-tile__visual img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(16, 42, 50, 0.12);
}

/* ônibus é landscape (~2:1) — não forçar quadrado */
.portal-tile--tp .portal-tile__visual img {
  width: 120px;
  height: 57px;
  object-fit: contain;
  object-position: left center;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.portal-tile__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--portal-ink);
}

.portal-tile__desc {
  margin: 0 0 0.85rem;
  color: var(--portal-muted);
  font-size: 1.02rem;
  line-height: 1.45;
  flex: 1 1 auto;
}

.portal-tile__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
  width: 100%;
}

.portal-tile__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--portal-sea);
  font-size: 0.98rem;
}

.portal-tile--farma .portal-tile__cta { color: var(--portal-leaf); }
.portal-tile--tp .portal-tile__cta { color: #9a5f10; }

.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.portal-btn--google {
  background: var(--portal-sea);
  color: #fff;
  flex: 1 1 auto;
}

.portal-btn--google:hover,
.portal-btn--google:focus-visible {
  background: #082f39;
  color: #fff;
}

.portal-btn--ghost {
  background: transparent;
  color: var(--portal-sea);
  border-color: rgba(11, 61, 74, 0.28);
}

.portal-btn--ghost:hover,
.portal-btn--ghost:focus-visible {
  background: rgba(11, 61, 74, 0.06);
}

.portal-footer {
  text-align: center;
  padding: 0 1rem 1.75rem;
  color: var(--portal-muted);
  font-size: 0.9rem;
}

@keyframes portal-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-bg,
  .portal-hero,
  .portal-tile {
    animation: none;
  }

  .portal-tile:hover,
  .portal-tile:focus-within {
    transform: none;
  }
}
