* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: #171717;
  background: #fff;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", sans-serif;
}

.site-header {
  height: 128px;
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 0 10px 0 11px;
  position: relative;
  background: #fff;
  border-bottom: 1px solid #f2f2f2;
}

.brand {
  width: 116px;
  flex: 0 0 116px;
  margin-left: 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 98.8px;
  height: auto;
  display: block;
  margin: 10px 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: #242424;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
}

.main-nav a:hover { color: #8b88c8; }

/* Fixed art-directed 5x7 modular grid. Base cells are squares (the whole
   grid is given a 5:7 width:height aspect-ratio, matching 5 columns of
   square cells stacked 7 rows deep), and every image spans an explicit,
   named region of that grid — never auto-placed. */
.portfolio {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(7, 1fr);
  grid-template-areas:
    "a a b b c"
    "a a d e e"
    "f f g e e"
    "f f h h i"
    "j k h h l"
    "m m n n o"
    "p q n n r";
  aspect-ratio: 5 / 7;
  gap: 12px;
  padding: 0 31px;
}

.ga-a { grid-area: a; }
.ga-b { grid-area: b; }
.ga-c { grid-area: c; }
.ga-d { grid-area: d; }
.ga-e { grid-area: e; }
.ga-f { grid-area: f; }
.ga-g { grid-area: g; }
.ga-h { grid-area: h; }
.ga-i { grid-area: i; }
.ga-j { grid-area: j; }
.ga-k { grid-area: k; }
.ga-l { grid-area: l; }
.ga-m { grid-area: m; }
.ga-n { grid-area: n; }
.ga-o { grid-area: o; }
.ga-p { grid-area: p; }
.ga-q { grid-area: q; }
.ga-r { grid-area: r; }

.project {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #edf2eb;
}

.project img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.project:hover img { transform: scale(1.015); filter: saturate(1.05); }

.about {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}

.about h2 {
  margin: 0 0 16px;
  display: flex;
  justify-content: center;
}

.about h2 img {
  width: 105px;
  height: auto;
  display: block;
}

.about p {
  margin: 0;
  color: #444;
  font-size: 16px;
  line-height: 1.6;
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 100;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, .85);
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: default;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.cookie-banner {
  display: none;
  position: fixed;
  z-index: 90;
  left: 20px;
  right: 20px;
  bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  background: #171717;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

.cookie-banner.open { display: flex; }

.cookie-banner p {
  margin: 0;
  max-width: 520px;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.cookie-accept,
.cookie-reject {
  height: 36px;
  padding: 0 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.cookie-accept {
  border: 0;
  background: #fff;
  color: #171717;
}

.cookie-reject {
  border: 1px solid rgba(255, 255, 255, .5);
  background: transparent;
  color: #fff;
}

footer {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 30px;
  background: #f7f7f7;
}

footer a { color: #222; }

.cookie-settings-link {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.footer-brand {
  display: block;
  text-decoration: none;
}

.footer-brand img {
  width: 84px;
  height: auto;
  display: block;
}

/* The exact 5x7 art-directed matrix is a desktop-only composition — below
   that, CSS multi-column gives a separate, simpler packed layout (same
   images, same relative grouping, but auto-flowing instead of pinned to
   the desktop matrix), per the brief's responsive guidance. */
@media (max-width: 900px) {
  .site-header { height: 98px; padding: 0 16px; gap: 12px; }
  .brand { width: 82px; flex-basis: 82px; }
  .brand img { width: 72.8px; }
  .main-nav { gap: 14px; }
  .main-nav a { font-size: 11px; }

  .portfolio {
    display: block;
    aspect-ratio: auto;
    column-count: 3;
    column-gap: 8px;
    padding: 6px 8px 24px;
  }
  .project {
    grid-area: auto;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
    break-inside: avoid;
  }
  .project:nth-child(6n+1) { aspect-ratio: 4 / 5; }
  .project:nth-child(6n+2) { aspect-ratio: 16 / 10; }
  .project:nth-child(6n+3) { aspect-ratio: 1 / 1; }
  .project:nth-child(6n+4) { aspect-ratio: 3 / 4; }
  .project:nth-child(6n+5) { aspect-ratio: 4 / 3; }
  .project:nth-child(6n) { aspect-ratio: 1 / 1; }
}

@media (max-width: 520px) {
  .portfolio { column-count: 1; column-gap: 5px; padding: 5px; }
  .project { margin-bottom: 5px; }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .cookie-settings-link { margin-left: 0; }
}
