/**
 * MyDocSafe CMS - Custom Styles
 *
 * Additional styles beyond Tailwind.
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
    --mds-primary: var(--mds-blue-900);
    --mds-primary-dark: var(--mds-blue-800);
    --mds-secondary: var(--mds-teal-600);
    --mds-secondary-dark: var(--mds-teal-700);
    --mds-primary-contrast: var(--mds-panel);
    --mds-cta: var(--mds-teal-600);
    --mds-cta-dark: var(--mds-teal-700);
}

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

:focus-visible {
    outline: 2px solid var(--mds-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.prose h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--mds-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mds-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--mds-text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    color: var(--mds-muted);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
    color: var(--mds-muted);
    line-height: 1.75;
}

.prose a {
    color: var(--mds-primary);
    text-decoration: none;
}

.prose a:hover {
    color: var(--mds-primary-dark);
    text-decoration: underline;
}

.prose strong {
    font-weight: 600;
    color: var(--mds-text);
}

.prose hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

.prose figure {
    margin: 1.5rem 0;
}

.prose figcaption {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-align: center;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.prose blockquote {
    border-left: 4px solid var(--mds-primary);
    padding-left: 1rem;
    font-style: italic;
    color: #4b5563;
    margin: 1.5rem 0;
}

/* Distinct callouts used in GDPR guide for product-specific commentary */
.prose .mds-comment {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid var(--mds-primary);
    border-radius: 0.625rem;
    padding: 1rem 1.125rem;
    margin: 1.5rem 0;
}

.prose .mds-comment p {
    margin: 0 0 0.75rem;
    color: #0f172a;
    line-height: 1.65;
}

.prose .mds-comment p:last-child {
    margin-bottom: 0;
}

.prose .mds-comment a {
    color: var(--mds-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose .mds-comment a:hover {
    color: var(--mds-primary-dark);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
    background-color: var(--mds-cta);
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 179, 136, 0.3);
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--mds-cta-dark);
    box-shadow: 0 4px 16px rgba(0, 179, 136, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--mds-panel);
    color: var(--mds-primary);
    border: 2px solid var(--mds-primary);
    padding: 0.75rem 2rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: var(--mds-blue-100);
    color: var(--mds-primary);
    transform: translateY(-1px);
}

.btn-link,
.btn-link:hover {
    color: var(--mds-primary);
    font-weight: 600;
}

.btn-link:hover {
    color: var(--mds-primary-dark);
}

.btn-link-inverse,
.btn-link-inverse:hover {
    color: var(--mds-panel);
}

/* ==========================================================================
   Hero & Marketing Sections
   ========================================================================== */

.mds-hero-gradient {
    background: var(--mds-hero-gradient);
    position: relative;
    overflow: hidden;
}

/* Subtle animated mesh overlay on hero */
.mds-hero-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.mds-soft-glow {
    background: var(--mds-soft-glow);
}

.mds-section-soft {
    background: var(--mds-blue-100);
}

.mds-section-muted {
    background: var(--mds-gray-50);
}

/* ==========================================================================
   Cards & Panels
   ========================================================================== */

.mds-panel-card {
    background: var(--mds-panel);
    border: 1px solid rgba(0, 114, 206, 0.08);
    box-shadow: 0 1px 3px rgba(0, 43, 69, 0.04);
    transition: all 0.25s ease;
}

.mds-panel-card:hover {
    box-shadow: 0 8px 30px rgba(0, 43, 69, 0.08);
    border-color: rgba(0, 114, 206, 0.15);
    transform: translateY(-2px);
}

.card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Icons & Logos
   ========================================================================== */

.mds-icon {
    width: 1.75rem;
    height: 1.75rem;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
}

.mds-icon--teal {
    color: var(--mds-secondary);
}

.mds-icon--blue {
    color: var(--mds-primary);
}

.mds-logo {
    height: 40px;
    width: auto;
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.mds-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.mds-chip {
    background: var(--mds-panel);
    border: 1px solid #e6edf3;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.mds-desktop-nav {
    gap: 0.85rem;
    min-width: 0;
    flex-wrap: nowrap;
}

.mds-nav-item {
    min-width: 0;
}

.mds-nav-label {
    display: inline-block;
    max-width: 10rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

@media (min-width: 1280px) {
    .mds-desktop-nav {
        gap: 1.1rem;
    }

    .mds-nav-label {
        max-width: 11.5rem;
    }
}

.mds-chip:hover {
    border-color: rgba(0, 114, 206, 0.2);
    box-shadow: 0 4px 12px rgba(0, 43, 69, 0.06);
}

.mds-screenshot {
    background: var(--mds-panel);
    border: 1px solid var(--mds-blue-100);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 114, 206, 0.12);
    transition: all 0.3s ease;
}

.mds-screenshot:hover {
    box-shadow: 0 16px 40px rgba(0, 114, 206, 0.18);
    transform: translateY(-2px);
}

.mds-feature-icon svg {
    width: 1.75rem !important;
    height: 1.75rem !important;
}

/* ==========================================================================
   Contrast Overrides
   ========================================================================== */

.bg-primary.text-primary,
.bg-primary.text-primary:hover {
    color: var(--mds-primary-contrast) !important;
}

.bg-primary {
    color: var(--mds-primary-contrast);
}

.bg-primary .text-primary {
    color: var(--mds-primary-contrast) !important;
}

.bg-white.text-primary {
    color: var(--mds-primary) !important;
}

.bg-primary .bg-white.text-primary {
    color: var(--mds-primary-dark) !important;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

[x-show] {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

[x-cloak] {
    display: none !important;
}

.nav-active {
    color: var(--mds-primary);
    font-weight: 600;
}

/* ==========================================================================
   Section Headings — Tighter letter-spacing for large text
   ========================================================================== */

section h2 {
    letter-spacing: -0.025em;
}

section h1 {
    letter-spacing: -0.03em;
}

/* ==========================================================================
   Currency Switcher
   ========================================================================== */

.price-value {
    font-variant-numeric: tabular-nums;
}

.currency-symbol {
    font-size: 0.875rem;
    font-weight: 400;
}

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    border: 1px solid #d1d5db;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--mds-cta);
    box-shadow: 0 0 0 3px rgba(0, 179, 136, 0.15);
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes pulse-subtle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Scroll-triggered reveal */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.text-gradient {
    background: linear-gradient(135deg, #0066CC 0%, #00A86B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle divider between alternating sections */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 114, 206, 0.1), transparent);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }

    main {
        padding: 0 !important;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
