/* =========================================================
   tanso.tech — zen / carbon-craft / portfolio-grid
   Palette:
   #FAF6F0 warm linen (background)
   #2C2016 dark walnut (text)
   #C4956A warm terracotta (accents)
   #8B7355 muted olive-brown (secondary text)
   #E8DDD0 pale sand (card backgrounds)
   #5B7B5E forest green (nature motif)
   #F5EDE0 cream (hover/active)

   Fonts (Google Fonts): 'Source Sans 3', 'Source Serif 4'
   Typography pairing: Source Sans 3 + Source Serif 4 from the
   Source superfamily — humanist sans for headings, serif for
   body. Both loaded from (Google Fonts).

   Reveal pattern notes:
   IntersectionObserver triggers the `.visible` class on each
   card. The stagger creates a gentle cascade effect across
   the grid, like stones placed in a zen garden.
   ========================================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg: #FAF6F0;
    --text: #2C2016;
    --accent: #C4956A;
    --muted: #8B7355;
    --card: #E8DDD0;
    --leaf: #5B7B5E;
    --hover: #F5EDE0;
    --wrapper-max: 1200px;
    --wrapper-pad: clamp(1.5rem, 4vw, 3rem);
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.008em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, .sans {
    font-family: "Source Sans 3", "Inter", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

p { margin: 0 0 1em 0; }
p:last-child { margin-bottom: 0; }

img {
    max-width: 100%;
    display: block;
    filter: brightness(0.9) saturate(0.85) sepia(0.1);
    transition: filter 0.4s ease;
}

img:hover {
    filter: brightness(0.95) saturate(0.9) sepia(0.05);
}

/* =========================================================
   Section 1 — The Workshop (Hero)
   ========================================================= */

.workshop {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: clamp(1.5rem, 4vw, 3rem);
    overflow: hidden;
    isolation: isolate;
}

.workshop-photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 30% 40%, rgba(44, 32, 22, 0.45) 0%, rgba(44, 32, 22, 0.8) 60%),
        radial-gradient(circle at 70% 60%, #2C2016 0%, #3a2a1c 30%, #1b120a 80%),
        linear-gradient(160deg, #3a2a1c 0%, #1b120a 100%);
    filter: brightness(0.85) saturate(0.9);
}

/* charcoal piece suggestion: dark irregular gradient blobs */
.workshop-photo::before,
.workshop-photo::after {
    content: "";
    position: absolute;
    border-radius: 50% 42% 55% 48% / 48% 55% 42% 50%;
    background: radial-gradient(circle at 35% 30%, #4a3626 0%, #2a1c10 55%, #110a05 100%);
    filter: blur(2px);
}

.workshop-photo::before {
    left: 12%;
    top: 45%;
    width: 38vw;
    height: 22vw;
    transform: rotate(-18deg);
    box-shadow:
        38vw 2vw 0 -4vw rgba(30, 20, 12, 0.85),
        -8vw 8vw 0 -2vw rgba(40, 28, 16, 0.75);
}

.workshop-photo::after {
    right: 10%;
    top: 55%;
    width: 30vw;
    height: 18vw;
    transform: rotate(22deg);
    background: radial-gradient(circle at 55% 40%, #5a4230 0%, #2e1e12 60%, #130a04 100%);
    box-shadow:
        -18vw -4vw 0 -3vw rgba(35, 24, 14, 0.8),
        6vw 10vw 0 -2vw rgba(25, 16, 8, 0.85);
}

.workshop-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(44, 32, 22, 0.25) 0%, rgba(44, 32, 22, 0.55) 60%, rgba(44, 32, 22, 0.75) 100%);
}

.workshop-content {
    max-width: 720px;
}

.workshop-domain {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--bg);
    margin: 0 0 1.2rem 0;
    line-height: 1.05;
}

.workshop-rule {
    width: 64px;
    height: 1px;
    border: 0;
    background: var(--accent);
    margin: 0 0 1rem 0;
}

.workshop-tagline {
    font-family: "Source Serif 4", Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    color: #E8DDD0;
    margin: 0;
    letter-spacing: 0.01em;
}

.workshop-scroll-hint {
    position: absolute;
    right: clamp(1.5rem, 4vw, 3rem);
    bottom: clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--bg);
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.75;
}

