/* =====================================================
   iHQmail — Base Styles
   Reset, Typography, Global Styles
   ===================================================== */

/* ─────────────────────────────────────────────────────
   MODERN CSS RESET
   ───────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Deep space gradient background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(77, 124, 255, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse 50% 50% at 20% 60%, rgba(0, 212, 230, 0.04) 0%, transparent 40%),
        linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 50%, var(--color-bg-tertiary) 100%);
    z-index: -1;
    pointer-events: none;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* ─────────────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────────────── */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

strong {
    font-weight: var(--weight-semibold);
}

/* Text gradient utility */
.text-gradient {
    background: linear-gradient(135deg, var(--color-cyan-400) 0%, var(--color-blue-500) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-cyan {
    color: var(--color-cyan-400);
}

.text-muted {
    color: var(--color-text-muted);
}

/* ─────────────────────────────────────────────────────
   LAYOUT UTILITIES
   ───────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

@media (min-width: 768px) {
    .container {
        padding-inline: var(--space-8);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-inline: var(--space-12);
    }
}

.section {
    padding-block: var(--space-16);
}

@media (min-width: 768px) {
    .section {
        padding-block: var(--space-24);
    }
}

/* Flex utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* Grid utilities */
.grid {
    display: grid;
}

/* ─────────────────────────────────────────────────────
   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: 2px solid var(--color-cyan-400);
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ─────────────────────────────────────────────────────
   SELECTION STYLES
   ───────────────────────────────────────────────────── */

::selection {
    background: var(--color-cyan-500);
    color: var(--color-bg-primary);
}

/* ─────────────────────────────────────────────────────
   SCROLLBAR STYLING
   ───────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-cyan-600);
}