/* Alexandre Braga Lopes, visual communication.
   Static rebuild of the 2013 Wix site. Tokens below come from the Wix theme
   (theme colours color_1, color_11, color_12, color_15; fonts font_0 to font_9). */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/fonts/open-sans-latin-var.woff2") format("woff2");
}

:root {
  --c-bg: #000;            /* site background */
  --c-fg: #fff;            /* color_15: all text on black */
  --c-card: #fff;          /* color_1: gallery card */
  --c-card-text: #333;     /* color_12: gallery title and caption */
  --c-hover: rgb(0 0 0 / .3); /* color_11 at 30%: gallery hover */
  --c-focus: #ffcb05;      /* color_3: focus ring, visible on black and white */

  --font: "Open Sans", Arial, Helvetica, sans-serif;
  --fs-brand: 22px;        /* font_0 */
  --fs-menu: 14px;         /* font_1 */
  --fs-lead: 14px;         /* font_7, bold */
  --fs-body: 13px;         /* font_8 */
  --fs-small: 12px;        /* font_9 */

  --page-w: 980px;
  --gutter: 30px;
  --gallery-gap: 14px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-fg);
  font: var(--fs-body)/1.3 var(--font);
}

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

a { color: inherit; }

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

/* Component display rules must never override the hidden attribute. */
[hidden] { display: none !important; }

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

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 20;
  padding: 8px 12px; background: var(--c-fg); color: var(--c-bg);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--page-w); margin: 0 auto; }

/* Header -------------------------------------------------------------- */

.site-header {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px;
  padding: 34px var(--gutter) 24px 33px;
}

.brand {
  position: relative; display: block; flex: 0 0 auto;
  padding-left: 15px;
  font-size: var(--fs-brand); line-height: 1.1;
  text-decoration: none;
}
/* The vertical rule only runs alongside the first two lines, as on the original. */
.brand::before {
  content: ""; position: absolute; left: 0; top: 1px;
  width: 4px; height: 45px; background: var(--c-fg);
}
.brand span { display: block; }
.brand .name { max-width: 7.6em; }

.site-nav { flex: 1 1 320px; padding-top: 16px; }
.site-nav ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-nav li { flex: 1 1 auto; }
.site-nav a {
  display: block;
  padding: 13px 8px 6px;
  border-top: 1px solid var(--c-fg);
  font-size: var(--fs-menu); line-height: 1.1;
  text-transform: uppercase; text-decoration: none;
}
.site-nav a[aria-current="page"] { border-top-width: 4px; padding-top: 10px; }
.site-nav a:hover { border-top-width: 4px; padding-top: 10px; }

/* Main ------------------------------------------------------------------ */

main { padding: 30px var(--gutter) 40px; }

.dash { margin: 0 0 13px; font-size: var(--fs-body); }

/* Home: the photograph runs up behind the header, as on the Wix page. */
.home main { padding: 0; }
.hero { position: relative; margin: 0; }
.hero img { width: 100%; aspect-ratio: 980 / 649; object-fit: cover; }
.hero blockquote {
  margin: 0; padding: 20px var(--gutter) 0;
  font-size: var(--fs-body); line-height: 1.3;
}
.hero blockquote p { margin: 0; }

@media (min-width: 760px) {
  .home .site-header { min-height: 149px; }
  .home main { margin-top: -121px; }
  .hero blockquote {
    position: absolute; left: 55px; top: 53.3%;
    width: 280px; padding: 0;
  }
  /* White on the pale sky falls short of WCAG contrast on the original.
     A soft shadow lifts the text without changing the look. */
  .home .site-header, .hero blockquote { text-shadow: 0 1px 3px rgb(0 0 0 / .55); }
}

/* Biography ------------------------------------------------------------- */

.bio { max-width: 555px; }
.bio p { margin: 0; }
.bio .lead { font-size: var(--fs-lead); font-weight: 700; line-height: 1.6; margin-bottom: 2.9em; }
.bio .gap { margin-top: 1.3em; }
.bio .clients { margin-top: 1.6em; font-size: var(--fs-small); line-height: 1.6; }

