/*
Theme Name:   ABS Child
Theme URI:    https://abubakarsiddik.net/
Description:  Child theme of Hello Elementor for abubakarsiddik.net. Holds the local webfont registration and the nine CSS exceptions Elementor cannot express. Everything else is built with native Elementor widgets on the Global Kit.
Author:       Mohammad Emmon
Author URI:   https://mohammademmon.com
Template:     hello-elementor
Version:      1.0.0
Text Domain:  abs-child
*/

/* =============================================================================
   THE AUTHORISED EXCEPTIONS · nine, each one asked for and granted
   -----------------------------------------------------------------------------
   instructions/00 section 3 permits child-theme CSS only for what Elementor
   cannot express, and only one rule at a time, each one raised and authorised
   before it was written. Each block below says what it does and why Elementor
   cannot do it. Nine are authorised: five at sign-off, then 6 (the hero crop
   and the frame ratios, 2026-10-10), 7 (backdrop blur, 2026-10-11), 8 (the FAQ
   question numbers, 2026-10-11) and 9 (the hero ID card below 769, 2026-10-11).
   If a section seems to need a tenth, the section was probably built wrong.
   Stop and raise it rather than adding to this file.

   Colours and spacing come from the Global Kit. The custom properties used
   below are the ones Elementor itself prints from Site Settings -> Global
   Colors, so a client editing a Global Colour still drives these rules.
   ========================================================================== */


/* --- 1 · The oversize outlined footer wordmark -------------------------------
   Elementor's Heading widget has no stroke control. -webkit-text-stroke with a
   transparent fill is the only way to get an outlined glyph, and the reference
   footer is built on it (app.css line 230). The size is fluid in the reference;
   it stays fluid here because this is a single decorative glyph, not body copy,
   so there is no per-device value to read off the type scale.
   Applied via a CSS class on the footer Heading widget: abs-ftr-mark
*/
.abs-ftr-mark,
.abs-ftr-mark .elementor-heading-title{
  font-family:Sora,system-ui,sans-serif;
  font-weight:700;
  font-size:clamp(26px,8.4vw,120px);
  line-height:.78;
  letter-spacing:-.035em;
  color:transparent;
  -webkit-text-stroke:1px var(--e-global-color-edge);
  user-select:none;
  white-space:nowrap;
  transform:translateY(.12em);
}


/* --- 2 · The 62ch reading measure -------------------------------------------
   Elementor's width controls are %, px, vw and em. There is no ch unit, and the
   measure has to be in ch because it must track the font, not the viewport.
   62ch is the signed-off reading column (GLOBAL-KIT section 4).
   Applied via a CSS class on long-prose Text Editor widgets: abs-read
*/
.abs-read,
.abs-read .elementor-widget-container{
  max-width:62ch;
}
.abs-read p{
  max-width:62ch;
}
/* the article column reads at 66ch, the reference's .art-body */
.abs-read-wide,
.abs-read-wide .elementor-widget-container,
.abs-read-wide p{
  max-width:66ch;
}


/* --- 3 · The focus-visible ring ---------------------------------------------
   Elementor exposes hover and active states on widgets but not :focus-visible,
   and the ring has to be global rather than per widget or keyboard users lose
   it the moment a client drags in a new element. Green is permitted here
   because focus is an action state, not decoration (GLOBAL-KIT section 1.1).
   Copied from the reference, app.css line 54.
*/
:focus-visible{
  outline:2px solid var(--e-global-color-green);
  outline-offset:3px;
  border-radius:4px;
}


/* --- 4 · prefers-reduced-motion ---------------------------------------------
   Elementor has no reduced-motion switch. Without this, its entrance animations
   and every transition below keep running for a visitor who has asked the OS to
   stop them. Copied from the reference, app.css line 246.
*/
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}


/* --- 5 · The green status pip and its pulse ---------------------------------
   A pseudo-element ring on a keyframe loop. Elementor cannot author a
   ::after or a @keyframes, and the pip is real UI: it is the one place in the
   whole site where green is allowed to move, because it signals "answering
   now" (GLOBAL-KIT section 1.1). Copied from the reference, app.css line 79.
   Applied via a CSS class on an empty Icon/Divider widget: abs-pip
*/
.abs-pip{
  position:relative;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--e-global-color-green);
  flex:none;
}
.abs-pip::after{
  content:'';
  position:absolute;
  inset:-4px;
  border-radius:50%;
  border:1px solid var(--e-global-color-green);
  opacity:.5;
  animation:abs-pulse 2.6s cubic-bezier(.22,1,.36,1) infinite;
}
@keyframes abs-pulse{
  0%{transform:scale(.6);opacity:.65}
  70%,100%{transform:scale(1.25);opacity:0}
}

