/* ==========================================================================
   j.m. design – werbe- und produktions GmbH
   Stylesheet
   ========================================================================== */

/* --- Design Tokens ------------------------------------------------------ */

:root {
  --blue:        #0088cc;
  --blue-dark:   #006ba3;
  --blue-deep:   #044a6e;
  --blue-tint:   #eaf5fb;

  --ink:         #17232e;
  --ink-soft:    #3d4d5c;
  --muted:       #6b7c8b;
  --line:        #dfe5ea;
  --line-soft:   #edf1f4;

  --bg:          #ffffff;
  --bg-alt:      #f4f6f7;
  --bg-deep:     #0f1c26;

  --shell:       1180px;
  --gutter:      clamp(1.25rem, 4vw, 3rem);
  --radius:      4px;
  --radius-lg:   10px;

  --shadow-sm:   0 1px 2px rgba(15, 28, 38, .06),
                 0 2px 8px rgba(15, 28, 38, .05);
  --shadow-md:   0 4px 12px rgba(15, 28, 38, .07),
                 0 16px 40px rgba(15, 28, 38, .09);

  --ease:        cubic-bezier(.22, .61, .36, 1);

  --font: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, Arial, sans-serif;
}

/* --- Reset -------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

p  { margin: 0 0 1.1em; }
p:last-child,
ul:last-child { margin-bottom: 0; }

strong { color: var(--ink); font-weight: 700; }

a {
  color: var(--blue-dark);
  text-decoration-color: rgba(0, 136, 204, .35);
  text-underline-offset: .18em;
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease);
}
a:hover { color: var(--blue); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Layout helpers ----------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: 820px; }

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.4rem;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  font-size: .9rem;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: #fff; }

/* --- Header / Navigation ------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease),
              background .3s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-deep) 100%);
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 20px rgba(15, 28, 38, .07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 84px;
  padding-block: .9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
  transition: opacity .25s var(--ease);
}
.brand:hover { opacity: .7; }
.brand img { width: 194px; height: 52px; }

.nav { display: flex; }

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: block;
  padding: .45rem .7rem;
  color: var(--ink-soft);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .22rem;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}

.nav-list a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-list a:hover::after,
.nav-list a.is-active::after { transform: scaleX(1); }
.nav-list a.is-active { color: var(--blue-deep); font-weight: 700; }

/* Burger */

.nav-toggle {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  transition: background .2s var(--ease);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform .28s var(--ease), top .28s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top:  6px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(58rem 34rem at 88% -12%, var(--blue-tint) 0%, transparent 62%),
    linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--line-soft);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
  color: var(--blue-deep);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--blue);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -.035em;
  margin-bottom: .5em;
}
.hero h1 .accent { color: var(--blue); }

.hero-lead {
  max-width: 34em;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
}

.hero-claim {
  margin-top: 2rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--blue);
  font-size: 1.05rem;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.25rem;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease),
              box-shadow .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 136, 204, .3);
}
.btn--primary:hover {
  background: var(--blue-dark);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 136, 204, .35);
}

.btn--ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--blue); color: var(--blue-deep); }

.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* --- Framed images ------------------------------------------------------ */

/* The original artwork is small (max 270 x 350 px). It is never scaled up –
   it sits in a frame at its native size so it stays perfectly sharp. */

.frame {
  position: relative;
  flex: none;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.frame img { border-radius: 2px; }

.frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 46%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue));
  border-radius: 0 0 var(--radius-lg) 0;
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.frame:hover { transform: translateY(-5px); box-shadow: 0 10px 24px rgba(15,28,38,.1), 0 26px 56px rgba(15,28,38,.12); }
.frame:hover::after { opacity: 1; }

.frame--hero { transform: rotate(-1.2deg); }
.frame--hero:hover { transform: rotate(0deg) translateY(-5px); }

/* --- Sections ----------------------------------------------------------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  scroll-margin-top: 96px;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line-soft);
}

.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.section-head .kicker {
  display: block;
  margin-bottom: .5rem;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.section h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

.section-head .rule {
  width: 52px;
  height: 3px;
  margin-top: 1.1rem;
  background: var(--blue);
  border-radius: 2px;
}

/* Alternating text / image layout */

