/* FYI Page Styling */

.fyi-page {
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.fyi-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    position: relative;
}

.fyi-header {
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 2rem;
    position: relative;
}

.fyi-title {
    font-size: 8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 1rem;
    font-family: monospace;
}

.fyi-note-container {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 3rem;
}

.fyi-arrow {
    width: 30px;
    height: 30px;
    margin-top: 5px;
}

.fyi-subtitle-note {
    font-size: 1.4rem;
    text-align: left;
    color: var(--text-color);
}

.fyi-intro {
    font-size: 1.2rem;
    font-family: monospace;
    line-height: 1.8;
}

.highlight-thin {
    background-color: var(--highlight-yellow);
    padding: 2px 6px;
    border-radius: 4px;
    color: #111;
}

[data-theme="dark"] .highlight-thin {
    color: #111;
}

/* Physics Canvas & Floating Notes */
.fyi-canvas {
    position: relative;
    width: 100%;
    min-height: 600px;
    margin: 4rem 0;
}

.floating-note {
    position: absolute;
    font-size: 1.3rem;
    color: var(--text-color);
    z-index: 10;
    pointer-events: none; /* Don't interfere with physics drag */
}

.note-1 { top: 30%; left: 0; transform: rotate(-5deg); }
.note-2 { bottom: 10%; left: 5%; transform: rotate(2deg); }
.note-3 { top: 20%; right: 2%; transform: rotate(4deg); }
.note-4 { bottom: -10%; right: 10%; transform: rotate(-3deg); }

.note-arrow {
    width: 30px;
    height: 30px;
    display: block;
    margin-top: 5px;
}

/* Cards Container & Basic Card Style */
.cards-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
    position: relative;
    /* Will be handled by JS to turn absolute */
}

.fyi-card {
    width: 260px;
    background: #FFFAF0; /* Warm off-white paper */
    border: 1px solid #E5E0D8;
    border-radius: 4px;
    padding: 2rem 1.5rem;
    box-shadow: 2px 4px 15px rgba(0,0,0,0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* initial rotations for a slightly messy look */
    transform-origin: center center;
    cursor: grab;
    user-select: none;
    color: #111; /* text always dark on light paper */
}

.fyi-card:active {
    cursor: grabbing;
}

.fyi-card:nth-child(1) { transform: rotate(-3deg); margin-top: 20px;}
.fyi-card:nth-child(2) { transform: rotate(1deg); margin-top: 0;}
.fyi-card:nth-child(3) { transform: rotate(-1deg); margin-top: 10px;}
.fyi-card:nth-child(4) { transform: rotate(2deg); margin-top: -10px;}
.fyi-card:nth-child(5) { transform: rotate(-2deg); margin-top: 40px;}

.card-title {
    font-size: 1.2rem;
    font-family: monospace;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.underline-title {
    display: inline-block;
    border-bottom: 2px solid currentColor;
    padding-bottom: 2px;
}

.fyi-card p {
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.fyi-card ul.faq-list {
    list-style: none;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 2;
}

.fyi-card ul.faq-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.fyi-card ul.faq-list li::before {
    content: '•';
    position: absolute;
    left: 0;
}

.card-footer {
    margin-top: auto;
    font-size: 1.2rem;
    text-align: right;
    color: #555;
}

/* Paper Variations */
.card-lined {
    background-image: repeating-linear-gradient(transparent, transparent 31px, #e5e5e5 31px, #e5e5e5 32px);
    background-position: 0 40px;
}

/* Decorators */
.card-clip {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 15px;
    height: 40px;
    border: 3px solid #999;
    border-radius: 10px;
    z-index: 2;
    background: transparent;
}

.card-pin {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #111;
    border-radius: 50%;
    box-shadow: 2px 4px 6px rgba(0,0,0,0.3);
    z-index: 2;
}

.card-tape {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 80px;
    height: 25px;
    background: rgba(245, 230, 180, 0.7);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Specific Card Layouts */
.card-header-icon {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.coffee-icon {
    width: 30px;
    height: 30px;
    color: #777;
}

.hourglass-icon {
    width: 30px;
    height: 30px;
    color: #777;
}

.icon-center {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.smiley-draw {
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    text-align: center;
    margin-top: 1rem;
    transform: rotate(90deg);
}

.circled-text-container {
    text-align: center;
    margin-top: 1rem;
}

.circled-text {
    position: relative;
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1.4rem;
}

.circle-draw {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Central Message & Bottom */
.fyi-central-message {
    text-align: center;
    margin: 6rem 0;
}

.message-highlight-block {
    display: inline-block;
    background-color: var(--highlight-yellow);
    padding: 2rem 3rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #111;
    transform: rotate(-1deg);
    box-shadow: 2px 4px 15px rgba(0,0,0,0.05);
}

.message-note {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    color: var(--text-color);
}

.underline-draw {
    display: block;
    width: 200px;
    height: 20px;
    margin: 0 auto;
}

.fyi-bottom-cta {
    text-align: center;
    margin-bottom: 8rem;
    font-family: monospace;
}

.cta-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.cta-link {
    font-size: 1.1rem;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.cta-link:hover {
    color: #555;
}

/* Reset Area */
.reset-area {
    position: fixed;
    bottom: 2rem;
    right: 6rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    z-index: 100;
}

.btn-reset {
    background: #111;
    color: #fff;
    border: 2px solid #111;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: transparent;
    color: #111;
}

.btn-reset svg {
    width: 20px;
    height: 20px;
}

/* Dark Mode Variants */
[data-theme="dark"] .fyi-card {
    background: #2A2A2A;
    border-color: rgba(253, 251, 247, 0.1);
    color: #fdfbf7;
    box-shadow: 2px 4px 15px rgba(0,0,0,0.2);
}

[data-theme="dark"] .card-lined {
    background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(253, 251, 247, 0.1) 31px, rgba(253, 251, 247, 0.1) 32px);
}

[data-theme="dark"] .card-dark {
    background: #111; /* Very dark variant */
    border-color: rgba(253, 251, 247, 0.2);
}

[data-theme="dark"] .card-footer {
    color: #aaa;
}

[data-theme="dark"] .coffee-icon,
[data-theme="dark"] .hourglass-icon {
    color: #aaa;
}

[data-theme="dark"] .message-highlight-block {
    background-color: var(--highlight-yellow);
    color: #111; /* keep text dark inside the yellow highlight */
}

[data-theme="dark"] .cta-link:hover {
    color: var(--highlight-yellow);
}

[data-theme="dark"] .btn-reset {
    background: transparent;
    color: var(--text-color);
    border-color: var(--text-color);
}

[data-theme="dark"] .btn-reset:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .cards-container {
        flex-wrap: wrap;
    }
    .floating-note {
        display: none; /* Hide floating notes on small screens to reduce clutter */
    }
    .fyi-card {
        margin-top: 10px !important;
        transform: rotate(0) !important;
    }
    .fyi-canvas {
        min-height: auto;
    }
    .reset-area {
        position: relative;
        bottom: 0;
        right: 0;
        align-items: center;
        margin-bottom: 4rem;
    }
}
