/**
 * Aviva e Connected — layout editorial local.
 * Sem Supabase. Cores via tokens da marca.
 */

/* Width includes padding and borders in both ministry templates. */
body.min-static,
body.min-static *,
body.min-static *::before,
body.min-static *::after {
  box-sizing: border-box;
}

body.min-static {
  margin: 0;
  overflow-x: clip;
  background: var(--min-bg, #f5f0e8);
  color: var(--min-ink, #24211f);
  font-family: var(--ibg-font, "IBG", system-ui, sans-serif);
}

body.min-static--aviva {
  --min-bg: var(--aviva-bg, #f5f0e8);
  --min-ink: var(--aviva-ink, #24211f);
  --min-accent: var(--aviva-primary, #f28c28);
  --min-accent-2: var(--aviva-primary-hover, #e86b18);
  --min-soft: #fff;
}

body.min-static--connected {
  --min-bg: var(--connected-bg, #f1edf8);
  --min-ink: var(--connected-ink, #25232a);
  --min-accent: var(--connected-primary, #6945a1);
  --min-accent-2: var(--connected-accent, #b5d56a);
  --min-soft: #fff;
}

.min-skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 20;
  padding: 0.4rem 0.7rem;
  background: #fff;
  color: #111;
}

.min-skip:focus {
  top: 0.75rem;
}

.min-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.2rem;
  padding: 0.6rem max(1rem, calc((100% - 1120px) / 2));
  background: var(--min-ink);
  color: #fff;
}

.min-brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}

.min-brand img {
  display: block;
  height: 2.4rem;
  width: auto;
}

.min-nav {
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.min-nav a,
.min-drawer a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.min-nav a:hover,
.min-drawer a:hover {
  color: #fff;
}

.min-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--btn-bg);
  border-radius: var(--btn-radius, 4px);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  text-decoration: none;
}

.min-pill:hover {
  background: var(--btn-hover-bg);
  border-color: var(--btn-hover-bg);
  color: var(--btn-hover-fg);
}

.min-pill--ghost,
.min-pill--ghost:hover {
  background: transparent;
  color: var(--min-ink);
  border: 1px solid rgba(36, 33, 31, 0.28);
}

.min-menu {
  display: none;
  width: 2.6rem;
  height: 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: transparent;
  color: #fff;
}

.min-menu span,
.min-menu span::before,
.min-menu span::after {
  display: block;
  width: 1rem;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  position: relative;
}

.min-menu span::before,
.min-menu span::after {
  content: "";
  position: absolute;
  left: 0;
}

.min-menu span::before { top: -5px; }
.min-menu span::after { top: 5px; }

.min-drawer {
  display: none;
  position: fixed;
  inset: 4.2rem 0 0 auto;
  z-index: 29;
  width: min(18rem, 100%);
  padding: 1.2rem 1.1rem;
  background: var(--min-ink);
}

.min-drawer.is-open { display: grid; gap: 0.85rem; }

.min-wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.min-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem;
}

.min-kicker {
  margin: 0 0 0.6rem;
  color: var(--min-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.min-static--connected .min-kicker {
  color: var(--connected-secondary, #382553);
}

.min-hero h1,
.min-statement h2,
.min-block h2,
.min-foot h2 {
  margin: 0;
  max-width: 14ch;
  color: var(--min-ink);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 0.95;
  overflow-wrap: normal;
  word-break: normal;
}

.min-hero h1 em,
.min-statement h2 em,
.min-block h2 em,
.min-foot h2 em {
  font-style: italic;
  font-weight: 600;
  color: var(--min-accent);
}

body.min-static--connected .min-hero h1 em,
body.min-static--connected .min-statement h2 em,
body.min-static--connected .min-block h2 em,
body.min-static--connected .min-foot h2 em {
  color: var(--min-accent-2);
}

.min-lead {
  max-width: 36rem;
  margin: 1rem 0 0;
  color: rgba(36, 33, 31, 0.72);
  font-size: 1.05rem;
  line-height: 1.55;
}

body.min-static--connected .min-lead {
  color: rgba(37, 35, 42, 0.72);
}

.min-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.min-figure {
  position: relative;
  margin: 0;
  min-height: 280px;
}

.min-figure img {
  display: block;
  width: 100%;
  height: min(68vh, 520px);
  object-fit: cover;
  border-radius: 2px;
}

.min-figure::before {
  content: "";
  position: absolute;
  right: -0.6rem;
  bottom: -0.6rem;
  z-index: -1;
  width: 46%;
  height: 46%;
  background: var(--min-accent);
}

body.min-static--connected .min-figure::before {
  background: var(--min-accent-2);
}

.min-chip {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  margin: 0;
  padding: 0.35rem 0.6rem;
  background: #fff;
  color: var(--min-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.min-statement,
.min-block {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem 2rem;
  align-items: start;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.min-rows {
  display: grid;
  gap: 0.75rem;
}

.min-row {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(36, 33, 31, 0.12);
  color: inherit;
  text-decoration: none;
}

.min-row strong {
  font-size: 1.15rem;
}

.min-row span {
  color: rgba(36, 33, 31, 0.62);
  font-size: 0.92rem;
}

.min-invite {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  align-items: center;
  margin: 1rem 0 2.5rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--min-ink);
  color: #fff;
}

.min-invite h2 {
  color: #fff;
  max-width: 14em;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
}

.min-invite .min-kicker {
  color: var(--min-accent);
}

body.min-static--connected .min-invite .min-kicker {
  color: var(--min-accent-2);
}

.min-invite p {
  margin: 0.85rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.min-place a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.min-place svg,
.min-social svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.min-place svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.min-social svg {
  fill: currentColor;
  stroke: none;
}

.min-when {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.min-when li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.min-when svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  flex: none;
}

.min-map {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 220px;
  aspect-ratio: 5 / 4;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: #1c1917;
}

.min-map img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% 92%;
}

.min-map__pin {
  position: absolute;
  left: 22%;
  top: 76%;
  z-index: 2;
  width: 1.15rem;
  height: 1.15rem;
  margin: -0.58rem 0 0 -0.58rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c94836;
  box-shadow: 0 0 0 8px rgba(201, 72, 54, 0.22);
  pointer-events: none;
}

.min-map__credit {
  position: absolute;
  left: 0.4rem;
  bottom: 0.35rem;
  z-index: 2;
  padding: 0.02rem 0.28rem;
  background: rgba(255, 252, 249, 0.82);
  color: #243028;
  font-size: 0.62rem;
}

.min-invite__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}

.min-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.min-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.55rem;
  padding: 0 0.9rem 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.min-social a:hover {
  border-color: rgba(255, 255, 255, 0.7);
}

.min-ibg {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.min-ibg:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.min-invite .min-social {
  margin-top: 0.15rem;
}

@keyframes minIn {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes minPhoto {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: none; }
}

[data-min-in].is-on {
  animation: minIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) both;
}

.min-figure.is-on {
  animation-name: minPhoto;
  animation-duration: 0.75s;
}

.min-foot {
  padding: 2.2rem 0 1.6rem;
  background: var(--min-ink);
  color: #fff;
}

.min-foot h2 {
  color: #fff;
  max-width: 16ch;
}

.min-foot a {
  color: #fff;
}

.min-legal {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .min-nav,
  .min-header .min-pill { display: none; }
  .min-menu { display: inline-flex; align-items: center; justify-content: center; }
  .min-hero,
  .min-statement,
  .min-block,
  .min-invite {
    grid-template-columns: 1fr;
  }
  .min-figure { min-height: 0; }
  .min-figure::before { display: none; }
  .min-actions { width: 100%; }
  .min-actions .min-pill {
    flex: 1 1 8.5rem;
    justify-content: center;
    text-align: center;
  }
  .min-figure img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
    max-height: 72vh;
    object-fit: cover;
  }
  .min-hero h1,
  .min-statement h2,
  .min-block h2 { max-width: none; font-size: clamp(2.2rem, 11vw, 3.4rem); }

  .min-hero {
    gap: 1.05rem;
    align-items: start;
    padding: 0.85rem 0 1.6rem;
  }

  .min-hero .min-figure {
    order: -1;
  }

  .min-hero .min-figure img {
    aspect-ratio: 4 / 5;
    max-height: none;
    border-radius: 8px;
    object-position: center 30%;
  }

  .min-hero .min-kicker {
    margin: 0.15rem 0 0.55rem;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
  }

  .min-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.35rem, 10.2vw, 3.05rem);
    line-height: 0.98;
  }

  .min-hero .min-lead {
    margin-top: 0.8rem;
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .min-hero .min-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin-top: 1.15rem;
  }

  .min-hero .min-actions .min-pill {
    flex: none;
    width: 100%;
    min-height: 3.05rem;
    justify-content: space-between;
    padding: 0 1rem;
  }

  .min-hero .min-actions .min-pill:not(.min-pill--ghost)::after {
    content: "→";
    font-weight: 500;
  }

  .min-hero .min-actions .min-pill--ghost,
  .min-hero .min-actions .min-pill--ghost:hover {
    width: auto;
    align-self: center;
    min-height: 2.5rem;
    margin-top: 0.35rem;
    padding: 0.35rem 0.5rem;
    border: 0;
    background: transparent;
    color: var(--min-ink);
    font-weight: 600;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .min-static *,
  [data-min-in].is-on,
  .min-figure.is-on {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
