/* 
   Calcuto Pro Design System v2
   Theme: Modern Minimal (Light Mode, Premium Whitespace, Stripe-style typography)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #ffffff;
    --bg-subtle: #f6f9fc;
    --border-color: #e3e8ee;
    
    --primary: #5469d4; /* Stripe Blue */
    --primary-hover: #4354b3;
    --secondary: #1a1f36;
    
    --text-main: #1a1f36;
    --text-muted: #4f566b;
    --text-error: #df1b41;
    
    --shadow-subtle: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    --shadow-hover: 0 18px 45px rgba(50, 50, 93, 0.12), 0 8px 15px rgba(0, 0, 0, 0.08);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --nav-height: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1 { font-size: 3rem; font-weight: 700; color: var(--secondary); margin-bottom: 1rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; font-weight: 600; color: var(--secondary); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; font-weight: 600; color: var(--secondary); margin-bottom: 0.75rem; }
p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 1.125rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-subtle);
    border-color: var(--primary);
}

/* Cards */
.card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

/* Sections */
section {
    padding: 6rem 0;
}

.bg-subtle {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* Layout helpers */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Related Content Hub (Liquid Layout) */
.related-content {
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin-top: 6rem;
    border: 1px solid var(--border-color);
    display: block !important;
    width: 100%;
    clear: both;
}

.related-content h2, .related-content h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: left;
    font-weight: 700;
}

/* Responsive Cluster Layout (Flex-based) */
.related-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    width: 100%;
}

.cluster-col {
    flex: 1 1 300px; /* Stacks when columns drop below 300px */
    min-width: 0;
}

.tool-links, .guide-links {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.related-content .card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    width: 100%;
    min-height: 140px;
}

.related-content .card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.related-content .card strong {
    display: block;
    font-size: 1.15rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.related-content .card span {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.related-content .card::after {
    content: 'Read This Guide →';
    margin-top: auto;
    padding-top: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.related-content .card:hover::after {
    transform: translateX(6px);
}

@media (max-width: 992px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
    .tool-layout { grid-template-columns: 1fr; }
    .related-cluster { gap: 4rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    section { padding: 4rem 0; }
    .related-content { padding: 2.5rem 1.25rem; }
    .related-content .card { padding: 1.5rem; }
}

/* Placeholders */
#header-placeholder { height: var(--nav-height); }

/* Utility Classes */
.p-main { padding-top: 140px; padding-bottom: 80px; }
.section-padding { padding: 4rem 0; }
.section-padding-top { padding-top: 4rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2.5rem; }
.mb-3 { margin-bottom: 4rem; }
.mb-4 { margin-bottom: 6rem; }
.mt-auto { margin-top: auto; }
.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.mt-1 { margin-top: 1rem; }

.lead-text {
    max-width: 800px;
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.text-sm { font-size: 0.95rem; }
.text-xs { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--primary); font-weight: 600; }
.text-secondary { color: var(--secondary); font-weight: 600; }
.text-error { color: var(--text-error); font-weight: 600; }
.text-bold { font-weight: 700; }
.text-center { text-align: center; }
.alert-danger-subtle { background: #fff5f5; border: 1px solid #feb2b2; }
.pb-lg { padding-bottom: 100px; }

.h1-display { 
    font-size: 3.5rem; 
    font-weight: 700; 
    letter-spacing: -0.02em; 
    line-height: 1.1; 
}

.max-w-650 { max-width: 650px; margin-left: auto; margin-right: auto; }
.m-auto { margin-left: auto; margin-right: auto; }

.article-meta { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    margin-bottom: 2rem;
}

.article-hero-img {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-card);
}

.article-footnote {
    font-size: 0.85rem;
    padding: 1rem;
    color: var(--text-muted);
}

.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.img-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.w-full { width: 100%; }
.max-w-800 { max-width: 800px; }
.overflow-hidden { overflow: hidden; }
.border-top { border-top: 1px solid var(--border-color); }
