/* ==========================================================================
   DoAIKnowYou - Base Styles
   Reset, typography, foundational styles
   ========================================================================== */

/* ==========================================================================
   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 {
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: var(--font-weight-normal);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
    background-color: var(--color-bg);
    min-height: 100vh;
}

ul, ol {
    list-style: none;
}

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

img, svg {
    display: block;
    max-width: 100%;
}

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

table {
    border-collapse: collapse;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-semibold);
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--tracking-tighter);
    line-height: 1.1;
}

h2 {
    font-size: var(--text-2xl);
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--space-6);
}

h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
}

h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

p {
    margin-bottom: var(--space-4);
    max-width: var(--content-width);
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: var(--leading-loose);
    max-width: var(--content-width);
}

/* Links */
a {
    color: var(--color-citation);
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--color-citation-hover);
}

.content a,
p a {
    text-decoration: underline;
    text-decoration-color: var(--color-border-strong);
    text-underline-offset: 2px;
}

.content a:hover,
p a:hover {
    text-decoration-color: var(--color-citation-hover);
}

/* Strong and emphasis */
strong, b {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

em, i {
    font-style: italic;
}

/* Blockquotes */
blockquote {
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--color-text-secondary);
    border-left: 2px solid var(--color-brand-gold);
    padding-left: var(--space-6);
    margin: var(--space-8) 0;
    max-width: var(--content-width);
}

blockquote cite {
    display: block;
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--color-text-tertiary);
    margin-top: var(--space-3);
}

/* Code */
code {
    font-family: var(--font-data);
    font-size: 0.9em;
    background: var(--color-bg-surface);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
}

pre {
    font-family: var(--font-data);
    font-size: var(--text-sm);
    background: var(--color-bg-surface);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow-x: auto;
    margin: var(--space-6) 0;
}

pre code {
    background: none;
    padding: 0;
}

/* Lists */
.content ul,
.content ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-6);
}

.content ul {
    list-style: disc;
}

.content ol {
    list-style: decimal;
}

.content li {
    margin-bottom: var(--space-2);
    padding-left: var(--space-2);
}

.content li::marker {
    color: var(--color-text-tertiary);
}

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-12) 0;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

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

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

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

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-center { text-align: center; }
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-gold { color: var(--color-brand-gold); }

.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }
.font-data { font-family: var(--font-data); }

.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-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.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); }

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

:focus-visible {
    outline: 2px solid var(--color-brand-gold);
    outline-offset: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

::selection {
    background: var(--color-brand-gold);
    color: var(--color-text-inverse);
}
