/* Experimental Typography Design specific styles */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}
/* Design-specific variables */
:root {
    --exp-accent-color: #ff6b6b;
    --exp-transition: all 0.3s ease;
    --exp-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Design 1: Deconstructivist Typography */
.deconstruct-container {
    position: relative;
    padding: 1.5rem;
    min-height: 320px;
    background-color: #f0f0f0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.fragment {
    position: absolute;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.2rem 0.5rem;
    background-color: white;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.fragment-1 {
    top: 20%;
    left: 10%;
    transform: rotate(-5deg);
    z-index: 5;
    font-size: 1.4rem;
}

.fragment-2 {
    top: 30%;
    left: 35%;
    transform: rotate(3deg);
    z-index: 4;
    font-size: 1.2rem;
}

.fragment-3 {
    top: 25%;
    right: 10%;
    transform: rotate(-8deg);
    z-index: 6;
    font-size: 1.3rem;
}

.fragment-4 {
    top: 50%;
    left: 15%;
    transform: rotate(5deg);
    z-index: 3;
    font-size: 1.2rem;
}

.fragment-5 {
    top: 45%;
    left: 40%;
    transform: rotate(-4deg);
    z-index: 2;
    font-size: 1.1rem;
}

.fragment-6 {
    bottom: 40%;
    right: 20%;
    transform: rotate(6deg);
    z-index: 1;
    font-size: 1.2rem;
}

.fragment-7 {
    bottom: 45%;
    left: 30%;
    transform: rotate(-7deg);
    z-index: 7;
    font-size: 1.3rem;
}

.deconstruct-text {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.8rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    box-shadow: var(--shadow);
    z-index: 10;
}

/* Design 2: Nonlinear Reading Typography */
.nonlinear-container {
    position: relative;
    padding: 1.5rem;
    min-height: 320px;
    background-color: #e6f0f9;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.reading-paths {
    position: relative;
    height: 200px;
    width: 100%;
}

.path {
    position: absolute;
    background-color: white;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: var(--shadow);
}

.path-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--primary-color);
}

.path-1 {
    top: 20%;
    left: 20%;
    z-index: 5;
}

.path-2 {
    top: 30%;
    left: 40%;
    z-index: 4;
}

.path-3 {
    top: 70%;
    left: 50%;
    z-index: 3;
}

.path-4 {
    top: 40%;
    left: 70%;
    z-index: 2;
}

.path-5 {
    top: 60%;
    left: 80%;
    z-index: 1;
}

.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.connection {
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-dasharray: 5;
    opacity: 0.5;
    animation: dash 10s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: 100;
    }
}

.nonlinear-text {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.8rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    box-shadow: var(--shadow);
}

/* Design 3: Data Visualization Typography */
.data-viz-container {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.data-viz-header {
    border-bottom: 2px solid #333;
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
}

.data-viz-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
}

