/* ==========================================================================
   EasyScopes.net — Design System & Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Font Faces — Self-hosted Inter (Latin subset)
   -------------------------------------------------------------------------- */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/inter-latin-800.woff2') format('woff2'); }

/* --------------------------------------------------------------------------
   2. CSS Custom Properties
   -------------------------------------------------------------------------- */

:root {
    /* Core palette */
    --bg-primary: #0a1628;
    --bg-secondary: #111d32;
    --bg-tertiary: #1a2a4a;
    --border: #1e3a5f;
    --border-subtle: #162a45;
    /* Accent */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-hover: linear-gradient(135deg, #2563eb, #7c3aed);
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #3b82f6;
    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    /* Layout */
    --max-width: 1200px;
    --nav-height: 64px;
}

/* --------------------------------------------------------------------------
   3. Reset + Base Styles
   -------------------------------------------------------------------------- */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    height: var(--nav-height);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
}

.nav-logo-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all var(--transition-fast);
}

/* --------------------------------------------------------------------------
   5. Mobile Navigation
   -------------------------------------------------------------------------- */

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-secondary);
    z-index: 201;
    transition: right var(--transition-normal);
    padding-top: 60px;
    border-left: 1px solid var(--border-subtle);
}

.mobile-nav-panel.open {
    right: 0;
}

.mobile-nav-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav-link {
    display: block;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--text-primary);
}

.mobile-nav-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 24px;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--gradient-hover);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */

.cards-grid {
    display: grid;
    gap: 20px;
}

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

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

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: block;
}

.card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.card-icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.card-icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.card-icon-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. Tags
   -------------------------------------------------------------------------- */

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--accent-blue);
    color: #fff;
}

.tag-accent {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

/* --------------------------------------------------------------------------
   9. Stats
   -------------------------------------------------------------------------- */

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    margin-bottom: 24px;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   10. Forms
   -------------------------------------------------------------------------- */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.required {
    color: var(--error);
}

/* --------------------------------------------------------------------------
   11. Alerts
   -------------------------------------------------------------------------- */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* --------------------------------------------------------------------------
   12. Screenshot Cards
   -------------------------------------------------------------------------- */

.screenshot-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.screenshot-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.screenshot-card .screenshot-img {
    height: 180px;
    overflow: hidden;
}

.screenshot-card .screenshot-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-card .screenshot-info {
    padding: 16px 20px;
}

.screenshot-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.screenshot-card .screenshot-url {
    font-size: 13px;
    color: var(--accent-blue);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 48px 0 0;
    margin-top: var(--space-3xl);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.footer-col a,
.footer-col p {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 6px;
    line-height: 1.5;
}

.footer-col a:hover {
    color: var(--accent-blue);
}

.footer-badge {
    display: inline-block;
    font-size: 11px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-top: 8px;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   14. Hero
   -------------------------------------------------------------------------- */

.hero {
    padding: var(--space-4xl) 0 var(--space-3xl);
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: var(--space-3xl);
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.hero-tagline {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    max-width: 480px;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
}

.hero-screenshot {
    flex: 0 0 480px;
}

.hero-screenshot img,
.hero-screenshot picture {
    width: 100%;
    border-radius: var(--radius-lg);
}

.hero-screenshot picture img {
    width: 100%;
    border-radius: var(--radius-lg);
}

/* --------------------------------------------------------------------------
   15. Page Layout
   -------------------------------------------------------------------------- */

.page-content {
    padding-top: calc(var(--nav-height) + var(--space-xl));
    padding-bottom: var(--space-3xl);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    margin-bottom: var(--space-3xl);
}

.section-intro {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    max-width: 640px;
    margin-bottom: var(--space-xl);
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent-blue);
    margin-bottom: var(--space-lg);
    display: block;
}

/* --------------------------------------------------------------------------
   16. Page Header
   -------------------------------------------------------------------------- */

.page-header {
    margin-bottom: var(--space-2xl);
}

.page-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: var(--space-md);
}

.page-header-centered {
    text-align: center;
    padding: 80px 0;
}

.page-header-cta {
    margin-top: var(--space-xl);
}

/* Section headings (h2 inside .section) */
.section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

/* --------------------------------------------------------------------------
   17. Content
   -------------------------------------------------------------------------- */

.content-section {
    margin-bottom: var(--space-2xl);
}

.content-narrow {
    max-width: 720px;
}

.content-narrow h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.content-narrow p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.content-narrow a:not(.btn) {
    color: var(--accent-blue);
    text-decoration: none;
}

.content-narrow a:not(.btn):hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   18. Site Detail
   -------------------------------------------------------------------------- */

.site-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.site-detail-screenshot img {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.site-detail-meta {
    margin-top: var(--space-xl);
}

.site-meta-item {
    margin-bottom: var(--space-md);
}

.site-meta-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.site-meta-value {
    font-size: 15px;
    color: var(--text-secondary);
}

a.site-meta-value {
    color: var(--accent-blue);
    text-decoration: none;
}

a.site-meta-value:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   19. Back Link
   -------------------------------------------------------------------------- */

.back-link {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: var(--space-lg);
}

.back-link:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   20. Focus Styles (Accessibility)
   -------------------------------------------------------------------------- */

.btn:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.nav-link:focus-visible {
    color: var(--text-primary);
    outline: 2px solid var(--accent-blue);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.card:focus-visible {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
    outline: none;
}

.screenshot-card:focus-visible {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
    outline: none;
}

.mobile-nav-link:focus-visible {
    color: var(--text-primary);
    outline: 2px solid var(--accent-blue);
    outline-offset: -2px;
}

.footer-col a:focus-visible {
    color: var(--accent-blue);
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   21. Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .hero-inner { flex-direction: column; }
    .hero-screenshot { order: -1; flex: none; width: 100%; }
    .hero-screenshot img { width: 100%; }
    .hero-title { font-size: 32px; }
    .cards-2 { grid-template-columns: 1fr; }
    .cards-3 { grid-template-columns: 1fr; }
    .site-detail { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .stats-row { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
    .page-title { font-size: 28px; }
    .hero-title { font-size: 28px; }
}
