/*
Theme Name:  Fuller Living
Theme URI:   https://fullerlivingllc.com
Description: Child theme for Fuller Living LLC — a trauma-informed healing platform built on The Value-Pain Paradox™ and the philosophy of "Grace in Progress." Mobile-first, accessibility-first (WCAG AA), and calm by design. Foundation layer: brand tokens, self-hosted typography, and accessible base styles. Parent theme: Kadence.
Author:      Fuller Living LLC
Author URI:  https://fullerlivingllc.com
Template:    kadence
Version:     1.0.0
Requires at least: 6.4
Tested up to:      6.6
Requires PHP:      8.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fuller-living
Tags:        accessibility-ready, custom-colors, custom-menu, e-commerce, editor-style
*/

/* ==========================================================================
   FULLER LIVING — FOUNDATION BASE LAYER
   --------------------------------------------------------------------------
   Element defaults that translate the brand tokens (assets/css/tokens.css)
   into a calm, readable, accessible baseline. Loads after the parent theme's
   styles so these brand decisions take precedence site-wide.

   Page-specific layout lives elsewhere — this file is intentionally the
   quiet groundwork: type, color, focus, spacing, and a few core utilities.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset & box model
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Comfortable scroll offset so anchored sections clear a sticky header. */
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --------------------------------------------------------------------------
   Typography — headings speak in Playfair, body reads in Lora
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  text-transform: none;      /* the guide: headings are never all caps */
  text-wrap: balance;        /* tidy multi-line headings where supported */
}

h1 { font-size: var(--text-h1); line-height: var(--leading-display); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-lg); }
h6 {
  font-size: var(--text-eyebrow);
  font-family: var(--font-ui);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

p {
  margin: 0 0 var(--space-md);
  max-width: var(--measure);
  text-wrap: pretty;
}

/* Long-form lists breathe like paragraphs */
ul, ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.4em;
  max-width: var(--measure);
}
li + li { margin-top: var(--space-2xs); }

strong, b { font-weight: var(--fw-semibold); }
em, i { font-style: italic; }

small { font-size: var(--text-sm); }

/* Pull quotes feel handwritten and generously spaced */
blockquote {
  margin: var(--space-lg) 0;
  padding-left: var(--space-md);
  border-left: 3px solid var(--fl-mauve);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: var(--text-h4);
  line-height: var(--leading-snug);
  color: var(--color-heading);
}
blockquote p { max-width: var(--measure-narrow); }

hr {
  border: 0;
  height: 1px;
  margin: var(--space-xl) 0;
  background-color: var(--color-border);
}

/* --------------------------------------------------------------------------
   Links — inviting teal, generous underline offset
   -------------------------------------------------------------------------- */
a {
  color: var(--color-link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--color-link) 45%, transparent);
  transition: color var(--duration-fast) var(--ease-out),
              text-decoration-color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--color-link-hover);
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   Media
   -------------------------------------------------------------------------- */
img, picture, svg, video, canvas {
  max-width: 100%;
  height: auto;
}
img { border-style: none; }

/* --------------------------------------------------------------------------
   Forms — conversational, comfortable, touch-friendly
   -------------------------------------------------------------------------- */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}

label {
  font-family: var(--font-ui);
  font-weight: var(--fw-bold);
  color: var(--color-heading);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  width: 100%;
  min-height: 44px;                 /* touch target minimum */
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-form);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
textarea { min-height: 8rem; line-height: var(--leading-snug); }

input::placeholder,
textarea::placeholder {
  color: var(--color-text-subtle);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: var(--focus-ring);
}

/* Honeypot anti-spam field (used by fuller_living_form_hidden_fields()) —
   invisible to sighted users and hidden from screen readers via the wrapping
   aria-hidden + tabindex="-1", but still present in the DOM for bots that
   blindly fill every input. Never uses display:none/visibility:hidden, since
   some spam bots specifically skip those. */
.fl-hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: 0;
}

/* Form submission status notice (success/error), shown via
   fuller_living_form_status_notice() right above a form after redirect. */
.fl-form-notice {
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-form);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  line-height: var(--leading-snug);
}
.fl-form-notice--success {
  background-color: var(--fl-sage-tint);
  color: var(--fl-sage-strong);
  border: 1px solid color-mix(in srgb, var(--fl-sage) 35%, transparent);
}
.fl-form-notice--error {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid color-mix(in srgb, var(--color-danger) 35%, transparent);
}

