/* ============================================================================
 * PROJECT           : Demo Salon — Salon Franchise Business Website
 * COMPANY           : Privonix Technologies Pvt. Ltd.
 * BRAND             : Demo Salon™
 * TRADEMARK NOTICE  : “Demo Salon” is designated as a project brand identifier.
 *                     The ™ symbol does not assert registered trademark status.
 * COPYRIGHT         : © 2026 Privonix Technologies Pvt. Ltd. All rights reserved.
 * FILE              : base.css
 * FILE PATH         : /Assets/Modules/base.css
 * FILE TYPE         : CSS — shared global base and reusable UI module
 * MODULE SCOPE      : Global reset, typography, layout, controls, icons, scrolling
 * PURPOSE           : Production-ready shared base styles: reset, typography,
 *                     layout utilities, editorial rules, accessible controls,
 *                     five button variants, Phosphor icon treatments, forms,
 *                     custom scrollbars, Lenis compatibility and motion support.
 * DEPENDENCIES      : /Assets/Modules/tokens.css (load first); Outfit font;
 *                     Phosphor Icons Web stylesheets for the weights in use.
 * OPTIONAL          : Lenis JavaScript. This file only contains Lenis CSS-state
 *                     compatibility; it does not install or initialise Lenis.
 * AUTHOR            : Mayank Chawdhari AKA BOSS294
 * VERSION           : 1.0.1
 * CREATED           : 2026-11-28
 * LAST UPDATED      : 2026-11-28
 *
 * HOW TO USE
 * 1. Keep this file in /Assets/Modules/ as a central shared stylesheet.
 * 2. Load Outfit and the required Phosphor icon weight stylesheets first.
 * 3. Load /Assets/Modules/tokens.css BEFORE this file, then load base.css.
 * 4. Keep page-specific layout and styles in their own page/content files.
 *    Reuse the provided classes and design tokens instead of duplicating them.
 * 5. Use the button and icon examples below as the supported class contract.
 *
 * HTML SETUP (place inside <head>):
 *   <link rel="preconnect" href="https://fonts.googleapis.com">
 *   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 *   <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet">
 *   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.2/src/regular/style.css">
 *   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.2/src/thin/style.css">
 *   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.2/src/light/style.css">
 *   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.2/src/bold/style.css">
 *   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.2/src/fill/style.css">
 *   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.2/src/duotone/style.css">
 *   <link rel="stylesheet" href="/Assets/Modules/tokens.css">
 *   <link rel="stylesheet" href="/Assets/Modules/base.css">
 *
 * BUTTON EXAMPLES:
 *   <button class="btn btn-solid"><i class="ph ph-calendar-check" aria-hidden="true"></i> Book now</button>
 *   <button class="btn btn-outline">View services</button>
 *   <button class="btn btn-soft">Explore offers</button>
 *   <button class="btn btn-ghost">Learn more</button>
 *   <a class="btn btn-editorial" href="#franchise">Franchise details</a>
 *   Add .btn-sm, .btn-lg or .btn-block for supported size/layout modifiers.
 *
 * ICON EXAMPLES:
 *   <i class="ph ph-scissors" aria-hidden="true"></i>
 *   <i class="ph-bold ph-calendar-check" aria-hidden="true"></i>
 *   <span class="icon-box icon-box--soft"><i class="ph ph-sparkle" aria-hidden="true"></i></span>
 *   Available icon weights: ph-thin, ph-light, ph (regular), ph-bold,
 *   ph-fill and ph-duotone. Load the matching web stylesheet for each weight.
 *   Give icon-only interactive buttons an accessible aria-label.
 *
 * LENIS NOTE:
 *   Initialise Lenis from the project's JavaScript entry point. The CSS below
 *   recognises Lenis state classes and preserves native scrolling without it.
 *
 * CHANGELOG
 * 1.0.1 — 2026-11-28 — Added company/legal metadata, central module path and
 *         detailed setup, button, icon and Lenis usage instructions.
 * 1.0.0 — Initial global base layer and reusable UI primitives.
 * ============================================================================ */