.split {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.split--reverse { grid-template-columns: minmax(0, 1fr) auto; }
.split--reverse .split-media { order: 2; }

.split-body { max-width: 42em; }
.split-body p + p { margin-top: 0; }

/* Wide banner image (kreation.jpg is 638 x 188) */

.banner {
  max-width: 638px;
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
}

/* --- Numbered service index --------------------------------------------- */

.service-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-index a {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  height: 100%;
  padding: 1.35rem 1.4rem;
  background: #fff;
  text-decoration: none;
  transition: background .25s var(--ease);
}
.service-index a:hover { background: var(--blue-tint); }

.service-index .num {
  color: var(--blue);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
}
.service-index .label {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.service-index .hint {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
}

/* --- Referenzen --------------------------------------------------------- */

.refs-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.ref-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ref-list li {
  padding: .9rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ref-list li:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.ref-list .name {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.4;
}
.ref-list .place {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}

/* --- Kontakt ------------------------------------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.contact-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contact-card h3 {
  margin-bottom: 1rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.contact-card address {
  font-style: normal;
  line-height: 1.85;
}

.contact-rows {
  display: grid;
  gap: .65rem;
  margin: 0;
}
.contact-rows > div {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: .75rem;
  align-items: baseline;
}
.contact-rows dt {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.contact-rows dd { margin: 0; color: var(--ink); }

/* --- Legal pages -------------------------------------------------------- */

.page-hero {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--line-soft);
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0; }

.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.legal h2 {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 1.4rem;
}
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.legal h3 {
  margin-top: 2rem;
  font-size: 1.08rem;
  color: var(--blue-deep);
}

.legal h4 {
  margin-top: 1.5rem;
  font-size: .98rem;
  color: var(--ink);
}

.legal ul { padding-left: 1.15rem; }
.legal li { margin-bottom: .35rem; }

.legal address {
  margin: 0 0 1.1em;
  padding: 1.1rem 1.3rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: normal;
  line-height: 1.8;
}

.legal a { word-break: break-word; }

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: var(--bg-deep);
  color: #9fb1bf;
  font-size: .92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.site-footer h2 {
  margin-bottom: 1.1rem;
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.site-footer a { color: #cfdde7; text-decoration-color: rgba(207, 221, 231, .3); }
.site-footer a:hover { color: #fff; }

.site-footer address { font-style: normal; line-height: 1.85; }

/* The logo PNG has no alpha channel – it carries an opaque white background.
   It therefore sits on a white plate in the dark footer instead of being
   inverted, which would flatten it into a solid block. */
.footer-plate {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 10px 14px;
  background: #fff;
  border-radius: var(--radius);
}
.footer-plate img {
  width: 194px;
  height: 52px;
}

.footer-nav {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  font-size: .84rem;
  color: #7d90a0;
}

.footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- Back to top -------------------------------------------------------- */

.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease),
              visibility .3s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--blue); color: var(--blue); }

/* --- Reveal animations -------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1080px) {
  .nav-list a { padding-inline: .55rem; font-size: .84rem; }
  .nav-list a::after { left: .55rem; right: .55rem; }
}

@media (max-width: 940px) {
  .header-inner { min-height: 72px; }

  .nav-toggle { display: block; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid transparent;
    transition: max-height .4s var(--ease), border-color .4s var(--ease),
                box-shadow .4s var(--ease);
  }
  .nav.is-open {
    max-height: 32rem;
    border-bottom-color: var(--line);
    box-shadow: 0 16px 30px rgba(15, 28, 38, .1);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
  }
  .nav-list li + li { border-top: 1px solid var(--line-soft); }
  .nav-list a { padding: .85rem .25rem; font-size: .98rem; }
  .nav-list a::after { display: none; }
  .nav-list a:hover { background: transparent; }
  .nav-list a.is-active { color: var(--blue); }

  .hero-inner,
  .split,
  .split--reverse,
  .refs-layout { grid-template-columns: minmax(0, 1fr); }

  .split--reverse .split-media { order: 0; }

  .frame { justify-self: start; }
  .frame--hero { transform: none; }

  .service-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .brand img { width: 160px; height: 43px; }
  .service-index { grid-template-columns: minmax(0, 1fr); }
  .contact-rows > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* --- Motion / print preferences ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .frame--hero { transform: none; }
}

@media print {
  .site-header, .to-top, .hero-actions, .service-index { display: none; }
  body { color: #000; }
  .reveal { opacity: 1; transform: none; }
  .frame { box-shadow: none; }
}
