/* ============================================================
   Francisco Borges Ribeiro — Crowdfunding site
   Mobile-first stylesheet. Base rules target ~375px and up;
   breakpoints layer on at 480 / 768 / 1024 / 1280.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --text: #f5f5f4;
  --muted: #9a9a97;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .28);
  --accent: #ffffff;
  --accent-ink: #0a0a0a;

  --font-display: 'Bodoni Moda', Georgia, serif;
  --font-quote: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --header-h: 64px;
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
code { font-family: var(--font-body); }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* ---------- Layout helpers ---------- */
.section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.55rem + 1.5vw, 2.5rem);
  line-height: 1.1;
  margin: .5rem 0 2rem;
}

.kicker {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(.9rem, .85rem + .2vw, 1rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .75rem 1.25rem;
  z-index: 300;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: .875rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Buttons & cards ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.375rem;
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--accent);
}

.card {
  display: block;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  padding: 1.75rem 1.5rem;
  transition: background .15s ease;
}
.card:hover, .card:focus-visible { background: var(--panel-2); }

/* Grid-of-cards hairline pattern: container bg = line color, gap = 1px */
.hairline-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

@media (max-width: 768px) {
  .nav-logo {
    font-size: 1.25rem;
  }
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle-bar {
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 1.25rem 2rem;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s;
}
.nav-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
}

.lang-switch { display: flex; gap: .5rem; }
.lang-btn {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.lang-btn.is-active { border-color: var(--accent); color: var(--text); }

.nav-cta { align-self: flex-start; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 2.25rem;
    background: transparent;
    border: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .nav-links { flex-direction: row; gap: 1.75rem; }
  .nav-links a { min-height: auto; }
  .lang-switch { gap: .375rem; }
  .lang-btn { flex: none; min-width: 34px; min-height: 30px; padding: 0 .5rem; }
  .nav-cta { align-self: auto; }
  .nav-inner { padding: 0 2rem; }
}

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 3.5rem; border-top: 0; }

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.25rem, 1.6rem + 4vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: .5rem 0 0;
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  max-height: 55vh;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 2px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .65);
}

.hero-subtitle {
  font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
}

.progress-block {
  margin-top: 1.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.375rem;
}
.progress-bar {
  height: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 1.1s ease;
}
.progress-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
  margin-top: .875rem;
  font-size: .875rem;
}
.progress-stat strong {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rate-note { font-size: .75rem; color: var(--muted); margin-top: .625rem; }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.875rem;
}
.hero-cta-row .btn { flex: 1 1 auto; }

@media (min-width: 480px) {
  .hero-cta-row .btn { flex: 0 1 auto; }
}

@media (min-width: 768px) {
  .hero { padding: 3.5rem 0 4.5rem; }
  .hero-inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    grid-template-areas: "head media" "body media";
    align-items: start;
    gap: 1rem 3rem;
    padding: 0 2rem;
  }
  .hero-head { grid-area: head; }
  .hero-media { grid-area: media; }
  .hero-body { grid-area: body; }
  .hero-media img { aspect-ratio: 3 / 4; max-height: 70vh; }
}

@media (min-width: 1024px) {
  .hero { padding: 5rem 0 6rem; }
  .hero-inner { gap: 1rem 4rem; }
}

/* ---------- My Story ---------- */
.story-grid {
  grid-template-columns: 1fr;
  margin-top: .5rem;
}
.story-block { background: var(--bg); padding: 1.75rem 1.5rem; }
.story-block h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 .75rem;
}
.story-block p { line-height: 1.65; }

