Files
palina-theme/assets/css/tailwind.css
2026-02-20 09:49:13 +01:00

181 lines
4.9 KiB
CSS

@import "tailwindcss";
@plugin "@tailwindcss/typography";
@theme {
/* Brand Palette: Palina Gold (#DDC288) */
--color-brand-50: #faf8f0;
--color-brand-100: #f4edd1;
--color-brand-200: #e9dba4;
--color-brand-300: #ddc277;
--color-brand-400: #ddc288;
--color-brand-500: #c9a765;
--color-brand-600: #b58d46;
--color-brand-700: #9c763a;
--color-brand-800: #7d5e31;
--color-brand-900: #624a29;
--color-brand-950: #4c3a23;
/* Font Families */
--font-serif: "Fraunces", serif;
--font-heading: "Fraunces", serif;
--font-sans: "Montserrat", sans-serif;
}
/*
Theme Variable Definitions
Using :root for default (Dark) and [data-theme='light'] for overrides.
This ensures maximum compatibility with Alpine.js and dynamic swapping.
*/
:root {
--bg-primary: #121212;
--bg-secondary: #1e1e1e;
--bg-tertiary: #2a2a2a;
--text-primary: #f2f2f2;
--text-secondary: #a3a3a3;
--text-tertiary: #737373;
--brand-primary: #ddc288; /* Bright Gold for Dark Theme */
--brand-secondary: #c9a765;
}
[data-theme='light'] {
--bg-primary: #fdfcf9;
--bg-secondary: #f4f1e8;
--bg-tertiary: #e9e4d5;
--text-primary: #2d2114;
--text-secondary: #624a29;
--text-tertiary: #7d5e31;
--brand-primary: #9c763a; /* Darker Gold for Light Theme contrast */
--brand-secondary: #7d5e31;
}
@layer base {
[x-cloak] { display: none !important; }
body {
background-color: var(--bg-primary);
color: var(--text-primary);
font-family: var(--font-sans);
transition: background-color 0.3s ease, color 0.3s ease;
}
/* Global Headings */
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-heading);
color: var(--brand-primary);
transition: color 0.3s ease;
}
}
@layer components {
/* Main navigation styling */
header nav ul {
@apply flex items-center space-x-4;
}
header nav ul li a {
@apply text-[var(--text-primary)] hover:text-[var(--brand-primary)] transition-colors duration-200;
}
/* Mobile navigation styling */
#mobile-menu nav ul {
@apply flex flex-col items-center space-y-8;
}
#mobile-menu nav ul li a {
@apply text-[var(--text-primary)] text-3xl font-bold hover:text-[var(--brand-primary)] transition-colors duration-200;
}
/* Button & Link Components */
.btn-primary {
@apply inline-flex items-center px-8 py-3 border border-transparent text-base font-semibold rounded-lg shadow-md
bg-[var(--brand-primary)] text-[var(--bg-primary)]
hover:shadow-lg hover:-translate-y-0.5 active:translate-y-0
transition-all duration-300 cursor-pointer relative overflow-hidden;
}
.btn-primary::after {
content: "";
@apply absolute inset-0 bg-white opacity-0 transition-opacity duration-300;
}
.btn-primary:hover::after {
@apply opacity-10;
}
.fancy-link {
@apply font-medium transition-all duration-300 relative inline-block;
color: var(--brand-primary) !important;
text-decoration: none !important;
background-image: linear-gradient(var(--brand-primary), var(--brand-primary));
background-position: 0 100%;
background-repeat: no-repeat;
background-size: 0 1px;
}
.fancy-link:hover {
@apply text-[var(--text-primary)];
background-size: 100% 1px;
}
/* Typography (Prose) Customization */
.prose {
--tw-prose-body: var(--text-primary);
--tw-prose-headings: var(--brand-primary);
--tw-prose-links: var(--brand-primary);
--tw-prose-bold: var(--text-primary);
--tw-prose-counters: var(--text-secondary);
--tw-prose-bullets: var(--brand-primary);
--tw-prose-quotes: var(--text-primary);
--tw-prose-quote-borders: var(--brand-primary);
--tw-prose-captions: var(--text-secondary);
--tw-prose-code: var(--text-primary);
--tw-prose-pre-code: var(--text-primary);
--tw-prose-pre-bg: var(--bg-secondary);
--tw-prose-th-borders: var(--bg-tertiary);
--tw-prose-td-borders: var(--bg-secondary);
max-width: 100%;
transition: color 0.3s ease;
}
/* Increase specificity to ensure headings follow our brand-primary theme */
.prose :where(h1, h2, h3, h4, h5, h6) {
color: var(--brand-primary) !important;
font-family: var(--font-heading);
@apply font-bold tracking-tight transition-colors duration-300;
}
/* Link styling within prose */
.prose a {
color: var(--brand-primary) !important;
text-decoration: none !important;
@apply font-medium transition-all duration-300;
background-image: linear-gradient(var(--brand-primary), var(--brand-primary));
background-position: 0 100%;
background-repeat: no-repeat;
background-size: 0 1px;
}
.prose a:hover {
background-size: 100% 1px;
}
}
.site-logo {
@apply transition-all duration-300;
color: var(--brand-primary);
fill: currentColor;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fadeInUp {
animation: fadeInUp 0.5s ease-out forwards;
}