/*
  Footer redesign (design v4, file keeps its v2 name). Markup: templates/footer/v2.php. Gate and enqueue:
  includes/footer-v2.php (dark on production until Kim signs it off).
  Design: _kim/mockups/header-footer-v4-2026-10-07.html.

  COLOUR. Design-system tokens only (enttec-design-system.php prints them on every
  front-end page), plus plain white and white alpha on the charcoal. The brand blue
  is never shifted: no --enttec-blue-hover, no mix, no opacity. A blue fill takes
  white text (Kim, 2026-10-07).

  CASCADE. Everything is scoped under .ft, and the legacy theme rules that reach any
  <footer> are neutralised here:
    main-style.css  footer a { padding; border-bottom dashed; transition: all }
    main-style.css  footer a:hover { border-bottom dashed }
    main-style.css  a:focus { outline: 0; box-shadow: 0 0 0 }
    main-style.css  a, a:visited { text-decoration: underline }
    enttec-nav.php  footer a:hover { color: inherit }
    bootstrap       h2 / ul / p / address / figure margins
  Outlined controls draw their ring with an inset box-shadow, not a border, so the
  border resets above can never thin or dash a pill or an icon ring on hover.

  Type sizes are px because the theme sets html { font-size: 62.5% }. Nothing is
  below 12px.

  DESIGN SYSTEM. Same conventions as the header (enttec-nav/assets/header-v2.css):
  the DS component classes are not used in the markup; their values are restated
  here, scoped, and named after the DS piece they come from. The tokens print on
  every front-end page (enttec-design-system.php, priority 5) and the footer only
  renders on front-end pages, so every var() resolves; the fallbacks match the
  header's so a missing token degrades the same way in both.
    headings  .eds-eyebrow  display 600 13px, .12em, uppercase (blue on charcoal)
    pills     .eds-btn--ghost  rgba(255,255,255,.45) edge, .12 white wash on
              hover, radius --eds-radius-btn, hover = lift translateY(-2px)
    copy      .eds-btn--ghost + --sm  body 600 14px, 8px 18px, min-height 44px
    icons     the header's .hd-icon: ring and fill, no lift (a row of bobbing
              icons reads as jitter, and the DS has no icon button)
    links     the header's .hd-u draw-in underline, --eds-dur / --eds-ease
    focus     .eds-btn:focus-visible  3px solid blue, offset 3px
*/

