/* ==========================================================================
   Smash Rabbit — child theme styles
   --------------------------------------------------------------------------
   Scope rule for this file: if Elementor can express it through a native
   control, it does NOT belong here. What remains is font delivery, the design
   tokens, and the six treatments Elementor has no control for.

   Every value is measured from "1. LANDING PAGE.pdf" on its native 1920
   canvas. See docs/01-implementation-spec.md for the derivation.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   --------------------------------------------------------------------------
   Stand-ins for the artwork's licensed faces:
     Big Noodle Titling  ->  Big Shoulders Display  (display, weight 600)
     Gotham              ->  Montserrat             (body, variable 400-700)

   To switch to the licensed originals: drop the .woff2 files into
   assets/fonts/, change the src and font-family names below, and update the
   two family names in Elementor → Site Settings → Global Fonts. Nothing else
   in the build refers to the family names.

   The latin-ext subsets are declared but only downloaded by the browser if
   the page actually contains those characters.
   -------------------------------------------------------------------------- */

@font-face {
	font-family: 'Big Shoulders Display';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/bigshouldersdisplay-600-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Big Shoulders Display';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/bigshouldersdisplay-600-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/montserrat-latin.woff2') format('woff2-variations'), url('../fonts/montserrat-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/montserrat-latin-ext.woff2') format('woff2-variations'), url('../fonts/montserrat-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   --------------------------------------------------------------------------
   These mirror Elementor's Global Colours and Global Fonts. Elementor remains
   the source of truth for anything a widget uses — these exist so the custom
   treatments below, and any future custom CSS, can reference the same values
   instead of hard-coding hexes.

   If you change a colour in Site Settings → Global Colours, change it here too.
   -------------------------------------------------------------------------- */

:root {
	/* Palette — sampled directly from the artwork */
	--sr-orange: #f59120;
	--sr-orange-hover: #d97a10;
	--sr-charcoal: #333333;
	--sr-charcoal-deep: #222121;   /* footer */
	--sr-off-white: #f4f4f4;       /* pale panels + display type on charcoal */
	--sr-white: #ffffff;           /* white panels + body copy on charcoal */
	--sr-page: #e8e8e8;            /* the substrate the panels sit on */
	--sr-grey: #a7a9ac;            /* the "+" marks, placeholder tiles */
	--sr-line: #e2e2e2;            /* hairline — inferred, not in the artwork */

	/* Layout rails */
	--sr-channel: 1170px;          /* content channel: x 374 -> 1544 */
	--sr-panel: 1420px;            /* panel band:      x 251 -> 1671 */
	--sr-narrow: 820px;
	--sr-gutter: 24px;

	/* Fluid type — artwork sizes held at 1280px and above, scaled to 390px.
	   Duplicated into Elementor's Global Fonts as custom-unit values. */
	--sr-fs-hero: clamp(2.5rem, 1.377rem + 4.607vw, 5.0625rem);      /* 40 -> 81 */
	--sr-fs-h2: clamp(2.125rem, 1.303rem + 3.371vw, 4rem);           /* 34 -> 64 */
	--sr-fs-h3: clamp(1.875rem, 1.409rem + 1.910vw, 2.9375rem);      /* 30 -> 47 */
	--sr-fs-badge: clamp(1.25rem, 1.086rem + 0.674vw, 1.625rem);     /* 20 -> 26 */
	--sr-fs-lede: clamp(1.0625rem, 0.980rem + 0.337vw, 1.25rem);     /* 17 -> 20 */
	--sr-fs-body: clamp(1rem, 0.945rem + 0.225vw, 1.125rem);         /* 16 -> 18 */
	--sr-fs-quote-mark: clamp(6.875rem, 2.575rem + 17.640vw, 16.6875rem); /* 110 -> 267 */

	/* Display tracking.
	   Big Shoulders Display sets ~5.8% wider than the artwork's Big Noodle
	   Titling, which pushes four of the design's headlines onto an extra line
	   and breaks the composed line breaks. -0.03em was derived by measuring all
	   19 headline lines in the artwork against the substitute: it brings every
	   line to within 1% of its drawn width and keeps each headline on its
	   intended number of lines.

	   With licensed Big Noodle Titling installed, set this to 0.01em — and
	   change the same value in Elementor → Site Settings → Global Fonts, which
	   is where the widgets actually read it from. */
	--sr-ls-display: -0.03em;

	/* Spacing */
	--sr-section-y: clamp(3.5rem, 1.747rem + 7.191vw, 7.5rem);       /* 56 -> 120 */

	/* The orange strip laid over one edge of each split photograph.
	   Measured at 44px in all three sections of the artwork. */
	--sr-strip-width: clamp(22px, 3.2vw, 44px);
}

/* --------------------------------------------------------------------------
   3. Accessible browser defaults
   -------------------------------------------------------------------------- */

/* Hello Elementor does not ship a visible focus ring on every control.
   :focus-visible keeps it off mouse clicks and on for keyboard users. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--sr-orange);
	outline-offset: 3px;
	border-radius: 2px;
}

/* On the orange field itself an orange ring is invisible. */
.sr-on-orange :focus-visible,
.elementor-button:focus-visible {
	outline-color: var(--sr-charcoal);
}

::selection {
	background: var(--sr-orange);
	color: var(--sr-white);
}

.skip-link:focus {
	background: var(--sr-orange);
	color: var(--sr-white);
	padding: 12px 22px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	z-index: 100000;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* --------------------------------------------------------------------------
   4. The orange full stop
   --------------------------------------------------------------------------
   Every closing headline carries a full stop in the accent colour. Type it
   straight into the Heading widget's title field:

     Design with purpose<span class="sr-dot">.</span>
   -------------------------------------------------------------------------- */

.sr-dot {
	color: var(--sr-orange);
}

/* --------------------------------------------------------------------------
   5. Split photographs
   --------------------------------------------------------------------------
   Two things Elementor cannot do natively:

   (a) An aspect-ratio box. The artwork's split photographs each have their own
       frame ratio, and that frame is what sets the section's height. Holding
       the ratio (rather than a pixel height) is what keeps the composition
       intact at every width.
   (b) The orange strip. It is laid over the photograph's outer edge in
       multiply, so the photographic texture reads through it — a flat orange
       overlay is visibly wrong. `isolation` keeps the blend inside the frame
       instead of multiplying against the section behind it.

   Put `sr-photo` plus one ratio class on the Image widget, and one strip class
   if that photograph carries the accent.
   -------------------------------------------------------------------------- */

.sr-photo {
	position: relative;
	isolation: isolate;
}

.sr-photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Frame ratios, measured from the artwork */
.sr-ratio-approach { aspect-ratio: 661 / 710; }   /* 03 Our Approach */
.sr-ratio-portrait { aspect-ratio: 554 / 708; }   /* 05 Why Smash Rabbit */
.sr-ratio-cta      { aspect-ratio: 626 / 556; }   /* 08 Let's Work Together */
.sr-ratio-card     { aspect-ratio: 332 / 460; }   /* service card media */
.sr-ratio-hero     { aspect-ratio: 1920 / 696; }

.sr-photo.sr-ratio-approach,
.sr-photo.sr-ratio-portrait,
.sr-photo.sr-ratio-cta,
.sr-photo.sr-ratio-card {
	overflow: hidden;
}

.sr-strip-left::after,
.sr-strip-right::after {
	content: "";
	position: absolute;
	inset-block: 0;
	width: var(--sr-strip-width);
	background: var(--sr-orange);
	mix-blend-mode: multiply;
	pointer-events: none;
	z-index: 2;
}

.sr-strip-left::after  { left: 0; }
.sr-strip-right::after { right: 0; }

/* Safari has historically mis-composited multiply over an <img> inside a
   transformed ancestor. Promoting the frame to its own layer avoids it. */
.sr-strip-left,
.sr-strip-right {
	transform: translateZ(0);
}

/* --------------------------------------------------------------------------
   6. The chevron text link  ("EXPLORE BRANDING >")
   --------------------------------------------------------------------------
   Add `sr-link` to a Button widget. The chevron is generated so the label
   stays plain editable text, and it is decorative — screen readers read only
   the label, which already says where it goes.
   -------------------------------------------------------------------------- */

.sr-link .elementor-button-text::after {
	content: ">";
	margin-left: 0.4em;
	display: inline-block;
	transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.sr-link .elementor-button:hover .elementor-button-text::after,
.sr-link .elementor-button:focus-visible .elementor-button-text::after {
	transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   7. Navigation pipe separators
   --------------------------------------------------------------------------
   Add `sr-nav-pipes` to the Nav Menu widget. Suppressed on the mobile
   dropdown, where items stack.
   -------------------------------------------------------------------------- */

@media (min-width: 1025px) {
	.sr-nav-pipes .elementor-nav-menu--main .elementor-nav-menu > li + li::before {
		content: "|";
		align-self: center;
		color: rgba(244, 244, 244, 0.45);
		pointer-events: none;
	}

	.sr-nav-pipes .elementor-nav-menu--main .elementor-nav-menu {
		align-items: center;
	}
}

/* --------------------------------------------------------------------------
   8. Headline line breaks
   --------------------------------------------------------------------------
   Every headline in the artwork breaks at a chosen point. Those breaks are
   composed for a 570px column and are wrong once the column narrows, so
   `sr-nobreak-sm` releases them below the tablet breakpoint and lets the text
   wrap naturally.

   IMPORTANT when editing a heading: type a space *before* each <br>, like
   `Great businesses <br>deserve to be <br>remembered.` Hiding a <br> does not
   introduce a word gap, so without that space the mobile headline reads
   "Great businessesdeserve to be". The trailing space collapses at the end of
   a line, so it changes nothing on desktop.
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.sr-nobreak-sm br {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   9. Service card — link pinned to the card foot
   --------------------------------------------------------------------------
   The three cards are equal height, so their links must sit on a common
   baseline regardless of how many lines the copy runs to. Elementor has no
   "push to the bottom" control for a widget inside a flex container.
   -------------------------------------------------------------------------- */

.sr-push-down {
	margin-top: auto;
}

/* --------------------------------------------------------------------------
   10. Badge hover
   --------------------------------------------------------------------------
   The box fills orange and its label flips to white. Elementor can colour the
   container on hover, but not a child widget's text at the same time.
   Decorative only — the badges are not interactive controls.
   -------------------------------------------------------------------------- */

.sr-badge:hover .elementor-heading-title,
.sr-badge:focus-within .elementor-heading-title {
	color: var(--sr-white);
}

/* --------------------------------------------------------------------------
   11. Touch targets
   --------------------------------------------------------------------------
   The footer nav sets 16px links on a tight rhythm. Below tablet they need
   room to be tapped reliably.
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.sr-footer-nav .elementor-icon-list-item > a,
	.sr-footer-nav .elementor-nav-menu a {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}
}