.credits { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.credits-toggle {
  min-height: 44px;
  padding: 0 1.125rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
}
.credits-toggle:hover { border-color: var(--accent); }

.credits-list-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.credits-list-wrap.is-open { max-height: 900px; }
.credits-list li {
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .9375rem;
  color: var(--muted);
}
.credits-list li:first-child { padding-top: 1.25rem; }

@media (min-width: 768px) {
  .story-grid { grid-template-columns: 1fr 1fr; }
  .credits-list { column-count: 2; column-gap: 2.5rem; }
  .credits-list li { break-inside: avoid; }
}

/* ---------- Testimonials ---------- */
.testimonials { padding-bottom: 0; }
.testimonials .section-inner { margin-bottom: 2rem; }

.testimonial-track {
  display: flex;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: 1.25rem;
  padding: 0 1.25rem 0 0;
}
.testimonial-track::-webkit-scrollbar { height: 6px; }
.testimonial-track::-webkit-scrollbar-thumb { background: var(--line-strong); }

.testimonial-card {
  scroll-snap-align: start;
  flex: 0 0 82%;
  background: var(--bg);
  padding: 2rem 1.5rem;
}
.testimonial-card:first-child { margin-left: 1.25rem; }
.testimonial-card p {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.testimonial-card footer {
  font-family: var(--font-body);
  font-size: .8125rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (min-width: 480px) {
  .testimonial-card { flex-basis: 70%; }
}
@media (min-width: 768px) {
  .testimonial-track { padding-right: 2rem; scroll-padding-left: 2rem; }
  .testimonial-card:first-child { margin-left: 2rem; }
  .testimonial-card { flex-basis: 44%; }
}
@media (min-width: 1024px) {
  .testimonial-card { flex-basis: 31%; }
}

/* ---------- My Work ---------- */
.work-links { grid-template-columns: 1fr; margin-top: 1.5rem; }
.work-card {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .875rem;
}
@media (min-width: 768px) { .work-links { grid-template-columns: 1fr 1fr; } }

/* ---------- Gallery ---------- */
.gallery-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}
.gallery-item { background: var(--bg); position: relative; overflow: hidden; }
.gallery-item img {
  width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  object-position: var(--pos-x, 50%) var(--pos-y, 50%);
  transform: scale(max(var(--zoom, 1), 1));
  transform-origin: var(--pos-x, 50%) var(--pos-y, 50%);
}
.gallery-placeholder {
  aspect-ratio: 4 / 5;
  background: var(--panel-2);
  border: 1px dashed var(--line-strong);
}
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .5rem .625rem;
  font-size: .6875rem;
  letter-spacing: .02em;
  color: var(--text);
  background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent);
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Journey: budget + transparency ---------- */
.budget-list { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--line);
}
.budget-amount { font-family: var(--font-body); font-weight: 700; font-size: 1.0625rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

.transparency {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 2px;
}
.transparency h3 {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .8125rem;
  color: var(--muted);
  margin: 0 0 .875rem;
}
.transparency p { line-height: 1.65; }
.transparency ul { margin: .875rem 0 0; padding-left: 1.125rem; list-style: disc; }
.transparency li { margin: 0 0 .5rem; line-height: 1.55; }
.transparency-pending { margin-top: 1.25rem; font-size: .8125rem; color: var(--muted); }

/* ---------- Contribute ---------- */
.contribute-note {
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
  margin: .75rem 0 0;
  max-width: 90em;
}
.payment-cards { grid-template-columns: 1fr; margin-top: 1.5rem; }
.payment-card { background: var(--bg); padding: 1.75rem 1.5rem; }
.payment-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 .75rem; font-weight: 600; }
.payment-card p { color: var(--muted); line-height: 1.6; margin: 0 0 1.25rem; }
.bank-line { margin: 0 0 1rem; font-size: .9375rem; color: var(--muted); }

.copy-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.copy-row code {
  font-size: .875rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: .625rem .875rem;
  border-radius: 2px;
  letter-spacing: .01em;
  word-break: break-all;
}
.copy-btn { padding: 0 1rem; font-size: .75rem; }
.copy-btn.is-copied { border-color: var(--accent); }

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

/* ---------- Follow ---------- */
.follow-links { grid-template-columns: 1fr; margin-top: 1.5rem; }
.follow-link {
  text-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .875rem;
}
@media (min-width: 768px) { .follow-links { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { padding: 2.5rem 0 3rem; text-align: center; }
.site-footer p { margin: .375rem 0; color: var(--muted); font-size: .8125rem; }

/* ---------- Wide screens: cap container growth ---------- */
@media (min-width: 1280px) {
  .section-inner, .hero-inner, .nav-inner { padding-left: 0; padding-right: 0; }
}