.ft {
	--ft-bg: var(--enttec-dark, #2f2f2f);
	--ft-text: var(--eds-white);
	--ft-body: var(--eds-white-a78);  /* paragraphs, address */
	--ft-quiet: var(--eds-white-a66); /* small labels, legal */
	--ft-rule: var(--eds-white-a16);  /* hairlines */
	--ft-edge: var(--eds-white-a45);  /* .eds-btn--ghost border */
	--ft-wash: var(--eds-white-a12);  /* .eds-btn--ghost:hover */
	--ft-accent: var(--enttec-blue, #0ea5df);
	--ft-ring: var(--eds-bw-3) solid var(--enttec-blue, #0ea5df); /* .eds-btn:focus-visible */

	background: var(--ft-bg);
	color: var(--ft-text);
	font-family: var(--enttec-font-body, 'Source Sans 3', system-ui, sans-serif);
	font-size: var(--eds-text-body);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.ft *,
.ft *::before,
.ft *::after { box-sizing: border-box; }

/* Resets against the legacy footer and theme rules listed above. Each state rule
   carries only the property its legacy rule sets: a colour or transition here at
   (0,2,1) would beat every component rule below on hover or once visited. */
.ft a {
	padding: 0;
	border: 0;
	text-decoration: none;
	color: inherit;
	transition: none;
}
.ft a:visited { text-decoration: none; }
/* One hover for every footer text link (DS text-link rule, #9091): underline only,
   the link keeps its colour. Icon buttons (.ft-social, .ft-copy) opt out below. */
.ft a:hover { border-bottom: 0; }
.ft a:hover,
.ft a:focus-visible,
.ft .ft-legal button:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ft ul { list-style: none; margin: 0; padding: 0; }
.ft li { margin: 0; padding: 0; }
.ft p,
.ft h2,
.ft figure,
.ft address { margin: 0; }

/* Same width and edge as the header bar (the DS container and its padding), so the
   footer's columns line up under the logo and the account icons, and both stop
   growing together on very wide screens (Kim, 2026-11-16). */
.ft .ft-inner {
	max-width: var(--eds-container, 1760px);
	margin: 0 auto;
	padding: var(--eds-sp-16) var(--eds-edge-pad) 0;
}

.ft .ft-top {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.2fr) minmax(0, .8fr) auto;
	gap: var(--eds-sp-12);
	padding-bottom: var(--eds-sp-12);
	align-items: start;
}
/* Sentence case, quiet: the headings label the columns, they are not decoration. */
.ft .ft-h {
	font: 600 var(--eds-text-secondary)/1.2 var(--enttec-font-display, 'Montserrat', system-ui, sans-serif);
	color: var(--ft-quiet);
	margin: 0 0 var(--eds-sp-4);
	padding: 0;
	border: 0;
	letter-spacing: 0;
	text-transform: none;
}

/* Brand column: the logo and the one positioning line. */
.ft .ft-brand .ft-logo { margin-bottom: var(--eds-sp-4); }
.ft .ft-logo-svg { width: 132px; }
/* text-wrap: pretty keeps a lone word off the last line; the no-break space before
   "works" in the copy does the same where the browser ignores it. 44ch sets the line
   in three lines at 1440 instead of four, still well inside a readable measure
   (Kim, 2026-11-17); narrower columns cap it first. */
.ft .ft-pitch { max-width: 44ch; font-size: var(--eds-text-msg); line-height: 1.6; color: var(--ft-quiet); text-wrap: pretty; }

/* Contact rows, each led by a muted icon in a fixed 20px column so the text lines
   up. The phone is the one emphasised line (what a buyer scrolls down for). */
.ft .ft-rows { display: grid; gap: var(--eds-sp-1); }
.ft .ft-row { display: grid; grid-template-columns: 20px auto auto; justify-content: start; align-items: center; column-gap: var(--eds-sp-3); min-height: 36px; }
.ft .ft-row > i { justify-self: center; font-size: var(--eds-text-msg); color: var(--ft-quiet); }
.ft .ft-row--addr { align-items: start; padding-top: var(--eds-sp-1); }
.ft .ft-row--addr > i { margin-top: var(--eds-sp-1); }
.ft .ft-row a,
.ft .ft-row > span { font-size: var(--eds-text-body); color: var(--eds-white); overflow-wrap: anywhere; }
/* An email wraps only at the <wbr> after its @ (footer/v2.php), never mid-word
   ("support@enttec.com.a / u" at 1024). break-word still breaks a single part that
   cannot fit at all, so nothing overflows. */
.ft .ft-row a.ft-email { overflow-wrap: break-word; }
.ft .ft-phone { font: 600 var(--eds-h3)/1.2 var(--enttec-font-display, 'Montserrat', system-ui, sans-serif); }
.ft .ft-minor { font-size: var(--eds-text-msg); color: var(--ft-quiet); }
.ft .ft-minor a { color: var(--eds-white); }
.ft .ft-copy {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: var(--eds-radius-1);
	background: none;
	color: var(--ft-quiet);
	cursor: pointer;
	transition: color var(--eds-dur-fast, .2s) var(--eds-ease, ease), background var(--eds-dur-fast, .2s) var(--eds-ease, ease);
}
.ft .ft-copy[hidden] { display: none; }
.ft .ft-copy svg { width: 16px; height: 16px; }
.ft .ft-copy .i-done { display: none; }
.ft .ft-copy:hover { color: var(--eds-white); background: var(--eds-white-a8); }
.ft .ft-copy.is-done { color: var(--ft-accent); }
.ft .ft-copy.is-done .i-copy { display: none; }
.ft .ft-copy.is-done .i-done { display: block; }
.ft .ft-addr { font-style: normal; font-size: var(--eds-text-msg); line-height: 1.55; color: var(--ft-quiet); }
.ft .ft-row .ft-addr a { font-size: var(--eds-text-msg); color: var(--ft-quiet); }
.ft .ft-qr { display: flex; gap: var(--eds-sp-4); }
.ft .ft-qr img { display: block; width: 88px; height: 88px; max-width: none; background: var(--eds-white); padding: var(--eds-sp-1); border-radius: var(--eds-radius-2); }
.ft .ft-qr figcaption { margin-top: var(--eds-sp-1); font-size: var(--eds-text-small); color: var(--ft-quiet); text-align: center; }

/* Desktop rows are 32px (a mouse needs less than a thumb), so the seven links stay
   close to the contact column's height. Phones keep 40px targets, below. */
.ft .ft-links { display: grid; gap: var(--eds-sp-0-5); }
.ft .ft-links a { display: inline-flex; align-items: center; gap: var(--eds-sp-1); min-height: 30px; font-size: var(--eds-text-body); }
.ft .ft-links svg { width: 12px; height: 12px; opacity: .6; }


.ft .ft-logo { display: block; line-height: 0; border-radius: var(--eds-radius-1); }
.ft .ft-logo-svg { display: block; height: auto; }
.ft .ft-logo-accent { fill: var(--ft-accent); }

/* Site switcher: one control, the list opens upward over the footer. */
.ft .ft-site { position: relative; }
/* The toggle is .eds-btn--ghost.eds-btn--sm and the list an .eds-menu (both in the
   markup, enttec-design-system.css). It is a list of links, not a <select>: each row
   is a different site, so it has to work with no script and stay crawlable. Only the
   <details> plumbing and where the list opens are set here. */
.ft .ft-site summary { list-style: none; }
.ft .ft-site summary::-webkit-details-marker { display: none; }
.ft .ft-site summary svg { width: 16px; height: 16px; }
.ft .ft-site .ft-caret { width: 10px; height: 10px; transition: transform var(--eds-dur, .3s) var(--eds-ease, ease); }
.ft .ft-site:not([open]) .ft-caret { transform: rotate(180deg); }
.ft .ft-site-list {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	z-index: 5;
	min-width: 240px;
}
/* Menu rows hover with the .eds-menu wash, not the text-link underline. */
.ft .ft-site-list a:hover,
.ft .ft-site-list a:focus-visible { text-decoration: none; }

.ft .ft-base {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--eds-sp-3) var(--eds-sp-6);
	/* 16px above and below at every width (Kim, 2026-11-17). */
	padding: var(--eds-sp-4) 0;
	border-top: var(--eds-bw-1) solid var(--ft-rule);
	font-size: var(--eds-text-secondary);
	color: var(--ft-quiet);
}
.ft .ft-meta { display: flex; flex-wrap: wrap; gap: var(--eds-sp-1) var(--eds-sp-4); }
.ft .ft-meta a { color: var(--ft-quiet); }
.ft .ft-legal-h { display: none; }
.ft .ft-legal { display: flex; flex-wrap: wrap; gap: var(--eds-sp-1) var(--eds-sp-5); }
.ft .ft-legal a,
.ft .ft-legal button {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	min-height: 32px;
	display: inline-flex;
	align-items: center;
	color: var(--ft-quiet);
	font: inherit;
	cursor: pointer;
}
.ft .ft-site { margin-left: auto; }
.ft .ft-social { display: grid; grid-template-columns: repeat(4, 40px); gap: var(--eds-sp-1); margin-left: calc(var(--eds-sp-2) * -1); }
.ft .ft-social a {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ft-quiet);
	transition: color var(--eds-dur-fast, .2s) var(--eds-ease, ease), background var(--eds-dur-fast, .2s) var(--eds-ease, ease);
}
.ft .ft-social a:hover { text-decoration: none; color: var(--eds-white); background: var(--eds-white-a8); }
.ft .ft-social svg { width: 18px; height: 18px; fill: currentColor; }

/* Back to top, docked (Kim, 2026-11-17). While this row is on screen the floating
   #go-to-top moves into .ft-gtt-slot (js/global-script-jquery.js) and shows its
   label, right of the site switcher at the footer's edge. The ghost is an invisible
   copy of the docked button in the same grid cell, so the row is the same size with
   or without the button and nothing jumps when it lands. The values restate the
   button's own (main-style.css #go-to-top), because the ghost must match it. */
.ft .ft-gtt-slot { display: grid; align-items: center; justify-items: end; }
.ft .ft-gtt-slot > * { grid-area: 1 / 1; }
.ft .ft-gtt-ghost {
	visibility: hidden;
	display: inline-flex;
	align-items: center;
	gap: var(--eds-sp-2);
	height: 44px;
	padding: 0 var(--eds-sp-5);
	border: var(--eds-bw-1) solid transparent;
	font: 600 var(--eds-text-secondary)/1 var(--enttec-font-body, 'Source Sans 3', system-ui, sans-serif);
	white-space: nowrap;
}
.ft .ft-gtt-ghost__icon { width: 16px; height: 16px; flex: none; }
/* 8px from the switcher, a pair, not the row's 24px (Kim, 2026-11-17). */
@media (min-width: 601px) {
	.ft .ft-gtt-slot { margin-left: calc(var(--eds-sp-2) - var(--eds-sp-6)); }
}
/* In the row, not over the page: no fixed position, no lift shadow. Docked it is the
   same ghost pill as the site switcher beside it (.eds-btn--ghost.eds-btn--sm):
   44px, transparent, white text, half-white edge, 16px icon (Kim, 2026-11-17). */
.ft #go-to-top.is-docked {
	position: static;
	z-index: auto;
	gap: var(--eds-sp-2);
	height: 44px;
	min-width: 0;
	padding: 0 var(--eds-sp-5);
	background: transparent;
	color: var(--eds-white);
	border-color: var(--eds-white-a50);
	border-radius: var(--eds-radius-btn);
	box-shadow: none;
}
.ft #go-to-top.is-docked .gtt__icon { width: 16px; height: 16px; }
.ft #go-to-top.is-docked:hover {
	background: var(--eds-white-a10);
	color: var(--eds-white);
	border-color: var(--eds-white-a50);
	box-shadow: none;
}
.ft #go-to-top.is-docked .gtt__label { max-width: 140px; opacity: 1; transform: none; }
/* The footer's own keyboard ring, like the switcher beside it. */
.ft #go-to-top.is-docked:focus-visible { outline: var(--ft-ring); outline-offset: 3px; }
/* The move between corner and row is a FLIP transform (the script); the label only
   fades, so nothing but transform and opacity animates. */
