/**
 * Kata footer — the SLIM variant, for the contact page.
 *
 * WHY THERE ARE TWO.
 *
 * The site footer is a contact section: a photograph, the enquiry form, the
 * heading "בונים יחד את הצעד הבא שלכם", the intro line, the address, the e-mail
 * and the sales hotline — and then, underneath all of it, a legal bar. On the
 * contact page the body carries that same heading, the same intro, the same
 * form and the same details, so the page shipped with every one of them twice:
 * /contact/ rendered two "שלח פרטים" buttons and two 03-373-1277 links.
 *
 * Figma 2220:2754 ("דף צור קשר", 1600 x 1285) draws the page with the body as
 * built and the legal bar alone beneath it — frame 2220:2825, 1600 x 142. No
 * image panel, no form, no heading or intro, no address, telephone or e-mail.
 * Every other page keeps the full footer (2260:8810), so this is a variant and
 * not a change to footer.css.
 *
 * WHY IT NEEDS ITS OWN LAYOUT RATHER THAN A FEW OVERRIDES.
 *
 * footer.css is one composition, not a stack of rows: the footer carries the
 * frame's 1600/1084 aspect ratio and every block is pinned to a percentage of
 * it, over two clip-path wedges. Take the top three blocks away and the
 * percentages mean nothing — the legal cluster would still sit at 87% of a
 * frame that is now 142 tall. So the ratio and the wedges are switched off here
 * and the bar is laid out as what it is: two columns facing each other.
 *
 * EVERY NUMBER BELOW IS READ OFF 2220:2825, at its drawn 1600 width.
 * Its content sits in one frame (2220:2881) at x=59, y=20, 1482.351 x 97:
 *
 *   left column  (2220:2882 + Line 523 + 2220:2900), 502 wide, pinned left
 *     legal links and copyright   36 ..  48
 *     rule                        77          (29 under the links)
 *     credit                     105 .. 117   (28 under the rule)
 *
 *   right column (2220:2888), 502.351 wide, pinned right
 *     social marks                20 ..  48   (28 tall)
 *     rule                        73          (25 under the marks)
 *     site menu                   98 .. 112   (25 under the rule)
 *
 * As fractions of the 1600 frame, which is how the rest of this theme states
 * them so the bar scales with the page rather than with the text:
 *
 *   59 -> 3.6875%   20 -> 1.25%   25 -> 1.5625%
 *   16 -> 1%        28 -> 1.75%   29 -> 1.8125%
 *
 * and each column is 502 of the 1482.351 between the margins: 33.865%.
 */

/* ---------------------------------------------------------------------------
 * The ground
 *
 * `surface`, NOT the full footer's #090b0b. The full footer is a black plane
 * the page descends into; this bar is the foot of the contact page's own
 * ground, and the frame draws it in the same rgb(35,39,40) as the body above
 * it — there is no edge between the two in the drawing, and there must not be
 * one on the page.
 * ------------------------------------------------------------------------ */

.kata-footer--slim {
	aspect-ratio: auto;
	background-color: var( --wp--preset--color--surface );
	/* Nothing is placed against the frame any more, so nothing can overhang. */
	overflow: visible;
}

/*
 * The two wedges belong to the 1600 x 1084 composition — the grey plane across
 * the top and down the right, and the gradient the form sits on. There is no
 * composition here. `content: none` rather than `display: none` so the narrow
 * footer's second ::after rule, which re-declares `content`, is covered too.
 */
.kata-footer--slim::before,
.kata-footer--slim::after {
	content: none;
	display: none;
}

/* ---------------------------------------------------------------------------
 * Wide — the drawn bar
 *
 * Scoped to the width the drawing is for. Below it the footer reverts to the
 * ordinary stacked arrangement footer.css already defines for every footer,
 * and these rules must not reach into it.
 * ------------------------------------------------------------------------ */

