/* historygrapher.com - Paper Texture Craft Store Aesthetic */
/* Palette: #ddd0b8, #efe8d8, #2c2215, #1a1610, #5c4628, #8b4513, #b8a88f, #3d3020 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #ddd0b8;
    color: #2c2215;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    overflow-x: hidden;
}

/* ===================== PAPER GRAIN TEXTURE ===================== */
.paper-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.paper-grain-dark {
    opacity: 0.05;
}

/* ===================== ATELIER / HERO ===================== */
.atelier {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd0b8;
    overflow: hidden;
}

.atelier-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

/* Wax Seal */
.wax-seal {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #8b4513;
    border: 4px solid #5c4628;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 2px 2px 8px rgba(44, 34, 21, 0.3);
    position: relative;
}

.wax-seal-inner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd0b8;
    position: relative;
}

.wax-seal-inner::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd0b8;
    opacity: 0.6;
}

.wax-seal-small {
    width: 36px;
    height: 36px;
    border-width: 3px;
    margin-bottom: 1rem;
}

.wax-seal-small .wax-seal-inner {
    width: 16px;
    height: 16px;
    border-width: 1.5px;
}

.wax-seal-small .wax-seal-inner::before {
    width: 5px;
    height: 5px;
}

.brand {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    color: #1a1610;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.tagline {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    color: #5c4628;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

/* ===================== METHODS SECTION ===================== */
.methods {
    position: relative;
    background: #ddd0b8;
    padding: 6rem 2rem;
    min-height: 160vh;
}

.methods-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Paper Card with Deckled Edges */
.paper-card {
    position: relative;
    background: #efe8d8;
    padding: 2.5rem 2rem 2rem;
    clip-path: polygon(
        0% 0.5%,
        2% 0%,
        15% 0.3%,
        30% 0%,
        45% 0.4%,
        55% 0%,
        70% 0.3%,
        85% 0%,
        98% 0.5%,
        100% 0%,
        99.5% 15%,
        100% 30%,
        99.7% 50%,
        100% 70%,
        99.5% 85%,
        100% 100%,
        98% 99.5%,
        85% 100%,
        70% 99.6%,
        55% 100%,
        45% 99.5%,
        30% 100%,
        15% 99.7%,
        2% 100%,
        0% 99.5%,
        0.3% 85%,
        0% 70%,
        0.4% 50%,
        0% 30%,
        0.3% 15%
    );
    box-shadow: 4px 4px 12px rgba(184, 168, 143, 0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.paper-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px dashed #b8a88f;
    pointer-events: none;
    margin: 8px;
    opacity: 0.6;
}

.paper-card:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 18px rgba(184, 168, 143, 0.65);
}

/* Tape Strip Decoration */
.tape-strip {
    position: absolute;
    top: -6px;
    right: 24px;
    width: 40px;
    height: 18px;
    background: rgba(184, 168, 143, 0.45);
    transform: rotate(-2deg);
    border-radius: 1px;
    z-index: 2;
}

.tape-strip::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        rgba(255,255,255,0.15) 4px,
        rgba(255,255,255,0.15) 5px
    );
}

/* Tool Icons */
.tool-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.75rem;
    position: relative;
}

.pen-icon {
    width: 5px;
    height: 32px;
    background: #3d3020;
    border-radius: 1px 1px 0 0;
    position: relative;
}

.pen-icon::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 6px solid #3d3020;
}

.book-icon {
    width: 28px;
    height: 22px;
    border: 2.5px solid #3d3020;
    border-radius: 2px;
    position: relative;
}

.book-icon::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 1.5px;
    background: #3d3020;
    transform: translateX(-50%);
}

.book-icon::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3d3020;
    border-radius: 1px 0 0 1px;
}

.glass-icon {
    width: 20px;
    height: 20px;
    border: 2.5px solid #3d3020;
    border-radius: 50%;
    position: relative;
}

.glass-icon::after {
    content: '';
    position: absolute;
    bottom: -9px;
    right: -5px;
    width: 2.5px;
    height: 12px;
    background: #3d3020;
    transform: rotate(-45deg);
    border-radius: 0 0 1px 1px;
}

.compass-icon {
    width: 24px;
    height: 24px;
    border: 2.5px solid #3d3020;
    border-radius: 50%;
    position: relative;
}

