/*
Theme Name:   Isak child theme
Description:  Write here a brief description about your child-theme
Author:       Themesflat
Template:     isak
Version:      1.0.0
Tested up to: 5.8.1
Requires PHP: 5.6
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  isak-child-theme
*/

/*
 * Hero status badge (brief §01) — "Available for Speaking & Coaching".
 *
 * The badge text is not in a flexible box: it sits inside a fixed 32x227px white tab
 * drawn by the parent theme's images/item/vector-user.svg. Once the 8px dot and its
 * 8px flex gap are counted, ~211px of the tab's run is usable, and .sidebar-user
 * .user-image{overflow:hidden} clips whatever escapes the card.
 *
 * The brief's copy is 33 characters: at the theme's 14px (.text-body-3) it measures
 * ~245px, so it silently wrapped into a SECOND vertical column — a 40px-wide text box
 * centred in a 32px tab, 4px past the card's edge where it got clipped. 12.5px with
 * -0.016em tracking measures ~198px, keeping one line with ~13px to spare.
 *
 * Scoped to the vertical instance only; the sub-576px horizontal badge keeps 14px
 * (it measures 246px and still fits a 320px viewport). Specificity beats the theme's
 * single-class .text-vertical, so no !important is needed. If the badge copy is ever
 * edited again, re-measure: past roughly 34 characters it will reflow to two columns.
 *
 * SECOND HALF — the white pill has to grow with the copy (browser-measured, not
 * assumed). vector-user.svg is a 32x227 <img>, but its <path> is a SPINDLE that tapers
 * to a point at both ends, so the white is much narrower than the img box near the top
 * and bottom: measured, white >=26px wide (what the 20px text column needs) spans only
 * img-local y 35..192 = 158px, and the whole shape is 210px tall. The longer copy needs
 * 198.4px (text) + 8px (gap) + 8px (dot) = 214.4px, so at first pass its ends and the
 * dot sat past the white and read straight over the portrait (client-reported).
 *
 * scaleY(1.45) about the default centre stretches the spindle to ~329px, widening the
 * >=26px band to 158 x 1.45 = ~229px — enough for all 214.4px with ~7px of air at each
 * end. Both boxes are 227px and concentric, so the shape, the text and the dot stay
 * centred on each other. If the copy grows again, this factor is the knob: required
 * band = text run + 16px, so factor = (run + 16 + margin) / 158.
 *
 * THIRD PART — the stretch also lengthens the tab's tapered TIPS (~51px at each end),
 * and those tips are what the badge then reached down over the "Hi, I'm <rotating word>"
 * row with (client-reported: the extended white pill pushed the changing intro text).
 * The two halves of the badge are anchored differently by the theme: .meta-left (this
 * tab + the copy) is vertically CENTRED in the card (top:50% + translateY(-50%)), while
 * .user-info (the intro text) is BOTTOM-anchored (bottom:38px). On short viewports the
 * home card is capped to the viewport height, so the two converge — at the preview
 * size (1055x672) the centred badge landed with its stem beside the intro line and its
 * tip 83px below it, and even at 1440x900 the clearance was ~4px.
 *
 * Fix: re-anchor the badge above the intro block instead of centring it in the card, so
 * the clearance no longer depends on how tall the card happens to be. This offset is the
 * composition knob, and LOWER = CLOSER to the intro text. It must stay large enough that
 * the tab's SOLID white (the >=26px band) is clear of the intro text at every viewport:
 * measured floor ~247px (below that the solid part re-enters the row at 1440/1920). 313px
 * was the first fix (airy — .user-info's bottom + height (219..247px) + the stretched
 * tab's lower tip (51px) + a ~16px gap); lowering it eats that gap first. The client chose
 * 262px after a before/after comparison at 1055x672: the solid white stays 43px clear
 * there and >=15px clear at 1440/1920, while the tab's thin tip just reaches the top of
 * the "Hi, I'm ..." row — the tightest value that is safe everywhere. The rule also
 * removes the theme's translateY(-50%), which only exists to centre a top:50% box. Ink is
 * never covered at any value: the tab occupies the 8px gutter left of the text (tab
 * x 22..54, text x >=62). If .user-info's height changes materially, or the badge copy is
 * shortened (fewer px of run -> a shorter stretch -> a shorter tip), recompute as
 * bottom = intro-block height above the card's bottom + (tab height x (factor - 1) / 2)
 * + the gap you want.
 */
