/* MC Footer (.mc-w-footer): the footer drawn as a GA drawing frame.
   One major square = one zone (desktop A–N, tablet A–F, phone A–D), split into 5 x 5 minor squares.
   The frame grows to a whole number of squares and the row numbers follow (mc-footer.js sets --rows). */

/* The widget must take the full width of its container. Elementor leaves a widget's width to its content on phones;
   Chrome then measures the footer's height as if the frame (a size container) had no width, every cell wraps word by word,
   and the page gains about 1,200px of empty scroll below the footer. A width set on the widget in Elementor still wins. */
.elementor-element.elementor-widget-mc-footer { width: 100%; }

.mc-w-footer .mc-fv { font-family: var(--mc-font-semi); color: var(--mc-grey-text); background: var(--mc-black); position: relative; z-index: 1; border-top: 2px solid var(--mc-panel); padding: 20px 16px; }
.mc-w-footer p,
.mc-w-footer ul,
.mc-w-footer h2 { margin: 0; }
.mc-w-footer .mc-ff { position: relative; container-type: inline-size; --side: 24px; --zh: 22px; --zn: 14; border: 1px solid var(--mc-border); display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; grid-template-rows: 22px auto 22px; }
/* the four frame lines run the full width and height, through the corner squares, so each corner is a closed box:
   under the top letters, above the bottom letters, and beside both columns of row numbers */
.mc-w-footer .mc-ff::before,
.mc-w-footer .mc-ff::after { content: ""; position: absolute; pointer-events: none; border: 0 solid var(--mc-border); }
.mc-w-footer .mc-ff::before { left: 0; right: 0; top: calc(var(--zh) - 1px); bottom: calc(var(--zh) - 1px); border-width: 1px 0; }
.mc-w-footer .mc-ff::after { top: 0; bottom: 0; left: calc(var(--side) - 1px); right: var(--side); border-width: 0 1px; }
.mc-w-footer .mc-fcm { position: absolute; width: 16px; height: 16px; z-index: 2; }
.mc-w-footer .mc-fcm.mc-tl { top: -1px; left: -1px; border-top: 2px solid var(--mc-red); border-left: 2px solid var(--mc-red); }
.mc-w-footer .mc-fcm.mc-br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--mc-red); border-right: 2px solid var(--mc-red); }

/* zone letters and row numbers */
.mc-w-footer .mc-fz { grid-column: 2; display: grid; font-family: var(--mc-font-mono); font-size: .6rem; line-height: 21px; color: var(--mc-grey-text); text-align: center; }
.mc-w-footer .mc-fz span { border-left: 1px solid var(--mc-border); }
.mc-w-footer .mc-fz span:first-child { border-left: 0; }
.mc-w-footer .mc-fz-top { grid-row: 1; }
.mc-w-footer .mc-fz-bot { grid-row: 3; }
.mc-w-footer .mc-fr { grid-row: 2; display: flex; flex-direction: column; font-family: var(--mc-font-mono); font-size: .6rem; color: var(--mc-grey-text); }
.mc-w-footer .mc-fr span { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--mc-border); }
.mc-w-footer .mc-fr span:first-child { border-top: 0; }
.mc-w-footer .mc-fr-l { grid-column: 1; }
.mc-w-footer .mc-fr-r { grid-column: 3; }
.mc-w-footer .mc-z6,
.mc-w-footer .mc-z4 { display: none; }