/* --------------------------------------------------------------------------
   1. BOX MODEL, DOCUMENT DEFAULTS & RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  tab-size: 2;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:where(button, input, textarea, select) {
  color: inherit;
  font: inherit;
}

:where(button, [type="button"], [type="reset"], [type="submit"]) {
  -webkit-tap-highlight-color: transparent;
}

:where(img, picture, video, canvas, svg) {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

:where(iframe) {
  max-width: 100%;
  border: 0;
}

:where(figure, blockquote, dl, dd) {
  margin: 0;
}

:where(h1, h2, h3, h4, h5, h6, p) {
  margin-block: 0;
}

:where(ul, ol) {
  margin-block: 0;
  padding-inline-start: 1.25em;
}

:where(a) {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

:where(button) {
  border: 0;
}

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

:where(code, kbd, samp, pre) {
  font-family: var(--font-mono);
}

:where(pre) {
  max-width: 100%;
  overflow: auto;
}

:where(summary) {
  cursor: pointer;
}

:where([hidden]) {
  display: none !important;
}

/* --------------------------------------------------------------------------
   2. ACCESSIBILITY & FOCUS
   -------------------------------------------------------------------------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 3px;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: fixed;
  z-index: var(--z-tooltip);
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
  padding: var(--space-3) var(--space-4);
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-weight: var(--font-weight-semibold);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6,
.heading {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-heading);
  text-wrap: balance;
}

h1,
.heading-1 {
  font-size: clamp(2.5rem, 6.3vw, var(--font-size-6xl));
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

h2,
.heading-2 {
  font-size: clamp(2rem, 4.4vw, var(--font-size-5xl));
}

h3,
.heading-3 {
  font-size: clamp(1.5rem, 2.8vw, var(--font-size-3xl));
}

h4,
.heading-4 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-snug);
}

p {
  color: inherit;
  line-height: var(--line-height-relaxed);
  text-wrap: pretty;
}

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-muted { color: var(--color-muted); }
.text-accent { color: var(--color-accent); }
.text-ink { color: var(--color-ink); }
.text-uppercase { text-transform: uppercase; letter-spacing: var(--letter-spacing-caps); }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-caps);
  line-height: 1.3;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   4. LINKS
   -------------------------------------------------------------------------- */
.link {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}

.link:hover {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   5. SURFACES, CONTAINERS & LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - (var(--container-gutter) * 2), var(--container-xl));
  margin-inline: auto;
}

.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--lg { max-width: var(--container-lg); }
.container--wide { max-width: var(--container-wide); }

.section {
  position: relative;
  padding-block: var(--section-space-y);
}

.surface {
  background: var(--color-surface);
}

.surface--subtle {
  background: var(--color-surface-subtle);
}

.surface--raised {
  background: var(--color-canvas-raised);
  box-shadow: var(--shadow-sm);
}

.card {
  min-width: 0;
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-canvas-raised);
  box-shadow: var(--shadow-xs);
}

.card--flat {
  box-shadow: none;
}

.card--interactive {
  transition: var(--transition-elevate), border-color var(--duration-base) var(--ease-standard);
}

.card--interactive:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stack--sm { gap: var(--space-2); }
.stack--lg { gap: var(--space-6); }
.stack--xl { gap: var(--space-8); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.cluster--between {
  justify-content: space-between;
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   6. EDITORIAL GRID LINES — HORIZONTAL & VERTICAL
   These are restrained structural dividers; use them to guide the eye.
   -------------------------------------------------------------------------- */
.rule,
.rule-horizontal {
  display: block;
  width: 100%;
  height: 1px;
  border: 0;
  background: var(--color-divider);
}

.rule--strong,
.rule-horizontal--strong {
  background: var(--color-divider-strong);
}

.rule--accent,
.rule-horizontal--accent {
  background: var(--color-accent);
}

.rule-vertical {
  display: inline-block;
  align-self: stretch;
  width: 1px;
  min-height: 1.25rem;
  border: 0;
  background: var(--color-divider);
}

.rule-vertical--strong { background: var(--color-divider-strong); }
.rule-vertical--accent { background: var(--color-accent); }

/* Grid with precise dividing lines between columns (no double borders). */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns, 2), minmax(0, 1fr));
}

