/* =========================================================
   style.css - Advanced Tool Library
   Single stylesheet for all pages. No inline styles anywhere.
   ========================================================= */

/* ---------------------------------------------------------
   Variables
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --dark:    #1B1940;
    --mid:     #16213e;
    --accent:  #2979C8;
    --accent2: #4da3ff;
    --light:   #f5f7fa;
    --hero-bg: #f0f5ff;
    --text:    #2d2d2d;
    --muted:   #666;
    --border:  #e0e4ea;
    --white:   #ffffff;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
}

/* ---------------------------------------------------------
   Typography
   --------------------------------------------------------- */
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); }
h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; letter-spacing: -0.01em; color: var(--text); }
h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
p  { margin-bottom: 1rem; color: var(--text); }
p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */
nav {
    background: var(--dark);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #aab4c8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--white); }

.nav-links a.btn-nav {
    background: var(--accent);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 600;
}

.nav-links a.btn-nav:hover { background: var(--accent2); color: var(--white); }

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */
.container { max-width: 1000px; margin: 0 auto; padding: 0 2rem; }

section { padding: 4rem 0; }
section.section-alt { background: var(--light); }
section.section-dark { background: var(--mid); }

/* ---------------------------------------------------------
   Hero sections
   --------------------------------------------------------- */
.hero {
    background: var(--hero-bg);
    padding: 5rem 0 4rem;
}

/* Hero with two-column layout (TTL) */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-image img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.hero h1          { color: var(--dark); }
.hero h1 span     { color: var(--accent); }
.hero p           { color: var(--muted); font-size: 1.1rem; margin: 1.25rem 0 2rem; }
.hero-centered    { text-align: center; }
.hero-centered p  { max-width: 540px; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.1s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary   { background: var(--accent); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--accent); border: 2px solid var(--accent); }

/* ---------------------------------------------------------
   Badges
   --------------------------------------------------------- */
.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}
.badge-free { background: #e6f4ea; color: #2e7d32; }
.badge-paid { background: #c7d9f8; color: #0f3a8a; }

/* ---------------------------------------------------------
   Feature cards
   --------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}

.feature-card p  { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.75rem; }
.feature-card ul { padding-left: 1.25rem; margin-top: 0.5rem; flex: 1; }
.feature-card li { margin-bottom: 0.35rem; color: var(--muted); font-size: 0.95rem; }
.feature-card img {
    width: 100%;
    border-radius: 5px;
    margin-top: auto;
    padding-top: 1.25rem;
    border: 1px solid var(--border);
}

/* ---------------------------------------------------------
   Product cards (homepage)
   --------------------------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.product-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.product-card p  { flex: 1; color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.product-card .btn { align-self: flex-start; }

/* ---------------------------------------------------------
   How it works steps
   --------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }

.step { text-align: center; padding: 1.5rem 1rem; }

.step-num {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.step h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.step p  { font-size: 0.9rem; color: var(--muted); }

/* ---------------------------------------------------------
   Screenshot gallery
   --------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.gallery img { width: 100%; border-radius: 5px; border: 1px solid var(--border); }

/* ---------------------------------------------------------
   Support box
   --------------------------------------------------------- */
.support-box {
    background: var(--white);
    padding: 2rem;
    max-width: 800px;
}
.section-alt .support-box {
    background: transparent;
    padding: 2rem 0;
}
.support-box p    { color: var(--muted); }
.support-box a    { color: var(--accent); text-decoration: none; font-weight: 500; }
.support-box a:hover { text-decoration: underline; }
.support-box .privacy-link { margin-top: 1rem; font-size: 0.85rem; }

/* ---------------------------------------------------------
   Download table
   --------------------------------------------------------- */
.download-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.download-table tr {
    border-bottom: 1px solid var(--border);
}

.download-table tr:first-child {
    border-top: 1px solid var(--border);
}

.dl-thumb {
    width: 72px;
    padding: 0.75rem 1rem 0.75rem 0;
}

.dl-thumb-box {
    width: 56px;
    height: 56px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.dl-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.975rem;
    padding: 0.75rem 1rem 0.75rem 0;
}

.dl-links {
    text-align: right;
    padding: 0.75rem 0;
    white-space: nowrap;
}

.dl-links .btn { margin-left: 0.5rem; }

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------
   --------------------------------------------------------- */
.error-section {
    min-height: calc(100vh - 60px - 80px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.error-message { color: var(--muted); margin-bottom: 2rem; max-width: 420px; }

/* ---------------------------------------------------------
   Policy / EULA pages
   --------------------------------------------------------- */
.policy-content { max-width: 720px; }
.policy-content h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
.policy-content p, .policy-content li { color: var(--muted); font-size: 0.95rem; }
.policy-content ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.policy-content code {
    background: var(--light);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--text);
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
footer {
    background: var(--dark);
    color: #e0e6f5;           /* Lighter for better readability */
    text-align: center;
    padding: 2rem;
    font-size: 0.85rem;
}
footer p, a { color: #e0e6f5; text-decoration: none; }
footer a:hover { color: var(--white); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 700px) {
    h1 { font-size: 1.8rem; }
    nav { padding: 0 1rem; }
    .nav-links { gap: 1rem; }
    .container { padding: 0 1rem; }
    section { padding: 2.5rem 0; }
    .hero-split { grid-template-columns: 1fr; }
    .hero-image { display: none; }
    .error-code { font-size: 4rem; }
    .dl-links { white-space: normal; }
    .dl-links .btn { margin: 0.25rem 0.25rem 0 0; }
}