/*
Theme Name: EightyEighty
Theme URI: https://eightyeighty.ch
Author: Jürgen Baumann
Description: Avantgardistisches Swiss-Editorial WordPress-Theme für EightyEighty mit Elementor Pro, ACF Pro und Presto Player Pro Anschluss.
Version: 0.6.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: eightyeighty
*/

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --white: #fff;
  --paper: #fbfbf7;
  --soft: #f1f1eb;
  --ink: #11110f;
  --muted: #5c5b55;
  --hairline: rgba(17, 17, 15, 0.16);
  --red: #d40000;
  --red-dark: #b70000;
  --edge: clamp(18px, 3.4vw, 56px);
  --rail: clamp(54px, 7vw, 108px);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, transparent calc(var(--rail) - 1px), var(--hairline) var(--rail), transparent calc(var(--rail) + 1px)),
    linear-gradient(90deg, transparent calc(100% - var(--rail) - 1px), var(--hairline) calc(100% - var(--rail)), transparent calc(100% - var(--rail) + 1px)),
    var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 15, 0.055) 1px, transparent 1px);
  background-size: 100% 96px, 96px 100%;
  opacity: 0.28;
}

body::after {
  position: fixed;
  left: calc(var(--edge) * 0.7);
  bottom: var(--edge);
  z-index: 12;
  writing-mode: vertical-rl;
  content: "WEB / VIDEO / CONTENT-FOTOGRAFIE";
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: var(--edge) var(--edge) auto var(--edge);
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  pointer-events: none;
}

.brand,
.site-nav,
.nav-toggle {
  pointer-events: auto;
}

.brand {
  display: inline-grid;
  grid-template-columns: 54px auto;
  gap: 12px;
  align-items: center;
  width: max-content;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  line-height: 1;
}

.site-nav {
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  max-width: min(640px, calc(100vw - 220px));
  justify-content: flex-end;
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  content: "";
  background: var(--red);
  transition: transform 180ms ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
}

.chapter-mark,
.site-footer,
.chapter-link,
.study-grid span,
.project-meta span,
.project-gallery figcaption,
.form-note,
.button,
label span {
  font-family: var(--mono);
}

.chapter-mark {
  margin: 0 0 clamp(18px, 3vw, 36px);
  color: var(--ink);
  font-size: clamp(0.68rem, 0.72vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.horizontal-scroll {
  display: flex;
  width: 100vw;
  height: 100svh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  background: var(--white);
}

.home-horizontal {
  min-height: 100svh;
  overflow: hidden;
}

.horizontal-scroll::-webkit-scrollbar {
  height: 9px;
}

.horizontal-scroll::-webkit-scrollbar-track {
  background: var(--white);
}

.horizontal-scroll::-webkit-scrollbar-thumb {
  background: var(--ink);
}

.h-panel {
  position: relative;
  display: grid;
  min-width: 100vw;
  height: 100svh;
  grid-template-columns: var(--rail) repeat(10, minmax(0, 1fr)) var(--rail);
  grid-template-rows: 1fr;
  align-items: center;
  column-gap: clamp(12px, 1.5vw, 24px);
  overflow: hidden;
  scroll-snap-align: start;
  border-right: 1px solid var(--ink);
  background: var(--white);
}

.h-panel::before {
  position: absolute;
  left: var(--rail);
  top: 0;
  bottom: 0;
  width: 1px;
  content: "";
  background: var(--hairline);
}

.h-panel::after {
  position: absolute;
  right: clamp(58px, 10vw, 180px);
  top: clamp(88px, 16vh, 180px);
  width: clamp(54px, 8vw, 118px);
  height: clamp(54px, 8vw, 118px);
  content: "";
  background: var(--red);
  mix-blend-mode: multiply;
}

.h-copy {
  position: relative;
  z-index: 2;
  grid-column: 2 / span 5;
  max-width: 720px;
}

.h-copy::before {
  position: absolute;
  left: -34px;
  top: 0.22em;
  width: 12px;
  height: 42vh;
  content: "";
  border-left: 1px solid var(--ink);
  border-top: 1px solid var(--ink);
}

.h-copy.narrow {
  grid-column: 3 / span 4;
  max-width: 560px;
}

.h-copy p,
.h-teaser p,
.detail-body p,
.project-copy p,
.project-statement,
.study-grid p {
  margin: 0;
  max-width: 62ch;
  color: var(--ink);
  font-size: clamp(1rem, 1.04vw, 1.14rem);
  line-height: 1.62;
}

.h-copy p + p,
.detail-body p + p,
.project-copy p + p {
  margin-top: 1.05em;
}

.h-panel h1,
.h-panel h2,
.detail-hero h1,
.project-hero h1 {
  margin: 0;
  max-width: 760px;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.95;
}

.h-panel h1 {
  font-size: clamp(2.8rem, 6.4vw, 6.6rem);
}

.h-panel h2 {
  font-size: clamp(2.2rem, 5vw, 5rem);
}

.h-panel h1 + p,
.h-panel h2 + p {
  margin-top: clamp(24px, 4vh, 42px);
}

.h-image {
  grid-column: 7 / span 4;
  margin: 0;
}

.h-image img,
.h-teaser img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--ink);
  background: var(--soft);
  filter: grayscale(1);
}