.sidebar-user .user-image .avaiable-dot .text-vertical {
	font-size: 12.5px;
	letter-spacing: -0.016em;
}

.sidebar-user .user-image .bg-item-svg img {
	transform: scaleY(1.45);
}

/* Note the body.page-id-35 prefix: this child stylesheet prints BEFORE the parent's
 * css/main.css + css/tf-main.css (verify the order in the served <head>), so an
 * equal-specificity rule loses to the theme's .sidebar-user .user-image .meta-left.
 * The extra class wins on specificity without !important. */
body.page-id-35 .sidebar-user .user-image .meta-left {
	top: auto;
	bottom: 262px;
	transform: none;
}

/*
 * Footer name-marks — the two large wordmarks in the footer (client request:
 * "Change the large footer text 'Isak' for 'Gbenga' and 'Folio' for 'Oba'").
 *
 * The marks are inline SVGs echoed by footer.php / footer-2.php from the theme options
 * footer_signature_1 (top, .foot-inner) and footer_signature_2 (bottom, .foot-bottom).
 * With both options unset, the parent theme's own demo artwork was rendering — the
 * outlined words "Isak" (viewBox 354x160) and "Folio" (428x162). The replacements are
 * outlined "Gbenga" (744x209) and "Oba" (386x161) in the theme's ApfelGrotezk font,
 * drawn at the demo art's cap height (150 user units) and its -0.038em tracking, and
 * installed through the Customizer's own signature fields (uploads 1261/1262).
 *
 * The theme sizes each mark by a max-width that IS the demo wordmark's viewBox width:
 *   .tf-footer .foot-inner .isak  { max-width: 354px }   (css/tf-main.css:7338)
 *   .tf-footer .foot-bottom .isak { max-width: 428px }   (css/tf-main.css:7350)
 * At the mark's natural 1:1 scale that cap height renders cap 150px on desktop. Left
 * alone, a six-letter name would be squeezed into 354px and its letters would shrink to
 * ~47% of the demo's (cap 70px) — so each maximum is raised to the replacement's own
 * viewBox width, which keeps the letters the same size as the approved template art.
 * The bottom mark needs a smaller box (386 < the old 428) because "Oba" is three
 * letters, not five. Heights follow each SVG's aspect ratio automatically.
 *
 * Why the `body` prefix: this child stylesheet prints BEFORE the parent's tf-main.css
 * (see the note above), so an equal-specificity rule would lose. `body` adds the one
 * element that wins the cascade without !important.
 *
 * The wordmark is a flexible flex item, so it renders min(natural width, whatever the row
 * leaves). The footer row is narrow — measured 720px at 1920, 676px at 1440, 489px at
 * 1024, 326px at 390 — so a six-letter name never reaches its natural 744px and is always
 * row-limited; it therefore always keeps the flex gap (12px) as its only clearance to the
 * round logo. The min-width:992px rule below subtracts the logo + gap + a 40px gutter so
 * the desktop composition keeps deliberate air instead of looking wedged. Below 992px the
 * row is far narrower than either artwork anyway, and there the theme's own behaviour (the
 * mark fills its slot) is left alone.
 *
 * Only max-width is touched. If the marks are ever swapped in the Customizer, update these
 * numbers to the new artwork's viewBox widths (or delete these rules and the new mark
 * simply renders at the template's default size).
 */
body .tf-footer .foot-inner .isak {
	max-width: 744px;
}

@media (min-width: 992px) {
	body .tf-footer .foot-inner .isak {
		max-width: min(744px, calc(100% - 120px));
	}
}

body .tf-footer .foot-bottom .isak {
	max-width: 386px;
}

/*
 * Footer wordmark direction — Customizer: Appearance → Customize → Footer →
 * "Flip the top/bottom footer image (mirror)".
 *
 * The template adds .isak-mark-flip to the mark's wrapper when that toggle is
 * ticked (isak_child_signature_flip_class() in functions.php); the mirror itself
 * is a scaleX(-1) on the <svg>.
 *
 * The <svg> is deliberately the target rather than the .isak wrapper: the
 * wrapper carries the theme's fadeUp reveal, which animates transform, so
 * flipping it would fight the animation. The paths inside keep their own
 * fill/stroke, so the theme's dark-mode recolour
 * (.dark-mode .tf-footer .isak path) still applies unchanged.
 *
 * Nothing else is touched — in particular the max-width rules above and the
 * theme's own sizing are direction-agnostic (a reflection preserves the box).
 */
