/* ============================================================
   E&D Solution GmbH — Redesign
   Monochrome system derived from the brand mark:
   charcoal ink, silver, paper white.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink-950: #0d0e10;
  --ink-900: #131417;
  --ink-800: #1b1d21;
  --gray-900: #17181b;
  --gray-600: #575c64;
  --silver-100: #eceef1;
  --silver-300: #c4c8ce;
  --silver-500: #8f949c;
  --paper: #ffffff;
  --paper-2: #f4f4f6;
  --line-dark: rgba(255, 255, 255, 0.1);
  --line-light: rgba(19, 20, 23, 0.12);
  --steel-text: linear-gradient(160deg, #f4f5f7 0%, #cfd3d9 32%, #999fa8 68%, #c9cdd4 100%);
  --ease-out: cubic-bezier(0.2, 0.6, 0.2, 1);
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

::selection { background: var(--silver-300); color: var(--ink-900); }
:focus-visible { outline: 2px solid var(--silver-500); outline-offset: 3px; }

.container { width: min(1240px, calc(100% - clamp(40px, 8vw, 96px))); margin-inline: auto; }

section[id] { scroll-margin-top: 84px; }

.skip-link {
  position: absolute; top: -48px; left: 16px; z-index: 200;
  padding: 10px 18px; background: var(--ink-900); color: var(--silver-100);
  font-size: 13px; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: 1.04;
  letter-spacing: 0.01em;
  font-weight: 700;
}
h2 { font-size: clamp(1.85rem, 3.4vw, 2.85rem); color: var(--gray-900); }

/* woven garment label — the section eyebrow */
.label {
  display: inline-flex;
  position: relative;
  padding: 9px 16px;
  border: 1px solid var(--line-light);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gray-600);
}
.label::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(19, 20, 23, 0.18);
  pointer-events: none;
}
.label-dark { border-color: var(--line-dark); color: var(--silver-500); }
.label-dark::before { border-color: rgba(255, 255, 255, 0.14); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 17px 30px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn-light, .btn-solid { background: var(--silver-100); color: var(--ink-900); }
.btn-light:hover, .btn-solid:hover { background: #fff; transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.28); color: var(--silver-300); }
.btn-ghost:hover { border-color: var(--silver-300); color: #fff; }

/* ---------- film grain for dark sections ---------- */
.grain { position: relative; isolation: isolate; }
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain > * { position: relative; z-index: 2; }

/* ---------- header ---------- */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.site-head.scrolled {
  background: rgba(13, 14, 16, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-dark);
}
.head-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 66px;
  height: auto;
  flex: none;
}
.brand-word {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: var(--silver-100);
  line-height: 1.1;
}
.brand-word em {
  display: block;
  font-style: normal;
  font-size: 9px;
  font-weight: 560;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--silver-500);
  margin-top: 4px;
}

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: clamp(22px, 2.6vw, 38px); }
.main-nav a {
  position: relative;
  font-size: 13.5px;
  font-weight: 520;
  color: #b9bdc4;
  padding-bottom: 6px;
  transition: color 0.25s;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: #fff;
  transition: right 0.28s var(--ease-out);
}
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a:hover::after, .main-nav a.active::after { right: 0; }

.head-cta { padding: 12px 22px; }

.burger {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-left: auto;
}
.burger span {
  position: absolute;
  left: 10px;
  width: 24px; height: 1.6px;
  background: var(--silver-100);
  transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out);
}
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 26px; }
.burger.open span:first-child { top: 22px; transform: rotate(45deg); }
.burger.open span:last-child { top: 22px; transform: rotate(-45deg); }

