/* Shared styles for all sub-pages */

:root {
    --primary: #D84315;
    --primary-dark: #BF360C;
    --secondary: #FFA726;
    --accent: #FFE082;
    --bg: #FFFBF5;
    --surface: #FFFFFF;
    --text: #1A1A1A;
    --text-muted: #666666;
    --border: #E0D5C7;
    --success: #43A047;
    --shadow: rgba(216, 67, 21, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 167, 38, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(216, 67, 21, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 40px 0 20px;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}

nav a {
    color: var(--text);
    text-decoration: none;
    margin-left: 24px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

main {
    padding: 60px 0;
}

.hero {
    text-align: center;
    padding: 40px 0 60px;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text);
    margin-bottom: 20px;
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 24px;
    color: var(--text);
}

h3 {
    font-size: 1.5rem;
    margin: 32px 0 16px;
    color: var(--text);
}

p {
    margin-bottom: 16px;
    color: var(--text);
}

.content-section {
    margin-bottom: 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.feature-card {
    background: var(--surface);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.feature-title {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.inline-link {
    color: var(--primary);
    text-decoration: underline;
}

footer {
    background: var(--surface);
    padding: 60px 0 40px;
    margin-top: 100px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-family: 'Fraunces', serif;
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Tool section (used by anagram solver & scrabble helper) */
.tool-section {
    background: var(--surface);
    border-radius: 24px;
    padding: 48px;
    margin-bottom: 60px;
    box-shadow: 0 4px 24px var(--shadow), 0 0 0 1px var(--border);
    position: relative;
    overflow: hidden;
}

.tool-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.tool-input-group {
    margin-bottom: 24px;
}

.tool-input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.tool-input-group input {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.125rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    font-family: inherit;
    text-transform: lowercase;
    transition: all 0.3s ease;
    outline: none;
}

.tool-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(216, 67, 21, 0.1);
}

.button-group {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.btn-primary {
    flex: 1;
    padding: 18px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: var(--primary);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(216, 67, 21, 0.4);
}

.btn-secondary {
    flex: 1;
    padding: 18px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    background: var(--bg);
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--border);
}

.tool-results {
    min-height: 200px;
}

.tool-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.tool-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        margin: 0 12px 8px;
    }

    .tool-section {
        padding: 32px 24px;
    }

    .button-group {
        flex-direction: column;
    }
}