.h-panel-intro .h-image {
  grid-column: 6 / span 5;
  transform: translateY(4vh);
}

.h-panel-intro .h-image::before,
.detail-hero::after,
.project-hero::after {
  position: absolute;
  content: "";
  background: var(--red);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.h-panel-intro .h-image::before {
  right: -7%;
  bottom: -9%;
  width: 40%;
  height: 42%;
}

.h-panel-text {
  background:
    linear-gradient(90deg, transparent 0 51%, rgba(17, 17, 15, 0.06) 51% 51.12%, transparent 51.12%),
    var(--white);
}

.h-red {
  grid-column: 8 / span 2;
  width: 100%;
  height: min(58vh, 520px);
  background: var(--red);
}

.h-teaser {
  color: var(--ink);
}

.h-teaser .chapter-mark {
  grid-column: 2 / span 2;
  align-self: start;
  margin-top: clamp(116px, 18vh, 190px);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.h-teaser h2,
.h-teaser p {
  grid-column: 3 / span 4;
}

.h-teaser h2 {
  align-self: center;
}

.h-teaser p {
  align-self: center;
  margin-top: clamp(130px, 24vh, 240px);
}

.h-teaser img {
  grid-column: 8 / span 3;
  width: min(100%, 520px);
  transform: translateY(5vh);
  transition:
    transform 240ms ease,
    filter 240ms ease;
}

.h-teaser:hover img {
  transform: translateY(3vh) scale(1.02);
  filter: grayscale(0.65);
}

.h-teaser:hover h2 {
  color: var(--red);
}

.detail-layout,
.project-layout {
  background: var(--white);
}

.detail-hero,
.project-hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: var(--rail) repeat(10, minmax(0, 1fr)) var(--rail);
  align-items: center;
  column-gap: clamp(12px, 1.5vw, 24px);
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: var(--white);
}

.detail-hero > div,
.project-hero-copy {
  grid-column: 2 / span 5;
  padding-top: clamp(96px, 14vh, 150px);
}

.detail-hero h1,
.project-hero h1 {
  font-size: clamp(2.45rem, 5.6vw, 5.7rem);
}

.detail-hero img,
.project-hero-image {
  grid-column: 8 / span 3;
}

.detail-hero img,
.project-hero-image img,
.placeholder-grid img,
.project-gallery img,
.study-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--ink);
  background: var(--soft);
  filter: grayscale(1);
}

.detail-hero::after,
.project-hero::after {
  right: clamp(48px, 9vw, 160px);
  bottom: clamp(48px, 9vh, 110px);
  width: clamp(86px, 15vw, 250px);
  height: clamp(130px, 24vh, 330px);
}

.detail-body,
.project-body {
  width: min(1180px, calc(100% - (var(--edge) * 2)));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 136px) 0;
}

.text-column,
.project-copy {
  max-width: 760px;
  border-left: 1px solid var(--ink);
  padding-left: clamp(18px, 3vw, 34px);
}

.text-column h2,
.placeholder-grid h2,
.project-copy h2,
.study-grid h2,
.study-grid h3 {
  margin: 0 0 10px;
  font-size: clamp(1.12rem, 1.75vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.placeholder-grid,
.study-grid,
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(48px, 7vw, 96px);
}

.placeholder-grid article,
.study-grid article,
.study-card,
.project-meta {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--white);
}

.placeholder-grid article {
  padding: 18px;
}

.placeholder-grid article::after,
.study-card::after {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 22px;
  height: 22px;
  content: "";
  background: var(--red);
}

.placeholder-grid img {
  margin-bottom: 18px;
}

