/* ==========================================================================
   sbom.study -- Anti-Design Vintage Gallery
   Palette: Honeyed-Neutral
   Fonts: Playfair Display (700, 900), Inter (400, 500, 600)
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: #3C2F1E;
    background-color: #F5EDD8;
    overflow-x: hidden;
}

/* ---------- Selection ---------- */
::selection {
    background: #8B6914;
    color: #FFF8E8;
}

/* ---------- Links ---------- */
a {
    color: #8B6914;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #C87941;
}

/* ---------- Section Headings ---------- */
.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2rem, 4.5vw, 4rem);
    color: #3C2F1E;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    letter-spacing: -0.02em;
}

.section-heading::before,
.section-heading::after {
    content: '\2767';
    display: inline-block;
    margin: 0 0.6em;
    color: #8B6914;
    font-size: 0.6em;
    vertical-align: middle;
    opacity: 0.7;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
#site-header {
    position: relative;
    padding: 3rem 2rem 2rem;
    text-align: center;
    border-bottom: 3px double #8B6914;
    background: #FFF8E8;
}

.header-content {
    position: relative;
    z-index: 2;
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    color: #3C2F1E;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.title-dot {
    color: #8B6914;
}

.site-tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    font-weight: 400;
    color: #C87941;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* Header Ornaments -- line illustrations */
.header-ornament {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    border: 1px solid #A8B596;
    opacity: 0.5;
}

.header-ornament--left {
    left: 2rem;
    border-radius: 0;
    transform: translateY(-50%) rotate(45deg);
}

.header-ornament--right {
    right: 2rem;
    border-radius: 50%;
    transform: translateY(-50%);
}

/* Navigation */
.header-nav {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #3C2F1E;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.3em 0.5em;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-link:hover {
    color: #8B6914;
    border-bottom-color: #8B6914;
}

.nav-ornament {
    color: #A8B596;
    font-size: 0.7rem;
    user-select: none;
}

/* ==========================================================================
   BANNER SECTION
   ========================================================================== */
.banner-section {
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
    background: #F5EDD8;
    overflow: hidden;
    border-bottom: 1px solid #A8B596;
}

/* Line Illustration -- geometric decoration */
.line-illustration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.geo-line {
    position: absolute;
    background: none;
}

.geo-line--1 {
    top: 20%;
    left: 5%;
    width: 120px;
    height: 0;
    border-top: 1px solid #A8B596;
    transform: rotate(-12deg);
    opacity: 0.6;
}

.geo-line--2 {
    bottom: 30%;
    right: 8%;
    width: 80px;
    height: 0;
    border-top: 1px solid #C87941;
    transform: rotate(25deg);
    opacity: 0.5;
}

.geo-line--3 {
    top: 60%;
    left: 15%;
    width: 50px;
    height: 0;
    border-top: 1px solid #8B6914;
    transform: rotate(-45deg);
    opacity: 0.4;
}

.geo-circle--1 {
    position: absolute;
    top: 15%;
    right: 15%;
    width: 40px;
    height: 40px;
    border: 1px solid #A8B596;
    border-radius: 50%;
    opacity: 0.4;
}

.geo-circle--2 {
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 25px;
    height: 25px;
    border: 1px solid #8B6914;
    border-radius: 50%;
    opacity: 0.35;
}

.geo-diamond {
    position: absolute;
    top: 40%;
    right: 25%;
    width: 20px;
    height: 20px;
    border: 1px solid #C87941;
    transform: rotate(45deg);
    opacity: 0.4;
}

.banner-text {
    position: relative;
    z-index: 2;
}

.banner-quote {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    color: #3C2F1E;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.banner-attribution {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: #8B6914;
    letter-spacing: 0.08em;
}

/* ==========================================================================
   PORTFOLIO GRID -- Studies Section
   ========================================================================== */
.studies-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ---------- Study Card ---------- */
.study-card {
    position: relative;
    background: #FFF8E8;
    padding: 2rem 1.5rem 1.5rem;
    border: 1px solid #A8B596;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.study-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
}

/* Card Ornament -- top-left vintage corner */
.card-ornament {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border-top: 2px solid #8B6914;
    border-left: 2px solid #8B6914;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.study-card:hover .card-ornament {
    opacity: 1;
}

/* Card Number -- Roman numeral */
.card-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #A8B596;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #3C2F1E;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.card-body {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #3C2F1E;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 1rem;
}

.card-body--extended {
    padding-top: 0.5rem;
    border-top: 1px solid #A8B596;
    opacity: 0.75;
    font-size: 0.85rem;
}

.card-tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8B6914;
    border: 1px solid #8B6914;
    padding: 0.2em 0.6em;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.study-card:hover .card-tag {
    background-color: #8B6914;
    color: #FFF8E8;
}

/* Featured Card -- span 2 columns */
.study-card--featured {
    grid-column: span 2;
    border-width: 2px;
    border-color: #8B6914;
}

/* Tall Card -- span 2 rows */
.study-card--tall {
    grid-row: span 2;
    border-style: double;
    border-width: 3px;
    border-color: #C87941;
}

/* Vintage ::before decorator on featured */
.study-card--featured::before {
    content: '\2766';
    position: absolute;
    top: 0.5rem;
    right: 0.8rem;
    font-size: 1.2rem;
    color: #8B6914;
    opacity: 0.4;
}