#go-to-top.is-flipping .gtt__label { transition: opacity var(--eds-dur) var(--eds-ease); }
/* Region and Back to top at every width (Kim, 2026-11-18): a light fill, no border
   (white 10%, 20% on hover), 40px tall. The switcher keeps globe, site name and caret
   on one centre line; back-to-top docks as a 40px round icon button, its label kept
   for screen readers, clipped from view. Overrides the ghost-pill rules above. */
.ft .ft-site summary { display: inline-flex; align-items: center; gap: var(--eds-sp-2); min-height: var(--eds-sp-10); padding: 0 var(--eds-sp-4); line-height: 1; border-color: transparent; border-radius: var(--enttec-radius-pill, 100px); background: var(--eds-white-a10); }
.ft .ft-site summary:hover { border-color: transparent; background: var(--eds-white-a20); }
/* Icons and label on one centre line: the label's own line box sat it low. */
.ft .ft-site summary > * { display: block; flex: none; }
.ft .ft-gtt-ghost { width: var(--eds-sp-10); height: var(--eds-sp-10); padding: 0; }
.ft .ft-gtt-ghost { font-size: 0; }
.ft #go-to-top.is-docked { width: var(--eds-sp-10); height: var(--eds-sp-10); padding: 0; justify-content: center; border-color: transparent; border-radius: var(--enttec-radius-pill, 100px); background: var(--eds-white-a10); }
.ft #go-to-top.is-docked:hover { border-color: transparent; background: var(--eds-white-a20); }
.ft #go-to-top.is-docked .gtt__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ft .ft-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* main-style.css zeroes a:focus; the DS ring comes back on keyboard focus only. */
.ft a:focus-visible,
.ft button:focus-visible { outline: var(--ft-ring); outline-offset: 3px; border-radius: var(--eds-radius-1); }