.editorial-grid > * {
  min-width: 0;
  padding: var(--space-5);
}

.editorial-grid > * + * {
  border-inline-start: 1px solid var(--color-divider);
}

.editorial-grid--rows > * {
  border-block-end: 1px solid var(--color-divider);
}

.editorial-grid--rows > *:last-child {
  border-block-end: 0;
}

/* --------------------------------------------------------------------------
   7. BUTTON SYSTEM — FIVE READY-TO-USE TYPES
   Markup: <a class="btn btn-solid" href="#">...</a>
           <button class="btn btn-outline" type="button">...</button>
   Variants: solid / outline / soft / ghost / editorial
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  min-height: var(--button-height-md);
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0 var(--button-padding-x);
  border: 1px solid transparent;
  border-radius: var(--button-radius);
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--button-font-size);
  font-weight: var(--button-font-weight);
  letter-spacing: var(--button-letter-spacing);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: var(--transition-control), box-shadow var(--duration-base) var(--ease-standard);
  -webkit-appearance: none;
  appearance: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn:disabled,
.btn[aria-disabled="true"],
.btn.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

/* 1 — Solid: primary conversion action. */
.btn-solid {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  box-shadow: 0 2px 0 rgb(46 41 40 / 0.06);
}

.btn-solid:hover {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn-solid:active {
  border-color: var(--color-accent-active);
  background: var(--color-accent-active);
}

/* 2 — Outline: secondary action with a clear frame. */
.btn-outline {
  border-color: var(--color-border-strong);
  background: transparent;
  color: var(--color-ink);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  transform: translateY(-1px);
}

/* 3 — Soft: low-emphasis action with a visible tinted surface. */
.btn-soft {
  border-color: transparent;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.btn-soft:hover {
  border-color: var(--color-accent-border);
  background: var(--color-accent-soft-hover);
  color: var(--color-accent-hover);
  transform: translateY(-1px);
}

/* 4 — Ghost: quiet action, usually for navigation or tertiary actions. */
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--color-ink);
  padding-inline: 0.75rem;
}

.btn-ghost:hover {
  background: var(--color-surface-subtle);
  color: var(--color-accent);
}

/* 5 — Editorial: text-led action with a refined underline. */
.btn-editorial {
  min-height: var(--button-height-md);
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0 0 0.125rem;
  border: 0;
  border-radius: 0;
  border-block-end: 1px solid var(--color-accent);
  background: transparent;
  color: var(--color-ink);
}

.btn-editorial:hover {
  color: var(--color-accent);
}

.btn-editorial .ph,
.btn-editorial .icon {
  color: var(--color-accent);
  transition: transform var(--duration-base) var(--ease-standard);
}

.btn-editorial:hover .ph,
.btn-editorial:hover .icon {
  transform: translate(3px, -1px);
}

/* Button sizes and layout modifiers. */
.btn-sm {
  min-height: var(--button-height-sm);
  padding-inline: 0.875rem;
  font-size: var(--font-size-xs);
}