body .tf-footer .isak.isak-mark-flip svg {
	transform: scaleX(-1);
}

/*
 * "Recognition & Publications" heading over the publications list.
 *
 * The markup is injected by this child theme (isak_child_award_heading_html() in
 * functions.php) inside the TF About widget, between the bio and <ul class="award-list">.
 * The client edits the text — or hides the heading — in the widget's own panel:
 * Elementor -> TF About Section -> Content -> Awards List -> "Show Heading" / "Heading Text".
 *
 * Only the spacing lives here. Type, colour and letter-spacing come from the theme's own
 * classes on the <h5> (.letter-space--2, .text-black-72 — the latter is a dark-mode
 * custom property, so no dark-mode rule is needed).
 *
 * The gap ABOVE the heading is the theme's existing .section-about .s-desc margin-bottom
 * (88px desktop / 60px <=1199 / 40px <=767), which used to separate the bio from the list
 * directly; it is deliberately left alone so the bio still gets the template's full air and
 * only the heading-to-list gap is set here (24px, 16px on mobile) — tighter than the bio's
 * gap, so the heading reads as the list's own label rather than a second bio paragraph.
 *
 * `body` prefix for the same reason as the footer rules above: this stylesheet prints
 * before the parent's tf-main.css, so an equal-specificity rule could lose the cascade.
 */
body .section-about .award-heading {
	margin-bottom: 24px;
}

@media (max-width: 767px) {
	body .section-about .award-heading {
		margin-bottom: 16px;
	}
}

/*
 * Hero circular text — set in the logo's own type (client request 2026-09-13).
 *
 * The rotating ring around the GO badge is live text, not artwork: TF Intro prints an empty
 * <div class="text" data-text="…"> and plugin-core's main.js splits that string into one <span>
 * per character, rotating each by 360/length about `transform-origin: 0 83px` (75px at the
 * theme's own <=575px size). So everything below is ordinary typography and stays editable:
 * Elementor -> TF Intro -> Content -> Circular Text.
 *
 * What was wrong: the theme uppercased the string and let it inherit the body size, so the ring
 * read "THEGBENGAOBA.GBENGAOBA." while the client's logo reads "TheGbengaOba. GbengaOba." in
 * mixed case. Font: the ring already renders in Inter, which is also the closer of the two
 * families this site loads to the mark's letterforms — compared side by side against Apfel
 * Grotezk (the heading font): Inter's narrow grotesque forms, double-storey 'a' and flat-barred
 * 'G' match the logo, Apfel's wider, rounder forms do not. No new font is introduced.
 *
 * Size: measured off the logo, not guessed. In the mark the ring glyphs are 52px tall at a
 * mid-band radius of 415px, i.e. glyph height = 0.125 x ring radius; the site's radius is 83px,
 * so the cap height wants ~10.4px and Inter's cap height is 0.7275em -> 14px (75/83 of that at
 * the <=575px ring).
 *
 * Spacing and the dot: characters are placed by equal angle, so per-character letter-spacing
 * cannot move them — each span holds one character and the browser positions it by rotation.
 * The spacing is therefore the string itself, which is why `curve_text` now carries a space
 * after every dot ("TheGbengaOba. GbengaOba. …"), exactly as the logo's ring is set: the space
 * is a real slot in the ring, and that is what gives the dot its air. Do NOT try to fix the
 * spacing here with letter-spacing — it will do nothing.
 *
 * `body` prefix for the same reason as the other child rules: this stylesheet prints before the
 * parent's tf-main.css, so an equal-specificity rule could lose the cascade.
 */
