/* Anneke Kleimann — static rebuild of the former Lay Theme design.
   Desktop/tablet: free 12/28-column grid per page. Phone (<= 600px): one column. */

:root {
  --font: helvetica, sans-serif;
  --text-size: 25px;
  --accent: #0000ff;
  --header-height: 60px;
}

html {
  overflow-y: scroll;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: var(--font);
  font-weight: 300;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

/* --- header ------------------------------------------------------------ */

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-title {
  position: absolute;
  top: 16px;
  left: 5vw;
  color: #000;
  font-size: var(--text-size);
  line-height: 30px;
}

.site-nav ul {
  position: absolute;
  top: 14px;
  right: 5vw;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: #000;
  font-size: var(--text-size);
  line-height: 28px;
}

.site-title:hover,
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.burger {
  display: none;
}

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

.grid {
  padding: var(--top) var(--margin) var(--bottom);
}

.row {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
  margin-bottom: var(--gap, var(--row-gap));
}

.row:last-child {
  margin-bottom: 0;
}

.item {
  display: flow-root; /* keep nested margins inside the item, as Lay does */
  min-width: 0;
}

.align-top { align-self: start; }
.align-middle { align-self: center; }
.align-bottom { align-self: end; }

.item-thumb:hover img {
  filter: brightness(0.75);
}

.video {
  position: relative;
  height: 0;
}

.video iframe,
.video-consent {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-consent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 5%;
  box-sizing: border-box;
  background: #f2f2f2;
  color: #000;
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
}

/* Play triangle, drawn with borders. */
.video-play {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 22px 0 22px 38px;
  border-color: transparent transparent transparent currentColor;
}

.video-consent:hover {
  color: var(--accent);
}

/* --- text -------------------------------------------------------------- */

.text {
  font-size: var(--text-size);
  line-height: 1.2;
  overflow-wrap: break-word;
}

/* Lay spaces only the direct children of a text block; nested markup keeps
   browser defaults. */
.text > * {
  margin-top: 0;
  margin-bottom: 20px;
}

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

.text a:hover {
  color: var(--accent) !important;
}

.text a:hover span {
  color: inherit !important;
}

.text table {
  border-collapse: collapse;
  font: inherit;
}

.text td {
  padding: 1px;
}

/* --- footer & project arrows ------------------------------------------ */

.project-arrow {
  position: fixed;
  z-index: 5;
  top: 50%;
  padding: 20px;
  color: #000;
  font-size: 20px;
  line-height: 1;
  transform: translateY(-50%);
}

.project-arrow:hover {
  color: var(--accent);
}

.project-arrow.prev {
  left: 0;
  transform: translateY(-50%) scaleX(-1);
}

.project-arrow.next {
  right: 0;
}

/* --- phone ------------------------------------------------------------- */

@media (max-width: 600px) {
  :root {
    --text-size: 16px;
    --header-height: 40px;
  }

  .site-header {
    background: #fff;
    transform: none !important;
  }

  .site-title {
    top: 12px;
    font-size: 16px;
    line-height: 16px;
  }

  .burger {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 52px;
    height: var(--header-height);
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .burger::before,
  .burger::after {
    position: absolute;
    right: 17px;
    width: 16px;
    height: 1px;
    background: #000;
    content: "";
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .burger::before { top: 16px; }
  .burger::after { top: 23px; }

  .burger[aria-expanded="true"]::before { top: 20px; transform: rotate(45deg); }
  .burger[aria-expanded="true"]::after { top: 20px; transform: rotate(-45deg); }

  .site-nav {
    display: none;
  }

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

  .site-nav ul {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: block;
  }

  .site-nav li a {
    display: block;
    padding-left: 10px;
    border-bottom: 1px solid #fff;
    background: #fff;
    font-size: 15px;
    line-height: 35px;
  }

  .grid {
    padding: 5vw;
  }

  main .grid {
    padding-top: calc(var(--header-height) + 5vw);
  }

  .row {
    display: block;
    margin: 0;
  }

  .item {
    margin-bottom: 4.5vw;
  }

  .grid > .row:last-child > .item:last-child {
    margin-bottom: 0;
  }

  .project-arrow {
    display: none;
  }
}
