/* Variables */
:root {
    --primary: #E9477A;
    --secondary: #7DD2F1;
    --accent: #cf2e2e;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --white: #ffffff;
    --neutral-bg: #F5F5F5;
}

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

@font-face {
    font-family: 'HelveticaNowText';
    src: url('fonts/HelveticaNowText') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'HelveticaNowText', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Site Header */
.site-header {
    background: #1a1a1a;
}

.site-header-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    line-height: 1.5rem;
}

.site-title {
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
}

/* Site Navigation */
.site-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.site-nav-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0 0.25rem;
}

.logo img {
    height: 2.5rem;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    gap: 1.25rem;
}

.main-nav a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

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

/* Layout */

main {
    background-repeat: no-repeat;
    background-color: var(--neutral-bg);
}

.app {
    flex: 1;
    padding: 1rem;

}

.container {
    max-width: 40rem;
    margin: 1rem auto 0;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1rem;
    color: var(--gray-600);
}

/* Main Card */
.main-card {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Section Labels */
.section-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}

/* Speed Selection */
.speed-section {
    margin-bottom: 1.5rem;
}

.speed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.speed-btn {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--gray-200);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.speed-btn:hover {
    border-color: var(--primary);
}

.speed-btn.active {
    border-color: var(--primary);
    background: rgba(233, 71, 122, 0.05);
}

.speed-btn-title {
    font-weight: 600;
    color: var(--gray-800);
}

.speed-btn.active .speed-btn-title {
    color: var(--primary);
}

.speed-btn-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Text Input */
.text-section {
    margin-bottom: 1.5rem;
}

.text-input {
    width: 100%;
    height: 12rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--gray-800);
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
}

.text-input::placeholder {
    color: var(--gray-400);
}

.text-input:focus {
    border-color: var(--primary);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-value.primary {
    color: var(--primary);
}

.stat-value.accent {
    color: var(--accent);
}

/* Result Card */
.result-card {
    background: var(--primary);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    color: var(--white);
    display: none;
}

.result-card.visible {
    display: block;
}

.result-card h2 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.result-card .duration-text {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-card .speed-info {
    font-size: 0.875rem;
    opacity: 0.8;
}


/* Blog Section */
.blog-section {
    padding: 1rem;
    max-width: 72rem;
    margin: 0 auto;
}

.blog-container {
    max-width: 80rem;
    padding: 1rem;
    margin: 0 auto;
    background-color: var(--white);
}

.blog-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-card-image {
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.blog-card-image img {
    width: 100%;
    height: 14rem;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.03);
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--primary);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-card-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.blog-card-link:hover {
    opacity: 0.8;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .blog-section {
        padding: 1rem;
    }
}

/* Site Footer */
.site-footer {
    background: #000000;
    margin-top: auto;
}

.site-footer-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

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

/* Responsive */
@media (min-width: 768px) {


    main {
        background-image: url("../images/clovers.png");
        background-position: 1rem 1rem;
        padding: 1rem;
    }

    .main-card {
        padding: 1rem;
    }

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

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