/* =============================================
   FIGURE KNOCKOUT — FKO.COM
   Notebook / Hand-Drawn Theme
   ============================================= */

/* ===== ROOT VARIABLES ===== */
:root {
    --paper:        #f5f0e1;
    --paper-dark:   #ede7d0;
    --lines:        #c5d8f0;
    --margin-line:  rgba(240, 160, 160, 0.55);
    --ink:          #1a1a2e;
    --ink-light:    #2d3561;
    --red:          #e63946;
    --red-dark:     #c1121f;
    --blue:         #457b9d;
    --blue-dark:    #1d3557;
    --orange:       #f4a261;
    --green:        #52b788;
    --yellow-hl:    rgba(255, 235, 59, 0.42);
    --shadow-sketch: 3px 3px 0 rgba(26, 26, 46, 0.28);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Patrick Hand', cursive;
    background-color: var(--paper);
    color: var(--ink);
    overflow-x: hidden;
    cursor: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-family: 'Permanent Marker', cursive; }
.font-marker  { font-family: 'Permanent Marker', cursive; }
.font-caveat  { font-family: 'Caveat', cursive; }
.font-indie   { font-family: 'Indie Flower', cursive; }
.font-patrick { font-family: 'Patrick Hand', cursive; }

/* ===== NOTEBOOK PAPER BACKGROUNDS ===== */
.nb-paper {
    background-color: var(--paper);
    background-image:
        linear-gradient(transparent calc(2.5rem - 1px), var(--lines) calc(2.5rem - 1px), var(--lines) 2.5rem, transparent 2.5rem),
        linear-gradient(90deg, transparent 3.5rem, var(--margin-line) 3.5rem, var(--margin-line) 3.65rem, transparent 3.65rem);
    background-size: 100% 2.5rem, 100% 100%;
}

.nb-white {
    background-color: #fff;
    background-image:
        linear-gradient(transparent calc(2.5rem - 1px), var(--lines) calc(2.5rem - 1px), var(--lines) 2.5rem, transparent 2.5rem),
        linear-gradient(90deg, transparent 3.5rem, var(--margin-line) 3.5rem, var(--margin-line) 3.65rem, transparent 3.65rem);
    background-size: 100% 2.5rem, 100% 100%;
}

.nb-dark {
    background-color: var(--ink);
    background-image:
        linear-gradient(transparent calc(2.5rem - 1px), rgba(197, 216, 240, 0.07) calc(2.5rem - 1px), rgba(197, 216, 240, 0.07) 2.5rem, transparent 2.5rem);
    background-size: 100% 2.5rem;
}

/* ===== HIGHLIGHT ===== */
.hl        { background: var(--yellow-hl); padding: 0 5px; border-radius: 2px; }
.hl-red    { background: rgba(230, 57, 70, 0.18); padding: 0 5px; border-radius: 2px; }
.hl-blue   { background: rgba(69, 123, 157, 0.2); padding: 0 5px; border-radius: 2px; }
.hl-green  { background: rgba(82, 183, 136, 0.25); padding: 0 5px; border-radius: 2px; }

/* ===== SKETCH CARDS ===== */
.sketch-card {
    background: #fff;
    border: 2.5px solid var(--ink);
    border-radius: 4px;
    box-shadow: 5px 5px 0 var(--ink);
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sketch-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--ink);
}
.card-red    { border-color: var(--red);    box-shadow: 5px 5px 0 var(--red); }
.card-red:hover    { box-shadow: 8px 8px 0 var(--red); }
.card-blue   { border-color: var(--blue);   box-shadow: 5px 5px 0 var(--blue); }
.card-blue:hover   { box-shadow: 8px 8px 0 var(--blue); }
.card-orange { border-color: var(--orange); box-shadow: 5px 5px 0 var(--orange); }
.card-orange:hover { box-shadow: 8px 8px 0 var(--orange); }
.card-green  { border-color: var(--green);  box-shadow: 5px 5px 0 var(--green); }
.card-green:hover  { box-shadow: 8px 8px 0 var(--green); }

/* ===== TAPE STRIP ===== */
.tape::before {
    content: '';
    position: absolute;
    width: 72px; height: 26px;
    background: rgba(255, 220, 90, 0.65);
    border-radius: 2px;
    top: -10px; left: 50%;
    transform: translateX(-50%) rotate(-1.5deg);
    z-index: 1;
}