.scroll-arrow {
    animation: drift 2.4s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* =========================================================
   Shared: leaf divider, section header
   ========================================================= */

.leaf-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    padding: clamp(3rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.leaf-divider svg {
    opacity: 0.7;
}

.section-header {
    max-width: var(--wrapper-max);
    margin: 0 auto;
    padding: 0 var(--wrapper-pad);
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-kicker {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    color: var(--text);
}

.section-lede {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--muted);
    max-width: 56ch;
}

/* =========================================================
   Section 2 — The Collection (Portfolio Grid)
   ========================================================= */

.collection {
    padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
    background: var(--bg);
}

.portfolio-grid {
    max-width: var(--wrapper-max);
    margin: 0 auto;
    padding: 0 var(--wrapper-pad);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.card {
    background: var(--card);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, background-color 0.3s ease;
    transition-delay: calc(var(--card-index, 0) * 0.15s);
}

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

.card:hover {
    background: var(--hover);
}

@media (min-width: 768px) {
    .card--feature {
        grid-column: span 2;
    }
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: brightness(0.9) saturate(0.85) sepia(0.1);
    transition: filter 0.4s ease;
    background-size: cover;
    background-position: center;
}

.card:hover .card-image {
    filter: brightness(0.95) saturate(0.9) sepia(0.05);
}

/* Textured CSS "photographs" per card */
.card-image--binchotan {
    background:
        radial-gradient(ellipse at 30% 40%, #3a2a1c 0%, #1f150c 60%, #0d0804 100%),
        linear-gradient(135deg, #2c2016, #1a1108);
    background-blend-mode: multiply;
    position: relative;
}
.card-image--binchotan::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(92deg, rgba(196, 149, 106, 0.08) 0 2px, transparent 2px 18px),
        radial-gradient(circle at 70% 30%, rgba(232, 221, 208, 0.22) 0%, transparent 40%);
}

.card-image--nanotube {
    background:
        repeating-linear-gradient(60deg, #3a2a1c 0 6px, #221610 6px 12px),
        linear-gradient(160deg, #2c2016, #0e0804);
    background-blend-mode: overlay;
    position: relative;
}
.card-image--nanotube::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(120deg, rgba(196, 149, 106, 0.12) 0 3px, transparent 3px 14px);
}

.card-image--fiber {
    background:
        repeating-linear-gradient(45deg, #1a1108 0 8px, #3a2a1c 8px 16px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0 8px, transparent 8px 16px);
    background-blend-mode: overlay;
}

.card-image--graphene {
    background:
        linear-gradient(180deg, #3a2a1c 0%, #2c2016 40%, #1a1108 100%),
        repeating-linear-gradient(0deg, rgba(196, 149, 106, 0.08) 0 1px, transparent 1px 12px);
    background-blend-mode: overlay;
    position: relative;
}
.card-image--graphene::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(232, 221, 208, 0.12) 0 1px, transparent 1px 10px),
        repeating-linear-gradient(60deg, rgba(232, 221, 208, 0.08) 0 1px, transparent 1px 10px),
        repeating-linear-gradient(-60deg, rgba(232, 221, 208, 0.08) 0 1px, transparent 1px 10px);
}

.card-image--activated {
    background:
        radial-gradient(circle at 20% 30%, #1a1108 0 4%, transparent 5%),
        radial-gradient(circle at 55% 25%, #120a05 0 3%, transparent 4%),
        radial-gradient(circle at 78% 60%, #1a1108 0 5%, transparent 6%),
        radial-gradient(circle at 32% 72%, #0e0604 0 4%, transparent 5%),
        radial-gradient(circle at 65% 82%, #1a1108 0 3%, transparent 4%),
        radial-gradient(circle at 88% 35%, #0e0604 0 2%, transparent 3%),
        linear-gradient(135deg, #3a2a1c, #1a1108);
}

.card-image--diamond {
    background:
        conic-gradient(from 35deg at 50% 50%, #5a4230 0deg, #8b7355 45deg, #c4956a 90deg, #5a4230 135deg, #8b7355 225deg, #3a2a1c 315deg, #5a4230 360deg),
        linear-gradient(180deg, #2c2016, #1a1108);
    background-blend-mode: multiply;
}

.card-image--graphite {
    background:
        repeating-linear-gradient(180deg, #3a2a1c 0 14px, #2c2016 14px 16px, #1a1108 16px 32px, #120a05 32px 34px),
        linear-gradient(135deg, rgba(196,149,106,0.15), transparent);
    background-blend-mode: overlay;
}

.card-image--fullerene {
    background:
        radial-gradient(circle at 50% 50%, #5a4230 0%, #3a2a1c 40%, #1a1108 100%),
        repeating-conic-gradient(from 0deg at 50% 50%, rgba(196,149,106,0.15) 0deg 12deg, transparent 12deg 24deg);
    background-blend-mode: overlay;
    position: relative;
}
.card-image--fullerene::after {
    content: "";
    position: absolute;
    inset: 15%;
    border-radius: 50%;
    background:
        repeating-conic-gradient(from 0deg at 50% 50%, rgba(232,221,208,0.12) 0 6deg, transparent 6deg 12deg);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
}

.card-title {
    padding: 1.2rem 1.2rem 0.4rem;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    margin: 0;
    letter-spacing: 0.01em;
}

.card-description {
    padding: 0 1.2rem 1.2rem;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted);
    margin: 0;
}

/* =========================================================
   Section 3 — The Process
   ========================================================= */

.process {
    padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 7vw, 6rem);
    background: linear-gradient(180deg, var(--bg) 0%, var(--hover) 100%);
}

.process-steps {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 var(--wrapper-pad);
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 5vw, 4rem);
}

.process-step {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "leaf number"
        "leaf body";
    gap: 0.25rem 1.5rem;
    align-items: start;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-leaf {
    grid-area: leaf;
    align-self: start;
    padding-top: 0.5rem;
    opacity: 0.85;
}

.step-number {
    grid-area: number;
    font-family: "Source Sans 3", sans-serif;
    font-weight: 300;
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--accent);
    opacity: 0.5;
    line-height: 1;
    letter-spacing: 0.02em;
}

.step-body {
    grid-area: body;
    padding-top: 0.5rem;
}

.step-title {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text);
    margin: 0 0 0.75rem 0;
    letter-spacing: 0.01em;
}

.step-text {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--muted);
    margin: 0;
}

.step-text em {
    color: var(--text);
    font-style: italic;
}

@media (max-width: 540px) {
    .process-step {
        grid-template-columns: 1fr;
        grid-template-areas:
            "number"
            "leaf"
            "body";
        gap: 0.5rem;
    }
    .step-leaf {
        padding-top: 0;
    }
}

/* =========================================================
   Section 4 — The Garden
   ========================================================= */

.garden {
    position: relative;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(4rem, 8vw, 8rem) var(--wrapper-pad);
    background: var(--bg);
    isolation: isolate;
    text-align: center;
    gap: clamp(2rem, 5vw, 3.5rem);
}

.garden-photo {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(250, 246, 240, 0.6) 0%, rgba(250, 246, 240, 0.85) 100%),
        radial-gradient(ellipse at 25% 40%, #5B7B5E 0%, #3d5841 35%, #25341f 100%),
        linear-gradient(180deg, #8aa07a 0%, #5B7B5E 35%, #2c3f27 100%);
    background-blend-mode: overlay, normal, normal;
    filter: brightness(0.9) saturate(0.85) sepia(0.1);
    aspect-ratio: 21 / 9;
    max-height: 60vh;
    position: absolute;
    top: 10%;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
}

.garden-photo::before,
.garden-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(88deg, rgba(91, 123, 94, 0.18) 0 3px, transparent 3px 24px),
        repeating-linear-gradient(92deg, rgba(44, 32, 22, 0.3) 0 2px, transparent 2px 40px);
}

.garden-photo::after {
    background:
        radial-gradient(ellipse at 50% 100%, rgba(44, 32, 22, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 0%, rgba(232, 221, 208, 0.25) 0%, transparent 60%);
}

.garden-reflection {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
    background: rgba(250, 246, 240, 0.92);
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    z-index: 1;
}

.leaf-flank {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    opacity: 0.75;
}

.garden-text {
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text);
    margin: 0;
    text-align: left;
    font-style: italic;
    letter-spacing: 0.008em;
}

.garden-domain {
    font-family: "Source Sans 3", sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin: 0;
    z-index: 1;
    position: relative;
}

@media (max-width: 600px) {
    .garden-reflection {
        flex-direction: column;
    }
    .leaf-flank {
        flex-direction: row;
    }
}
