/*
bareBones3.css
Purpose: introduce visual hierarchy fundamentals without advanced layout.

Teaching focus:
1) Type scale and line-height
2) Section rhythm and whitespace
3) Contrast and readability
4) Link/focus states for usability and accessibility
5) Light emphasis patterns (note/callout)
*/

:root {
    --page-bg: #f4f7fb;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #4b5563;
    --heading: #0f172a;
    --border: #d7deea;
    --accent: #0b5bd3;
    --accent-strong: #083f93;
    --focus: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--page-bg);
}

/* Keep layout simple and readable. */
header,
main,
footer {
    width: min(100% - 2rem, 860px);
    margin-inline: auto;
    margin-block: 1rem;
}

header,
main > section,
footer {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1rem 1.1rem;
}

/* Skip link is hidden until keyboard focus. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #111827;
    color: #ffffff;
    padding: 0.45rem 0.7rem;
}

.skip-link:focus {
    left: 0.75rem;
    top: 0.5rem;
    z-index: 1000;
}

/* Type hierarchy */
h1,
h2,
h3 {
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    color: var(--heading);
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 0.55rem;
}

h1 {
    font-size: clamp(1.8rem, 2.6vw, 2.3rem);
}

h2 {
    font-size: clamp(1.35rem, 2.1vw, 1.7rem);
}

h3 {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

p,
ul,
ol,
dl,
pre,
figure,
blockquote,
details,
form {
    margin-top: 0;
    margin-bottom: 0.9rem;
}

.eyebrow {
    margin-bottom: 0.25rem;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
}

.subtitle {
    color: var(--muted);
    max-width: 62ch;
}

/* Basic nav presentation only; no advanced layout system. */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* Link states build visual cues for interaction. */
a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

main > section {
    margin-bottom: 1rem;
}

pre {
    border: 1px solid var(--border);
    background: #f7f8fc;
    padding: 0.75rem;
    overflow-x: auto;
}

.note {
    border-left: 4px solid #3b82f6;
    padding: 0.5rem 0.65rem;
    background: #eef5ff;
}

.callout {
    border-left: 4px solid #10b981;
    padding: 0.55rem 0.7rem;
    background: #ecfdf5;
}

blockquote {
    border-left: 4px solid #9ca3af;
    margin-left: 0;
    padding-left: 0.8rem;
    color: #374151;
}

fieldset {
    border: 1px solid var(--border);
    padding: 0.7rem;
}

legend {
    font-weight: 700;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
}

input,
select,
textarea,
button {
    font: inherit;
}

input[type="text"],
select,
textarea {
    width: min(100%, 34rem);
    padding: 0.35rem;
}

footer {
    color: var(--muted);
}

@media (max-width: 640px) {
    header,
    main,
    footer {
        width: min(100% - 1rem, 860px);
    }
}
