/*
Theme Name: SwankedHQ Child
Template: swankedhq
Author: Swanked Digital
Version: 1.2.1
Text Domain: swankedhq-child
Description: Brand layer + portal page templates (Hero Full, Hero Canvas) + branded login screen for the SwankedHQ client portal. Pairs with the Swanked Engagement Manager plugin.
*/

/* ─────────────────────────────────────────────────────────────────
 * SWANKEDHQ — SITE-WIDE BRAND LAYER
 *
 * One source of truth for site-wide typography, colour, buttons,
 * forms, and the WP login screen. The SEM plugin handles its own
 * surfaces (.sem-portal, .sem-welcome, .sem-onboarding, .sem-form)
 * via assets/css/sem-admin.css — this file covers everything else:
 * Elementor pages, default WP-rendered content, BuddyBoss theme
 * surfaces, the login screen, etc.
 *
 * Tokens are exposed as CSS custom properties under the `--sd-`
 * namespace so any custom block, Elementor HTML widget, or one-off
 * stylesheet can pick them up without redefining them.
 *
 * Order of cascade with Elementor:
 *   1. This file (loaded by the child theme)
 *   2. Elementor's Site Settings (Global Fonts/Colors + Theme Style)
 *   3. Per-widget Elementor settings (highest specificity, GUI-set)
 *
 * Elementor wins on individually-styled widgets — that's intentional.
 * This file sets the brand floor; Site Settings builds on it; per-
 * widget overrides handle one-off creative.
 * ───────────────────────────────────────────────────────────────── */


/* ── 1. TOKENS ─────────────────────────────────────────────────── */

:root {
  /* Brand palette — primary */
  --sd-coral:        #d96557;
  --sd-coral-dark:   #bf4f42;
  --sd-coral-dim:    rgba(217, 101, 87, 0.1);
  --sd-mauve:        #9e8db5;
  --sd-mauve-dark:   #7e6d95;
  --sd-lavender:     #ddd4ea;
  --sd-sky:          #8aabd4;
  --sd-sky-light:    #b8cfe8;

  /* Neutrals */
  --sd-charcoal:     #232323;
  --sd-ink:          #1e1e22;
  --sd-mid:          #7a7490;
  --sd-cream:        #faf3ec;
  --sd-cream-mid:    #f0e8df;
  --sd-cream-dark:   #e4dbd0;

  /* Status / accent */
  --sd-pop-lime:     #d4ec6a;
  --sd-success:      #5aa67a;
  --sd-success-dim:  rgba(90, 166, 122, 0.1);
  --sd-warn:         #e8a060;

  /* Type stack */
  --sd-font-display: 'Bebas Neue', 'Impact', sans-serif;
  --sd-font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --sd-font-mono:    'Space Mono', 'Courier New', monospace;

  /* Radii / shadows / motion */
  --sd-r-sm:  6px;
  --sd-r-md:  10px;
  --sd-r-lg:  16px;
  --sd-r-xl:  24px;
  --sd-shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.05);
  --sd-shadow-card:  0 2px 16px rgba(0, 0, 0, 0.07);
  --sd-shadow-float: 0 8px 40px rgba(0, 0, 0, 0.12);
  --sd-t: 0.2s ease;
}


/* ── 2. BASE TYPOGRAPHY ────────────────────────────────────────── */

/*
 * Body default: DM Sans + brand ink colour. Wrapped in :where() where
 * relevant so per-page overrides win without !important wars. We do
 * NOT touch Elementor's own widget output here — Elementor sets very
 * specific selectors on its widgets, and Site Settings is the right
 * place to control those.
 */

