/* Dragon Den School Store - Somerset Oaks Leadership and Innovation */
/* Brand Colors: Black, Orange, Red */

:root {
    --color-black: #1a1a1a;
    --color-orange: #e67300;
    --color-orange-dark: #cc6600;
    --color-red: #cc2936;
    --color-red-dark: #a82230;
    --color-white: #ffffff;
    --color-gray-light: #f5f5f5;
    --color-gray: #666666;
    --color-gray-dark: #333333;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --max-width: 1200px;
    --header-height: 80px;
}

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal scroll */
html, body {
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-black);
    color: var(--color-white);
    padding: 0.75rem 1rem;
    z-index: 1000;
    font-weight: bold;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--color-orange);
    outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    line-height: 1.3;
    color: var(--color-black);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.6rem;
    border-bottom: 3px solid var(--color-orange);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.3rem;
    color: var(--color-red);
}

h4 {
    font-size: 1.1rem;
}

p {
    margin: 0 0 1rem 0;
}

a {
    color: var(--color-orange-dark);
    text-decoration: underline;
}

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

ul, ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Header */
.site-header {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: max(0.5rem, env(safe-area-inset-top));
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.logo-section img {
    height: 65px;
    width: auto;
    flex-shrink: 0;
}

.logo-section > div {
    min-width: 0;
    overflow: hidden;
}

.logo-section h1 {
    font-size: 1rem;
    margin: 0;
    color: var(--color-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-section .school-name {
    font-size: 0.7rem;
    color: var(--color-orange);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation */
.main-nav {
    width: 100%;
    display: none;
    padding: 1rem 0;
}

.main-nav.active {
    display: block;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.main-nav a {
    display: block;
    padding: 0.75rem 0;
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--color-gray-dark);
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a[aria-current="page"] {
    color: var(--color-orange);
    background-color: transparent;
}

.nav-toggle {
    background: none;
    border: 2px solid var(--color-orange);
    color: var(--color-white);
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover,
.nav-toggle:focus {
    background-color: var(--color-orange);
    color: var(--color-black);
}

.nav-toggle[aria-expanded="true"] {
    background-color: var(--color-orange);
    color: var(--color-black);
}

.main-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Main Content */
main {
    min-height: calc(100vh - var(--header-height) - 200px);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-black) 0%, var(--color-gray-dark) 100%);
    color: var(--color-white);
    padding: 3rem 1rem;
    text-align: center;
}

.hero h1 {
    color: var(--color-white);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero .store-name {
    color: var(--color-orange);
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

/* Notice Box */
.notice {
    background-color: var(--color-red);
    color: var(--color-white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
}

.notice-warning {
    background-color: var(--color-orange);
    color: var(--color-black);
}

/* Cards and Sections */
.card {
    background-color: var(--color-white);
    border: 2px solid var(--color-gray-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-highlight {
    border-left: 4px solid var(--color-orange);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background-color: var(--color-gray-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.info-card h3 {
    color: var(--color-black);
    margin-bottom: 0.5rem;
}

.info-card .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Link Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: var(--color-orange);
    color: var(--color-black);
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.btn:focus {
    background-color: var(--color-orange-dark);
    color: var(--color-white);
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: var(--color-black);
    color: var(--color-white);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--color-gray-dark);
    color: var(--color-white);
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

/* Job Role Cards */
.role-card {
    background-color: var(--color-white);
    border: 2px solid var(--color-black);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.role-card h3 {
    background-color: var(--color-black);
    color: var(--color-orange);
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 6px 6px 0 0;
    font-size: 1.3rem;
}

.role-card h4 {
    color: var(--color-red);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.role-card ul {
    margin-bottom: 0;
}

.role-purpose {
    font-size: 1.1rem;
    font-weight: 500;
    background-color: var(--color-gray-light);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Habits List */
.habits-list {
    list-style: none;
    padding: 0;
    counter-reset: habit;
}

.habits-list li {
    counter-increment: habit;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--color-gray-light);
    border-radius: 4px;
    position: relative;
    padding-left: 3.5rem;
}

.habits-list li::before {
    content: counter(habit);
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--color-orange);
    color: var(--color-black);
    width: 2.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 4px 0 0 4px;
}

.habits-list strong {
    display: block;
    color: var(--color-black);
    margin-bottom: 0.25rem;
}

/* Contact Info */
.contact-info {
    font-size: 1.1rem;
}

.contact-info p {
    margin-bottom: 0.75rem;
}

.contact-info strong {
    color: var(--color-black);
}

/* Expectations List */
.expectations-list {
    background-color: var(--color-gray-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-red);
}

.expectations-list h3 {
    margin-top: 0;
}

.expectations-list li {
    margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-logo span {
    font-weight: bold;
    font-size: 1.1rem;
}

.footer-notice {
    color: var(--color-orange);
    font-weight: bold;
}

.footer-updated {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    color: var(--color-white);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--color-orange);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--color-black) 0%, var(--color-gray-dark) 100%);
    color: var(--color-white);
    padding: 2rem 1rem;
    text-align: center;
}

.page-header h1 {
    color: var(--color-white);
    margin: 0;
}

.page-header .subtitle {
    color: var(--color-orange);
    margin-top: 0.5rem;
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
    html {
        font-size: 18px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .header-container {
        flex-wrap: nowrap;
        min-height: 95px;
    }

    .logo-section img {
        height: 85px;
    }

    .logo-section h1 {
        font-size: 1.4rem;
    }

    .logo-section .school-name {
        font-size: 0.85rem;
    }

    .nav-toggle {
        display: none;
    }

    .main-nav {
        display: block;
        width: auto;
        padding: 0;
    }

    .main-nav ul {
        flex-direction: row;
        gap: 0.5rem;
    }

    .main-nav a {
        padding: 0.5rem 1rem;
        border-bottom: none;
        border-radius: 4px;
    }

    .main-nav a:hover,
    .main-nav a:focus,
    .main-nav a[aria-current="page"] {
        background-color: var(--color-orange);
        color: var(--color-black);
    }

    .hero {
        padding: 4rem 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Buttons side by side on tablet+ */
    .btn {
        display: inline-block;
        width: auto;
    }

    .link-group {
        flex-direction: row;
        gap: 1rem;
    }

    .footer-container {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }

    .footer-logo {
        justify-content: flex-start;
    }

    .footer-links {
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 3rem 2rem;
    }

    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .role-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .role-card.ambassador {
        grid-column: 1 / -1;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    html {
        font-size: 14px;
    }

    .logo-section h1 {
        font-size: 0.9rem;
    }

    .logo-section .school-name {
        display: none;
    }

    .logo-section img {
        height: 55px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .notice {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
}

/* Safe area padding for notched phones */
@supports (padding: max(0px)) {
    .site-footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .nav-toggle {
        display: none;
    }

    body {
        font-size: 12pt;
        color: black;
        background: white;
    }

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

    .hero {
        background: white;
        color: black;
        border-bottom: 2px solid black;
    }

    .hero h1,
    .page-header h1 {
        color: black;
    }

    .notice {
        border: 2px solid black;
        background: white;
        color: black;
    }
}
