
/* ==========================================================================
   CTM PATH™ Guided Journey™

   File        : foundation.css
   Version     : 1.0
   Status      : DEVELOPMENT
   Stage       : STAGE 0 — FOUNDATION

   Purpose     :
   Establish the global CSS foundation for the CTM PATH™ Guided Journey™
   application.

   Responsibilities:

   • CSS reset
   • Global box model
   • Base typography
   • Layout primitives
   • Container system
   • Utility classes
   • Accessibility foundations

   Does NOT contain:

   • Brand theme variables
   • Page-specific styles
   • Component-specific styles
   • Responsive breakpoints

   Those responsibilities belong to:

   theme.css
   responsive.css
   component/page stylesheets

   ========================================================================== */


/* ==========================================================================
   CSS RESET
   ========================================================================== */


*,
*::before,
*::after {

    box-sizing: border-box;

    margin: 0;

    padding: 0;

}



html {

    font-size: 16px;

    scroll-behavior: smooth;

    -webkit-font-smoothing: antialiased;

    -moz-osx-font-smoothing: grayscale;

}



body {

    min-height: 100vh;

    font-family:
        "Inter",
        "Segoe UI",
        Arial,
        sans-serif;

    line-height: 1.6;

    overflow-x: hidden;

}



img,
svg {

    display: block;

    max-width: 100%;

}



button,
input,
textarea,
select {

    font: inherit;

}



button {

    cursor: pointer;

    border: none;

    background: none;

}



a {

    text-decoration: none;

}



ul,
ol {

    list-style: none;

}



/* ==========================================================================
   ROOT APPLICATION STRUCTURE
   ========================================================================== */


#app-shell {

    min-height: 100vh;

    display: flex;

    flex-direction: column;

}



#app-content {

    flex: 1;

    width: 100%;

}



.app-container {

    width: 100%;

    max-width: 1280px;

    margin-left: auto;

    margin-right: auto;

    padding-left: 2rem;

    padding-right: 2rem;

}



/* ==========================================================================
   GLOBAL LAYOUT UTILITIES
   ========================================================================== */


.flex {

    display: flex;

}



.flex-column {

    display: flex;

    flex-direction: column;

}



.flex-center {

    display: flex;

    align-items: center;

    justify-content: center;

}



.flex-between {

    display: flex;

    align-items: center;

    justify-content: space-between;

}



.grid {

    display: grid;

}



.hidden {

    display: none !important;

}



.visible {

    display: block;

}



.relative {

    position: relative;

}



.absolute {

    position: absolute;

}



/* ==========================================================================
   SPACING UTILITIES
   ========================================================================== */


.mt-1 {

    margin-top: 0.5rem;

}



.mt-2 {

    margin-top: 1rem;

}



.mt-3 {

    margin-top: 1.5rem;

}



.mt-4 {

    margin-top: 2rem;

}



.mb-1 {

    margin-bottom: 0.5rem;

}



.mb-2 {

    margin-bottom: 1rem;

}



.mb-3 {

    margin-bottom: 1.5rem;

}



.mb-4 {

    margin-bottom: 2rem;

}



.p-1 {

    padding: 0.5rem;

}



.p-2 {

    padding: 1rem;

}



.p-3 {

    padding: 1.5rem;

}



.p-4 {

    padding: 2rem;

}



/* ==========================================================================
   TYPOGRAPHY FOUNDATION
   ========================================================================== */


.heading-xl {

    font-size: 3rem;

    line-height: 1.15;

    font-weight: 700;

}



.heading-lg {

    font-size: 2.25rem;

    line-height: 1.2;

    font-weight: 700;

}



.heading-md {

    font-size: 1.75rem;

    line-height: 1.3;

    font-weight: 600;

}



.heading-sm {

    font-size: 1.25rem;

    line-height: 1.4;

    font-weight: 600;

}



.text-large {

    font-size: 1.125rem;

}



.text-small {

    font-size: 0.875rem;

}



.text-center {

    text-align: center;

}



.text-left {

    text-align: left;

}



.text-right {

    text-align: right;

}



/* ==========================================================================
   FORM FOUNDATION
   ========================================================================== */


input,
textarea,
select {

    width: 100%;

    outline: none;

}



label {

    display: block;

    margin-bottom: 0.5rem;

    font-weight: 500;

}



textarea {

    resize: vertical;

}



/* ==========================================================================
   BUTTON FOUNDATION
   ========================================================================== */


.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 0.5rem;

    padding: 0.85rem 1.75rem;

    border-radius: 0.5rem;

    font-weight: 600;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;

}



.btn:hover {

    transform: translateY(-1px);

}



.btn:disabled {

    cursor: not-allowed;

    opacity: 0.6;

    transform: none;

}



/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */


