/* Homepage, part 2: the worlds. One section per thing on the shelf, each in its
   project's own type, colour and texture. Shared skeleton first, then the six looks. */

/* ---------- reveal on scroll (only when scripting is on) ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

.ch-text .reveal:nth-child(2) { transition-delay: 0.06s; }
.ch-text .reveal:nth-child(3) { transition-delay: 0.12s; }
.ch-text .reveal:nth-child(4) { transition-delay: 0.18s; }
.ch-text .reveal:nth-child(5) { transition-delay: 0.24s; }
.ch-text .reveal:nth-child(6) { transition-delay: 0.3s; }

/* ---------- skeleton ---------- */

.ch {
    position: relative;
    overflow: hidden;
    --fg: var(--ink);
    --accent: var(--ink);
    color: var(--fg);
}

.ch-in {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(36px, 6vw, 110px);
    max-width: 1440px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: clamp(84px, 13vh, 170px) clamp(20px, 5vw, 72px);
}

.flip .ch-text {
    order: 2;
}

/* where the section sits on the shelf: "App Store —— Game" */
.crumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crumb b {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.crumb b::after {
    content: '';
    width: 34px;
    height: 1.5px;
    background: currentColor;
}

.ch-title {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.6vw, 24px);
}

.app-icon {
    flex: none;
    width: clamp(60px, 6.4vw, 96px);
    height: auto;
    border-radius: 22.5%;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.ch h2 {
    font-size: clamp(46px, 6.2vw, 104px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.ch-tag {
    margin-top: clamp(18px, 2.4vh, 30px);
    font-size: clamp(22px, 2.1vw, 31px);
    line-height: 1.2;
    color: var(--accent);
    text-wrap: balance;
}

.ch-desc {
    max-width: 47ch;
    margin-top: 18px;
    font-size: clamp(16px, 1.25vw, 18.5px);
    opacity: 0.9;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.facts li {
    padding: 7px 12px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    opacity: 0.8;
}

.cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 26px;
    margin-top: 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 26px;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.1;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s, color 0.15s;
}

.btn::after {
    content: '↗';
    font-family: var(--sans);
    font-weight: 500;
}

.link {
    font-weight: 500;
    text-underline-offset: 5px;
    text-decoration-thickness: 1.5px;
}

.link:hover,
.link:focus-visible {
    color: var(--accent);
    outline: none;
}

.ch-media {
    position: relative;
}

/* three phones, the middle one a step forward */
.phones {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.5vw, 22px);
}

.phone {
    position: relative;
    flex: 1 1 0;
    max-width: 260px;
    overflow: hidden;
    transition: transform 0.5s var(--ease);
}

.phone img {
    width: 100%;
}

.phone:nth-of-type(1) { transform: translateY(26px) rotate(-3.5deg); }
.phone:nth-of-type(2) { z-index: 2; transform: scale(1.07); }
.phone:nth-of-type(3) { transform: translateY(26px) rotate(3.5deg); }

.phones:hover .phone:nth-of-type(1) { transform: translate(-8px, 18px) rotate(-5deg); }
.phones:hover .phone:nth-of-type(2) { transform: scale(1.1); }
.phones:hover .phone:nth-of-type(3) { transform: translate(8px, 18px) rotate(5deg); }

@media (max-width: 940px) {
    .ch-in {
        grid-template-columns: minmax(0, 1fr);
        gap: 56px;
        min-height: 0;
        padding-top: 84px;
        padding-bottom: 96px;
    }

    .flip .ch-text {
        order: 0;
    }
}

/* ---------- Vize: Yaşam — green felt, pixel type, rubber stamps ---------- */

.ch-vize {
    --fg: #f4e7bd;
    --accent: #f5b041;
    background-color: #244a3b;
    background-image: var(--noise), radial-gradient(ellipse 80% 60% at 70% 30%, #2f5d4a, transparent 70%);
    background-blend-mode: soft-light, normal;
}

.ch-vize h2,
.ch-vize .ch-tag {
    font-family: 'Pixelify Sans', var(--mono);
}

.ch-vize h2 {
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: 0.06em 0.06em 0 #14261f;
}

.ch-vize .ch-tag {
    font-weight: 500;
}

.ch-vize .app-icon {
    border-radius: 0;
    image-rendering: pixelated;
    box-shadow: 6px 6px 0 #14261f;
}

.ch-vize .facts li {
    border-radius: 0;
    border-width: 2px;
}

.ch-vize .btn {
    background: #f5b041;
    color: #14261f;
    border: 3px solid #14261f;
    box-shadow: 6px 6px 0 #14261f;
    font-family: 'Pixelify Sans', var(--mono);
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
}

.ch-vize .btn:hover,
.ch-vize .btn:focus-visible {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 #14261f;
    outline: none;
}

.shots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1.3vw, 20px);
}

.shots img {
    width: 100%;
    border: 3px solid #14261f;
    box-shadow: 7px 7px 0 #14261f;
    transition: transform 0.4s var(--ease);
}

.shots img:nth-child(odd) { transform: translateY(-18px) rotate(-1.4deg); }
.shots img:nth-child(even) { transform: translateY(18px) rotate(1.1deg); }
.shots img:hover { transform: translateY(-6px) scale(1.04); z-index: 2; }

.stamp {
    position: absolute;
    right: -1%;
    top: -9%;
    padding: 2px 16px 0;
    border: 5px double #e2574c;
    color: #e2574c;
    font-family: 'Pixelify Sans', var(--mono);
    font-weight: 700;
    font-size: clamp(28px, 3.6vw, 56px);
    line-height: 1.15;
    letter-spacing: 0.08em;
    transform: rotate(9deg);
    opacity: 0.92;
    mix-blend-mode: screen;
    pointer-events: none;
}

.js .shots .stamp {
    opacity: 0;
    transform: rotate(9deg) scale(2.2);
}

.js .shots.in .stamp {
    opacity: 0.92;
    transform: rotate(9deg) scale(1);
    transition: transform 0.22s cubic-bezier(0.5, 0, 0.9, 0.4) 0.9s, opacity 0.1s linear 0.9s;
}

.vize-strip {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    height: clamp(170px, 24vw, 430px);
    object-fit: cover;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%);
    mask-image: linear-gradient(180deg, transparent, #000 22%);
}

@media (max-width: 940px) {
    .shots {
        display: flex;
        gap: 14px;
        margin: 0 -20px;
        padding: 24px 20px 30px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .shots::-webkit-scrollbar {
        display: none;
    }

    .shots img {
        flex: none;
        width: min(46vw, 230px);
        scroll-snap-align: center;
    }

    .stamp {
        right: 8%;
        top: -4%;
    }
}

/* ---------- Tonmi — blue sky, a sun, a round friend ---------- */

.ch-tonmi {
    --fg: #3a2a2a;
    --accent: #e8590c;
    background: linear-gradient(180deg, #bfe3ff 0%, #dff1ff 48%, #fff6e3 100%);
}

.ch-tonmi h2,
.ch-tonmi .ch-tag,
.ch-tonmi .btn {
    font-family: 'Fredoka', var(--sans);
}

.ch-tonmi h2 {
    font-weight: 600;
}

.ch-tonmi .ch-tag {
    font-weight: 500;
}

.ch-tonmi .app-icon {
    box-shadow: 0 0 0 4px #fff, 0 12px 26px -8px rgba(58, 42, 42, 0.35);
}

.ch-tonmi .facts li {
    border-color: transparent;
    background: #fff;
    opacity: 1;
}

.ch-tonmi .btn {
    padding: 16px 30px;
    border-radius: 999px;
    background: #ff7a1a;
    color: #fff;
    font-weight: 600;
    font-size: 19px;
    box-shadow: 0 6px 0 #c9560a;
}

.ch-tonmi .btn:hover,
.ch-tonmi .btn:focus-visible {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #c9560a;
    outline: none;
}

.ch-tonmi .phone {
    border: 5px solid #3a2a2a;
    border-radius: clamp(20px, 2.6vw, 38px);
    background: #3a2a2a;
    box-shadow: 0 16px 0 rgba(58, 42, 42, 0.1);
}

.tonmi-sun {
    position: absolute;
    top: clamp(60px, 10vh, 120px);
    left: 7%;
    width: clamp(90px, 13vw, 200px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, #ffe169 0 58%, rgba(255, 225, 105, 0.35) 59% 78%, rgba(255, 225, 105, 0.14) 79% 100%);
    animation: sun 7s ease-in-out infinite;
}

.tonmi-hill {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: 0;
    height: clamp(90px, 17vh, 190px);
    background:
        radial-gradient(ellipse 60% 100% at 78% 100%, #8fd66f 0 99%, transparent 100%),
        radial-gradient(ellipse 70% 82% at 22% 100%, #a9e18a 0 99%, transparent 100%);
}

.tonmi-mascot {
    position: absolute;
    z-index: 3;
    left: -7%;
    bottom: -13%;
    width: clamp(88px, 27%, 210px);
    animation: bob 3.2s ease-in-out infinite;
}

@media (max-width: 940px) {
    .tonmi-sun {
        left: auto;
        right: 6%;
        top: 54px;
    }

    .tonmi-mascot {
        left: -2%;
        bottom: -17%;
    }
}

/* ---------- Leaf to Wing — a notebook in pencil and watercolour ---------- */

.ch-leaf {
    --fg: #364537;
    --accent: #5f8f4e;
    background-color: #f3f1e3;
    background-image:
        linear-gradient(rgba(70, 95, 70, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(70, 95, 70, 0.07) 1px, transparent 1px),
        radial-gradient(ellipse 50% 45% at 78% 40%, rgba(214, 233, 196, 0.9), transparent 70%),
        radial-gradient(ellipse 40% 40% at 12% 85%, rgba(244, 205, 211, 0.55), transparent 70%);
    background-size: 34px 34px, 34px 34px, auto, auto;
}

.ch-leaf h2,
.ch-leaf .ch-tag,
.ch-leaf .btn,
.ch-leaf .link {
    font-family: 'Mynerve', cursive;
}

.ch-leaf h2 {
    font-weight: 400;
    font-size: clamp(50px, 6.8vw, 116px);
    letter-spacing: 0;
}

.ch-leaf .ch-tag {
    font-size: clamp(25px, 2.5vw, 36px);
}

.ch-leaf .app-icon {
    box-shadow: 0 0 0 1.5px #5a6b5a, 0 14px 28px -14px rgba(54, 69, 55, 0.5);
}

.ch-leaf .facts li {
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.ch-leaf .btn {
    padding: 13px 28px 14px;
    border: 2px solid #364537;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    background: #cfe6bd;
    color: #2b382c;
    font-size: 25px;
    font-weight: 400;
}

.ch-leaf .btn:hover,
.ch-leaf .btn:focus-visible {
    background: #b9dba2;
    transform: rotate(-1.2deg);
    outline: none;
}

.ch-leaf .link {
    font-size: 23px;
}

.ch-leaf .phone {
    border: 1.5px solid #5a6b5a;
    border-radius: clamp(18px, 2.4vw, 34px);
    box-shadow: 0 30px 50px -28px rgba(54, 69, 55, 0.55);
}

.leaf-fly {
    position: absolute;
    z-index: 3;
    right: -5%;
    top: -15%;
    width: clamp(110px, 34%, 250px);
    transform: rotate(14deg);
    animation: flutter 5s ease-in-out infinite;
}

/* ---------- Hissera — indigo, lilac and jade ---------- */

.ch-hissera {
    --fg: #f8f7ff;
    --accent: #2fd6ae;
    background:
        radial-gradient(ellipse 55% 60% at 12% 18%, rgba(154, 125, 255, 0.3), transparent 70%),
        radial-gradient(ellipse 50% 50% at 92% 88%, rgba(21, 190, 151, 0.2), transparent 70%),
        #12153a;
}

.ch-hissera h2,
.ch-hissera .ch-tag,
.ch-hissera .btn,
.video span {
    font-family: 'Montserrat', var(--sans);
}

.ch-hissera h2 {
    font-weight: 800;
    letter-spacing: -0.045em;
}

.ch-hissera h2::first-letter {
    color: #9a7dff;
}

.ch-hissera .ch-tag {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ch-hissera .btn {
    border-radius: 14px;
    background: #15be97;
    color: #0c1030;
    font-weight: 800;
}

.ch-hissera .btn:hover,
.ch-hissera .btn:focus-visible {
    background: #9a7dff;
    transform: translateY(-2px);
    outline: none;
}

.hissera-mark {
    position: absolute;
    right: -8%;
    top: 4%;
    width: min(62vw, 760px);
    opacity: 0.1;
    pointer-events: none;
}

.videos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 1.8vw, 26px);
}

.video {
    display: block;
    text-decoration: none;
    transition: transform 0.3s var(--ease), color 0.2s;
}

.video-big {
    grid-column: 1 / -1;
}

.video img {
    width: 100%;
    border-radius: clamp(10px, 1.2vw, 18px);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(248, 247, 255, 0.1);
}

.video span {
    display: block;
    margin-top: 12px;
    font-weight: 700;
    font-size: clamp(14px, 1.2vw, 18px);
    line-height: 1.3;
}

.video-big span {
    font-size: clamp(17px, 1.6vw, 24px);
}

.video:hover,
.video:focus-visible {
    transform: translateY(-5px);
    color: #2fd6ae;
    outline: none;
}

/* ---------- Strange Tomorrows — a dark gallery, gilt frames ---------- */

.ch-strange {
    --fg: #ece2cb;
    --accent: #d2ae66;
    background:
        radial-gradient(ellipse 50% 45% at 72% 30%, rgba(210, 174, 102, 0.17), transparent 70%),
        radial-gradient(ellipse 45% 40% at 68% 82%, rgba(210, 174, 102, 0.1), transparent 70%),
        #0d0b0e;
}

.ch-strange h2,
.ch-strange .ch-tag,
.plate b {
    font-family: var(--serif);
}

.ch-strange h2 {
    font-weight: 300;
    font-style: italic;
    font-size: clamp(46px, 5.6vw, 96px);
    letter-spacing: -0.035em;
    font-variation-settings: 'opsz' 144;
}

.ch-strange .ch-tag {
    font-weight: 400;
    font-style: italic;
}

.ch-strange .app-icon {
    border-radius: 50%;
    box-shadow: 0 0 0 2px #d2ae66, 0 0 0 6px #0d0b0e, 0 0 0 7px rgba(210, 174, 102, 0.4);
}

.ch-strange .btn {
    border: 1px solid #d2ae66;
    color: #f0d9a4;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 21px;
}

.ch-strange .btn:hover,
.ch-strange .btn:focus-visible {
    background: #d2ae66;
    color: #0d0b0e;
    outline: none;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(26px, 3.4vw, 54px) clamp(18px, 2.4vw, 40px);
}

.art {
    display: block;
    text-decoration: none;
    transition: transform 0.4s var(--ease);
}

.art:nth-child(even) {
    margin-top: clamp(20px, 4vw, 64px);
}

.art img {
    width: 100%;
    padding: clamp(6px, 0.8vw, 12px);
    background: linear-gradient(135deg, #7a5a22, #e6c97c 22%, #8a6a2c 46%, #dcbb6a 70%, #6a4d1c);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.45),
        0 34px 60px -26px #000,
        0 0 70px -10px rgba(210, 174, 102, 0.18);
}

.plate {
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    padding: 7px 16px 8px;
    background: #e6dcc4;
    color: #4b4232;
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 6px 14px -6px #000;
}

.plate b {
    display: block;
    font-weight: 500;
    font-style: italic;
    font-size: 18px;
    letter-spacing: 0;
    text-transform: none;
    color: #1f1a11;
}

.art:hover,
.art:focus-visible {
    transform: translateY(-7px);
    outline: none;
}

@media (max-width: 520px) {
    .gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .art:nth-child(even) {
        margin-top: 0;
    }
}

/* ---------- Beyond Vibe Coding — the course cover's yellow, one blue, wide grotesk ---------- */

.ch-udemy {
    --fg: #15171c;
    --accent: #1f35f0;
    background: radial-gradient(ellipse 80% 70% at 68% 45%, #fbe18f, #f1d078 60%, #e8c463);
    font-family: 'Archivo', var(--sans);
    font-stretch: 125%;
}

.ch-udemy h2 {
    font-weight: 800;
    font-size: clamp(42px, 5.3vw, 90px);
    line-height: 0.92;
    letter-spacing: -0.035em;
}

.ch-udemy .ch-tag {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ch-udemy .ch-desc {
    font-family: var(--sans);
    font-stretch: 100%;
    opacity: 1;
}

.parts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 30px;
}

.parts li {
    padding-top: 10px;
    border-top: 4px solid rgba(21, 23, 28, 0.22);
}

.parts li:first-child {
    border-color: #1f35f0;
}

.parts b {
    display: block;
    font-weight: 700;
    font-size: clamp(14px, 1.25vw, 19px);
    letter-spacing: -0.02em;
}

.parts span,
.note {
    font-family: var(--mono);
    font-stretch: 100%;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

.ch-udemy .btn {
    background: #1f35f0;
    color: #fff;
    font-weight: 700;
}

.ch-udemy .btn:hover,
.ch-udemy .btn:focus-visible {
    background: #15171c;
    transform: translateY(-2px);
    outline: none;
}

.lesson {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1.3vw, 20px);
}

.lesson img {
    width: 100%;
    border: 1.5px solid #15171c;
    box-shadow: 8px 8px 0 rgba(21, 23, 28, 0.9);
    transition: transform 0.4s var(--ease);
}

.lesson-cover {
    grid-column: 1 / -1;
}

.lesson img:hover {
    transform: translate(-3px, -3px);
}

/* ---------- motion ---------- */

@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes sun {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.07); }
}

@keyframes flutter {
    0%, 100% { transform: rotate(14deg) translateY(0) scaleX(1); }
    25% { transform: rotate(11deg) translateY(-8px) scaleX(0.9); }
    50% { transform: rotate(15deg) translateY(-3px) scaleX(1); }
    75% { transform: rotate(12deg) translateY(-10px) scaleX(0.88); }
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .js .shots .stamp {
        opacity: 0.92;
        transform: rotate(9deg);
    }

    .tonmi-sun,
    .tonmi-mascot,
    .leaf-fly { animation: none; }
}