.btn-lg {
  min-height: var(--button-height-lg);
  padding-inline: 1.5rem;
  font-size: var(--font-size-md);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-icon-only {
  width: var(--button-height-md);
  min-width: var(--button-height-md);
  padding: 0;
  aspect-ratio: 1;
}

.btn-icon-only.btn-sm {
  width: var(--button-height-sm);
  min-width: var(--button-height-sm);
}

.btn-icon-only.btn-lg {
  width: var(--button-height-lg);
  min-width: var(--button-height-lg);
}

.btn .ph,
.btn .icon {
  flex: 0 0 auto;
  font-size: 1.15em;
  line-height: 1;
}

/* Add aria-busy="true" and a .btn-spinner child for an explicit loading state. */
.btn[aria-busy="true"] {
  cursor: progress;
  pointer-events: none;
}

.btn-spinner {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: btn-spin 650ms linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   8. PHOSPHOR ICON SYSTEM
   Requires @phosphor-icons/web weight stylesheets in <head>.
   Example: <i class="ph ph-scissors" aria-hidden="true"></i>
            <i class="ph-bold ph-calendar-check" aria-hidden="true"></i>
   Available weights: ph-thin / ph-light / ph / ph-bold / ph-fill / ph-duotone
   -------------------------------------------------------------------------- */
.ph,
[class^="ph-"],
[class*=" ph-"] {
  line-height: 1;
}

.ph,
.ph-thin,
.ph-light,
.ph-bold,
.ph-fill,
.ph-duotone {
  display: inline-block;
  flex: 0 0 auto;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  vertical-align: -0.125em;
  speak: never;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  font-size: var(--icon-size-md);
  line-height: 1;
}

.icon-xs { font-size: var(--icon-size-xs); }
.icon-sm { font-size: var(--icon-size-sm); }
.icon-md { font-size: var(--icon-size-md); }
.icon-lg { font-size: var(--icon-size-lg); }
.icon-xl { font-size: var(--icon-size-xl); }
.icon-2xl { font-size: var(--icon-size-2xl); }

/* Five reusable icon containers for navigation, feature cards and actions. */
.icon-box {
  display: inline-flex;
  width: var(--icon-container-md);
  height: var(--icon-container-md);
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--icon-container-radius);
  font-size: var(--icon-size-lg);
  line-height: 1;
  transition: var(--transition-control);
}

.icon-box--plain {
  background: transparent;
  color: var(--color-ink);
}

.icon-box--soft {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.icon-box--outline {
  border-color: var(--color-border-strong);
  background: transparent;
  color: var(--color-ink);
}

.icon-box--filled {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.icon-box--surface {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
}

.icon-box--circle {
  border-radius: var(--radius-pill);
}

.icon-box--sm {
  width: var(--icon-container-sm);
  height: var(--icon-container-sm);
  font-size: var(--icon-size-md);
}

.icon-box--lg {
  width: var(--icon-container-lg);
  height: var(--icon-container-lg);
  font-size: var(--icon-size-xl);
}

.icon-box--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Icon-only action control. Use a descriptive aria-label on the button. */
.icon-button {
  display: inline-flex;
  width: var(--button-height-md);
  height: var(--button-height-md);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-canvas-raised);
  color: var(--color-ink);
  cursor: pointer;
  font-size: var(--icon-size-md);
  transition: var(--transition-control);
}

.icon-button:hover {
  border-color: var(--color-accent-border);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.icon-button:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   9. FORMS & INPUTS
   -------------------------------------------------------------------------- */
.field,
.form-control,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--field-border);
  border-radius: var(--field-radius);
  background: var(--field-background);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: 1.4;
  transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard);
}

.field,
.form-control,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
select {
  min-height: var(--field-height);
  padding: 0 var(--field-padding-x);
}

textarea {
  min-height: 8rem;
  padding: 0.75rem var(--field-padding-x);
  resize: vertical;
}

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

:where(input, select, textarea):hover {
  border-color: var(--field-border-hover);
}

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

:where(input, select, textarea):disabled,
:where(input, select, textarea)[aria-disabled="true"] {
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  cursor: not-allowed;
  opacity: 0.72;
}

select {
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--color-accent);
  vertical-align: middle;
  cursor: pointer;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--color-accent);
  cursor: pointer;
}

input[type="file"] {
  max-width: 100%;
  color: var(--color-muted);
  font: inherit;
}

.form-group {
  display: grid;
  gap: var(--space-2);
}