/* ===== BUTTONS ===== */
.btn-fko {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.05rem;
    border: 3px solid var(--ink);
    border-radius: 4px;
    padding: 0.65rem 1.8rem;
    box-shadow: 4px 4px 0 var(--ink);
    letter-spacing: 1px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    display: inline-flex; align-items: center; gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
}
.btn-fko:hover  { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-fko:active { transform: translate(2px,  2px);  box-shadow: 2px 2px 0 var(--ink); }

.btn-red  { background: var(--red);  color: #fff; }
.btn-red:hover  { background: var(--red-dark); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-steam {
    background: #1b2838; color: #c7d5e0;
    border-color: #c7d5e0;
    box-shadow: 5px 5px 0 #c7d5e0;
}
.btn-steam:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 #c7d5e0; color: #fff; }

/* ===== TAGS ===== */
.tag {
    display: inline-block;
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 3px;
    padding: 0.15rem 0.75rem;
    margin: 0.25rem;
    box-shadow: 2px 2px 0 var(--ink);
    transition: transform 0.12s, box-shadow 0.12s;
}
.tag:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }

/* ===== SECTION DIVIDER ===== */
.wavy-divider {
    border: none; height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='10'%3E%3Cpath d='M0 5 Q 50 0, 100 5 Q 150 10, 200 5 Q 250 0, 300 5 Q 350 10, 400 5' stroke='%231a1a2e' stroke-width='2' fill='none' stroke-dasharray='4,2'/%3E%3C/svg%3E");
    background-size: 400px 10px;
    background-repeat: repeat-x;
    background-position: center;
    margin: 2.5rem 0; opacity: 0.4;
}

/* ===== SECTION TITLE ===== */
.section-heading {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}
.section-heading::after {
    content: '';
    display: block;
    height: 4px;
    width: 55%;
    background: var(--red);
    border-radius: 2px;
    margin: 0.35rem auto 0;
}

/* ===== NAVBAR ===== */
#fko-nav {
    font-family: 'Caveat', cursive;
    font-size: 1.15rem;
    font-weight: 700;
    background-color: var(--paper);
    border-bottom: 3px solid var(--ink);
    box-shadow: 0 3px 0 rgba(26, 26, 46, 0.12);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 1050;
}
#fko-nav.scrolled {
    background-color: #fffef8;
    box-shadow: 0 4px 14px rgba(26, 26, 46, 0.18);
}
.fko-brand {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.9rem;
    letter-spacing: 3px;
    color: var(--ink) !important;
    line-height: 1;
}
.fko-brand .brand-k { color: var(--red); }
.fko-brand .brand-o { color: var(--blue); }

.fko-nav-link {
    color: var(--ink) !important;
    position: relative;
    padding: 0.4rem 0.9rem !important;
    transition: color 0.2s;
}
.fko-nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 10%;
    width: 0; height: 2.5px;
    background: var(--red);
    border-radius: 2px;
    transition: width 0.25s ease;
}
.fko-nav-link:hover { color: var(--red) !important; }
.fko-nav-link:hover::after { width: 80%; }

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background-image: url('https://shared.fastly.steamstatic.com/store_item_assets/steam/apps/2884010/page_bg_raw.jpg?t=1772420785');
    background-size: cover;
    background-position: center;
}
.hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg,
        rgba(245, 240, 225, 0.82) 0%,
        rgba(245, 240, 225, 0.55) 45%,
        rgba(26,  26,  46,  0.5)  100%
    );
}
.hero-lines {
    position: absolute; inset: 0;
    background-image: linear-gradient(
        transparent calc(3rem - 1px),
        rgba(197, 216, 240, 0.18) calc(3rem - 1px),
        rgba(197, 216, 240, 0.18) 3rem,
        transparent 3rem
    );
    background-size: 100% 3rem;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }

.hero-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    line-height: 1.05;
    color: var(--ink);
    text-shadow: 4px 4px 0 rgba(255,255,255,0.55), 7px 7px 0 rgba(26,26,46,0.2);
}
.hero-title .title-red {
    color: var(--red);
    display: inline-block;
    animation: wobble 3.5s ease-in-out infinite;
}
.hero-subtitle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.1rem, 2.8vw, 1.75rem);
    font-weight: 600;
    color: var(--ink-light);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.8);
}
.free-badge {
    display: inline-block;
    font-family: 'Permanent Marker', cursive;
    font-size: 1rem;
    background: var(--green);
    color: #fff;
    padding: 0.3rem 1.1rem;
    border: 2.5px solid var(--ink);
    border-radius: 3px;
    box-shadow: 3px 3px 0 var(--ink);
    transform: rotate(-2.5deg);
    transition: transform 0.2s ease;
}
.free-badge:hover { transform: rotate(-1deg) scale(1.05); }

