/* ===== Reset & Base ===== */
@import url('https://fonts.googleapis.com/css2?family=Tektur:wght@400..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tektur', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

}

html {
    scroll-behavior: smooth;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -500;
    pointer-events: none;
    opacity: 0.12;
    /* Seamless equilateral triangle grid - lines only, no gaps */
    background: url('data:image/svg+xml;utf8,<svg width="30" height="52" viewBox="0 0 30 52" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="0" x2="30" y2="0" stroke="%23b0b8c1" stroke-width="1"/><line x1="0" y1="26" x2="30" y2="26" stroke="%23b0b8c1" stroke-width="1"/><line x1="0" y1="52" x2="30" y2="52" stroke="%23b0b8c1" stroke-width="1"/><line x1="0" y1="0" x2="15" y2="26" stroke="%23b0b8c1" stroke-width="1"/><line x1="15" y1="26" x2="30" y2="0" stroke="%23b0b8c1" stroke-width="1"/><line x1="0" y1="52" x2="15" y2="26" stroke="%23b0b8c1" stroke-width="1"/><line x1="15" y1="26" x2="30" y2="52" stroke="%23b0b8c1" stroke-width="1"/></svg>');
    background-size: 30px 52px;
    background-repeat: repeat;
    background-position: center;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    /* Enable GPU acceleration for smoother scrolling */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Make page a column so footer can be pushed to bottom */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

:root {
    /* site color COLOR from root.css */
    --brand: var(--color), var(--text-primary);

    /* Professional clean palette */
    --bg: #fafafa;
    --surface: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #717171;
    --border-color: #e5e5e5;
    --border-light: #f0f0f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);

    --brand-500: #1a1a1a;
    --brand-600: #0a0a0a;
    --accent: #1a1a1a;
    --accent-subtle: #f5f5f5;

}

/* ===== Keyframe Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes drawLine {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}


a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Header ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: #fff;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--brand);
    width: 100%;
    animation: fadeIn 0.6s ease-out;
    /* GPU acceleration for smooth hide/show */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

header .brand {
    display: flex;
    align-items: center;

    gap: 0.2rem;
}

header .brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

header .brand h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--brand);
    line-height: 1.1;
    animation: slideInLeft 0.7s ease-out;
}

header .brand h1:hover {
    /* -webkit-text-stroke: 1.5px var(--brand); */
    /* text change color from left to right */
    transition: all 0.3s ease-in-out;
}

header .brand p {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    animation: slideInLeft 0.7s ease-out 0.1s both;
    user-select: none;
}

header .brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
}

header .socials {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.7s ease-out 0.2s both;
}

header .socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

header .socials a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--text-primary);
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

