/**
 * CanalClear — Visual Polish & Design System
 * Comprehensive styling for premium, cohesive appearance
 *
 * Scope: Landing page, pricing, panama, suez, filing, login, blog, and all customer-facing pages
 * Goals:
 *   - Consistent spacing and padding across all sections
 *   - Professional typography hierarchy
 *   - Unified color palette with no rogue hex values
 *   - Mobile responsiveness at 375px, 768px, 1024px breakpoints
 *   - Premium button and card styling with smooth transitions
 *   - Professional images and icons
 *   - Clean footer and navbar alignment
 *   - Smooth animations without jank
 */

/* ───────────────────────────────────────────────────────────────────────────── */
/* ROOT & GLOBAL STYLES */
/* ───────────────────────────────────────────────────────────────────────────── */

:root {
    /* Primary Colors */
    --navy: #0A1628;
    --deep: #0F1D32;
    --slate: #1A2B45;
    --teal: #00D4AA;
    --teal-dim: rgba(0, 212, 170, 0.12);
    --teal-light: rgba(0, 212, 170, 0.08);

    /* Neutral Colors */
    --white: #F0F4F8;
    --gray: #8899AA;
    --gray-dark: #5A6B7D;
    --light: #C4D0DC;

    /* Semantic Colors */
    --red: #FF6B6B;
    --red-dim: rgba(255, 107, 107, 0.08);
    --yellow: #FFD93D;
    --gold: #F59E0B;
    --gold-dim: rgba(245, 158, 11, 0.1);
    --green: #10B981;

    /* Typography */
    --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

    /* Spacing Scale (8px base) */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 5rem;
    --space-5xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--navy);
    color: var(--white);
    line-height: 1.6;
    font-size: 1rem;
    min-height: 100vh;
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* TYPOGRAPHY */
/* ───────────────────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: var(--space-xl);
}

h2 {
    font-size: clamp(1.75rem, 3.5vw, 3rem);
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-bottom: var(--space-md);
}

h4 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

h5 {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

h6 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
}

p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--space-md);
    color: var(--light);
}

small {
    font-size: 0.875rem;
    color: var(--gray);
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #00bfa0;
}

strong {
    font-weight: 600;
    color: var(--white);
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* NAVBAR & NAVIGATION */
/* ───────────────────────────────────────────────────────────────────────────── */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) var(--space-xl);
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 170, 0.08);
    transition: all var(--transition-base);
}

nav .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    text-decoration: none;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
}

.logo-dot {
    color: var(--teal);
}

.logo img {
    height: 32px;
    width: auto;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--teal);
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-base);
}

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

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-links a.active {
    color: var(--teal);
}

/* Nav CTA */
.nav-cta {
    padding: var(--space-sm) var(--space-lg);
    background: var(--teal);
    color: var(--navy) !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-cta:hover {
    background: #00bfa0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
    color: var(--navy) !important;
}

/* Nav Login */
.nav-login {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-login:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* MAIN CONTENT */
/* ───────────────────────────────────────────────────────────────────────────── */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 7rem var(--space-xl) var(--space-5xl);
}

/* Sections */
section,
.section {
    margin-bottom: var(--space-5xl);
    padding: var(--space-3xl) var(--space-xl);
    border-radius: var(--radius-xl);
    background: transparent;
}

section:first-of-type {
    padding-top: var(--space-2xl);
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* HERO SECTION */
/* ───────────────────────────────────────────────────────────────────────────── */

.hero {
    text-align: center;
    margin-bottom: var(--space-4xl);
    padding: var(--space-3xl) 0;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: var(--teal-dim);
    border: 1px solid rgba(0, 212, 170, 0.25);
    color: var(--teal);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-xl);
    animation: fadeInDown 0.6s ease-out;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    margin-bottom: var(--space-lg);
    animation: fadeInDown 0.8s ease-out 0.1s both;
}

.hero h1 span {
    color: var(--teal);
    background: linear-gradient(135deg, var(--teal), #00bfa0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.125rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    animation: fadeInDown 1s ease-out 0.2s both;
}

.hero-cta-group {
    display: flex;
    flex-direction: row;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-notice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: var(--gold-dim);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xl);
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* BUTTONS & CONTROLS */
/* ───────────────────────────────────────────────────────────────────────────── */

button,
.btn,
[role="button"],
input[type="submit"],
input[type="button"] {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: 44px;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.5;
}

/* Primary Button */
.btn-primary,
button.btn-primary,
.cta-btn {
    background: var(--teal);
    color: var(--navy);
    font-weight: 700;
    padding: var(--space-sm) var(--space-xl);
}

.btn-primary:hover,
button.btn-primary:hover,
.cta-btn:hover {
    background: #00bfa0;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 212, 170, 0.3);
}

.btn-primary:active,
button.btn-primary:active,
.cta-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 212, 170, 0.2);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 1px solid rgba(196, 208, 220, 0.3);
}

