/* Associação Caminhos de Faria Lemos — main stylesheet (mobile-first) */

:root {
  --green: #1f6b3a;
  --green-dark: #14472a;
  --red: #b3261e;
  --cream: #f6e7a6;
  --bg: #fbf7ee;
  --bg-tint: #f3ecdb;
  --surface: #ffffff;
  --text: #2a2a24;
  --muted: #5c5a50;
  --border: #e3d9c2;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 12px;
  --shadow: 0 6px 24px rgba(20, 71, 42, 0.08);
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--red);
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--green-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.9rem, 4vw + 0.5rem, 2.75rem);
}

h3 {
  font-size: 1.35rem;
}

h4 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.narrow {
  width: min(760px, 100% - 2.5rem);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--green-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
}

.skip-link:focus {
  top: 0.75rem;
  color: #fff;
}

.small {
  font-size: 0.925rem;
  color: var(--muted);
}

.center {
  text-align: center;
}

.lead {
  font-size: 1.2rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Placeholders for content that still needs confirmation */
.placeholder {
  display: inline-block;
  padding: 0 0.4em;
  background: #fff3c4;
  border: 1px dashed #a35a00;
  border-radius: 4px;
  color: #7a3e00;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: var(--green);
  color: #fff;
}

.btn--primary:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn--ghost {
  border-color: var(--cream);
  color: var(--cream);
}

.btn--ghost:hover {
  background: var(--cream);
  color: var(--green-dark);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 238, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--green-dark);
}

.brand img {
  width: 56px;
  height: auto;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.1;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green-dark);
  position: relative;
  transition: transform 0.2s;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  display: block;
  padding: 0.7rem 0;
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}

.site-nav__list a:hover {
  color: var(--red);
}

/* Mobile: collapsible panel below the header (only hidden when JS is active) */
@media (max-width: 879px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .site-nav__list {
    width: min(1120px, 100% - 2.5rem);
    margin-inline: auto;
    padding: 0.5rem 0 1rem;
  }

  .js .site-nav {
    display: none;
  }

  .js .site-nav.is-open {
    display: block;
  }

  html:not(.js) .nav-toggle {
    display: none;
  }

  html:not(.js) .site-nav {
    position: static;
    box-shadow: none;
    border: 0;
  }
}

@media (min-width: 880px) {
  .nav-toggle {
    display: none;
  }

  .site-nav__list {
    display: flex;
    gap: 1.5rem;
  }

  .site-nav__list a {
    padding: 0.5rem 0;
    font-size: 0.975rem;
  }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(14, 40, 24, 0.55) 0%, rgba(14, 40, 24, 0.72) 60%, rgba(14, 40, 24, 0.88) 100%);
}

.hero__content {
  padding: 3rem 0 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: clamp(150px, 30vw, 240px);
  height: auto;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.35));
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw + 0.8rem, 3.6rem);
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero__tagline {
  color: var(--cream);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.hero__quote {
  margin: 0.5rem auto 1.75rem;
  max-width: 38rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 1.5vw + 0.8rem, 1.5rem);
  line-height: 1.45;
}

.hero__quote p {
  margin: 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section--tinted {
  background: var(--bg-tint);
}

.section__intro {
  max-width: 48rem;
}

.subhead {
  margin-top: 3rem;
  font-size: 1.6rem;
}

.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 880px) {
  .section {
    padding: 5.5rem 0;
  }

  .split {
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: start;
  }
}

.prose p {
  max-width: 42rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card > :last-child {
  margin-bottom: 0;
}

.card--history {
  border-top: 4px solid var(--green);
}

.card--event {
  border-top: 4px solid var(--red);
}

.cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 680px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .cards--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

details summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
}

details[open] summary {
  margin-bottom: 0.5rem;
}

.note {
  margin-top: 1.5rem;
  font-style: italic;
  color: var(--muted);
}

/* Timelines */
.timeline {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  border-left: 2px solid var(--cream);
}

.timeline li {
  position: relative;
  padding: 0 0 0.9rem 1.25rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.45em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface);
}

.timeline__year {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 680px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-left: 4px solid var(--green);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.step p {
  margin: 0;
  font-size: 0.975rem;
}

.step h3 {
  font-size: 1.15rem;
}

.step__year {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--red);
}

.values {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

@media (min-width: 880px) {
  .values {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value {
  background: var(--green-dark);
  color: #f4f1e6;
  border-radius: var(--radius);
  padding: 1.75rem;
}

.value h3 {
  color: var(--cream);
}

.value p {
  margin: 0;
}

/* Event highlight */
.highlight {
  position: relative;
  margin: 1.5rem 0 3rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #f4f1e6;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.highlight::before {
  /* Italian tricolour accent */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #1f8a46 0 33.3%, #fff 33.3% 66.6%, var(--red) 66.6%);
}

.highlight h3 {
  color: #fff;
  font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem);
  margin-bottom: 0.1em;
}

.highlight__badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.85rem;
}

.highlight__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--cream);
}

.highlight__meta {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

@media (min-width: 780px) {
  .highlight {
    padding: 2.5rem 3rem;
  }

  .highlight__meta {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 2.5rem;
  }
}

.highlight dt,
.sponsors dt {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.highlight dt {
  color: var(--cream);
}

.highlight dd,
.sponsors dd {
  margin: 0;
}

.highlight > p:last-child {
  margin: 0;
}

/* Gallery */
.gallery {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 680px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.gallery figure {
  margin: 0;
}

.gallery__link {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 8px;
  background: var(--border);
}

.gallery__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery__link:hover img,
.gallery__link:focus-visible img {
  transform: scale(1.04);
}

.gallery figcaption {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--muted);
}

/* Lightbox */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(10, 18, 12, 0.94);
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(10, 18, 12, 0.94);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__figure {
  margin: 0;
  padding: 3.5rem 1rem 4rem;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__img {
  max-width: min(1600px, 100%);
  max-height: calc(100vh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__caption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.95rem;
}

.lightbox__btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox__btn:focus-visible {
  outline-color: var(--cream);
}

.lightbox__close {
  top: 0.75rem;
  right: 0.75rem;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev {
  left: 0.5rem;
}

.lightbox__next {
  right: 0.5rem;
}

.lightbox__counter {
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #d8d4c4;
}

/* Videos */
.videos {
  list-style: none;
  margin: 2rem 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 680px) {
  .videos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .videos {
    grid-template-columns: repeat(3, 1fr);
  }
}

.video__facade,
.video iframe {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}

.video__facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.video__facade:hover img,
.video__facade:focus-visible img {
  opacity: 1;
}

.video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  background: var(--red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.video__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}

.video__title {
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* Support */
.sponsors {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sponsors dt {
  color: var(--red);
}

/* Contact */
.contact {
  font-style: normal;
}

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

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
}

.map iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Footer */
.site-footer {
  background: var(--green-dark);
  color: #e9e4d2;
  padding: 2.5rem 0;
}

.site-footer .small {
  color: #cfc9b4;
  margin: 0;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 0.25rem;
}

.social--icons {
  margin: 0;
}

.social--icons a {
  padding: 0;
  width: 44px;
  height: 44px;
  justify-content: center;
  background: transparent;
  border-color: rgba(246, 231, 166, 0.4);
  color: var(--cream);
}

.social--icons a:hover {
  background: var(--cream);
  color: var(--green-dark);
}