body {
  font-family: var(--sd-font-body);
  color: var(--sd-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Default headings — Bebas Neue, tight, charcoal. */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.widget-title {
  font-family: var(--sd-font-display);
  color: var(--sd-ink);
  letter-spacing: 0.5px;
  line-height: 1.05;
  font-weight: 400; /* Bebas Neue is a single-weight display face */
  margin-top: 0;
}

h1, .entry-title, .page-title { font-size: clamp(40px, 6vw, 72px); margin-bottom: 24px; }
h2 { font-size: clamp(32px, 4.5vw, 56px); margin-bottom: 20px; }
h3 { font-size: clamp(26px, 3.5vw, 40px); margin-bottom: 16px; }
h4 { font-size: clamp(20px, 2.5vw, 28px); margin-bottom: 14px; }
h5 { font-size: 18px; margin-bottom: 12px; }
h6 {
  font-family: var(--sd-font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sd-mid);
  margin-bottom: 12px;
}

/* Paragraphs and lists. Reasonable line-height for long-form reading. */
p, li {
  font-family: var(--sd-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--sd-ink);
}

ul, ol {
  padding-left: 1.4em;
  margin-bottom: 16px;
}
li + li { margin-top: 6px; }

small, .text-small { font-size: 13px; line-height: 1.55; color: var(--sd-mid); }

strong, b { font-weight: 700; }

code, kbd, pre {
  font-family: var(--sd-font-mono);
  font-size: 0.9em;
}

code {
  background: var(--sd-cream-mid);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--sd-charcoal);
}


/* ── 3. LINKS ──────────────────────────────────────────────────── */

a {
  color: var(--sd-coral);
  text-decoration: none;
  transition: color var(--sd-t), opacity var(--sd-t);
}
a:hover,
a:focus-visible {
  color: var(--sd-coral-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}


/* ── 4. BLOCKQUOTES + EMPHASIS ─────────────────────────────────── */

blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--sd-coral);
  font-style: italic;
  font-size: 18px;
  line-height: 1.65;
  color: var(--sd-mid);
}
blockquote p { margin-bottom: 8px; }
blockquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 13px;
  color: var(--sd-mid);
  letter-spacing: 1px;
  text-transform: uppercase;
}

hr {
  border: none;
  height: 1px;
  background: var(--sd-cream-dark);
  margin: 36px 0;
}


/* ── 5. BUTTONS ────────────────────────────────────────────────── */

/*
 * Default WP / theme buttons: coral fill, white text, lift on hover.
 * Scoped to the most common WP button classes; Elementor's button
 * widget uses its own selectors and is best controlled in
 * Site Settings → Theme Style → Buttons.
 */
.button,
.wp-block-button .wp-block-button__link,
button:not(.elementor-button):not(.ff-btn):not([class*="bb-"]):not([class*="ff-"]):not([class*="sem-"]),
input[type="submit"]:not(.elementor-button) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sd-font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  background: var(--sd-coral);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: var(--sd-r-sm);
  cursor: pointer;
  transition: all var(--sd-t);
  text-decoration: none;
  line-height: 1;
}

