﻿/* Variabili */
:root {
  --color-primary: #7022b7;
  --color-bg: #000000;
  --color-hover: #aaaaaa;
}

/* Reset base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  display: flex;
  flex-direction: row;
  background-color: var(--color-bg);
  color: var(--color-primary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 16px;
  padding: 0.5rem 0;
  min-height: 100dvh;
  gap: 0.5rem;
}
::selection {
  color: var(--color-bg);
  background: var(--color-hover);
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
  body {
    font-size: 14px;
  }
}

/* Utility layout */
.flex-row { display: flex; flex-direction: row; }
.flex-column { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.grow { flex-grow: 1; }
.justify-center { justify-content: center; }
.justify-space { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }
.align-end { align-items: flex-end; }

/* Tipografia */
h2 {
  writing-mode: vertical-rl;
  text-transform: uppercase;
  white-space: nowrap;
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 100ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
a:active {
  color: var(--color-hover);
}
@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--color-hover);
  }
}

/* Componenti: frame & words */
.frame,
.words {
  list-style: none;
  line-height: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.frame li,
.words li {
  padding: 0 2rem;
  cursor: pointer;
  font-size: 1rem;
  transition: font-size 100ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.frame li:hover,
.words li.hover {
  font-size: 2.5rem;
}
.words li {
  filter: blur(4px);
  transition: filter 200ms ease;
}
.words li.hover {
  filter: none;
}

/* Immagini */
.line {
  border-left: 1px solid var(--color-primary);
  height: 100%;
}
.images {
  position: relative;
  overflow: hidden;
  min-height: 35vh;
}
.images img {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 98%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.images img.hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 1280px) {
  .frame,
  .words {
    line-height: 1.3rem;
  }
  .frame li:hover,
  .words li.hover {
    font-size: 2.25rem;
  }
}
@media (max-width: 1024px) {
  .frame,
  .words {
    line-height: 1.2rem;
  }
  .frame li:hover,
  .words li.hover {
    font-size: 2rem;
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    padding: 0 0.5rem;
    justify-content: space-between;
  }
  main {
    justify-content: space-between;
  }
  main.reverse {
    flex-direction: column-reverse;
  }
  section {
    justify-content: center;
  }
  .flex-row {
    flex-direction: column;
  }
  .flex-column {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .flex-1,
  .flex-2 {
    flex: unset;
  }
  .frame,
  .words {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.2rem;
  }
  .frame li,
  .words li {
    padding: 0.375rem 0.5rem;
    font-size: 1rem;
  }
  .frame li:hover,
  .words li.hover {
    font-size: 1.5rem;
  }
  .hide {
    display: none;
  }
  h2 {
    writing-mode: horizontal-tb;
  }
}