/* ---------- mobile menu ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink-950);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px clamp(24px, 8vw, 48px) 48px;
}
.menu-overlay[hidden] { display: none; }
.menu-overlay nav a {
  display: block;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  text-transform: uppercase;
  color: var(--silver-100);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-dark);
}
.menu-overlay nav a:active { color: #fff; }
.menu-contact { margin-top: 40px; display: flex; flex-direction: column; gap: 10px; }
.menu-contact a { color: var(--silver-500); font-size: 16px; }
@keyframes menu-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.menu-overlay nav li, .menu-contact { animation: menu-in 0.45s var(--ease-out) both; }
.menu-overlay nav li:nth-child(2) { animation-delay: 0.05s; }
.menu-overlay nav li:nth-child(3) { animation-delay: 0.1s; }
.menu-overlay nav li:nth-child(4) { animation-delay: 0.15s; }
.menu-contact { animation-delay: 0.22s; }
body.menu-open { overflow: hidden; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--ink-900);
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-mark {
  position: absolute;
  z-index: 1;
  top: 55%;
  right: 0;
  width: min(45vw, 720px);
  height: auto;
  transform: translateY(-50%);
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(to right, transparent 4%, #000 52%);
  mask-image: linear-gradient(to right, transparent 4%, #000 52%);
}
.hero-inner { padding: 150px 0 140px; }
.hero-label { margin-bottom: clamp(28px, 4.5vh, 48px); }
.hero-title {
  font-size: clamp(2.85rem, 8.6vw, 6.6rem);
  line-height: 0.98;
  color: var(--silver-100);
}
.line-wrap { display: block; overflow: hidden; padding-bottom: 0.06em; }
.line { display: block; }
.metal {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0 1px, rgba(255, 255, 255, 0) 1px 3px),
    var(--steel-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  max-width: 54ch;
  margin-top: clamp(24px, 4vh, 40px);
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  line-height: 1.7;
  color: var(--silver-500);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(32px, 5vh, 52px); }

/* hero entrance */
@media (prefers-reduced-motion: no-preference) {
  .line { transform: translateY(115%); animation: rise 0.95s var(--ease-out) forwards; }
  .line-wrap:nth-child(2) .line { animation-delay: 0.12s; }
  @keyframes rise { to { transform: translateY(0); } }
  .hero-label, .hero-lead, .hero-cta { opacity: 0; animation: fade-in 0.9s ease forwards; }
  .hero-label { animation-delay: 0.05s; }
  .hero-lead { animation-delay: 0.42s; }
  .hero-cta { animation-delay: 0.55s; }
  @keyframes fade-in { to { opacity: 1; } }
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.services, .works, .about { padding: clamp(88px, 11vw, 140px) 0; }
.sec-head { max-width: 640px; margin-bottom: clamp(48px, 6vw, 80px); }
.sec-head .label { margin-bottom: 26px; }
.sec-sub { margin-top: 18px; font-size: 16.5px; color: var(--gray-600); }

/* ============================================================
   LEISTUNGEN
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 1.8vw, 24px); }
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-light);
  background: var(--paper);
  padding: clamp(28px, 3.2vw, 44px);
  min-height: 320px;
  transition: background 0.35s, border-color 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.card:nth-child(1), .card:nth-child(4) { grid-column: span 7; }
.card:nth-child(2), .card:nth-child(3) { grid-column: span 5; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: auto; }
.card-icon {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border: 1px solid var(--line-light);
  color: var(--gray-900);
  transition: border-color 0.35s, color 0.35s;
}
.card-icon svg { width: 24px; height: 24px; }
.card-no {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-600);
  font-variant-numeric: tabular-nums;
  transition: color 0.35s;
}
.card h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); margin-top: 56px; transition: color 0.35s; }
.card p {
  margin-top: 14px;
  max-width: 52ch;
  font-size: 15.5px;
  color: var(--gray-600);
  transition: color 0.35s;
}
@media (hover: hover) {
  .card:hover {
    background: var(--ink-900);
    border-color: var(--ink-900);
    transform: translateY(-6px);
    box-shadow: 0 24px 48px -24px rgba(13, 14, 16, 0.45);
  }
  .card:hover h3 { color: var(--silver-100); }
  .card:hover p { color: var(--silver-500); }
  .card:hover .card-no { color: var(--silver-500); }
  .card:hover .card-icon { border-color: rgba(255, 255, 255, 0.25); color: var(--silver-100); }
}

/* ============================================================
   REFERENZEN
   ============================================================ */
.works { background: var(--paper-2); }
.work-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding-bottom: 72px; /* room for the staggered middle column */
}
.tile { position: relative; }
.work-grid .tile:nth-child(3n + 2) { top: 72px; }
.tile-media { aspect-ratio: 4 / 5; overflow: hidden; background: #e2e3e6; }
.tile-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transform: scale(1.01);
  transition: filter 0.5s ease, transform 0.8s var(--ease-out);
}
.tile-zoom img { transform: scale(1.7); transform-origin: 38% 42%; }
@media (hover: hover) {
  .tile:hover img { filter: grayscale(0); transform: scale(1.06); }
  .tile:hover .tile-zoom img, .tile-zoom:hover img { transform: scale(1.76); }
}
@media (hover: none) {
  .tile-media img { filter: none; }
}
.tile figcaption { padding-top: 15px; }
.tile figcaption strong { display: block; font-size: 15px; font-weight: 620; color: var(--gray-900); }
.tile figcaption span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--gray-600); }