.button:hover,
.wp-block-button .wp-block-button__link:hover,
button:not(.elementor-button):not(.ff-btn):not([class*="bb-"]):not([class*="ff-"]):not([class*="sem-"]):hover,
input[type="submit"]:not(.elementor-button):hover {
  background: var(--sd-coral-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(217, 101, 87, 0.3);
  text-decoration: none;
}


/* ── 6. FORM INPUTS ────────────────────────────────────────────── */

/*
 * Default form-control styling for non-Elementor / non-Fluent Forms
 * inputs. Fluent Forms inside `.sem-form` get their own brand style
 * via sem-admin.css; Elementor form widget is controlled in its own
 * Style tab. This catches everything else (search forms, comment
 * forms, Gravity Forms when not themed, etc.).
 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
textarea,
select {
  font-family: var(--sd-font-body);
  font-size: 14px;
  color: var(--sd-ink);
  background: #fff;
  border: 1px solid var(--sd-cream-dark);
  border-radius: var(--sd-r-sm);
  padding: 11px 14px;
  transition: border-color var(--sd-t), box-shadow var(--sd-t);
  width: 100%;
  max-width: 100%;
  line-height: 1.4;
}

input::placeholder,
textarea::placeholder {
  color: var(--sd-mid);
  opacity: 0.6;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--sd-mauve);
  box-shadow: 0 0 0 3px rgba(158, 141, 181, 0.12);
}

textarea {
  min-height: 96px;
  line-height: 1.6;
  resize: vertical;
}

label {
  font-family: var(--sd-font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sd-mid);
  display: block;
  margin-bottom: 6px;
}


/* ── 7. SELECTION + FOCUS ──────────────────────────────────────── */

::selection {
  background: var(--sd-coral);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--sd-mauve);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ── 8. UTILITY CLASSES (for Elementor HTML widgets, etc.) ─────── */

/*
 * Drop-in classes you can use inside Elementor's HTML widget, Custom
 * HTML blocks, or anywhere you need brand-consistent text without
 * hand-rolling styles every time.
 *
 * All prefixed `.sd-` so they don't collide with Elementor's own
 * `.elementor-*` or BuddyBoss's `.bb-*` namespaces.
 */

/* Eyebrow tag — short uppercase label above a heading */
.sd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sd-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--sd-mauve);
  margin: 0 0 16px;
}
.sd-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* Display title — biggest possible, for above-the-fold */
.sd-display-title {
  font-family: var(--sd-font-display);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.9;
  letter-spacing: 1px;
  color: var(--sd-ink);
  margin: 0 0 24px;
}
.sd-display-title em,
.sd-section-title em,
.sd-page-title em {
  font-style: normal;
  color: var(--sd-coral);
}

/* Section title — for inside-page section headings */
.sd-section-title {
  font-family: var(--sd-font-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.95;
  letter-spacing: 0.5px;
  color: var(--sd-ink);
  margin: 0 0 18px;
}

/* Page title — for default pages */
.sd-page-title {
  font-family: var(--sd-font-display);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: 1px;
  color: var(--sd-ink);
  margin: 0 0 20px;
}

/* Lede paragraph — larger body copy under a heading */
.sd-lede {
  font-family: var(--sd-font-body);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.7;
  color: var(--sd-mid);
  max-width: 640px;
  margin: 0 0 24px;
}

/* Mono — for numbers, IDs, technical labels */
.sd-mono {
  font-family: var(--sd-font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--sd-mid);
}

/* Buttons — drop-in, no theme override needed */
.sd-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sd-font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  background: var(--sd-coral);
  color: #fff !important;
  padding: 14px 28px;
  border-radius: var(--sd-r-sm);
  text-decoration: none !important;
  transition: all var(--sd-t);
  border: none;
  cursor: pointer;
  line-height: 1;
}
.sd-button:hover,
.sd-button:focus {
  background: var(--sd-coral-dark);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(217, 101, 87, 0.3);
  text-decoration: none !important;
}

.sd-button-secondary {
  background: transparent;
  color: var(--sd-charcoal) !important;
  border: 2px solid var(--sd-charcoal);
  padding: 12px 26px;
}
.sd-button-secondary:hover,
.sd-button-secondary:focus {
  background: var(--sd-charcoal);
  color: #fff !important;
  border-color: var(--sd-charcoal);
}

.sd-button-ghost {
  background: transparent;
  color: var(--sd-coral) !important;
  border: 2px solid var(--sd-coral);
  padding: 12px 26px;
}
.sd-button-ghost:hover,
.sd-button-ghost:focus {
  background: var(--sd-coral);
  color: #fff !important;
}

/* Decorative gradient divider */
.sd-divider {
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--sd-coral), var(--sd-mauve));
  border-radius: 1px;
  margin: 24px 0;
  border: none;
}