.sr-only {

    position: absolute;

    width: 1px;

    height: 1px;

    padding: 0;

    margin: -1px;

    overflow: hidden;

    clip: rect(0,0,0,0);

    white-space: nowrap;

    border: 0;

}



:focus-visible {

    outline-width: 3px;

    outline-style: solid;

    outline-offset: 3px;

}


/* ==========================================================================
   CARD & SURFACE FOUNDATION
   ========================================================================== */


.card {

    width: 100%;

    border-radius: 1rem;

    padding: 2rem;

}



.surface {

    width: 100%;

    border-radius: 1rem;

}



/* ==========================================================================
   SECTION FOUNDATION
   ========================================================================== */


.section {

    width: 100%;

    padding-top: 4rem;

    padding-bottom: 4rem;

}



.section-header {

    width: 100%;

    margin-bottom: 2rem;

}



.section-title {

    margin-bottom: 0.75rem;

}



.section-description {

    max-width: 720px;

}



/* ==========================================================================
   PAGE FOUNDATION
   ========================================================================== */


.page {

    width: 100%;

    min-height: calc(100vh - 80px);

    display: flex;

    flex-direction: column;

}



.page-content {

    width: 100%;

    flex: 1;

}



/* ==========================================================================
   APPLICATION STATES
   ========================================================================== */


.is-loading {

    pointer-events: none;

    user-select: none;

}



.is-disabled {

    pointer-events: none;

    opacity: 0.6;

}



.is-active {

    display: block;

}



.is-hidden {

    display: none !important;

}



/* ==========================================================================
   LOADING COMPONENT FOUNDATION
   ========================================================================== */


.global-loader {

    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    z-index: 9999;

}



.loader-container {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 1rem;

}



.loader-spinner {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    animation: loader-spin 1s linear infinite;

}



@keyframes loader-spin {

    from {

        transform: rotate(0deg);

    }


    to {

        transform: rotate(360deg);

    }

}



/* ==========================================================================
   ERROR MESSAGE FOUNDATION
   ========================================================================== */


.error-container {

    position: fixed;

    bottom: 2rem;

    left: 50%;

    transform: translateX(-50%);

    max-width: 480px;

    width: calc(100% - 2rem);

    padding: 1rem 1.5rem;

    border-radius: 0.75rem;

    z-index: 9998;

}



/* ==========================================================================
   PROGRESS FOUNDATION
   ========================================================================== */


.progress-wrapper {

    width: 100%;

}



.progress-track {

    width: 100%;

    height: 8px;

    border-radius: 999px;

    overflow: hidden;

}



.progress-fill {

    height: 100%;

    width: 0%;

    transition:

        width 0.4s ease;

}



/* ==========================================================================
   DIVIDERS
   ========================================================================== */


.divider {

    width: 100%;

    height: 1px;

}



.divider-horizontal {

    margin-top: 1.5rem;

    margin-bottom: 1.5rem;

}



/* ==========================================================================
   ALIGNMENT HELPERS
   ========================================================================== */


.items-center {

    align-items: center;

}



.items-start {

    align-items: flex-start;

}



.items-end {

    align-items: flex-end;

}



.justify-center {

    justify-content: center;

}



.justify-start {

    justify-content: flex-start;

}



.justify-end {

    justify-content: flex-end;

}



/* ==========================================================================
   WIDTH HELPERS
   ========================================================================== */


.w-full {

    width: 100%;

}



.w-auto {

    width: auto;

}



.max-content {

    width: max-content;

}



.full-height {

    min-height: 100vh;

}



/* ==========================================================================
   BORDER RADIUS SYSTEM
   ========================================================================== */


.radius-sm {

    border-radius: 0.375rem;

}



.radius-md {

    border-radius: 0.75rem;

}



.radius-lg {

    border-radius: 1.25rem;

}



.radius-full {

    border-radius: 999px;

}



/* ==========================================================================
   SHADOW FOUNDATION
   ========================================================================== */


.shadow-sm {

    box-shadow:
        0 2px 8px rgba(0,0,0,0.08);

}



.shadow-md {

    box-shadow:
        0 8px 24px rgba(0,0,0,0.12);

}



.shadow-lg {

    box-shadow:
        0 16px 40px rgba(0,0,0,0.16);

}



/* ==========================================================================
   TRANSITION FOUNDATION
   ========================================================================== */


.transition {

    transition:

        all 0.25s ease;

}



.transition-fast {

    transition:

        all 0.15s ease;

}



.transition-slow {

    transition:

        all 0.4s ease;

}



/* ==========================================================================
   END OF FOUNDATION LAYER

   Theme variables:
   theme.css

   Responsive behavior:
   responsive.css

   Page styling:
   Individual page stylesheets

   ========================================================================== */

