/* HAMA – Maler & Lackierer
   ------------------------------------------------------------
   Tokens, base, components, sections. One stylesheet, no build.
*/

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../assets/fonts/BricolageGrotesque-normal.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/InstrumentSans-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* colour: a freshly painted wall, graphite text, the logo's three primaries */
  --wall: #f2f1ec;
  --wall-2: #e8e6df;
  --wall-3: #dcd9d0;
  --paper: #ffffff;
  --ink: #1f2226;
  --ink-2: #4b5058;
  --ink-3: #7a7f88;
  --line: #d3d0c7;
  --blue: #1f4e9e;
  --blue-deep: #163a77;
  --red: #c4262e;
  --yellow: #f2b21b;
  --logo-grey: #b1b1b4;

  /* type */
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --fs-0: 0.875rem;   /* 14 */
  --fs-1: 1rem;       /* 16 */
  --fs-2: 1.125rem;   /* 18 */
  --fs-3: 1.375rem;   /* 22 */
  --fs-4: clamp(1.5rem, 1.15rem + 1.2vw, 2rem);
  --fs-5: clamp(2rem, 1.4rem + 2.2vw, 3.375rem);
  --fs-6: clamp(2.75rem, 1.6rem + 5.2vw, 6.25rem);

  /* layout */
  --max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5rem, 6vw + 2rem, 9rem);
  --radius: 2px;
  --header-h: 4.5rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
p + p { margin-top: 1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: var(--radius); }
::selection { background: var(--yellow); color: var(--ink); }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute; left: var(--gutter); top: -100%;
  background: var(--ink); color: var(--wall); padding: .6rem 1rem; z-index: 100; border-radius: var(--radius);
}
.skip:focus { top: .75rem; }

/* the signature: three test strokes in the logo's primaries */
.strokes { display: flex; gap: .5rem; align-items: center; }
.strokes span { display: block; height: 6px; border-radius: 3px; }
.strokes span:nth-child(1) { width: 4.5rem; background: var(--blue); }
.strokes span:nth-child(2) { width: 2.25rem; background: var(--red); }
.strokes span:nth-child(3) { width: 3.25rem; background: var(--yellow); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .9rem 1.4rem; border-radius: var(--radius);
  font-weight: 500; font-size: var(--fs-1); line-height: 1; text-decoration: none;
  border: 1px solid var(--ink); background: var(--ink); color: var(--wall);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn svg { width: 1.05em; height: 1.05em; }

.textlink { font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); transition: text-decoration-color .2s; }
.textlink:hover { text-decoration-color: currentColor; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
/* Blur lives on a pseudo-element: a backdrop-filter on .header itself would
   turn it into the containing block for the fixed mobile navigation. */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(242, 241, 236, .88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header .wrap { position: relative; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { height: 2.35rem; width: auto; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--body); font-weight: 400; font-size: .8rem; color: var(--ink-2); letter-spacing: 0; }

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); }
.nav a { font-size: var(--fs-1); font-weight: 500; text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav .nav-phone { color: var(--ink); display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); font-variant-numeric: tabular-nums; }
.nav .nav-phone:hover { border-color: var(--ink); }
.nav .nav-phone svg { width: 1rem; height: 1rem; }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; margin-right: -.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .3s var(--ease), opacity .2s; }