.btn-secondary:hover {
    border-color: var(--teal);
    color: var(--white);
    background: rgba(0, 212, 170, 0.05);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--light);
    border: none;
}

.btn-ghost:hover {
    color: var(--white);
}

/* Disabled State */
button:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:hover,
.btn:disabled:hover {
    background: inherit;
    transform: none;
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* CARDS */
/* ───────────────────────────────────────────────────────────────────────────── */

.card,
.plan-card,
.feature-card,
.article-card {
    background: var(--deep);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.card:hover,
.plan-card:hover,
.feature-card:hover,
.article-card:hover {
    border-color: rgba(0, 212, 170, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* Featured/Highlighted Card */
.card.featured,
.plan-card.featured,
.feature-card.featured {
    border-color: var(--teal);
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.06), var(--deep));
    position: relative;
    overflow: hidden;
}

.card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.1), transparent);
    border-radius: 50%;
    pointer-events: none;
}

/* Card Badge */
.card-badge,
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--teal);
    color: var(--navy);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    white-space: nowrap;
    z-index: 1;
}

/* Card Header */
.card-header,
.plan-header {
    margin-bottom: var(--space-md);
}

.card-title,
.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.card-description,
.plan-description {
    font-size: 0.95rem;
    color: var(--gray);
}

/* Card Body */
.card-body,
.plan-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Card Footer */
.card-footer,
.plan-footer {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* GRIDS */
/* ───────────────────────────────────────────────────────────────────────────── */

.grid {
    display: grid;
    gap: var(--space-xl);
}

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

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

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

/* Responsive grids */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* PRICING SECTION */
/* ───────────────────────────────────────────────────────────────────────────── */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-4xl);
}

.plan-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.plan-price-period {
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 400;
}

.plan-features {
    list-style: none;
    margin: var(--space-md) 0;
}