/* Hero image */
.hero-img-wrap { position: relative; max-width: 520px; margin: auto; }
.hero-img {
    width: 100%;
    height: auto;
    border: 3px solid var(--ink);
    border-radius: 4px;
    box-shadow: 9px 9px 0 var(--ink);
    animation: floatY 5s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-img:hover {
    transform: translateY(-4px);
    box-shadow: 13px 13px 0 var(--ink);
}
.img-tape {
    position: absolute;
    width: 80px; height: 26px;
    background: rgba(255, 220, 90, 0.7);
    border-radius: 2px;
    top: -11px;
}
.img-tape-l { left: 14%; transform: rotate(-2.5deg); }
.img-tape-r { right: 14%; transform: rotate(2.5deg); }

.hero-annotation {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Floating doodles */
.doodle {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    color: var(--ink);
    pointer-events: none;
    opacity: 0.55;
}

/* Scroll cue */
.scroll-cue {
    position: absolute;
    bottom: 1.8rem; left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: var(--ink);
    opacity: 0.7;
    animation: floatY 2s ease-in-out infinite;
}

/* ===== MARQUEE BAR ===== */
.marquee-bar {
    background: var(--ink);
    border-top: 2.5px solid var(--red);
    border-bottom: 2.5px solid var(--red);
    overflow: hidden;
    padding: 0.7rem 0;
}
.marquee-track {
    display: flex;
    gap: 4rem;
    white-space: nowrap;
    animation: marquee 22s linear infinite;
    width: max-content;
}

/* ===== STATS ===== */
.stat-number {
    font-family: 'Permanent Marker', cursive;
    font-size: 3rem;
    display: block;
    color: var(--red);
    line-height: 1;
}
.stat-label {
    font-family: 'Caveat', cursive;
    font-size: 1.15rem;
    opacity: 0.8;
}
.stat-divider {
    border-left: 2px dashed var(--ink);
    height: 60px;
    margin: 0 1.5rem;
    opacity: 0.4;
}

/* ===== FEATURE ICONS ===== */
.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: floatY 3.5s ease-in-out infinite;
}
.feature-icon.d1 { animation-delay: 0s; }
.feature-icon.d2 { animation-delay: 0.5s; }
.feature-icon.d3 { animation-delay: 1s; }
.feature-icon.d4 { animation-delay: 1.5s; }

/* ===== CONTROL BUTTONS ===== */
.ctrl-btn {
    width: 72px; height: 72px;
    font-family: 'Permanent Marker', cursive;
    font-size: 1.3rem;
    border: 3px solid var(--ink);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--ink);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    cursor: default;
    user-select: none;
}
.ctrl-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.ctrl-attack { background: var(--red);    color: #fff; }
.ctrl-special { background: var(--blue);  color: #fff; }
.ctrl-evade   { background: var(--green); color: #fff; }
.ctrl-block   { background: var(--orange); color: #fff; }

/* ===== POLAROID GALLERY ===== */
.polaroid {
    background: #fff;
    border: 2px solid #ddd;
    padding: 0.9rem 0.9rem 3.2rem;
    box-shadow: 5px 5px 12px rgba(0,0,0,0.18);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: zoom-in;
}
.polaroid:hover { box-shadow: 10px 10px 22px rgba(0,0,0,0.28); }
.polaroid-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-repeat: no-repeat;
    display: block;
}
.polaroid .polaroid-caption {
    font-family: 'Caveat', cursive;
    font-size: 1.15rem;
    text-align: center;
    margin-top: 0.7rem;
    color: var(--ink-light);
}
.pol-r1 { transform: rotate(-2.2deg); }
.pol-r1:hover { transform: rotate(-0.5deg) scale(1.05); }
.pol-r2 { transform: rotate(1.8deg); }
.pol-r2:hover { transform: rotate(0.5deg) scale(1.05); }
.pol-r3 { transform: rotate(-1deg); }
.pol-r3:hover { transform: rotate(0.5deg) scale(1.05); }

/* ===== GAME IMAGE ===== */
.game-img {
    width: 100%;
    height: auto;
    border: 3px solid var(--ink);
    border-radius: 4px;
    box-shadow: 8px 8px 0 var(--ink);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}
.game-img:hover { transform: translate(-4px, -4px); box-shadow: 12px 12px 0 var(--ink); }

/* ===== MODE CARDS ===== */
.mode-card {
    border: 2.5px solid var(--ink);
    border-radius: 4px;
    background: var(--paper);
    padding: 1.6rem 1.2rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    box-shadow: 5px 5px 0 rgba(26,26,46,0.15);
}
.mode-card:hover { transform: translateY(-5px); box-shadow: 6px 6px 0 var(--ink); }
.mode-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }

/* ===== STEAM CTA ===== */
#cta { background: var(--ink); position: relative; overflow: hidden; }
#cta::before {
    content: '';
    position: absolute; inset: 0;
    background-image: linear-gradient(
        transparent calc(3rem - 1px),
        rgba(197, 216, 240, 0.06) calc(3rem - 1px),
        rgba(197, 216, 240, 0.06) 3rem,
        transparent 3rem
    );
    background-size: 100% 3rem;
}
.cta-title {
    font-family: 'Permanent Marker', cursive;
    color: var(--paper);
    font-size: clamp(2.5rem, 7vw, 5rem);
    text-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

/* ===== FOOTER ===== */
footer {
    background: var(--ink);
    color: var(--paper);
    border-top: 4px solid var(--red);
    font-family: 'Patrick Hand', cursive;
}
footer a { color: var(--paper); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--orange); }
.fko-footer-brand {
    font-family: 'Permanent Marker', cursive;
    font-size: 2.2rem;
    letter-spacing: 3px;
}

.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border: 2px solid rgba(245,240,225,0.45);
    border-radius: 4px;
    color: var(--paper) !important;
    font-size: 1.2rem;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.social-icon:hover {
    background: var(--red);
    border-color: var(--red);
    transform: rotate(-5deg) scale(1.12);
}

/* ===== CURSOR ===== */
.cursor-dot {
    width: 9px; height: 9px;
    background: var(--red);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease, opacity 0.15s ease;
    mix-blend-mode: multiply;
}

/* ===== ANIMATIONS ===== */
@keyframes wobble {
    0%, 100% { transform: rotate(-2deg); }
    50%       { transform: rotate(2.5deg); }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0);     }
    50%       { transform: translateY(-14px); }
}
@keyframes floatY-sm {
    0%, 100% { transform: translateY(0);    }
    50%       { transform: translateY(-7px); }
}
@keyframes spin-slow {
    from { transform: rotate(0deg);   }
    to   { transform: rotate(360deg); }
}
@keyframes bounce-in {
    0%   { transform: scale(0) rotate(-8deg);  opacity: 0; }
    60%  { transform: scale(1.1) rotate(3deg); opacity: 1; }
    80%  { transform: scale(0.95) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes stamp-in {
    0%   { transform: scale(3) rotate(-12deg); opacity: 0; }
    70%  { transform: scale(0.93) rotate(1deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes draw-underline {
    from { width: 0; }
    to   { width: 55%; }
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px) rotate(-1.5deg); }
    75%       { transform: translateX(4px) rotate(1.5deg); }
}
@keyframes pencil-draw {
    from { stroke-dashoffset: 1000; }
    to   { stroke-dashoffset: 0; }
}

.anim-float    { animation: floatY 4.5s ease-in-out infinite; }
.anim-float-sm { animation: floatY-sm 3s ease-in-out infinite; }
.anim-spin     { animation: spin-slow 8s linear infinite; }
.anim-bounce   { animation: bounce-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }

/* ===== RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .hero-title       { font-size: 2.8rem; }
    .ctrl-btn         { width: 58px; height: 58px; font-size: 1rem; }
    .stat-number      { font-size: 2.2rem; }
    .stat-divider     { display: none; }
    .cta-title        { font-size: 2.5rem; }
}
@media (max-width: 575.98px) {
    .hero-title       { font-size: 2.3rem; }
    .section-heading  { font-size: 1.9rem; }
    .feature-icon     { font-size: 2.4rem; }
}