@media ( min-width: 1025px ) {

	.kata-footer--slim {
		display: flex;
		align-items: flex-start;
		/*
		 * The columns are 502 and 502.351 with 478 of air between them. Stating
		 * the two widths and pushing them apart draws that without a third
		 * number that would have to be kept in step with the other two.
		 */
		justify-content: space-between;
		/*
		 * vw, not %, for every vertical measure in this file.
		 *
		 * A percentage margin or padding resolves against the INLINE size of
		 * its own containing block, so 1.5625% written on the site menu would
		 * be 1.5625% of the 502-wide column — 8px where the drawing gives 25.
		 * The footer is full-bleed, so a vw is the frame, whichever box the
		 * declaration happens to sit in. The inline padding below is left as a
		 * percentage because there it IS the frame.
		 */
		padding-block: clamp( 14px, 1.25vw, 20px ) clamp( 18px, 1.5625vw, 25px ); /* 20 and 25 of 1600 */
		padding-inline: 3.6875%; /* 59 */
	}

	/*
	 * Both columns are 502 of the 1482.351 between the margins. Percentages on
	 * a flex item resolve against the CONTENT box, which the padding above has
	 * already taken 118 out of — hence 33.865% and not the 31.375% footer.css
	 * uses, where the same 502 is measured against the whole 1600 frame.
	 */
	.kata-footer--slim .kata-footer__slim-meta,
	.kata-footer--slim .kata-footer__legal {
		inline-size: 33.865%;
		margin: 0;
	}

	/*
	 * The left column starts 16 lower than the right: the marks are 28 tall and
	 * the legal links 12, and the drawing sets the two columns by their rules
	 * rather than by their tops.
	 */
	.kata-footer--slim .kata-footer__legal {
		margin-block-start: clamp( 10px, 1vw, 16px ); /* 16 of 1600 */
	}

	/*
	 * UNPINNED. footer.css gives these `position: absolute` and an inset in
	 * percent of the 1600 x 1084 frame. Left in place they would stack on top
	 * of one another somewhere off the foot of a bar an eighth of that height.
	 */
	.kata-footer--slim .kata-footer__social,
	.kata-footer--slim .kata-footer__nav,
	.kata-footer--slim .kata-footer__legal {
		position: static;
		inset: auto;
	}

	/*
	 * The marks keep the `direction: ltr` footer.css gives them — Facebook,
	 * Instagram, YouTube read left to right in both directions — so `flex-end`
	 * here is the physical right, which is the edge they are drawn against.
	 */
	.kata-footer--slim .kata-footer__social {
		display: flex;
		justify-content: flex-end;
		inline-size: 100%;
	}

	/*
	 * STATED, NOT INHERITED FROM THE BLOCK'S OWN SETTING.
	 *
	 * Each of these three rows carries a `justifyContent` attribute, and core
	 * turns it into a rule on a generated single class — `.wp-container-core-
	 * navigation-is-layout-1` and friends — whose specificity ties with a
	 * theme class, so which of the two wins depends on the order core happens
	 * to print its block-support styles in. The whole drawing is three rows
	 * against two outer edges, so each one says where it goes at a specificity
	 * nothing generated can reach, and the bar cannot come out mirrored.
	 *
	 * `flex-start` is the physical RIGHT in these rows and `flex-end` the
	 * physical LEFT: the document is RTL, and only the social row opts out of
	 * that with the `direction: ltr` footer.css gives it.
	 */
	.kata-footer--slim .kata-footer__nav .wp-block-navigation__container {
		justify-content: flex-start; /* flush right, as drawn */
	}

	.kata-footer--slim .kata-footer__legal .kata-footer__legal-row {
		justify-content: flex-end; /* flush left, as drawn */
	}

	/*
	 * The site menu, its rule, and the 25 either side of it. The border is on
	 * the menu rather than drawn separately so the two cannot drift apart.
	 */
	.kata-footer--slim .kata-footer__nav {
		inline-size: 100%;
		margin-block-start: clamp( 16px, 1.5625vw, 25px ); /* 25, marks to rule */
		padding-block-start: clamp( 16px, 1.5625vw, 25px ); /* 25, rule to links */
	}

	/*
	 * THE BLOCK'S CLASS LANDS ON TWO ELEMENTS, NOT ONE.
	 *
	 * core's navigation block copies the block's className onto the inner list
	 * as well as onto the <nav> that wraps it — read off the rendered page:
	 *
	 *   <nav class="… kata-footer__nav …">
	 *     <ul class="wp-block-navigation__container … kata-footer__nav …">
	 *
	 * so the rule above was being applied TWICE: 25 of margin and 25 of padding
	 * on the nav, where the drawing wants them, and then 25 and 25 again on the
	 * list inside it, where it wants neither. That is the whole of the right
	 * column's slack. The list box measured 45.4 for a 20.4 row of links, the
	 * links were left sitting on its bottom edge, a hole opened under the rule
	 * (51 where the drawing gives 25) and the band came out 194 against the
	 * drawn 142.
	 *
	 * The 25s above are correct and are not touched: shrinking them would hide
	 * the symptom and break the moment the menu wraps or a link is added. The
	 * duplicate is cancelled where it lands. footer.css meets the same
	 * duplication a few rules up and answers it the same way, by zeroing the
	 * border support on the inner list.
	 *
	 * Written as a reset on the list rather than by narrowing the selector
	 * above to `nav.kata-footer__nav`, so it still holds if core ever renders
	 * the menu in some element other than <nav>.
	 */
	.kata-footer--slim .kata-footer__nav .kata-footer__nav,
	.kata-footer--slim .kata-footer__nav .wp-block-navigation__container {
		margin-block-start: 0;
		padding-block-start: 0;
	}

	/*
	 * 29 under the legal links, as drawn. footer.css carries 22 here, which is
	 * what the wide frame gives it; this bar is a different drawing and states
	 * its own.
	 */
	.kata-footer--slim .kata-footer__legal-row {
		padding-block-end: clamp( 18px, 1.8125vw, 29px ); /* 29 */
	}

	/* 28 from the rule to the credit — the gap footer.css already sets on the
	   column, restated against this frame so the two stay independent. */
	.kata-footer--slim .kata-footer__legal {
		gap: clamp( 18px, 1.75vw, 28px ); /* 28 */
	}

	/*
	 * THE LEADING, AS THE FRAME DRAWS IT.
	 *
	 * Every gap above is now exact, and the band still came out 155 against
	 * the drawn 142. The whole of the difference is leading: the site's
	 * body leading is 1.5, so each of these single-line rows renders in a box
	 * half as tall again as its own type — the legal links 18 where 2220:2825
	 * draws 12, the credit 18 where it draws 12, the menu 20.4 where it draws
	 * 14. Two of those sit in the left column, one above the other, so the
	 * left rule fell 11 below the right instead of the drawn 4 and the band
	 * grew 13.
	 *
	 * These are not paragraphs; they are four single lines set against a rule.
	 * The frame gives each of them a box exactly its own type size, which is
	 * leading of 1, and that is what is stated here — not a smaller gap
	 * anywhere, which would have hidden the difference rather than answered
	 * it. Type size, face, colour and tracking are untouched, and nothing can
	 * clip: each row is one line with 25 or more of air beneath it.
	 *
	 * Inside the wide query only — below 1025 the bar is footer.css's stacked
	 * arrangement, which is drawn with the ordinary leading.
	 */
	.kata-footer--slim .kata-footer__nav,
	.kata-footer--slim .kata-footer__legal-row,
	.kata-footer--slim .kata-footer__legal-nav,
	.kata-footer--slim .kata-footer__copyright,
	.kata-footer--slim .kata-footer__credit {
		line-height: 1;
	}

	/*
	 * THE CREDIT IS DIMMER HERE THAN IN THE WIDE FRAME — 50%, not 60%.
	 *
	 * Read off 2220:2825 itself: "Design & Development by Dofinity", 166 x 12,
	 * fill #ffffff at opacity 50%. Every other string in the bar — the three
	 * legal links, the copyright, the four menu links — is #ffffff at full
	 * strength. footer.css gives the copyright and the credit one shared
	 * `rgba( 255, 255, 255, 0.6 )`, which is what the 1600 x 1084 frame draws;
	 * this is a different drawing and states its own, for the credit alone.
	 *
	 * As a COLOUR, not `opacity`. footer.css met the same choice in the narrow
	 * frame and wrote the reason down a few hundred lines up: the credit also
	 * carries the rule above it as a border there, and dimming the element
	 * takes the rule down with the words. Nothing depends on that here — the
	 * slim bar's rules are on other elements — but the two files answering the
	 * same question the same way is worth more than the shortcut.
	 */
	.kata-footer--slim .kata-footer__credit {
		color: rgba( 255, 255, 255, 0.5 ); /* #ffffff at the drawn 50% */
	}

	/*
	 * AND THE COPYRIGHT IS FULL WHITE HERE — the other half of the same rule.
	 *
	 * The comment above states it already: in 2220:2825 every string in the bar
	 * is #ffffff at full strength and the Dofinity credit ALONE is dimmed. But
	 * the fix above was scoped to the credit, so the copyright kept footer.css's
	 * shared `rgba( 255, 255, 255, 0.6 )` — and the left row rendered as three
	 * bright links plus a dimmer tail where the frame draws one even line.
	 * Read off the frame, not assumed: node 2220:2882 (the legal row) returns
	 * all four of its strings — the three links and the copyright, 2220:2886 —
	 * sharing one fill at no opacity; only 2220:2900, the credit, is 50%.
	 *
	 * Stated as the SAME TOKEN the three links beside it already use in
	 * footer.css (`.kata-footer__legal-nav .wp-block-navigation-item__content`),
	 * so the row is one declared colour and cannot drift apart again — and as a
	 * COLOUR rather than `opacity`, for the reason given just above.
	 *
	 * Inside the wide query and under `--slim` only. The shared footer.css rule
	 * is untouched: below 1025, and on every page with the full footer, the
	 * copyright stays at the 0.6 its own frame draws.
	 */
	.kata-footer--slim .kata-footer__copyright {
		color: var( --wp--preset--color--white ); /* #ffffff, as drawn */
	}

	/*
	 * AND THE TWO RULES ARE FULL WHITE — the band's structure, at a fifth of
	 * the drawn strength until now.
	 *
	 * Same fault as the copyright, one layer out: this file restated the bar's
	 * GEOMETRY against 2220:2825 — the rules' padding, their gaps, their
	 * leading — and let their COLOUR come from the full footer, which is drawn
	 * at 1600 x 1084 and tints them. In 2220:2825 the two hairlines are
	 * `#ffffff`, 1px, at no opacity (Line 523 the left, Line 524 the right);
	 * live painted both `rgba( 255, 255, 255, 0.2 )`. They are what makes this
	 * a band rather than two corners sitting apart — the eye carries one
	 * broken line across the full width — so at a fifth of the strength the
	 * strip lost its spine. The dimmest thing in the frame is the credit, and
	 * that one is already right.
	 *
	 * They are not this file's borders to begin with: the left is footer.css's
	 * `.kata-footer__legal-row` border-block-end, the right its
	 * `.kata-footer__nav` border-block-start. Its own values (0.2) stay exactly
	 * as they are — correct for the drawing they answer to, 2130:3015 and
	 * 2130:3023 — and are not touched here. Both overrides are scoped to
	 * `.kata-footer--slim` inside the wide query, so the full footer on every
	 * other page, and this bar below 1025, keep the tinted rules they are drawn
	 * with.
	 *
	 * Written as the COLOUR LONGHAND, not the `border-*` shorthand: the drawn
	 * 1px and the solid style are already set where they belong, and only the
	 * strength is wrong. The token is the one footer.css itself reaches for
	 * wherever a frame draws these rules at full white — see its narrow-frame
	 * `.kata-footer__credit` border, commented "stroke=white, 1px — not a
	 * tinted rule."
	 */
	.kata-footer--slim .kata-footer__legal-row {
		/* The left rule. 2220:2825 Line 523: stroke #ffffff, 1px. */
		border-block-end-color: var( --wp--preset--color--white );
	}

	.kata-footer--slim .kata-footer__nav {
		/* The right rule. 2220:2825 Line 524: stroke #ffffff, 1px. */
		border-block-start-color: var( --wp--preset--color--white );
	}
}