.form-label,
label {
  color: var(--color-ink);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.form-hint {
  color: var(--color-muted);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

.form-error,
.field-error {
  color: var(--color-danger);
  font-size: var(--font-size-xs);
}

.field.is-invalid,
.form-control.is-invalid,
[aria-invalid="true"] {
  border-color: var(--color-danger) !important;
}

/* --------------------------------------------------------------------------
   10. BADGES, DIVIDERS, LISTS & TABLES
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  min-height: 1.625rem;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface-subtle);
  color: var(--color-ink-soft);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1;
}

.badge--accent {
  border-color: var(--color-accent-border);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.badge--success {
  border-color: transparent;
  background: var(--color-success-soft);
  color: var(--color-success);
}

.badge--warning {
  border-color: transparent;
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.badge--danger {
  border-color: transparent;
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.list-clean {
  margin: 0;
  padding: 0;
  list-style: none;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-canvas-raised);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  text-align: left;
}

th,
td {
  padding: 0.875rem 1rem;
  border-block-end: 1px solid var(--color-divider);
  vertical-align: top;
}

th {
  background: var(--color-surface-subtle);
  color: var(--color-ink);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--color-ink-soft);
  font-size: var(--font-size-sm);
}

tr:last-child > td {
  border-block-end: 0;
}

/* --------------------------------------------------------------------------
   11. MEDIA, ASPECT RATIO & IMAGE TREATMENT
   -------------------------------------------------------------------------- */
.media-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.aspect-1-1 { aspect-ratio: 1 / 1; }
.aspect-4-3 { aspect-ratio: 4 / 3; }
.aspect-3-2 { aspect-ratio: 3 / 2; }
.aspect-16-9 { aspect-ratio: 16 / 9; }

/* --------------------------------------------------------------------------
   12. CUSTOM SCROLLBARS
   -------------------------------------------------------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  min-height: 2.5rem;
  border: 2px solid var(--scrollbar-track);
  border-radius: var(--radius-pill);
  background: var(--scrollbar-thumb);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

/* Optional compact scrollbar for side panels and dropdowns. */
.scrollbar-compact {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.scrollbar-compact::-webkit-scrollbar {
  width: 0.375rem;
  height: 0.375rem;
}

.scrollbar-compact::-webkit-scrollbar-track {
  background: transparent;
}

/* --------------------------------------------------------------------------
   13. LENIS SCROLL INTEGRATION
   Load and initialise Lenis from the project JavaScript entry point.
   Native scrolling remains available when Lenis is not initialised.
   -------------------------------------------------------------------------- */
html.lenis,
html.lenis body {
  height: auto;
}

html.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

html.lenis.lenis-smooth [data-lenis-prevent],
html.lenis.lenis-smooth [data-lenis-prevent-wheel],
html.lenis.lenis-smooth [data-lenis-prevent-touch] {
  overscroll-behavior: contain;
}

html.lenis.lenis-stopped {
  overflow: clip;
}

html.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   14. MOTION UTILITIES
   -------------------------------------------------------------------------- */
.fade-in {
  animation: demo-fade-in var(--duration-reveal) var(--ease-standard) both;
}

@keyframes demo-fade-in {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

.hover-lift {
  transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   15. RESPONSIVE BEHAVIOUR
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editorial-grid { grid-template-columns: repeat(min(var(--grid-columns, 2), 2), minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: calc(var(--header-height-mobile) + var(--space-3));
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .editorial-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .editorial-grid > * + * {
    border-inline-start: 0;
    border-block-start: 1px solid var(--color-divider);
  }

  .editorial-grid--rows > * {
    border-block-end: 0;
  }

  .btn-lg {
    min-height: var(--button-height-md);
    padding-inline: var(--button-padding-x);
    font-size: var(--button-font-size);
  }

  th,
  td {
    padding: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   16. REDUCED MOTION & PRINT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .no-print,
  .btn,
  .icon-button {
    display: none !important;
  }

  a {
    color: inherit;
    text-decoration: underline;
  }

  .card {
    box-shadow: none;
    break-inside: avoid;
  }
}