@media (max-width: 860px) {
  .brand-name { display: none; }
  .nav-toggle { display: block; position: relative; z-index: 60; }
  .nav {
    position: fixed; inset: 0; z-index: 55;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.75rem; padding: var(--gutter);
    background: var(--wall);
    transform: translateY(-100%); visibility: hidden;
    transition: transform .45s var(--ease), visibility 0s .45s;
  }
  .nav a { font-family: var(--display); font-size: 2.25rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
  .nav .nav-phone { font-family: var(--body); font-size: 1.125rem; font-weight: 500; border: 0; padding: 0; margin-top: 1rem; color: var(--ink-2); }
  body.nav-open .nav { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  body.nav-open { overflow: hidden; }
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  min-height: calc(100svh - var(--header-h));
}
.hero-copy {
  padding-block: clamp(3rem, 8vh, 7rem) clamp(3rem, 6vh, 5rem);
  padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  padding-right: clamp(1.5rem, 5vw, 5rem);
  display: flex; flex-direction: column; justify-content: center;
}
.hero-kicker { font-size: var(--fs-1); color: var(--ink-2); margin-bottom: 1.5rem; }
.hero h1 {
  font-size: var(--fs-6);
  font-weight: 640;
  line-height: .96;
  letter-spacing: -0.035em;
  max-width: 11ch;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; }
.hero .strokes { margin-top: 2rem; }
.hero-lead { margin-top: 2rem; font-size: var(--fs-3); line-height: 1.45; color: var(--ink-2); max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 2.5rem; align-items: center; }
.hero-actions .textlink { font-size: var(--fs-1); }

.hero-media { position: relative; min-height: 60vh; overflow: hidden; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }

/* the one page-load moment */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line > span { transform: translateY(110%); animation: rise .9s var(--ease) forwards; }
  .hero h1 .line:nth-child(2) > span { animation-delay: .08s; }
  .hero .strokes span { transform-origin: left; transform: scaleX(0); animation: stroke .7s var(--ease) forwards; }
  .hero .strokes span:nth-child(1) { animation-delay: .45s; }
  .hero .strokes span:nth-child(2) { animation-delay: .55s; }
  .hero .strokes span:nth-child(3) { animation-delay: .65s; }
  .hero-kicker, .hero-lead, .hero-actions { opacity: 0; animation: fade .8s var(--ease) forwards; }
  .hero-kicker { animation-delay: .05s; }
  .hero-lead { animation-delay: .35s; }
  .hero-actions { animation-delay: .5s; }
  .hero-media { clip-path: inset(0 0 0 100%); animation: unveil 1.1s var(--ease) .15s forwards; }
  .hero-media img { transform: scale(1.06); animation: settle 1.6s var(--ease) .15s forwards; }
}
@keyframes rise { to { transform: none; } }
@keyframes stroke { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes unveil { to { clip-path: inset(0); } }
@keyframes settle { to { transform: none; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding-right: var(--gutter); padding-block: 3.5rem 3rem; }
  .hero-media { min-height: 0; aspect-ratio: 4 / 3; }
  .hero-media img { position: static; height: 100%; }
}

/* ---------- facts strip ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.facts div { padding: 1.5rem 1.75rem 1.5rem 0; font-size: var(--fs-1); color: var(--ink-2); }
.facts div + div { border-left: 1px solid var(--line); padding-left: 1.75rem; }
.facts strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: .15rem; }
.facts a { text-decoration: none; }
@media (max-width: 720px) {
  .facts .wrap { grid-template-columns: 1fr; }
  .facts div { padding: 1.1rem 0; }
  .facts div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
}

/* ---------- sections ---------- */
.section { padding-block: var(--section); }
.section-head { max-width: 62ch; }
.section-head h2 { font-size: var(--fs-5); }
.section-head p { margin-top: 1.25rem; color: var(--ink-2); font-size: var(--fs-2); max-width: 56ch; }

/* ---------- services (Farbtonkarte) ---------- */
.services-grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.services-intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.services-intro h2 { font-size: var(--fs-5); }
.services-intro p { margin-top: 1.25rem; color: var(--ink-2); }
.services-intro .btn { margin-top: 2rem; }
.services-groups > .services-group-title { margin-top: 3rem; }
.services-groups > .services-group-title:first-child { margin-top: 0; }
.services-group-title { font-size: var(--fs-1); font-family: var(--body); font-weight: 500; color: var(--ink-3); margin-bottom: .75rem; letter-spacing: 0; line-height: 1.4; }
.services { list-style: none; border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.75rem;
  padding: 1.75rem 0; border-bottom: 1px solid var(--line);
}
.swatch { text-align: left; }
.swatch i {
  display: block; width: 4.5rem; height: 4.5rem; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.swatch small { display: block; margin-top: .45rem; font-size: .72rem; line-height: 1.3; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.service h4 { font-size: var(--fs-4); font-weight: 600; letter-spacing: -0.02em; }
.service p { margin-top: .5rem; color: var(--ink-2); font-size: var(--fs-1); max-width: 52ch; }
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .services-intro { position: static; }
}
@media (max-width: 480px) {
  .service { grid-template-columns: 3.5rem 1fr; gap: 1.25rem; }
  .swatch i { width: 3.5rem; height: 3.5rem; }
}

/* ---------- band ---------- */
.band { background: var(--wall-2); }

/* ---------- projects ---------- */
.gallery { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.gallery-group { grid-column: 1 / -1; font-family: var(--body); font-size: var(--fs-1); font-weight: 500; color: var(--ink-3); padding-top: 2.5rem; padding-bottom: .25rem; border-bottom: 1px solid var(--line); letter-spacing: 0; }
.gallery-group:first-child { padding-top: 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--wall-2); }
.gallery figcaption { margin-top: .65rem; font-size: var(--fs-0); color: var(--ink-2); line-height: 1.45; }
.gallery figcaption b { font-weight: 500; color: var(--ink); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.about-media img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
.about-media figcaption { margin-top: .65rem; font-size: var(--fs-0); color: var(--ink-2); }
.about-copy h2 { font-size: var(--fs-5); }
.about-copy > p { margin-top: 1.25rem; color: var(--ink-2); }
.about-copy p a { color: var(--ink); font-weight: 500; }
.about-copy .about-slogan { margin-top: 2rem; font-family: var(--display); font-size: var(--fs-4); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.about-copy .strokes { margin-top: 1rem; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }

/* ---------- call band ---------- */
.call { position: relative; color: #fff; isolation: isolate; overflow: hidden; }
.call img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.call::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(31,34,38,.86) 0%, rgba(31,34,38,.55) 60%, rgba(31,34,38,.3) 100%); }
.call .wrap { padding-block: clamp(4rem, 10vw, 8rem); }
.call h2 { font-size: var(--fs-5); max-width: 18ch; }
.call p { margin-top: 1.25rem; max-width: 46ch; color: rgba(255,255,255,.82); }
.call .btn { margin-top: 2rem; background: #fff; border-color: #fff; color: var(--ink); }
.call .btn:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.contact-copy h2 { font-size: var(--fs-5); }
.contact-copy > p { margin-top: 1.25rem; color: var(--ink-2); }
.contact-list { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.contact-list div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-1); }
.contact-list dt { color: var(--ink-3); }
.contact-list dd { margin: 0; }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }
.contact-list .sub { display: block; color: var(--ink-2); font-size: var(--fs-0); margin-top: .15rem; }

.direct { background: var(--paper); padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius); border: 1px solid var(--line); }
.direct h3 { font-size: var(--fs-4); }
.direct > p { margin-top: .75rem; color: var(--ink-2); }
.direct .direct-hint { margin-top: 1.75rem; font-size: var(--fs-1); color: var(--ink); }
.direct-list { margin-top: .5rem; padding-left: 1.2rem; color: var(--ink-2); font-size: var(--fs-1); }
.direct-list li + li { margin-top: .3rem; }
.direct-actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 2rem; }
.direct-actions .btn { word-break: break-word; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 3.5rem 2.5rem; font-size: var(--fs-1); color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer .brand { align-items: flex-start; }
.footer-grid p { margin-top: 1rem; max-width: 34ch; }
.footer h4 { font-family: var(--body); font-size: var(--fs-1); font-weight: 500; color: var(--ink); margin-bottom: .75rem; }
.footer ul { list-style: none; display: grid; gap: .5rem; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: var(--fs-0); color: var(--ink-3); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- legal pages ---------- */
.page { padding-block: clamp(3rem, 6vw, 6rem) var(--section); }
.page-head h1 { font-size: var(--fs-5); }
.page-head p { margin-top: 1rem; color: var(--ink-2); }
.prose { margin-top: 3rem; max-width: 68ch; }
.prose h2 { font-size: var(--fs-4); margin-top: 2.75rem; }
.prose h3 { font-size: var(--fs-3); margin-top: 1.75rem; }
.prose p, .prose ul { margin-top: .9rem; color: var(--ink-2); font-size: var(--fs-1); }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .35rem; }
.prose address { font-style: normal; margin-top: .9rem; color: var(--ink); font-size: var(--fs-1); line-height: 1.6; }
.prose a { color: var(--ink); }
.prose .card { margin-top: 1.25rem; padding: 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.prose .card p { margin-top: .5rem; }
.prose .card p:first-child { margin-top: 0; }

/* ---------- 404 ---------- */
.notfound { min-height: calc(100svh - var(--header-h)); display: grid; place-content: center; text-align: left; padding-block: 4rem; }
.notfound h1 { font-size: var(--fs-6); letter-spacing: -0.035em; line-height: .95; }
.notfound p { margin-top: 1.5rem; color: var(--ink-2); max-width: 40ch; }
.notfound .btn { margin-top: 2rem; }

@media print {
  .header, .nav, .call, .direct-actions, .skip { display: none !important; }
  body { background: #fff; color: #000; }
}