.follow {
  display: flex; flex-wrap: wrap; gap: 20px 60px;
  margin: 60px 0 0; padding: 0; list-style: none;
}
.follow a {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: var(--fs-lead); font-weight: 700; text-decoration: none;
}
.follow a:hover span { text-decoration: underline; }
.follow svg { width: 30px; height: 30px; flex: none; fill: currentColor; }
.contacts .follow { flex-direction: column; gap: 14px; margin-top: 110px; }
.contacts .follow svg { width: 24px; height: 24px; }

/* Contacts -------------------------------------------------------------- */

.contact-lines { margin: 0; font-style: normal; font-size: var(--fs-body); line-height: 1.3; }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { text-decoration: underline; }

/* Portfolio grid -------------------------------------------------------- */

.portefolio main { padding-top: 0; }
/* Full 980px grid, as on Wix, only once the window leaves room for side margins. */
@media (min-width: 1040px) { .portefolio main { padding-left: 0; padding-right: 0; } }
.gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gallery-gap);
  margin: 0; padding: 0; list-style: none;
}
.card {
  display: block; height: 100%;
  border: 4px solid var(--c-card); background: var(--c-card);
  color: var(--c-card-text); text-decoration: none;
}
.card .thumb { position: relative; background: #111; }
.card img { width: 100%; aspect-ratio: 309 / 160; object-fit: cover; }
.card .thumb::after {
  content: ""; position: absolute; inset: 0;
  background: var(--c-hover); opacity: 0; transition: opacity .2s;
}
.card:hover .thumb::after, .card:focus-visible .thumb::after { opacity: 1; }
.card .caption { display: block; padding: 12px 2px 14px; }
.card .title, .card .desc {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.card .title { font-size: var(--fs-lead); font-weight: 700; line-height: 1.3; }
.card .desc { font-size: var(--fs-small); line-height: 1.3; }
.card:focus-visible { outline-offset: 3px; }

.show-more {
  display: block; margin: 12px auto 0; padding: 6px 8px;
  background: none; border: 0; color: var(--c-fg);
  font: var(--fs-small)/1.3 var(--font); text-decoration: underline; cursor: pointer;
}

@media (max-width: 759px) {
  .portefolio main { padding-left: var(--gutter); padding-right: var(--gutter); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  :root { --gutter: 16px; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .site-header { padding-left: var(--gutter); }
  .site-nav { flex-basis: 100%; padding-top: 0; }
  .site-nav ul { gap: 4px; }
  .site-nav a { padding-left: 4px; padding-right: 4px; font-size: 13px; }
}

/* Lightbox -------------------------------------------------------------- */

.lightbox {
  width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgb(0 0 0 / .94); color: var(--c-fg);
}
.lightbox::backdrop { background: rgb(0 0 0 / .94); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lb-stage {
  display: flex; align-items: center; justify-content: center;
  min-height: 0; padding: 56px 64px 12px;
}
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-info {
  width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px 24px;
  font-size: var(--fs-body); line-height: 1.4;
}
.lb-info h2 { margin: 0 0 4px; font-size: var(--fs-lead); }
.lb-info p { margin: 0; white-space: pre-line; }
.lb-info .lb-link { display: inline-block; margin-top: 4px; }
.lb-count { margin-top: 8px; font-size: var(--fs-small); opacity: .75; }
.lb-btn {
  position: absolute; display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  background: none; border: 0; color: var(--c-fg); cursor: pointer;
}
.lb-btn svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.lb-close { top: 4px; right: 4px; }
.lb-prev { left: 4px; top: 45%; }
.lb-next { right: 4px; top: 45%; }
@media (max-width: 479px) {
  .lb-stage { padding: 56px 8px 8px; }
  .lb-info { padding-bottom: 64px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; }
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: 2px var(--gutter) 60px;
  font-size: var(--fs-small); line-height: 1.3;
}
.site-footer p { margin: 0; }
.social { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.social a { display: block; padding: 2px; }
.social svg { width: 20px; height: 20px; fill: currentColor; display: block; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