.plan-features li {
    padding: var(--space-sm) 0;
    color: var(--light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.plan-features li::before {
    content: '✓';
    color: var(--teal);
    font-weight: 700;
    flex-shrink: 0;
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* IMAGES & ICONS */
/* ───────────────────────────────────────────────────────────────────────────── */

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

img.logo {
    border-radius: 0;
}

img[alt] {
    /* All images should have alt text */
}

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-sm {
    width: 20px;
    height: 20px;
}

.icon-md {
    width: 32px;
    height: 32px;
}

.icon-lg {
    width: 48px;
    height: 48px;
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* FORMS */
/* ───────────────────────────────────────────────────────────────────────────── */

input,
textarea,
select {
    font-family: var(--font-body);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    color: var(--white);
    font-size: 1rem;
    transition: all var(--transition-base);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-dark);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--teal);
    background: rgba(0, 212, 170, 0.02);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

input:disabled,
textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* FOOTER */
/* ───────────────────────────────────────────────────────────────────────────── */

footer {
    background: var(--deep);
    border-top: 1px solid rgba(0, 212, 170, 0.08);
    padding: var(--space-4xl) var(--space-xl) var(--space-xl);
    margin-top: var(--space-5xl);
}

footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

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

.footer-section h3 {
    margin-bottom: var(--space-md);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: var(--gray);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--teal);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

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

.footer-socials {
    display: flex;
    gap: var(--space-md);
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* ALERTS & BANNERS */
/* ───────────────────────────────────────────────────────────────────────────── */

.alert,
.banner,
.notice {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    margin-bottom: var(--space-md);
}

.alert-info,
.banner-info {
    background: var(--teal-light);
    border-color: var(--teal);
    color: var(--teal);
}

.alert-warning,
.banner-warning {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
}

.alert-error,
.banner-error {
    background: var(--red-dim);
    border-color: var(--red);
    color: var(--red);
}

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

/* ───────────────────────────────────────────────────────────────────────────── */
/* ANIMATION KEYFRAMES */
/* ───────────────────────────────────────────────────────────────────────────── */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* RESPONSIVE DESIGN */
/* ───────────────────────────────────────────────────────────────────────────── */

/* Tablet (768px and down) */
@media (max-width: 768px) {
    :root {
        --space-3xl: 2.5rem;
        --space-4xl: 3rem;
        --space-5xl: 4rem;
    }

    main {
        padding: 6rem var(--space-lg) var(--space-3xl);
    }

    section,
    .section {
        padding: var(--space-2xl) var(--space-lg);
        margin-bottom: var(--space-3xl);
    }

    h1 {
        font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }

    .hero {
        margin-bottom: var(--space-3xl);
        padding: var(--space-2xl) 0;
    }

    .hero h1 {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }

    .hero p {
        font-size: 1rem;
        max-width: 100%;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta-group .btn {
        width: 100%;
    }

    nav {
        padding: var(--space-sm) var(--space-lg);
    }

    .nav-links {
        gap: var(--space-lg);
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .card,
    .plan-card,
    .feature-card,
    .article-card {
        padding: var(--space-lg);
    }

    button,
    .btn,
    [role="button"] {
        min-height: 44px;
        font-size: 1rem;
    }

    footer {
        padding: var(--space-3xl) var(--space-lg) var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2xl);
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    img {
        border-radius: var(--radius-md);
    }
}

/* Small Tablet / Large Phone (480px - 768px) */
@media (max-width: 480px) {
    :root {
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 2rem;
    }

    body {
        font-size: 15px;
    }

    main {
        padding: 5.5rem var(--space-md) var(--space-2xl);
    }

    section,
    .section {
        padding: var(--space-lg) var(--space-md);
        margin-bottom: var(--space-2xl);
    }

    h1 {
        font-size: clamp(1.5rem, 3vw, 2rem);
        margin-bottom: var(--space-lg);
    }

    h2 {
        font-size: clamp(1.25rem, 2.5vw, 1.5rem);
        margin-bottom: var(--space-md);
    }

    p {
        font-size: 0.95rem;
    }

    nav {
        padding: var(--space-sm) var(--space-md);
    }

    nav .nav-inner {
        gap: var(--space-sm);
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .nav-links {
        display: none;
    }

    .hero {
        margin-bottom: var(--space-2xl);
        padding: var(--space-lg) var(--space-md);
    }

    .hero h1 {
        font-size: clamp(1.5rem, 3vw, 1.75rem);
        margin-bottom: var(--space-md);
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: var(--space-lg);
    }

    .hero-tag {
        font-size: 0.7rem;
        padding: var(--space-xs) var(--space-sm);
        margin-bottom: var(--space-lg);
    }

    .card,
    .plan-card,
    .feature-card,
    .article-card {
        padding: var(--space-lg);
        gap: var(--space-sm);
    }

    button,
    .btn,
    [role="button"],
    input[type="submit"],
    input[type="button"] {
        padding: var(--space-sm) var(--space-md);
        min-height: 44px;
        font-size: 0.95rem;
    }

    .btn-primary,
    .cta-btn {
        padding: var(--space-sm) var(--space-lg);
    }

    .plan-price {
        font-size: 1.75rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    footer {
        padding: var(--space-2xl) var(--space-md) var(--space-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-section h3 {
        font-size: 0.9rem;
    }

    .footer-socials {
        gap: var(--space-sm);
    }
}

/* Extra small (375px and below) */
@media (max-width: 375px) {
    :root {
        --space-md: 0.75rem;
        --space-lg: 1rem;
        --space-xl: 1.25rem;
    }

    body {
        font-size: 14px;
    }

    main {
        padding: 5rem var(--space-sm) 2rem;
    }

    h1 {
        font-size: clamp(1.25rem, 2.5vw, 1.5rem);
        margin-bottom: var(--space-md);
    }

    section,
    .section {
        padding: var(--space-md) var(--space-sm);
        margin-bottom: var(--space-lg);
    }

    .hero {
        margin-bottom: var(--space-xl);
        padding: var(--space-lg) 0;
    }

    .hero-tag {
        font-size: 0.65rem;
        padding: 2px 8px;
    }

    .nav-inner {
        gap: var(--space-xs) !important;
    }

    .logo-text {
        font-size: 1rem;
    }

    .card,
    .plan-card,
    .feature-card,
    .article-card {
        padding: var(--space-md);
    }

    button,
    .btn {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.9rem;
    }

    input,
    textarea,
    select {
        padding: var(--space-xs) var(--space-sm);
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* ACCESSIBILITY */
/* ───────────────────────────────────────────────────────────────────────────── */

/* Focus visible for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode (always on) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--navy);
        color: var(--white);
    }
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* UTILITY CLASSES */
/* ───────────────────────────────────────────────────────────────────────────── */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

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

.p-0 {
    padding: 0 !important;
}

.p-sm {
    padding: var(--space-sm);
}

.p-md {
    padding: var(--space-md);
}

.p-lg {
    padding: var(--space-lg);
}

.p-xl {
    padding: var(--space-xl);
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.invisible {
    visibility: hidden;
}

.no-wrap {
    white-space: nowrap;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ───────────────────────────────────────────────────────────────────────────── */
/* PRINT STYLES */
/* ───────────────────────────────────────────────────────────────────────────── */

@media print {
    body {
        background: white;
        color: black;
    }

    nav,
    footer,
    .no-print {
        display: none !important;
    }

    a {
        text-decoration: underline;
    }
}