/* Card surface */
.sd-card {
  background: #fff;
  border: 1px solid var(--sd-cream-dark);
  border-radius: var(--sd-r-md);
  padding: 24px;
  box-shadow: var(--sd-shadow-card);
}
.sd-card-cream {
  background: var(--sd-cream-mid);
  border-color: var(--sd-cream-dark);
}

/* Background utilities */
.sd-bg-cream    { background: var(--sd-cream); }
.sd-bg-cream-mid{ background: var(--sd-cream-mid); }
.sd-bg-charcoal { background: var(--sd-charcoal); color: var(--sd-lavender); }
.sd-bg-charcoal h1, .sd-bg-charcoal h2, .sd-bg-charcoal h3,
.sd-bg-charcoal h4, .sd-bg-charcoal h5 { color: #fff; }
.sd-bg-charcoal a { color: var(--sd-sky-light); }
.sd-bg-charcoal a:hover { color: var(--sd-coral); }

/* Text colour utilities */
.sd-text-coral    { color: var(--sd-coral); }
.sd-text-mauve    { color: var(--sd-mauve); }
.sd-text-charcoal { color: var(--sd-charcoal); }
.sd-text-mid      { color: var(--sd-mid); }
.sd-text-white    { color: #fff; }


/* ── 9. WP LOGIN SCREEN ────────────────────────────────────────── */

/*
 * Theme `wp-login.php` so signing in matches the brand. The selectors
 * below are scoped to `body.login` so they cannot affect the front
 * end. The login enqueue is wired in functions.php via the
 * `login_enqueue_scripts` action.
 */
body.login {
  background: var(--sd-cream);
  font-family: var(--sd-font-body);
  color: var(--sd-ink);
  /* Subtle radial accent in the corner — same trick the portal hero uses,
   * keeps the page from feeling completely flat. */
  background-image:
    radial-gradient(ellipse at top right, rgba(158,141,181,.08) 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(217,101,87,.05) 0%, transparent 55%);
}

body.login #login {
  width: 380px;
  padding-top: 7vh;
  padding-bottom: 7vh;
}

/* Brand wordmark — eyebrow ("Client Portal") above the SwankedHQ title,
 * tagline below, all centered. The h1 a is the wordmark; ::before / ::after
 * stack on either side without needing extra DOM. */
body.login h1 {
  margin-bottom: 22px;
  text-align: center;
}
body.login h1 a {
  background-image: none !important;
  font-family: var(--sd-font-display);
  font-size: 44px !important;
  letter-spacing: 5px;
  line-height: 1 !important;
  color: var(--sd-charcoal) !important;
  text-indent: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0;
  display: inline-block;
  text-align: center;
  position: relative;
  cursor: default;
  pointer-events: none; /* wordmark is decorative — no link */
}
/* The anchor's own text content (set via login_headertext filter to
 * get_bloginfo('name')) IS the wordmark — no need for ::after. ::before
 * stacks the small "Client Portal" eyebrow above it. */
body.login h1 a::before {
  content: 'Client Portal';
  display: block;
  font-family: var(--sd-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--sd-coral);
  margin-bottom: 12px;
  text-align: center;
}

/* Tagline under the wordmark — uses ::after on h1 itself (h1 a's ::after
 * is taken by the wordmark text). */
body.login h1::after {
  content: 'Sign in to access your engagements, reports, and project board.';
  display: block;
  font-family: var(--sd-font-body);
  font-size: 12.5px;
  color: var(--sd-mid);
  margin-top: 14px;
  line-height: 1.55;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

body.login form {
  background: #fff;
  border: 1px solid var(--sd-cream-dark);
  border-radius: var(--sd-r-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 30px 28px 26px;
  margin-top: 0;
}

body.login label {
  font-family: var(--sd-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sd-mid);
  margin-bottom: 6px;
  display: block;
}

body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
  font-family: var(--sd-font-body);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--sd-cream-dark);
  border-radius: var(--sd-r-sm);
  box-shadow: none;
  background: #fff;
  color: var(--sd-ink);
  transition: border-color var(--sd-t), box-shadow var(--sd-t);
}
body.login input:focus {
  border-color: var(--sd-mauve);
  box-shadow: 0 0 0 3px rgba(158, 141, 181, 0.15);
  outline: none;
}

/* "Remember Me" — kill the default WP styling and use a clean checkbox row. */
body.login .forgetmenot {
  font-size: 12px;
  color: var(--sd-mid);
  margin: 12px 0 18px;
}
body.login .forgetmenot label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sd-mid);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
}
body.login input[type="checkbox"] {
  accent-color: var(--sd-coral);
}