body.page-id-35 .section-intro .text-rotate .text span {
	font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

@media (max-width: 575px) {
	body.page-id-35 .section-intro .text-rotate .text span {
		font-size: 12.7px;
	}
}

/*
 * Footer logo slot — the disc and the mark inside it.
 *
 * The markup is printed by isak_child_footer_logo_mark() (functions.php), which sets
 * --isak-f-logo-size inline from Appearance → Customize → Footer → "Footer logo size (px)".
 *
 * The size arrives as a custom property rather than an inline `width` so it can be re-read at a
 * breakpoint. The parent's own mobile rule shrinks the disc to 40px
 * (.tf-footer .f-logo { width:40px; height:40px } at <=767px, css/tf-main.css:7386), and the
 * largest square that fits inside a 40px circle is 40 ÷ √2 ≈ 28px. An inline width could not be
 * capped there without !important, and would also permanently outrank the parent's global
 * `img, pre { height:auto; width:100% }`.
 *
 * The 48px fallback in each var() matches the control's default, so the geometry still holds if
 * an image is ever printed without the property.
 *
 * Two parent rules have to be neutralised for the mark to reach the requested size at all,
 * and the disc's padding box is smaller than the mark by design — the disc is 68px with
 * padding:18px, i.e. a 32px content box, while the mark wants up to 48px. Measured on the live
 * page: without these the mark rendered 32px no matter what the control said.
 *
 *   1. the wrapper is a flex item with the default flex-shrink:1, so it shrank to the 32px
 *      content box instead of taking the mark's width (flex:0 0 auto);
 *   2. the parent's global `img { max-width: 100% }` (css/tf-main.css) then clamped the mark to
 *      that shrunken 32px box, silently overriding the explicit width (max-width:none).
 *
 * The wrapper is released at every breakpoint, not just below the parent's 20px mobile pin
 * (css/tf-main.css:7392), so the mark is always centred inside the disc: a wrapper narrower than
 * the mark would align the mark to the wrapper's left edge and hang it out to the right,
 * off-centre, since the disc is padding, not clipping.
 *
 * `display: block` on the mark, and dropping the parent's 4px mobile padding-bottom, together
 * take the mark off the text baseline. An inline image sits on the baseline and carries the
 * strut's descender below it, so its wrapper is taller than the art and the art rides high or
 * low inside the disc — measured 0.42px off-centre at 1440 and 1.66px at 390 before this. The
 * parent's 4px nudge was compensating for exactly that gap on the old 20px mark; at 28px in a
 * 40px disc it is also the difference between touching the circle and crossing it (28 ÷ √2 =
 * 19.80 against a 20px radius).
 *
 * `body` prefix for the same reason as the footer rules above: this stylesheet prints before the
 * parent's tf-main.css, so an equal-specificity rule could lose the cascade.
 */
body .tf-footer .f-logo .logo {
	width: auto;
	flex: 0 0 auto;
}

body .tf-footer .f-logo .logo img.image-switch {
	display: block;
	width: var(--isak-f-logo-size, 48px);
	max-width: none;
	height: auto;
}

@media (max-width: 767px) {
	body .tf-footer .f-logo .logo {
		padding-bottom: 0;
	}

	body .tf-footer .f-logo .logo img.image-switch {
		width: min(var(--isak-f-logo-size, 48px), 28px);
	}
}

/*
 * Core Expertise (tf-tech-stack) — keep the icon chip circular.
 *
 * The chip (.wg-tech .tech_image, 64x64 with border-radius:50%) is a flex item inside
 * .tech-infor, which the theme lays out as display:flex. It therefore inherits the default
 * flex: 0 1 auto — shrink factor 1, no min-width floor — so when the row is too narrow the flex
 * algorithm takes its share of the shortfall out of the chip's WIDTH while height stays 64px,
 * and border-radius:50% draws a vertical ellipse. Measured at 390px before this rule: chips
 * 45.97x64, 48.06x64, 47.73x64; 64x64 at 768px and above, which is why it only shows on mobile.
 *
 * This is NOT a size problem, which is why Elementor's responsive "Box Width/Height" control
 * (icon_box_size, in the widget's own Content tab) does not fix it: a smaller mobile value just
 * gives flex a smaller base to shrink — measured 38.31x52 at 52px. A shrink-proof floor is what
 * is needed, hence flex-shrink:0; min-width:64px works identically. With it the chip stays 64x64
 * at 390px, the text still fits and the page keeps no horizontal overflow.
 *
 * Scoped to the widget rather than to page 35: the squash is inherent to the widget's own flex
 * row wherever it is used. Its sibling icon rules (glyph size/colour) live in the page's Elementor
 * custom CSS in post 1215 — this is a theme-level layout guard, so it lives here where it is
 * version-controlled and revertible with `git restore`.
 */
body .wg-tech .tech_image {
	flex-shrink: 0;
}

