/*
Student Name: Sam Kallu
Student ID: 991741165
Assignment 4 - Adaptive/Accessible Site

Description: Stylesheet for smiley face drawing tutorial with
responsive design and accessibility features.
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff8e1;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -6px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
}

.skip-link:focus {
    top: 6px;
}

/* Header */
header {
    background-color: #ffeb3b;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Main content */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.8rem;
    color: #f57f17;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ffeb3b;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Introduction section */
.intro-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.text-content {
    flex: 2;
}

.intro-content figure {
    flex: 1;
    max-width: 300px;
}

/* Materials list */
ul[role="list"] {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ffeb3b;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

ul[role="list"] li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
    list-style-type: disc;
    margin-left: 1.5rem;
}

/* Step styling */
.step {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 5px solid #ffeb3b;
}

.step-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-text {
    flex: 1;
}

.step figure {
    flex: 1;
    max-width: 300px;
}

/* Images and figures */
img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 2px solid #ffeb3b;
}

figure {
    margin-bottom: 1rem;
}

figcaption {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
    padding: 0.5rem;
    background-color: #fffde7;
    border-radius: 4px;
}

/* Conclusion section */
section[aria-labelledby="conclusion-heading"] {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid #ffeb3b;
}

/* Footer */
footer {
    background-color: #f57f17;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 3px solid #f57f17;
    outline-offset: 2px;
}

/* Media queries for responsive design */

/* Tablet styles */
@media screen and (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .intro-content {
        flex-direction: column;
    }
    
    .step-content {
        flex-direction: column;
    }
    
    .step figure {
        max-width: 100%;
    }
    
    main {
        padding: 1rem 0.5rem;
    }
    
    .step {
        padding: 1.5rem;
    }
}

/* Mobile styles */
@media screen and (max-width: 480px) {
    header {
        padding: 1.5rem 0.5rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .step {
        padding: 1rem;
    }
    
    ul[role="list"] {
        padding: 1rem;
    }
    
    section[aria-labelledby="conclusion-heading"] {
        padding: 1.5rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background-color: #fff;
    }
    
    .step {
        border-left-width: 8px;
    }
    
    img {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}