/* Calia BI — portal visual */

:root {
  --bg: #f6f4f0;
  --bg-elevated: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --text-soft: #8a8a8a;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
}

.app {
  position: relative;
  min-height: 100dvh;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(15, 76, 129, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(91, 33, 182, 0.06), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(4, 120, 87, 0.06), transparent);
}

/* Views */
.view {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.view--active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.view[hidden] {
  display: none !important;
}

/* Hero */
.hero {
  padding: 2.5rem 1.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero__mark {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f4c81, #1e6bb8);
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
  box-shadow: var(--shadow);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero__tagline {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Home */
.home-main {
  flex: 1;
  padding: 1rem 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.home-intro {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* Project card */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, #0f4c81);
  opacity: 0.9;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.project-card:focus-visible {
  outline: 2px solid var(--card-accent, #0f4c81);
  outline-offset: 2px;
}

.project-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-card__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--card-accent-light, #e8f2fc);
  color: var(--card-accent, #0f4c81);
}

.project-card__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--ativo {
  background: #dcfce7;
  color: #166534;
}

.badge--demo {
  background: #f3e8ff;
  color: #6b21a8;
}

.project-card__name {
  margin: 0 0 0.15rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-card__campaign {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  font-weight: 500;
}

.project-card__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
  flex: 1;
}

.project-card__cta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--card-accent, #0f4c81);
}

.project-card__cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--transition);
}

.project-card:hover .project-card__cta svg {
  transform: translateX(4px);
}

/* Project detail */
.project-header {
  padding: 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem 0.5rem 0.6rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-back:hover {
  background: #fff;
  color: var(--text);
}

.btn-back svg {
  width: 1.1rem;
  height: 1.1rem;
}

.project-hero {
  padding: 0.5rem 0 0;
}

.project-hero__badge {
  margin-bottom: 0.75rem;
}

.project-hero__title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.project-hero__campaign {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--text-soft);
  font-weight: 500;
}

.project-hero__desc {
  margin: 0;
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.project-main {
  flex: 1;
  padding: 1.5rem 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Metrics */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.metric {
  padding: 1.1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.metric__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--metric-accent, var(--text));
}

.metric__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Actions */
.section-title {
  margin: 2.5rem 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow);
}

.action-btn:hover:not(.action-btn--disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.action-btn--primary {
  background: var(--action-accent, #0f4c81);
  border-color: transparent;
  color: #fff;
}

.action-btn--primary .action-btn__hint {
  color: rgba(255, 255, 255, 0.75);
}

.action-btn--primary .action-btn__icon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.action-btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-btn__icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--action-accent-light, #e8f2fc);
  color: var(--action-accent, #0f4c81);
}

.action-btn__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.action-btn__label {
  font-size: 1rem;
  font-weight: 600;
}

.action-btn__hint {
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.4;
}

/* Workflow */
.workflow {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.workflow-step {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.workflow-step__num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--wf-accent-light, #e8f2fc);
  color: var(--wf-accent, #0f4c81);
  font-size: 0.85rem;
  font-weight: 700;
}

.workflow-step__title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.workflow-step__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-item {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eee;
}

.gallery-item__caption {
  padding: 0.85rem 1rem;
}

.gallery-item__title {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.gallery-item__sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* Lightbox */
.lightbox {
  padding: 0;
  border: none;
  max-width: min(96vw, 1100px);
  width: 100%;
  background: transparent;
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__figure {
  margin: 0;
}

.lightbox__figure img {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox__figure figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Footer */
.site-footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-soft);
}

@media (max-width: 600px) {
  .hero {
    padding-top: 1.75rem;
  }

  .hero__title {
    font-size: 1.85rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }
}
