/**
 * AGS Base Styles
 */

/* === Reset === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-gray-700);
    background-color: #f0f9ff;
    background-image: url('../images/cloud-bg.png');
    background-repeat: repeat;
    background-size: 600px 600px;
    background-attachment: fixed;
}

/* === Top Bar Blue === */
.top-bar-blue {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg,
            rgba(56, 189, 248, 1) 0%,
            rgba(59, 130, 246, 1) 25%,
            rgba(96, 165, 250, 1) 50%,
            rgba(125, 211, 252, 1) 75%,
            rgba(34, 211, 238, 1) 100%);
    z-index: calc(var(--z-sticky) + 1);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-gray-800);
}

h1 {
    font-size: var(--font-size-5xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-xl);
}

h4 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--color-teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-teal-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Container === */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* === Sections === */
.section {
    padding: var(--space-20) 0;
}

.section-sm {
    padding: var(--space-12) 0;
}

.bg-white {
    background-color: var(--color-white);
}

.bg-gray {
    background-color: var(--color-gray-50);
}

.bg-teal {
    background-color: var(--color-teal);
    color: white;
}

/* === Grid === */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 968px) {

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* === Flex Utilities === */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* === Text Utilities === */
.text-center {
    text-align: center;
}

.text-teal {
    color: var(--color-teal);
}

.text-orange {
    color: var(--color-orange);
}

.text-green {
    color: var(--color-green);
}

.text-gray {
    color: var(--color-gray-500);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

/* === Spacing Utilities === */
.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, #0d9488 0%, #0ea5e9 100%);
    color: white;
    padding: var(--space-20) 0 var(--space-16);
    text-align: center;
    position: relative;
    margin-top: -80px;
    /* Increase top padding to prevent header overlap */
    padding-top: calc(120px + var(--space-12));
}

.page-header h1 {
    color: white;
    margin-bottom: var(--space-4);
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-lg);
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,30 C360,60 720,0 1080,40 C1260,55 1380,30 1440,20 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: 100% 100%;
}

/* === Screen Reader Only === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* === Reveal Animations === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}