.compass-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(30deg);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 14px solid #3d3020;
}

.compass-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3d3020;
    transform: translate(-50%, -50%);
}

.tool-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: #8b4513;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 0.4rem;
}

.card-title {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #1a1610;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-text {
    font-size: 0.88rem;
    color: #3d3020;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

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

/* ===================== TOOLS STRIP ===================== */
.tools-strip {
    position: relative;
    background: #efe8d8;
    padding: 5rem 2rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px dashed #b8a88f;
    border-bottom: 1px dashed #b8a88f;
}

.tools-strip-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.strip-heading {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1610;
    margin-bottom: 3rem;
    letter-spacing: 0.02em;
}

.tools-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

/* Small Tool Icons */
.tool-icon-sm {
    width: 24px;
    height: 24px;
    position: relative;
}

.pen-icon-sm {
    width: 4px;
    height: 24px;
    background: #3d3020;
    border-radius: 1px 1px 0 0;
    margin: 0 auto;
}

.pen-icon-sm::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 2.5px solid transparent;
    border-right: 2.5px solid transparent;
    border-top: 5px solid #3d3020;
}

.book-icon-sm {
    width: 20px;
    height: 16px;
    border: 2px solid #3d3020;
    border-radius: 1px;
    position: relative;
    margin: 0 auto;
}

.book-icon-sm::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: #3d3020;
    transform: translateX(-50%);
}

.glass-icon-sm {
    width: 16px;
    height: 16px;
    border: 2px solid #3d3020;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
}

.glass-icon-sm::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: -3px;
    width: 2px;
    height: 9px;
    background: #3d3020;
    transform: rotate(-45deg);
}

.compass-icon-sm {
    width: 18px;
    height: 18px;
    border: 2px solid #3d3020;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
}

.compass-icon-sm::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(30deg);
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 10px solid #3d3020;
}

.compass-icon-sm::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #3d3020;
    transform: translate(-50%, -50%);
}

.inkwell-icon-sm {
    width: 16px;
    height: 14px;
    background: #3d3020;
    border-radius: 0 0 4px 4px;
    position: relative;
    margin: 4px auto 0;
}

.inkwell-icon-sm::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -2px;
    right: -2px;
    height: 4px;
    background: #3d3020;
    border-radius: 2px 2px 0 0;
}

.inkwell-icon-sm::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: #3d3020;
    border-radius: 1px;
}

.tool-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #5c4628;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
}

.tool-desc {
    font-family: 'Lato', sans-serif;
    font-size: 0.72rem;
    color: #8b4513;
    opacity: 0.8;
}

/* ===================== WORKSHOP FOOTER ===================== */
.workshop {
    position: relative;
    background: #3d3020;
    text-align: center;
    padding: 6rem 2rem;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.workshop-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.workshop-text {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: #ddd0b8;
    line-height: 1.4;
}

.workshop-brand {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    color: #8b4513;
    display: block;
    margin-top: 1rem;
    letter-spacing: 0.08em;
}

.stitching-line {
    width: 60px;
    height: 0;
    border-top: 1px dashed #5c4628;
    margin-top: 1.5rem;
    opacity: 0.5;
}

/* ===================== ANIMATIONS ===================== */
.fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered card animation */
.paper-card.fade-in:nth-child(1) { transition-delay: 0s; }
.paper-card.fade-in:nth-child(2) { transition-delay: 0.12s; }
.paper-card.fade-in:nth-child(3) { transition-delay: 0.24s; }
.paper-card.fade-in:nth-child(4) { transition-delay: 0.36s; }

/* Seal subtle pulse */
@keyframes seal-pulse {
    0%, 100% { box-shadow: 2px 2px 8px rgba(44, 34, 21, 0.3); }
    50% { box-shadow: 2px 2px 14px rgba(139, 69, 19, 0.45); }
}

.atelier .wax-seal {
    animation: seal-pulse 4s ease-in-out infinite;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 600px) {
    .methods {
        padding: 4rem 1.25rem;
    }

    .paper-card {
        padding: 2rem 1.5rem 1.5rem;
    }

    .tools-row {
        gap: 1.5rem;
    }

    .tool-item {
        min-width: 60px;
    }

    .tools-strip {
        padding: 4rem 1.5rem;
    }
}