.category {
    font-size: 0.8rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.data-viz-content {
    display: flex;
    flex-direction: column;
}

.data-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 160px;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.chart-bar {
    width: 22%;
    background: linear-gradient(to top, #333, #555);
    border-radius: 3px 3px 0 0;
    position: relative;
    transition: var(--exp-transition);
}

.chart-bar:hover {
    background: linear-gradient(to top, var(--accent-color), #ff9f9f);
}

.chart-bar span {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    font-weight: bold;
}

.data-text {
    font-size: 1rem;
    line-height: 1.4;
}

/* Design 4: Typographic Experiments */
.experiment-container {
    background-color: #fff;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.experiment-banner {
    position: relative;
    height: 100px;
    margin-bottom: 1.2rem;
    overflow: hidden;
    border-radius: 4px;
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    z-index: 2;
    text-align: center;
    width: 100%;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.banner-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #5c6bc0, #ec407a);
    z-index: 1;
}

.experiment-text {
    font-size: 1rem;
    line-height: 1.4;
}

/* Design 5: Spatial Typography */
.spatial-container {
    padding: 1.2rem;
    background-color: #f4f7f9;
    border-radius: var(--border-radius);
}

.product-card {
    background-color: white;
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: var(--exp-shadow);
    margin-bottom: 1.2rem;
}

.product-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.star {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
    font-size: 0.9rem;
    margin-right: 0.2rem;
}

.star:before {
    content: '★';
    position: absolute;
    color: #ddd;
}

.star.filled:before {
    content: '★';
    color: #ffb400;
}

.rating-count {
    font-size: 0.8rem;
    color: #777;
    margin-left: 0.3rem;
}

.product-desc {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: #555;
}

.product-price {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #333;
}

.spatial-text {
    font-size: 1rem;
    line-height: 1.4;
}

/* Design 6: Generative Typography */
.generative-container {
    background-color: #0a0a0a;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    color: white;
}

.generative-canvas {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
    background-color: #121212;
    border-radius: 4px;
    overflow: hidden;
}

.regenerate-btn {
    display: block;
    width: 100%;
    padding: 0.6rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: var(--exp-transition);
}

.regenerate-btn:hover {
    background-color: var(--accent-color);
}

.generative-text {
    font-size: 1rem;
    line-height: 1.4;
    color: #ccc;
}

/* Design 7: Kinetic Typography */
.kinetic-container {
    background-color: #121212;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    color: white;
}

.kinetic-demo {
    position: relative;
    height: 150px;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 4px;
    background-color: #1a1a1a;
}

.kinetic-word {
    position: absolute;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.5s, opacity 0.5s;
}

.word1 {
    top: 20%;
    left: 10%;
    color: #f06292;
    animation: pulsate 5s infinite 0s;
}

.word2 {
    top: 50%;
    left: 30%;
    color: #64b5f6;
    animation: pulsate 5s infinite 1s;
}

.word3 {
    top: 30%;
    left: 55%;
    color: #81c784;
    animation: pulsate 5s infinite 2s;
}

.word4 {
    top: 60%;
    left: 70%;
    color: #ffb74d;
    animation: pulsate 5s infinite 3s;
}

.word5 {
    top: 40%;
    left: 85%;
    color: #ba68c8;
    animation: pulsate 5s infinite 4s;
}

@keyframes pulsate {
    0% {
        opacity: 0;
        transform: scale(0.5) translate(0, 0);
    }
    20% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    35% {
        opacity: 1;
        transform: scale(1) translate(10px, -10px);
    }
    50% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    65% {
        opacity: 1;
        transform: scale(1) translate(-10px, 10px);
    }
    80% {
        opacity: 1;
        transform: scale(1) translate(0, 0);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) translate(0, 0);
    }
}

.kinetic-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: expand 6s infinite linear;
}

@keyframes expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    70% {
        width: 120px;
        height: 120px;
        opacity: 0.5;
    }
    100% {
        width: 150px;
        height: 150px;
        opacity: 0;
    }
}

.kinetic-path {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
    background: radial-gradient(circle at center, transparent 30%, rgba(255, 255, 255, 0.05) 70%);
}

.kinetic-text {
    font-size: 1rem;
    line-height: 1.4;
    color: #ccc;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .deconstruct-container,
    .nonlinear-container,
    .data-viz-container,
    .experiment-container,
    .spatial-container,
    .generative-container,
    .kinetic-container {
        padding: 1rem;
    }
    .page-title {
        font-size: 1.8rem;
    }
    .fragment {
        font-size: 1rem;
    }

    .path {
        padding: 0.3rem 0.8rem;
    }

    .path-text {
        font-size: 0.8rem;
    }

    .experiment-banner {
        height: 80px;
    }

    .banner-text {
        font-size: 1.2rem;
    }

    .product-name {
        font-size: 1rem;
    }

    .data-chart {
        height: 120px;
    }

    .kinetic-demo {
        height: 120px;
    }

    .kinetic-word {
        font-size: 0.9rem;
    }
}