header .socials a:hover {
    color: #fff;
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

header .socials a:hover::before {
    transform: translateY(0);
}

header .socials a:hover svg {
    animation: pulse 0.4s ease;
}

/* ===== Section Headings ===== */
h2 {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    color: var(--text-primary);
    border-bottom: none;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand);
    transform-origin: left;
    animation: drawLine 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

/* Inside sections: hide h2 until scroll-reveal triggers */
section h2 {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.5s ease;
}

section h2::after {
    animation: none;
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

section.visible h2 {
    opacity: 1;
    transform: translateY(0);
}

section.visible h2::after {
    transform: scaleX(1);
}

/* ===== Sections ===== */
section {
    padding: 2rem 0;
}

section:first-of-type {
    padding: 3rem 0 0 0;
}

section:last-of-type {
    padding: 2rem 0 4rem;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 5%;
    box-sizing: border-box;
    flex: 1 0 auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    header {
        gap: 0.75rem;
        padding: 1rem 4%;
    }

    header .brand h1 {
        font-size: 1.3rem;
    }

    header .brand p {
        display: none;
    }

    header .brand img {
        width: 32px;
        height: 32px;
    }

    /* Pull user-banner out of absolute centering so it sits in the flex row */
    .user-banner {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }

    .container {
        padding: 0 4%;
    }
}

section.visible p {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    padding: 0.45rem 0.85rem;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.5s ease;
}

.btn:hover::after {
    transform: translateX(100%) skewX(-15deg);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
}

.btn-primary:hover {
    filter: brightness(0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background: var(--accent-subtle);
}

/* Load More button shared style */
.load-more-btn {
    display: block;
    margin: 1.5rem auto;
    padding: 0.5rem 2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.load-more-btn:hover {
    opacity: 0.85;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--accent-subtle);
}

.btn-ghost svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.btn-ghost:hover svg {
    transform: translateX(2px);
}

/* ===== Footer ===== */
footer {
    padding: 2rem 5%;
    background: #fff;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--brand);
    margin-top: auto;
    font-size: 0.85rem;
    animation: fadeInUp 0.6s ease-out;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

footer a:hover {
    color: var(--text-primary);
}

footer a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .link-grid {
        grid-template-columns: 1fr;
    }

    .quick-links {
        flex-direction: column;
    }

    .quick-link {
        justify-content: center;
    }

    footer {
        flex-direction: row;
        text-align: center;
    }
}

/* ===== Burger Menu ===== */
.burger-wrap {
    position: relative;
}

.burger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.burger-btn:hover {
    border-color: var(--text-primary);
}

.burger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.burger-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    overflow: hidden;
}

.burger-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.burger-dropdown a {
    display: block;
    padding: 0.7rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-light);
}

.burger-dropdown a:last-child {
    border-bottom: none;
}

.burger-dropdown a:hover {
    background: var(--accent-subtle, #f5f5f5);
    color: var(--brand);
    padding-left: 1.4rem;
}

/* ===== User Banner ===== */
.user-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.user-banner-name {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

.user-banner-name:hover {
    color: var(--text-primary);
    background: var(--accent-subtle, #f5f5f5);
}

.user-banner-arrow {
    transition: transform 0.3s ease;
}

.user-banner:hover .user-banner-arrow {
    transform: rotate(180deg);
}

.user-banner-logout {
    background: var(--red);
    color: #fff;
    padding: 0 1rem;
    border-radius: 0 0 6px 6px;
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.25s ease;  
    white-space: nowrap;
    text-align: center;
    position: absolute;
    top: 100%;
}

.user-banner:hover .user-banner-logout {
    opacity: 1;
    max-height: 40px;
    padding: 0.35rem 1rem;
}

.user-banner-logout:hover {
    filter: brightness(0.85);
}

/* ===== Remember Me Checkbox ===== */
.remember-group {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    /* align-items: center; */
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    accent-color: var(--brand);
    cursor: pointer;
}

.checkbox-label span {
    line-height: 1;
}

/* ===== Auth Pages (shared) ===== */
.auth-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.alert {
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #fee;
    border-left: 3px solid #c44;
    color: #933;
}

.alert-success {
    background: #efe;
    border-left: 3px solid #4c4;
    color: #393;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ===== Modal (shared) ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.15s ease-out;
}

.modal-content {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.2s ease-out;
}

.modal-content.modal-lg {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--accent-subtle);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    padding-bottom: 0.75rem;
    position: relative;
    border-bottom: none;
    opacity: 1;
    transform: none;
}

.modal-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand);
    transform-origin: left;
    animation: drawLine 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.modal-close:hover {
    color: var(--text-primary);
    background: #fff;
    transform: rotate(90deg);
}

.modal-content form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-content .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0;
}

.modal-content .form-group label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-content .form-group input,
.modal-content .form-group textarea,
.modal-content .form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content .form-group input:focus,
.modal-content .form-group textarea:focus,
.modal-content .form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
    transform: translateY(-1px);
}

.modal-content .form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* ===== Color Picker (shared) ===== */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
    background-clip: border-box;
}

.color-swatch:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--text-muted);
}

.color-swatch.selected {
    border-color: var(--brand);
    border-width: 3px;
    transform: scale(1.12);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

/* ===== Empty State (shared) ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    display: none;
}

.empty-state p {
    margin-top: 1rem;
    font-size: 1rem;
}
