/* Custom CSS variables and utility classes for Laravel app */

/*
 * Brand tokens MUST match resources/css/app.css (@theme --color-brand-*).
 * The .bg-brand-* classes below shadow Tailwind's generated utilities with
 * !important, so a mismatch here silently repaints the whole public site
 * (this is how the petrol-teal footer / off-orange CTA drift happened).
 */
:root {
    --foreground-rgb: 17, 24, 39;
    --background-rgb: 249, 250, 251;
    --brand-orange: #ea580c;
    --brand-blue: #1e3a8a;
    --brand-light-gray: #f9fafb;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #0a0a0a;
        --foreground: #ededed;
    }
}

/*
 * Instrument Sans — the brand font declared by Tailwind's --font-sans.
 * Self-hosted (Croatian needs latin-ext for č ć đ š ž); swap keeps LCP fast.
 */
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-ext-400-normal.woff2') format('woff2');
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-ext-500-normal.woff2') format('woff2');
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-600-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-ext-600-normal.woff2') format('woff2');
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/instrument-sans-latin-ext-700-normal.woff2') format('woff2');
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

body {
    color: rgb(var(--foreground-rgb));
    background: rgb(var(--background-rgb));
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

/* Accent Bar Styles */
.accent-bar-left {
    position: relative;
    padding-left: 1.25rem;
}

.accent-bar-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background-color: var(--brand-orange);
}

.accent-bar-bottom {
    position: relative;
    padding-bottom: 0.75rem;
}

.accent-bar-bottom::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 4px;
    background-color: var(--brand-orange);
}

.accent-bar-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--brand-orange);
}

/* Section Title Styles */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand-blue);
    margin-bottom: 1.5rem;
    position: relative;
}

.section-title-centered {
    text-align: center;
}

.section-title-centered::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -0.75rem;
    width: 80px;
    height: 4px;
    background-color: var(--brand-orange);
}

/* Card Shadow */
.shadow-card {
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Brand Color Backgrounds */
.bg-brand-orange {
    background-color: var(--brand-orange) !important;
}

.bg-brand-blue {
    background-color: var(--brand-blue) !important;
}

.bg-brand-light-gray {
    background-color: var(--brand-light-gray) !important;
}

/* ========================================
   Blog Prose Typography
   Long-form reading styles for blog articles
   ======================================== */

.blog-prose {
    font-size: 1.125rem;       /* 18px */
    line-height: 1.75;
    color: #374151;            /* gray-700 */
}

.blog-prose h2 {
    font-size: 1.75rem;        /* 28px */
    font-weight: 700;
    color: #111827;            /* gray-900 */
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.blog-prose h3 {
    font-size: 1.375rem;       /* 22px */
    font-weight: 600;
    color: #1f2937;            /* gray-800 */
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.4;
}

.blog-prose h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.25em;
    margin-bottom: 0.5em;
}

.blog-prose p {
    margin-bottom: 1.25em;
}

.blog-prose a {
    color: var(--brand-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-prose a:hover {
    color: var(--brand-orange);
}

.blog-prose strong {
    font-weight: 600;
    color: #111827;
}

/* Lists */
.blog-prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.blog-prose ol {
    list-style-type: decimal;
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.blog-prose li {
    margin-bottom: 0.5em;
    padding-left: 0.25em;
}

.blog-prose li > ul,
.blog-prose li > ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Blockquotes */
.blog-prose blockquote {
    border-left: 4px solid var(--brand-orange);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    background-color: #f9fafb;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #4b5563;
}

.blog-prose blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
.blog-prose code {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
    font-size: 0.875em;
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    color: #1f2937;
}

.blog-prose pre {
    background-color: #1f2937;
    color: #e5e7eb;
    padding: 1.25em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

.blog-prose pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Tables */
.blog-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9375rem;
}

.blog-prose thead th {
    background-color: #f3f4f6;
    font-weight: 600;
    text-align: left;
    padding: 0.75em 1em;
    border-bottom: 2px solid #e5e7eb;
    color: #374151;
}

.blog-prose tbody td {
    padding: 0.75em 1em;
    border-bottom: 1px solid #e5e7eb;
}

.blog-prose tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Images */
.blog-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5em 0;
}

.blog-prose figure {
    margin: 1.5em 0;
}

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

/* Horizontal rules */
.blog-prose hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}

/* First paragraph larger */
.blog-prose > p:first-child {
    font-size: 1.25rem;
    color: #1f2937;
    line-height: 1.7;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