/* ---------------------------------------------------------------------------
 * Tablet and below
 *
 * footer.css already stacks every footer here — marks, rule, site menu, then
 * the legal cluster — and that is exactly the order and the rhythm the narrow
 * frame draws for this bar. So nothing is restated: the wrapper is dissolved
 * so its two children become items of the footer's own column and pick up the
 * spacing footer.css gives them, and the footer's flex gap is cleared so the
 * drawn margins are the only thing between the rows.
 * ------------------------------------------------------------------------ */

@media ( max-width: 1024px ) {

	.kata-footer--slim {
		gap: 0;
		/*
		 * The full footer opens with a photograph, so it is padded away from
		 * the top of its plane. This one opens with the marks.
		 */
		padding-block-start: var( --wp--preset--spacing--50 );
	}

	/*
	 * `display: contents` — the group is a wide-layout device and has no part
	 * in the stack. Dissolving it leaves the marks and the menu as direct
	 * children of the footer, which is what footer.css's `order` values and
	 * margins are written against.
	 */
	.kata-footer--slim .kata-footer__slim-meta {
		display: contents;
	}
}

/*
 * The narrow footer's black wedge is cut to a photograph this bar does not
 * have. Restated inside the query that draws it, because that rule sets
 * `content` again and would otherwise bring the pseudo-element back.
 */
@media ( max-width: 781px ) {

	.kata-footer--slim::before,
	.kata-footer--slim::after {
		content: none;
		display: none;
	}

	/* footer.css paints the narrow footer `surface` already; stated here so the
	   bar does not depend on that staying true. */
	.kata-footer--slim {
		background-color: var( --wp--preset--color--surface );
	}
}