.wide-placeholder {
  margin: clamp(52px, 8vw, 110px) 0;
}

.wide-placeholder img {
  width: min(880px, 100%);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--ink);
  filter: grayscale(1);
}

.bridge,
.bridge.small,
.final-line {
  max-width: 920px;
  margin: clamp(52px, 8vw, 110px) 0;
  font-size: clamp(1.7rem, 3.7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.02;
}

.chapter-link {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  margin-top: clamp(42px, 7vw, 84px);
  border-top: 1px solid var(--ink);
  padding-top: 18px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chapter-link span,
.chapter-link:hover {
  color: var(--red);
}

.study-grid {
  align-items: stretch;
}

.study-card,
.study-grid article {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 18px;
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.study-card:hover {
  transform: translateY(-6px);
  border-color: var(--red);
}

.study-grid img {
  margin-bottom: 18px;
}

.study-grid span {
  display: block;
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.study-grid p {
  margin-top: auto;
}

.project-hero-image {
  margin: 0;
}

.project-statement {
  margin-top: clamp(24px, 4vw, 48px);
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(260px, 0.34fr);
  gap: clamp(32px, 6vw, 84px);
}

.project-meta {
  align-self: start;
  padding: 20px;
}

.project-meta div + div {
  margin-top: 24px;
}

.project-meta span,
.project-gallery figcaption {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-meta p,
.project-meta ul {
  margin: 8px 0 0;
  padding: 0;
}

.project-meta li {
  list-style: none;
}

.project-gallery,
.project-video,
.project-nav {
  grid-column: 1 / -1;
}

.project-gallery figure {
  margin: 0;
}

.project-gallery figcaption {
  margin-top: 10px;
}

.project-video:empty {
  display: none;
}

.contact-form {
  display: grid;
  gap: 18px;
  max-width: 680px;
  margin-top: clamp(48px, 7vw, 96px);
  border: 1px solid var(--ink);
  padding: clamp(18px, 3vw, 34px);
  background: var(--white);
  box-shadow: 12px 12px 0 var(--red);
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  padding: 12px 14px;
  color: var(--ink);
}

.button {
  width: max-content;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  padding: 12px 16px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.button:hover {
  background: var(--red);
}

.page-section {
  padding: clamp(100px, 14vw, 170px) var(--edge);
}

.section-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  padding: 24px var(--edge);
  background: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 980px) {
  body::after {
    display: none;
  }

  .site-header {
    inset: 18px 18px auto 18px;
  }

  .nav-toggle {
    justify-self: end;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--white);
  }

  .nav-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--ink);
  }

  .nav-toggle span + span {
    margin-top: -15px;
  }

  .site-nav {
    position: fixed;
    inset: 76px 18px auto 18px;
    display: none;
    max-width: none;
    border: 1px solid var(--ink);
    padding: 18px;
    background: var(--white);
  }

  .site-nav.is-open,
  .site-header.is-open .site-nav {
    display: grid;
  }

  .home-horizontal {
    overflow: auto;
  }

  .horizontal-scroll {
    display: block;
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  .h-panel,
  .detail-hero,
  .project-hero {
    min-width: 0;
    height: auto;
    min-height: 100svh;
    grid-template-columns: 18px repeat(6, minmax(0, 1fr)) 18px;
    padding: 104px 0 48px;
  }

  .h-copy,
  .h-copy.narrow,
  .h-image,
  .h-panel-intro .h-image,
  .h-teaser .chapter-mark,
  .h-teaser h2,
  .h-teaser p,
  .h-teaser img,
  .detail-hero > div,
  .detail-hero img,
  .project-hero-copy,
  .project-hero-image {
    grid-column: 2 / -2;
  }

  .h-teaser .chapter-mark {
    align-self: auto;
    margin-top: 0;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .h-teaser p,
  .h-teaser img {
    margin-top: 28px;
    transform: none;
  }

  .h-red {
    grid-column: 2 / span 2;
    height: 160px;
  }

  .placeholder-grid,
  .study-grid,
  .project-gallery,
  .project-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  :root {
    --edge: 18px;
    --rail: 18px;
  }

  .brand {
    grid-template-columns: 48px;
  }

  .brand > span:last-child {
    display: none;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .h-panel h1,
  .h-panel h2,
  .detail-hero h1,
  .project-hero h1 {
    font-size: clamp(2.3rem, 13vw, 4.2rem);
  }

  .h-copy::before {
    display: none;
  }
}