/* ============================================================
   ÜBER UNS
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: start;
}
.about-copy .label { margin-bottom: 26px; }
.about-copy h2 .muted { color: #a3a7ae; }
.about-copy p:not(.label) { margin-top: 22px; max-width: 58ch; color: var(--gray-600); font-size: 16.5px; }
.about-copy h2 + p { margin-top: 30px; }

/* padding-top drops the list to the level of the h2 next to it (label + margin) */
.about-list { display: grid; gap: 14px; padding-top: 57px; }
.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 26px;
  background: var(--paper-2);
}
.stitch {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  background: var(--ink-900);
  color: var(--silver-100);
}
.stitch svg { width: 21px; height: 21px; }
.about-list strong { display: block; font-size: 15.5px; font-weight: 640; color: var(--gray-900); }
.about-list p { margin-top: 5px; font-size: 14.5px; line-height: 1.6; color: var(--gray-600); }

.partners {
  position: relative;
  margin-top: clamp(64px, 8vw, 104px);
  padding: clamp(26px, 3.2vw, 40px) clamp(24px, 3.4vw, 48px);
  border: 1px solid var(--line-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.partners::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(19, 20, 23, 0.15);
  pointer-events: none;
}
.partners-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gray-600);
}
.partners ul { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 64px); }
.partners li {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 720;
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  letter-spacing: 0.08em;
  color: var(--gray-900);
}

/* ============================================================
   KONTAKT
   ============================================================ */
.contact { background: var(--ink-900); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(48px, 7vw, 110px);
  padding-top: clamp(130px, 16vw, 210px);
  padding-bottom: clamp(130px, 16vw, 210px);
  align-items: center;
}
.contact h2 { color: var(--silver-100); font-size: clamp(2rem, 4.2vw, 3.4rem); }
.contact-copy .label { margin-bottom: 26px; }
.contact-sub { margin-top: 24px; max-width: 44ch; color: var(--silver-500); font-size: 16.5px; }

.contact-list li {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--line-dark);
}
.contact-list li:last-child { border-bottom: 1px solid var(--line-dark); }
.contact-list li > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-500);
}
.contact-list a {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 560;
  color: var(--silver-100);
  transition: color 0.25s;
}
.contact-list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.contact-list address { font-size: 16px; line-height: 1.65; color: var(--silver-300); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot { background: var(--ink-950); border-top: 1px solid var(--line-dark); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 2fr) minmax(0, 3fr) minmax(0, 2fr);
  gap: 40px clamp(32px, 5vw, 80px);
  padding: clamp(56px, 7vw, 88px) 0 clamp(48px, 6vw, 72px);
}
.foot-brand { display: inline-flex; align-items: center; gap: 12px; }
.foot-brand .brand-mark { width: 54px; opacity: 0.9; }
.foot-brand span { font-size: 14px; font-weight: 600; color: var(--silver-100); }
.foot-about p {
  margin-top: 20px;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--silver-500);
}
.foot-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-500);
  margin-bottom: 20px;
}
.foot-col ul { display: grid; gap: 12px; }
.foot-col a { font-size: 14.5px; color: var(--silver-300); transition: color 0.25s; }
.foot-col a:hover { color: #fff; }
.foot-col address { font-size: 14.5px; line-height: 1.7; color: var(--silver-500); }
.foot-partners li {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--silver-300);
}
.foot-bottom { border-top: 1px solid var(--line-dark); }
.foot-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
  padding: 24px 0;
}
.foot-legal { font-size: 13px; color: var(--silver-500); }
.foot-meta { display: flex; gap: 22px; font-size: 13px; color: #565b63; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
html.js .rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
  transition-delay: var(--rv-delay, 0s);
}
html.js .rv.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js .rv { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .card:nth-child(n) { grid-column: span 6; }
}

@media (max-width: 880px) {
  .main-nav, .head-cta { display: none; }
  .burger { display: block; }

  .work-grid { grid-template-columns: repeat(2, 1fr); padding-bottom: 56px; }
  .work-grid .tile:nth-child(3n + 2) { top: 0; }
  .work-grid .tile:nth-child(2n) { top: 56px; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-list { padding-top: 0; }

  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .card:nth-child(n) { grid-column: span 12; min-height: 0; }
  .card h3 { margin-top: 40px; }

  .hero-inner { padding: 130px 0 110px; }
  .hero-mark { right: -28%; width: 115vw; opacity: 0.22; top: 50%; }
}

@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; padding-bottom: 0; }
  .work-grid .tile:nth-child(n) { top: 0; }
  .tile-media { aspect-ratio: 5 / 4; }

  .partners { flex-direction: column; align-items: flex-start; }
  .contact-list li { grid-template-columns: 1fr; gap: 8px; }

  .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .foot-bottom-inner { flex-direction: column; align-items: flex-start; }
}