/* the drawing grid behind the cells: square zones at every width */
.mc-w-footer .mc-fin { grid-column: 2; grid-row: 2; position: relative; overflow: hidden; --z: calc((100cqw - 2 * var(--side)) / var(--zn)); min-height: calc(var(--z) * var(--rows, 3)); background-color: #0b0b0b; background-image: linear-gradient(90deg, #353535 1px, transparent 1px), linear-gradient(#353535 1px, transparent 1px), linear-gradient(90deg, #1f1f1f 1px, transparent 1px), linear-gradient(#1f1f1f 1px, transparent 1px); background-size: var(--z) var(--z), var(--z) var(--z), calc(var(--z) / 5) calc(var(--z) / 5), calc(var(--z) / 5) calc(var(--z) / 5); background-position: -1px -1px; }
.mc-w-footer .mc-fcells { position: relative; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); margin-bottom: -1px; }
.mc-w-footer .mc-fc { min-width: 0; border-right: 1px solid var(--mc-border); border-bottom: 1px solid var(--mc-border); }
.mc-w-footer .mc-fc.mc-pad { padding: 28px 24px 30px; }
.mc-w-footer .mc-fh { margin: 0 0 18px; font-family: var(--mc-font-head); font-size: 1.1rem; font-weight: 600; line-height: 1.2; color: var(--mc-grey-text); text-transform: none; letter-spacing: 0; }

/* links */
.mc-w-footer a { color: var(--mc-grey-text); text-decoration: none; transition: color .3s; }
.mc-w-footer a:focus-visible { color: var(--mc-white); outline: 1px dotted var(--mc-grey-text); outline-offset: 2px; }
@media (hover: hover) { .mc-w-footer a:hover { color: var(--mc-white); } }
@media (hover: none) { .mc-w-footer a:active { color: var(--mc-white); } }

/* title block */
.mc-w-footer .mc-fk { margin: 0 0 2px; font-family: var(--mc-font-mono); font-size: .62rem; letter-spacing: .08em; color: var(--mc-grey-text); }
.mc-w-footer .mc-fval { font-size: .95rem; color: var(--mc-white); }
.mc-w-footer .mc-tb { padding: 10px 18px 12px; }

/* cells */
.mc-w-footer .mc-f-logo { grid-column: 1 / span 4; padding: 28px 28px 30px; display: flex; flex-direction: column; gap: 18px; }
.mc-w-footer .mc-f-logo img { width: 200px; max-width: 100%; height: auto; display: block; }
.mc-w-footer .mc-f-about { font-size: 1rem; line-height: 1.5; color: var(--mc-grey-text); max-width: 420px; }
.mc-w-footer .mc-f-e1 { display: none; }
.mc-w-footer .mc-f-nav { grid-column: 5 / span 4; }
.mc-w-footer .mc-fnav,
.mc-w-footer .mc-flist { list-style: none; padding: 0; margin: 0; font-size: 1rem; line-height: 1.9; }
.mc-w-footer .mc-fnav li { break-inside: avoid; }
.mc-w-footer .mc-fnav-g { color: var(--mc-grey-quiet); font-family: var(--mc-font-mono); font-size: .72rem; letter-spacing: .08em; line-height: 2.4; text-transform: uppercase; }
.mc-w-footer .mc-fnav li.mc-sub { position: relative; padding-left: 20px; }
.mc-w-footer .mc-fnav li.mc-sub::before { content: ""; position: absolute; left: 0; top: .95em; width: 10px; height: 2px; margin-top: -1px; background: var(--mc-red); }
.mc-w-footer .mc-f-con { grid-column: 9 / span 3; }
.mc-w-footer .mc-f-vis { grid-column: 12 / span 3; }
.mc-w-footer .mc-f-addr { font-size: 1rem; line-height: 1.6; color: var(--mc-grey-text); }
.mc-w-footer .mc-f-tt { grid-column: 1 / span 3; }
.mc-w-footer .mc-f-dwg { grid-column: 4 / span 2; padding: 10px 18px 12px; }
.mc-w-footer .mc-f-dwg .mc-fval { font-size: .85rem; white-space: nowrap; }
.mc-w-footer .mc-f-rev { grid-column: 6 / span 2; }
.mc-w-footer .mc-f-copy { grid-column: 8 / span 7; display: flex; align-items: center; }
/* copyright and group line: one line when there is room, otherwise the group line drops below; only the group line never breaks */
.mc-w-footer .mc-f-copy .mc-fval { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; margin: 0; }
.mc-w-footer .mc-f-copy .mc-tg { white-space: nowrap; color: var(--mc-grey-text); }
.mc-w-footer .mc-f-copy .mc-tg a { color: var(--mc-white); text-decoration: underline dotted; text-underline-offset: 3px; }
@media (hover: hover) { .mc-w-footer .mc-f-copy .mc-tg a:hover { color: var(--mc-red); } }
@media (hover: none) { .mc-w-footer .mc-f-copy .mc-tg a:active { color: var(--mc-red); } }