/* --------------------------------------------------------------------------
   Focus — always visible. Accessibility is hospitality.
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
  border-radius: 2px;
}
/* Remove the default outline only where focus-visible is supported. */
:focus:not(:focus-visible) { outline: none; }

::selection {
  background-color: color-mix(in srgb, var(--fl-teal) 22%, transparent);
  color: var(--color-heading);
}

/* --------------------------------------------------------------------------
   Core utilities (foundation only — components come with each page)
   -------------------------------------------------------------------------- */

/* Centered content column with responsive gutters */
.fl-container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.fl-container--narrow { max-width: var(--content-narrow); }
.fl-container--wide   { max-width: var(--content-wide); }

/* Section vertical rhythm */
.fl-section { padding-block: var(--section-gap); }
.fl-section--tight { padding-block: var(--section-gap-tight); }

/* Constrain rich text to a readable measure */
.fl-measure { max-width: var(--measure); }

/* Eyebrow / kicker label above headings */
.fl-eyebrow {
  display: inline-block;
  margin-bottom: var(--space-xs);
  font-family: var(--font-ui);
  font-size: var(--text-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-link);
}

/* Buttons feel like invitations, not demands */
.fl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 48px;
  padding: var(--space-xs) var(--space-lg);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  color: var(--color-btn-text);
  background-color: var(--color-btn-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.fl-btn:hover {
  color: var(--color-btn-text);
  background-color: var(--color-btn-bg-hover);
  transform: translateY(var(--lift-hover));   /* gentle lift */
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.fl-btn:active { transform: translateY(0); }

.fl-btn--secondary {
  color: var(--color-btn-secondary-text);
  background-color: var(--color-btn-secondary-bg);
  border-color: var(--color-btn-secondary-border);
}
.fl-btn--secondary:hover {
  color: var(--color-btn-text);
  background-color: var(--color-btn-bg-hover);
  border-color: var(--color-btn-bg-hover);
}

/* Shared components used across pages (kept global so every template has them) */

/* Inline arrow inside buttons and text links */
.fl-arrow {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  transition: transform var(--duration-fast) var(--ease-out);
}
.fl-btn:hover .fl-arrow,
.home-textlink:hover .fl-arrow { transform: translateX(3px); }

/* Arrowed text link ("Learn More", "Get the Workbook", etc.) */
.home-textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-ui);
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--color-link);
}
.home-textlink:hover { color: var(--color-link-hover); }

/* Centered section intro block (eyebrow + heading + lede) */
.home-section-head {
  max-width: 46rem;
  margin-inline: auto;
  margin-bottom: var(--space-2xl);
  text-align: center;
}
.home-section-head p {
  margin-inline: auto;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* "Coming Soon" pill badge with a gently breathing dot (used on Courses + Install) */
.courses-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 1em;
  border-radius: var(--radius-pill);
  background-color: var(--fl-sage-tint);
  color: var(--fl-sage-strong);
  font-family: var(--font-ui);
  font-size: var(--text-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.courses-badge__dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: var(--radius-pill);
  background-color: var(--fl-sage);
  animation: courses-breathe 2.8s var(--ease-soft) infinite;
}
@keyframes courses-breathe {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.1); }
}

/* --------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */

/* Skip link — visually hidden until focused */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: var(--z-toast);
  padding: var(--space-2xs) var(--space-md);
  background-color: var(--color-heading);
  color: var(--color-text-on-navy);
  font-family: var(--font-ui);
  font-weight: var(--fw-bold);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease-out);
}
.skip-link:focus {
  transform: translate(-50%, 0);
  color: var(--color-text-on-navy);
}

/* Screen-reader-only text (matches WordPress' .screen-reader-text contract) */
.screen-reader-text,
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: fixed !important;
  top: var(--space-xs);
  left: var(--space-xs);
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  padding: var(--space-2xs) var(--space-md);
  background-color: var(--color-surface);
  color: var(--color-link);
  z-index: var(--z-toast);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Motion preferences — animation should feel like breathing, or not at all
   -------------------------------------------------------------------------- */
@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;
  }
  .fl-btn:hover { transform: none; }
}
