/* =====================================================================
   PRVentures — Global Styles (AWS-inspired)
   Complements Tailwind CDN in base.html.
   ===================================================================== */

/* -------- Base -------- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* -------- Focus (accessibility + AWS-style ring) -------- */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #0ea5e9; /* primary-500 */
    outline-offset: 2px;
    border-radius: 2px;
}

/* Selection */
::selection {
    background-color: #0369a1; /* primary-700 */
    color: #ffffff;
}

/* -------- Prose (legal pages) -------- */
.prose,
.prose-legal {
    color: #37414f; /* ink-600 */
    font-size: 15px;
    line-height: 1.75;
}

.prose h2,
.prose-legal h2 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f1720; /* ink-900 */
    letter-spacing: -0.01em;
}

.prose h3,
.prose-legal h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f1720;
    letter-spacing: -0.01em;
    padding-top: 0.5rem;
    border-top: 1px solid #e6eaef; /* ink-100 */
}

.prose h3:first-of-type,
.prose-legal h3:first-of-type {
    border-top: none;
    padding-top: 0;
}

.prose h4,
.prose-legal h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1c2530; /* ink-800 */
    text-transform: none;
    letter-spacing: 0;
}

.prose p,
.prose-legal p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #37414f;
}

.prose ul,
.prose ol,
.prose-legal ul,
.prose-legal ol {
    margin: 0.75rem 0 1.25rem;
    padding-left: 1.5rem;
}

.prose ul,
.prose-legal ul {
    list-style: none;
    padding-left: 0;
}

.prose ul > li,
.prose-legal ul > li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #37414f;
}

.prose ul > li::before,
.prose-legal ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    background-color: #0284c7; /* primary-600 */
    border-radius: 1px;
}

.prose ol,
.prose-legal ol {
    list-style: decimal;
}

.prose ol > li,
.prose-legal ol > li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.prose strong,
.prose-legal strong {
    color: #0f1720;
    font-weight: 600;
}

.prose a,
.prose-legal a {
    color: #0369a1; /* primary-700 */
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(3, 105, 161, 0.25);
    transition: color .15s ease, border-color .15s ease;
}

.prose a:hover,
.prose-legal a:hover {
    color: #075985; /* primary-800 */
    border-bottom-color: #075985;
}

.prose code,
.prose-legal code {
    background-color: #f4f6f8; /* ink-50 */
    border: 1px solid #e6eaef;
    padding: 0.125rem 0.375rem;
    border-radius: 2px;
    font-size: 0.875em;
    color: #0f1720;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* -------- Scrollbar (AWS-like slim) -------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f4f6f8;
}

::-webkit-scrollbar-thumb {
    background: #c9d2dc; /* ink-200 */
    border-radius: 2px;
    border: 2px solid #f4f6f8;
}

::-webkit-scrollbar-thumb:hover {
    background: #9fadbd; /* ink-300 */
}

/* -------- Form inputs -------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea,
select {
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    color: #0f1720;
    background-color: #ffffff;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: #9fadbd; /* ink-300 */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0284c7 !important; /* primary-600 */
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

/* -------- Buttons/links transitions -------- */
button,
a {
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

/* -------- Card hover helper (optional) -------- */
.card-hover {
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.card-hover:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 2px 0 rgba(0,28,36,.10), 0 6px 20px -4px rgba(0,28,36,.18);
}

/* -------- Loading spinner -------- */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* -------- Animations -------- */
.fade-in {
    animation: fadeIn .3s ease-out;
}

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

.mobile-menu-enter {
    animation: slideDown .2s ease-out;
}

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

/* -------- Screen-reader only / skip link -------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus,
.sr-only:focus-visible {
    position: absolute;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

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

    body {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    p, li {
        orphans: 3;
        widows: 3;
    }
}

/* -------- Utility: subtle grid background pattern for hero sections -------- */
.bg-grid-white {
    background-image:
        linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* -------- Aspect ratio helpers (legacy) -------- */
.aspect-w-4 {
    position: relative;
    padding-bottom: 75%;
}

.aspect-w-4 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.aspect-h-3 {
    --tw-aspect-h: 3;
}

/* -------- Custom size helpers used in templates -------- */
.w-4\.5   { width: 1.125rem; }
.h-4\.5   { height: 1.125rem; }
.w-5\.5   { width: 1.375rem; }
.h-5\.5   { height: 1.375rem; }