/* ═══════════════════════════════════════════════════════════
   IJS Website - Base Styles
   Reset, typography, base elements
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--ijs-text);
    background-color: var(--ijs-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--ijs-dark);
}

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 {
    margin-bottom: var(--space-4);
}

a {
    color: var(--ijs-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--ijs-primary-dark);
}

a:focus-visible {
    outline: 2px solid var(--ijs-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

strong, b {
    font-weight: var(--weight-semibold);
}

em {
    font-style: normal;
    color: var(--ijs-primary);
    font-weight: var(--weight-bold);
}

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

mark {
    background-color: #FEF3C7;
    padding: 0 2px;
    border-radius: 2px;
}

/* ── Lists ── */
ul, ol {
    list-style: none;
}

/* ── Images ── */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

picture {
    display: block;
}

svg {
    display: inline-block;
    vertical-align: middle;
}

/* ── Media ── */
video {
    max-width: 100%;
}

iframe {
    border: 0;
}

/* ── Tables ── */
table {
    border-collapse: collapse;
    width: 100%;
}

/* ── Forms ── */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--ijs-primary);
    outline-offset: -1px;
}

/* ── 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;
}

.skip-nav {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: var(--z-toast);
    padding: var(--space-3) var(--space-6);
    background: var(--ijs-primary);
    color: white;
    font-weight: var(--weight-semibold);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: top var(--transition-fast);
}

.skip-nav:focus {
    top: 0;
    color: white;
}

/* ── Utility Classes ── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: var(--container-narrow);
}

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.brand-emphasis {
    color: var(--ijs-primary);
    font-weight: var(--weight-bold);
}

.notranslate {
    /* Google Translate exclusion */
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ── Section Spacing ── */
.section {
    padding: var(--space-20) 0;
}

.section-sm {
    padding: var(--space-12) 0;
}

.section-lg {
    padding: var(--space-32) 0;
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: var(--weight-extrabold);
    margin-bottom: var(--space-4);
    text-align: center;
}

.section-desc {
    font-size: var(--text-lg);
    color: var(--ijs-text-muted);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--ijs-text-light);
    text-align: center;
    margin-bottom: var(--space-12);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Selection ── */
::selection {
    background-color: var(--ijs-primary);
    color: white;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ijs-bg-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--ijs-text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ijs-text-light);
}

/* ── Reduced Motion ── */
@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;
    }
}