/* Tablet, 601-1023px: a 2 x 2 grid, so no column is left alone with half the row
   empty. Brand sits beside Follow (both short), Talk to our team beside Explore (both
   long). The base row keeps copyright and the site switcher on one line, with the
   legal links on their own line under them. */
@media (max-width: 1023px) {
	.ft .ft-inner { padding-top: var(--eds-sp-12); }
	.ft .ft-top {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas: "brand follow" "contact explore";
		gap: var(--eds-sp-10) var(--eds-sp-8);
		padding-bottom: var(--eds-sp-10);
	}
	.ft .ft-brand { grid-area: brand; }
	.ft .ft-contact { grid-area: contact; }
	.ft .ft-explore { grid-area: explore; }
	.ft .ft-follow { grid-area: follow; }
	.ft .ft-social { grid-template-columns: repeat(7, 40px); gap: var(--eds-sp-0-5); }
	/* Touch screens from here down: 40px rows, in two columns that read downwards. */
	.ft .ft-links { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 0 var(--eds-sp-4); }
	.ft .ft-links a { min-height: 40px; }
	/* Legal links first, then copyright with the switcher and back-to-top under them
	   (Kim, 2026-11-18: rows flipped). */
	.ft .ft-base nav { order: 0; flex-basis: 100%; }
	.ft .ft-meta { order: 1; }
	.ft .ft-site,
	.ft .ft-gtt-slot { order: 2; }
}
/* Phone, 600px and under: one column, read top to bottom. The site switcher comes
   straight after the content (people look for it), then the legal links, and the
   copyright closes the page. */