/* --- 6 · The hero portrait crop and frame ratio ------------------------------
   Authorised 2026-10-10. Elementor's Object Position control is a nine-keyword
   dropdown (center/top/bottom x left/center/right) with no custom percentage,
   and its containers expose min-height but no aspect-ratio. The hero portrait
   needs both: object-position 50% 22% because his face is not at the centre of
   the image, and a frame that turns from 3:4 to 4:3 on small screens so the
   photograph does not run the length of a phone.

   CLAUDE.md calls the 50% 22% value deliberate: centring it crops his forehead.
   This is the LCP element and the site's strongest trust signal, so the crop is
   not something to approximate.

   Applied via a CSS class on the portrait frame container: abs-hero-portrait
*/
.abs-hero-portrait{
  aspect-ratio:3 / 4;
}
/* Elementor wraps the img in two divs of auto height, so height:100% on the
   img alone resolves against the wrapper and the photograph overflows the
   frame whenever the two ratios disagree. The wrappers have to fill too. */
.abs-hero-portrait .elementor-widget-image,
.abs-hero-portrait .elementor-widget-container,
.abs-hero-portrait figure{
  height:100%;
  margin:0;
}
.abs-hero-portrait img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 22%;
}
@media (max-width:768px){
  .abs-hero-portrait{
    aspect-ratio:4 / 3;
  }
  .abs-hero-portrait img{
    object-position:50% 20%;
  }
}


/* Same gap as exception 6, same class pattern: a thumbnail frame needs a fixed
   ratio so a 480x300 photograph cannot change the height of a list row, and
   Elementor containers have no aspect-ratio control. Scoped to this one class. */
.abs-work-thumb{
  aspect-ratio:16 / 11;
}
.abs-work-thumb .elementor-widget-image,
.abs-work-thumb .elementor-widget-container,
.abs-work-thumb figure{
  height:100%;
  margin:0;
}
.abs-work-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}


/* .art-cover is aspect-ratio:21/9, and 16/10 on a phone, while the uploaded
   cover is 16/9: without the frame ratio the article cover sits 94px too tall. */
.abs-art-cover{
  aspect-ratio:21 / 9;
}
.abs-art-cover .elementor-widget-image,
.abs-art-cover .elementor-widget-container,
.abs-art-cover figure{
  height:100%;
  margin:0;
}
.abs-art-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
@media (max-width:640px){
  .abs-art-cover{
    aspect-ratio:16 / 10;
  }
}


/* .feat-shot is aspect-ratio:16/10 in the reference, and the uploaded shot is
   16/9, so the frame needs the ratio or the blog feature image sits 42px short. */
.abs-feat-shot{
  aspect-ratio:16 / 10;
}
.abs-feat-shot .elementor-widget-image,
.abs-feat-shot .elementor-widget-container,
.abs-feat-shot figure{
  height:100%;
  margin:0;
}
.abs-feat-shot img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}


.abs-about-shot{
  aspect-ratio:4 / 3;
}
/* the About hero's portrait is the tall crop, 4/5, not the home page's 4/3 */
.abs-bio-shot{
  aspect-ratio:4 / 5;
}
.abs-bio-shot .elementor-widget-image,
.abs-bio-shot .elementor-widget-container{
  height:100%;
}
.abs-bio-shot img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.abs-about-shot .elementor-widget-image,
.abs-about-shot .elementor-widget-container{
  height:100%;
}
.abs-about-shot img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}


/* ==========================================================================
   7 · BACKDROP BLUR          authorised 2026-10-11
   Three places in the design read through what is behind them: the hero ID
   card and the About portrait caption, which sit on a photograph, and the
   header bar, which the page scrolls under. Elementor has a CSS-filter control for an element, but
   none for backdrop-filter, so this is the one property it cannot express.
   Everything else about both cards (position, offsets, the translucent fill,
   border, radius, padding) is native and editable in Elementor.
   ========================================================================== */
.abs-glass{
  -webkit-backdrop-filter:blur(8px);
          backdrop-filter:blur(8px);
}
.abs-glass-hero{
  -webkit-backdrop-filter:blur(12px) saturate(140%);
          backdrop-filter:blur(12px) saturate(140%);
}
/* The header bar is the third one: .hdr-bar is rgb(18 26 53 / .86) over a
   blur(14px) saturate(140%), which is what lets the page show through it as it
   scrolls under. The translucent fill itself is a Global Colour, Veil Canvas;
   only the blur needs this rule. Added 2026-10-12 under the same exception. */