/* revision letter follows the layout: A desktop, B tablet, C phone */
.mc-w-footer .mc-rv-b,
.mc-w-footer .mc-rv-c { display: none; }

/* tablet: six zones; the site navigation is left to the header menu */
@media (max-width: 1024px) {
	.mc-w-footer .mc-ff { --zn: 6; }
	.mc-w-footer .mc-z14 { display: none; }
	.mc-w-footer .mc-z6 { display: grid; }
	.mc-w-footer .mc-fcells { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.mc-w-footer .mc-f-logo { grid-column: 1 / span 6; flex-direction: row; align-items: center; gap: 28px; }
	.mc-w-footer .mc-f-logo img { width: 180px; flex: none; }
	.mc-w-footer .mc-f-e1,
	.mc-w-footer .mc-f-nav { display: none; }
	.mc-w-footer .mc-rv-a,
	.mc-w-footer .mc-rv-c { display: none; }
	.mc-w-footer .mc-rv-b { display: inline; }
	.mc-w-footer .mc-f-con { grid-column: 1 / span 3; }
	.mc-w-footer .mc-f-vis { grid-column: 4 / span 3; }
	.mc-w-footer .mc-f-tt { grid-column: 1 / span 3; }
	.mc-w-footer .mc-f-dwg { grid-column: 4 / span 1; }
	.mc-w-footer .mc-f-rev { grid-column: 5 / span 2; }
	.mc-w-footer .mc-f-copy { grid-column: 1 / span 6; }
}

/* phone: four zones; the 5 x 5 minor lines are dimmed so the smaller squares keep the sheet dark */
@media (max-width: 640px) {
	.mc-w-footer .mc-fv { padding: 14px 10px; }
	.mc-w-footer .mc-fin { background-image: linear-gradient(90deg, #353535 1px, transparent 1px), linear-gradient(#353535 1px, transparent 1px), linear-gradient(90deg, #141414 1px, transparent 1px), linear-gradient(#141414 1px, transparent 1px); }
	.mc-w-footer .mc-ff { --side: 16px; --zh: 20px; --zn: 4; grid-template-columns: 16px minmax(0, 1fr) 16px; grid-template-rows: 20px auto 20px; }
	.mc-w-footer .mc-fz { font-size: .55rem; line-height: 19px; }
	.mc-w-footer .mc-z6 { display: none; }
	.mc-w-footer .mc-z4 { display: grid; }
	.mc-w-footer .mc-fcells { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.mc-w-footer .mc-f-logo { grid-column: 1 / span 4; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 18px; }
	.mc-w-footer .mc-f-logo img { width: 170px; }
	.mc-w-footer .mc-fc.mc-pad { padding: 22px 18px 24px; }
	.mc-w-footer .mc-f-con,
	.mc-w-footer .mc-f-vis { grid-column: 1 / span 4; }
	.mc-w-footer .mc-rv-a,
	.mc-w-footer .mc-rv-b { display: none; }
	.mc-w-footer .mc-rv-c { display: inline; }
	.mc-w-footer .mc-f-tt { grid-column: 1 / span 4; }
	.mc-w-footer .mc-f-dwg { grid-column: 1 / span 2; }
	.mc-w-footer .mc-f-rev { grid-column: 3 / span 2; }
	.mc-w-footer .mc-f-copy { grid-column: 1 / span 4; }
	.mc-w-footer .mc-fval { font-size: .9rem; }
}
