/*
 * File: styles.css
 * Description: Global styles for Stupidity Ink website.
 * Theme: Dark, minimal, smooth animations.
 */

/* Custom Font */
@font-face {
    font-family: 'Canterbury';
    src: url('fonts/Canterbury.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --text: #f5f5f5;
    --page-bg: #0b0b0b;
    --surface: #0f0f10;
    --accent: #9a9a9a;
    --muted: rgba(255,255,255,0.06);
    --font-family: 'Arial', sans-serif;
    --font-heading: 'Canterbury', cursive;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: var(--font-family);
    color: var(--text);
    background: var(--page-bg);
    line-height: 1.6;
    padding-top: 80px; /* space for fixed header */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 300ms ease, color 300ms ease;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }

/* Header */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: rgba(11,11,11,0.55);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    backdrop-filter: blur(6px);
    transition: background 300ms ease, transform 200ms ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo img {
    height: 48px; /* fixed logo height for consistency */
    width: auto;
    display: block;
    object-fit: contain;
    transition: transform 250ms ease, opacity 250ms ease, filter 250ms ease;
}
.logo img:hover { transform: scale(1.05); }

.nav-links { list-style: none; display: flex; gap: 22px; align-items: center; }
.nav-links a {
    font-weight: 600; padding: 8px 0; position: relative; color: var(--text);
    transition: color 200ms ease, transform 150ms ease;
}
.nav-links a:after {
    content: '';
    position: absolute; left: 0; bottom: -6px;
    width: 0; height: 2px; background: var(--text);
    transition: width 260ms ease;
}
.nav-links a:hover { color: var(--accent); transform: translateY(-2px); }
.nav-links a:hover:after { width: 100%; }

/* Page container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.section-title {
    font-size: 2.2rem; text-align: center; margin-bottom: 38px;
    border-bottom: 2px solid var(--muted); display: inline-block; padding: 10px 18px;
}

/* Hero */
.hero { position: relative; min-height: 80vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-background { position: absolute; inset: 0; background-image: url("images/Screenshot 2025-11-10 204332.png"); background-size: cover; background-position: center; filter: brightness(0.9) saturate(0.9); z-index: 0; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0.52), rgba(0,0,0,0.52)); box-shadow: inset 0 80px 120px rgba(0,0,0,0.25); z-index: 1; }

.hero-content { position: relative; z-index: 2; text-align: center; color: var(--text); padding: 80px 20px; opacity: 0; transform: translateY(10px); animation: fadeUp 800ms cubic-bezier(.2,.9,.3,1) 200ms forwards; }
.hero-content h1 { font-size: 3rem; letter-spacing: 1px; margin-bottom: 0.5rem; }
.hero-sub { font-size: 1.05rem; max-width: 720px; margin: 0 auto 1.25rem auto; opacity: 0.95; }

.cta-button { display: inline-block; background: transparent; color: var(--text); border: 2px solid rgba(255,255,255,0.95); padding: 12px 28px; font-weight: 700; text-transform: uppercase; transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease, box-shadow 200ms ease; }
.cta-button:hover { background-color: rgba(255,255,255,0.95); color: #0b0b0b; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.6); }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; padding-bottom: 50px; }
.gallery-item {
    position: relative;
    overflow: hidden;
    background-color: var(--surface);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    line-height: 0;
    border-radius: 6px;
}
/* Portrait fallback: use padding-top to enforce 3:4 tile (133.33% height) */
.gallery-item::before {
    content: "";
    display: block;
    padding-top: 133.3333%; /* portrait 3:4 (height = 4/3 * width) */
}
.gallery-item a { position: absolute; inset: 0; display: block; }
.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* crops to fit tile */
    filter: grayscale(100%);
    transition: filter 0.55s cubic-bezier(.2,.9,.3,1), transform 0.55s cubic-bezier(.2,.9,.3,1);
}
.gallery-item img:hover { filter: grayscale(0%); transform: scale(1.06); }

/* Lightbox / viewer */
.lightbox {
    position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 2000;
    background: rgba(0,0,0,0.85);
}
.lightbox.open { display: flex; }
.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 98vh;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.lightbox-content img { display: block; max-width: calc(95vw - 40px); max-height: calc(92vh - 40px); width: auto; height: auto; object-fit: contain; border-radius: 4px; transition: opacity 240ms ease; }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; top: 50%; transform: translateY(-50%); color: var(--text); background: rgba(0,0,0,0.4); border: none; padding: 10px 12px; cursor: pointer; border-radius: 4px; backdrop-filter: blur(4px);
}
.lightbox-close { top: 8px; right: 8px; transform: none; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-caption { margin-top: 10px; text-align: center; color: var(--accent); font-size: 0.95rem; display: none; }

@media (max-width: 768px) {
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

/* Blog Section */
.blog-intro {
    text-align: center;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-content {
    padding: 24px;
}

.blog-category {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.blog-card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text);
    transition: color 0.2s ease;
}

.blog-card:hover .blog-card-content h3 {
    color: #fff;
}

.blog-card-content p {
    color: var(--accent);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Section CTA Button */
.section-cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.section-cta .cta-button {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Blog Preview on Homepage */
.blog-preview {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .blog-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-preview {
        grid-template-columns: 1fr;
    }
}

/* Blog Responsive */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-content h3 {
        font-size: 1.1rem;
    }
}

/* Footer */
.footer { background: transparent; color: var(--text); text-align: center; padding: 30px 20px; margin-top: 50px; font-size: 0.9em; border-top: 1px solid rgba(255,255,255,0.03); }

/* Responsive Google Map wrapper */
.map-wrapper { width: 100%; max-width: 100%; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.03); }
.map-wrapper .responsive-map { width: 100%; height: 350px; border: 0; display: block; }

@media (max-width: 600px) {
    .map-wrapper .responsive-map { height: 260px; }
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    padding: 60px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
}

.footer-tagline {
    color: var(--accent);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
    letter-spacing: 0.5px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--accent);
    font-size: 0.9rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--text);
    transform: translateX(4px);
}

.footer-contact p {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--accent);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: var(--text);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 20px;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom p {
    color: var(--accent);
    font-size: 0.85rem;
}

.footer-made {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    body { padding-top: 60px; }
    .nav-container { flex-direction: column; padding: 10px 20px; }
    .logo { margin-bottom: 8px; }
    .nav-links { width: 100%; justify-content: space-around; padding-bottom: 5px; }
    .section-title { font-size: 1.6rem; margin-bottom: 22px; }
    .hero { min-height: 60vh; }
    .hero-content h1 { font-size: 2rem; }
    .hero-sub { font-size: 1rem; padding: 0 10px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 20px 30px;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-tagline {
        max-width: 100%;
    }
    
    .footer-links ul {
        align-items: center;
    }
    
    .footer-links a:hover {
        transform: none;
    }
    
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}