.abs-glass-hdr{
  -webkit-backdrop-filter:blur(14px) saturate(140%);
          backdrop-filter:blur(14px) saturate(140%);
}


/* ==========================================================================
   8 · THE FAQ QUESTION NUMBERS          authorised 2026-10-11
   The reference prints a mono Q1 .. Qn in a 30px column to the left of every
   question (.faq2 .q), on the home page, /faq/ and all six service pages. It
   also narrows the question, which is why the reference wraps long questions
   where a flush-left one does not.

   A Nested Accordion cannot carry it natively: its item title is a single
   plain-text field, and its one icon slot already holds the plus/minus the
   reference has on the right. Putting "Q1" in the title text would set it in
   the question's own face and make the client renumber by hand whenever a
   question moves.

   A CSS counter draws the numbers from the markup instead, so each question
   stays one editable field and the numbering follows the order in Elementor.
   Colour, size and tracking come from the kit, and open takes Green because an
   open question is a state, not decoration.
   The reference numbers two ways. A .faq2 block on the home page, the service
   pages, contact and free-check runs Q1, Q2, Q3 and starts again in the next
   block. The /faq/ page runs 01 to 16 straight through its four groups. Hence
   two classes on the accordion, abs-faq and abs-faq-num, and a third on the
   wrapper the /faq/ groups sit in, abs-faq-page, which is where that page's
   counter starts so it can carry across the groups.

   Applied via CSS classes on the Nested Accordion widget: abs-faq (Q1..Qn per
   block) or abs-faq-num inside abs-faq-page (01..16 across the page).
   ========================================================================== */
.abs-faq .e-n-accordion,
.abs-faq-page{
  counter-reset:abs-q;
}
.abs-faq .e-n-accordion-item-title,
.abs-faq-num .e-n-accordion-item-title{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) auto;
  gap:16px;
  align-items:start;
  counter-increment:abs-q;
}
.abs-faq .e-n-accordion-item-title::before,
.abs-faq-num .e-n-accordion-item-title::before{
  font-family:'JetBrains Mono',monospace;
  font-weight:500;
  font-size:10.5px;
  line-height:1.65;
  letter-spacing:.12em;
  padding-top:5px;
  color:var(--e-global-color-blue);
}
.abs-faq .e-n-accordion-item-title::before{
  content:'Q' counter(abs-q);
}
.abs-faq-num .e-n-accordion-item-title::before{
  content:counter(abs-q,decimal-leading-zero);
}
.abs-faq .e-n-accordion-item[open] > .e-n-accordion-item-title::before,
.abs-faq-num .e-n-accordion-item[open] > .e-n-accordion-item-title::before{
  color:var(--e-global-color-green);
}


/* ==========================================================================
   9 · THE HERO ID CARD BELOW 769          authorised 2026-10-11
   On desktop the card overlaps the bottom-left of the portrait. Below 769 the
   reference takes it out of the overlap and hangs it under the photograph,
   pulled up 48px, so the card never sits over his face on a phone.

   Elementor's container Position control is add_control, not
   add_responsive_control: there is one value for all three breakpoints, and a
   tablet value is simply ignored. The alternative is a second copy of the card
   with the desktop one hidden below 769, which would give the client two places
   to edit the same four lines.

   Only the position changes here. The pull-up is the card's own native margin
   on tablet and mobile, so the client still controls it in Elementor. The
   declaration is !important because Elementor prints --position on a
   three-class per-element selector that no class of ours can outrank.
   Applied via a CSS class on the ID card container: abs-hero-id
   ========================================================================== */
@media (max-width:768px){
  .abs-hero-id{
    --position:static!important;
    position:static!important;
  }
}


/* (list continues below) */


/* ==========================================================================
   10 · THE LIVE VISITOR LINE                authorised 2026-10-13
   The two numbers in the hero are written by JavaScript after the page has
   loaded, because any page cache on the live host would otherwise freeze them
   at whatever they were when the cache was written.

   That leaves a moment where the raw {now} and {you} placeholders are on
   screen. The text is kept invisible, not display:none, so it still takes up
   its line and nothing below it jumps when the numbers arrive.

   Applied via a CSS class on the text widget: abs-live
   ========================================================================== */
.abs-live{visibility:hidden}
.abs-live.is-ready{visibility:visible}


/* --- end of the permitted list. Ten, authorised one at a time. ----------- */