/* Vintage ::after decorator on tall */
.study-card--tall::after {
    content: '\2756';
    position: absolute;
    bottom: 0.8rem;
    right: 0.8rem;
    font-size: 1rem;
    color: #C87941;
    opacity: 0.4;
}

/* ---------- Card Line Art ---------- */
.card-line-art {
    position: absolute;
    bottom: 0.8rem;
    left: 1.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0.3;
    pointer-events: none;
}

.card-line-art--vertical {
    flex-direction: column;
    bottom: auto;
    top: 50%;
    right: 1rem;
    left: auto;
    transform: translateY(-50%);
}

.line-art-box {
    width: 16px;
    height: 16px;
    border: 1px solid #8B6914;
}

.line-art-cross {
    width: 16px;
    height: 16px;
    position: relative;
}

.line-art-cross::before,
.line-art-cross::after {
    content: '';
    position: absolute;
    background: #8B6914;
}

.line-art-cross::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: translateY(-50%);
}

.line-art-cross::after {
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    transform: translateX(-50%);
}

.line-art-triangle {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid #C87941;
    opacity: 0.5;
}

.line-art-dots {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.line-art-dots::before,
.line-art-dots::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #C87941;
    opacity: 0.5;
}

.line-art-zigzag {
    width: 60px;
    height: 12px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 4px,
        #8B6914 4px,
        #8B6914 5px
    );
    opacity: 0.4;
    clip-path: polygon(
        0% 100%, 10% 0%, 20% 100%, 30% 0%, 40% 100%,
        50% 0%, 60% 100%, 70% 0%, 80% 100%, 90% 0%, 100% 100%
    );
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-section {
    padding: 4rem 2rem;
    background: #FFF8E8;
    text-align: center;
    position: relative;
}

.about-ornament-border {
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        #8B6914 0px,
        #8B6914 8px,
        transparent 8px,
        transparent 16px,
        #A8B596 16px,
        #A8B596 24px,
        transparent 24px,
        transparent 32px
    );
    margin: 0 auto;
    max-width: 600px;
}

.about-content {
    max-width: 700px;
    margin: 2.5rem auto;
}

.about-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #3C2F1E;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   RESOURCES SECTION
   ========================================================================== */
.resources-section {
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

.resource-item {
    padding: 1.5rem;
    border: 1px solid #A8B596;
    background: #FFF8E8;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.resource-item:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.12);
}

.resource-ornament {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #8B6914;
    opacity: 0.5;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.resource-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #3C2F1E;
    margin-bottom: 0.5rem;
}

.resource-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #3C2F1E;
    opacity: 0.8;
    line-height: 1.6;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    padding: 3rem 2rem;
    text-align: center;
    background: #3C2F1E;
    color: #F5EDD8;
    position: relative;
}

.footer-line-illustration {
    margin-bottom: 1.5rem;
}

.footer-geo-line {
    width: 60px;
    height: 0;
    border-top: 1px solid #8B6914;
    margin: 0 auto;
    opacity: 0.6;
}

.footer-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #F5EDD8;
    margin-bottom: 0.4rem;
}

.footer-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #A8B596;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ==========================================================================
   ANIMATIONS -- Border ornament fade-in, line-illustration draw-on
   ========================================================================== */

/* Fade-in on scroll (triggered by JS adding .visible class) */
.study-card {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.study-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.study-card.visible:hover {
    transform: translateY(-2px);
}

/* Banner line-illustration draw-on */
.geo-line--1,
.geo-line--2,
.geo-line--3 {
    transform-origin: left center;
    animation: drawLine 1.2s ease-out forwards;
}

.geo-line--2 { animation-delay: 0.3s; }
.geo-line--3 { animation-delay: 0.6s; }

@keyframes drawLine {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.geo-circle--1,
.geo-circle--2 {
    animation: fadeScale 0.8s ease-out forwards;
    opacity: 0;
}

.geo-circle--2 { animation-delay: 0.4s; }

.geo-diamond {
    animation: fadeScale 0.8s ease-out 0.5s forwards;
    opacity: 0;
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(var(--rotate, 0deg));
    }
    to {
        opacity: 0.4;
        transform: scale(1) rotate(var(--rotate, 0deg));
    }
}

.geo-circle--1 { --rotate: 0deg; }
.geo-circle--2 { --rotate: 0deg; }
.geo-diamond { --rotate: 45deg; }

/* Resource items fade-in */
.resource-item {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.25s ease;
}

.resource-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.resource-item.visible:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE -- Anti-design still needs to work on mobile
   ========================================================================== */
@media (max-width: 768px) {
    .study-card--featured {
        grid-column: span 1;
    }

    .study-card--tall {
        grid-row: span 1;
    }

    .header-ornament {
        display: none;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    #site-header {
        padding: 2rem 1rem 1.5rem;
    }

    .banner-section {
        padding: 3rem 1.5rem;
    }

    .studies-section,
    .resources-section {
        padding: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 2.2rem;
    }

    .section-heading {
        font-size: 1.6rem;
    }

    .section-heading::before,
    .section-heading::after {
        display: none;
    }

    .header-nav {
        flex-wrap: wrap;
    }
}