body.login .button-primary,
body.login .wp-core-ui .button-primary {
  background: var(--sd-coral) !important;
  border-color: var(--sd-coral) !important;
  color: #fff !important;
  text-shadow: none !important;
  box-shadow: none !important;
  font-family: var(--sd-font-body) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--sd-r-sm) !important;
  padding: 0 22px !important;
  height: 44px !important;
  line-height: 44px !important;
  width: 100%;
  transition: background var(--sd-t), transform var(--sd-t);
}
body.login .button-primary:hover {
  background: var(--sd-coral-dark) !important;
  border-color: var(--sd-coral-dark) !important;
  transform: translateY(-1px);
}
body.login .button-primary:active {
  transform: translateY(0);
}

/* "Lost your password?" link — keep but de-emphasize. */
body.login #nav {
  text-align: center;
  margin-top: 18px;
  padding: 0;
}
body.login #nav a {
  font-size: 12px;
  color: var(--sd-mid) !important;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color var(--sd-t), border-color var(--sd-t);
}
body.login #nav a:hover {
  color: var(--sd-coral) !important;
  border-bottom-color: var(--sd-coral);
}

/* Hide "Back to site" — force-login redirects them straight back here, so
 * the link is a dead end. */
body.login #backtoblog { display: none !important; }

body.login .privacy-policy-page-link a {
  color: var(--sd-mid) !important;
  font-size: 11px;
}
body.login .privacy-policy-page-link a:hover { color: var(--sd-coral) !important; }

/* WP error / message banners — match the brand instead of the default
 * red bar. Kept legible — error stays red text, but the surface uses
 * cream-dark instead of WP's pink. */
body.login .message,
body.login #login_error {
  border-left: 4px solid var(--sd-coral);
  background: #fff;
  border-radius: var(--sd-r-sm);
  box-shadow: var(--sd-shadow-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--sd-ink);
}
body.login .message { border-left-color: var(--sd-mauve); }

/* Mobile — keep card full-width with safe gutters. */
@media (max-width: 480px) {
  body.login #login { width: auto; padding: 6vh 18px 6vh; }
  body.login h1 a { font-size: 36px !important; letter-spacing: 4px; }
  body.login form { padding: 24px 20px; }
}


/* ── 10. WP-CORE BLOCK + GUTENBERG TWEAKS ──────────────────────── */

/*
 * Light pass over Gutenberg block defaults so editor-rendered pages
 * carry brand. Most users on this site will use Elementor, so we
 * keep these light-touch — covering blocks people might still drop
 * in from the WP block library.
 */

.wp-block-button .wp-block-button__link.is-style-outline {
  background: transparent;
  color: var(--sd-coral);
  border: 2px solid var(--sd-coral);
}
.wp-block-button .wp-block-button__link.is-style-outline:hover {
  background: var(--sd-coral);
  color: #fff;
}

.wp-block-quote {
  border-left: 3px solid var(--sd-coral);
  padding-left: 22px;
  font-style: italic;
}

.wp-block-pullquote {
  border-top: 2px solid var(--sd-coral);
  border-bottom: 2px solid var(--sd-coral);
  padding: 28px 0;
}

.wp-block-separator {
  background: var(--sd-cream-dark);
  border: none;
  height: 1px;
}