@media (max-width: 600px) {
	/* One tight rhythm (Kim, 2026-11-18, second pass: "too much empty space"): 24px
	   between groups, 8px from a group heading to its content, 8px logo to pitch. Link
	   rows are 32px, past WCAG 2.5.8's 24px minimum target, not the 44px that left the
	   list airy. The side gutter is the header's (--eds-edge-pad, 16px here). */
	.ft .ft-inner { padding-top: var(--eds-sp-10); }
	.ft .ft-top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "contact" "explore" "follow"; gap: var(--eds-sp-6); padding-bottom: var(--eds-sp-6); }
	.ft .ft-brand .ft-logo { margin-bottom: var(--eds-sp-2); }
	.ft .ft-pitch { max-width: none; }
	/* Group headings read as the site's eyebrow labels: 12px caps, tracked .12em (the
	   .eds-eyebrow value, no token for it), medium weight, in the footer's quiet colour. */
	.ft .ft-h {
		font: var(--eds-weight-medium) var(--eds-text-label)/var(--eds-lh-heading) var(--enttec-font-display, 'Montserrat', system-ui, sans-serif);
		letter-spacing: .12em;
		text-transform: uppercase;
		margin-bottom: var(--eds-sp-2);
	}
	/* Contact rows: 32px tall, 16px icon in a 20px column, 12px to the text. Phone and
	   email share one size (the phone keeps its SemiBold); the address is the quiet 14px. */
	.ft .ft-rows { gap: 0; }
	.ft .ft-row { grid-template-columns: var(--eds-icon-box) minmax(0, auto) auto; column-gap: var(--eds-sp-3); min-height: var(--eds-sp-8); }
	.ft .ft-row > i { font-size: var(--eds-text-body); }
	.ft .ft-row a { display: inline-flex; align-items: center; min-height: var(--eds-sp-8); }
	.ft .ft-phone { font-size: var(--eds-text-body); line-height: var(--eds-lh-body); }
	.ft .ft-row--addr { align-items: start; padding-top: var(--eds-sp-1); padding-bottom: var(--eds-sp-1); }
	/* The icon box is as tall as the address's first line, so the icon sits on it. */
	.ft .ft-row--addr > i { display: flex; align-items: center; justify-content: center; height: calc(var(--eds-text-secondary) * var(--eds-lh-body)); margin-top: 0; }
	.ft .ft-addr { font-size: var(--eds-text-secondary); line-height: var(--eds-lh-body); }
	.ft .ft-row .ft-addr a { display: inline; min-height: 0; font-size: var(--eds-text-secondary); }
	.ft .ft-addr br { display: none; }
	.ft .ft-addr .ln + br + .ln::before { content: ", "; }
	.ft .ft-copy { width: var(--eds-sp-8); height: var(--eds-sp-8); }
	/* Explore: two columns that read downwards, 32px rows, 16px between the columns. */
	.ft .ft-links { gap: 0 var(--eds-sp-4); }
	.ft .ft-links a { min-height: var(--eds-sp-8); font-size: var(--eds-text-body); }
	/* Social: a row of 40px targets with 20px icons and no extra gap. The row is pulled
	   left by the padding each target holds, so the first icon lines up with the gutter. */
	.ft .ft-social { display: flex; flex-wrap: wrap; gap: 0; margin-left: calc((var(--eds-icon-box) - var(--eds-sp-10)) / 2); }
	.ft .ft-social a { width: var(--eds-sp-10); height: var(--eds-sp-10); }
	.ft .ft-social svg { width: var(--eds-icon-box); height: var(--eds-icon-box); }
	/* The switcher and the docked back-to-top share the first line, switcher left,
	   button right at the page edge (Kim, 2026-11-17); the legal links and the
	   copyright each take a full line under them. Too narrow for both, the button
	   wraps to its own line and stays right. 16px from the rule to the pills, between
	   each line, and 24px (plus the iPhone home-bar inset) under the copyright. */
	/* Legal is a group like Explore on phones (Kim, 2026-11-18): a heading, the same
	   white 16px links in two columns, first in the base, with no rule above it. */
	.ft .ft-base { gap: var(--eds-sp-6) var(--eds-sp-4); padding: 0 0 calc(var(--eds-sp-6) + env(safe-area-inset-bottom, 0px)); border-top: 0; }
	.ft .ft-legal-h { display: block; }
	.ft .ft-site { order: 1; margin-left: 0; }
	.ft .ft-gtt-slot { order: 1; margin-left: auto; }
	.ft .ft-site-list { left: 0; right: auto; }
	.ft .ft-base nav { order: 0; flex-basis: 100%; }
	.ft .ft-meta { order: 3; flex-basis: 100%; font-size: var(--eds-text-small); }
	.ft .ft-legal { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--eds-sp-4); width: 100%; font-size: var(--eds-text-body); }
	.ft .ft-legal a,
	.ft .ft-legal button { min-height: var(--eds-sp-8); text-align: left; color: var(--eds-white); }
}

@media (prefers-reduced-motion: reduce) {
	#go-to-top.is-flipping .gtt__label,
	.ft .ft-copy,
	.ft .ft-site .ft-caret,
	.ft .ft-social a { transition: none; }
}
