/* ==========================================================================
   in999official.in — Main Stylesheet
   Author: Chintu Sharma
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    /* Colors */
    --gold: #FFD700;
    --gold-dark: #D4AF37;
    --gold-light: #FFE57F;
    --dark-bg: #0A0E17;
    --dark-secondary: #05080E;
    --card-bg: #151C2C;
    --card-border: rgba(255, 255, 255, 0.06);
    --text-main: #FFFFFF;
    --text-sub: #A0AABF;
    --text-muted: #6B7488;
    --success: #00C853;
    --success-light: #00E676;
    --info: #2979FF;
    --info-light: #00B0FF;
    --telegram: #0088CC;
    --danger: #FF5252;

    /* Gradients */
    --green-gradient: linear-gradient(135deg, #00C853, #00E676);
    --blue-gradient: linear-gradient(135deg, #2979FF, #00B0FF);
    --gold-gradient: linear-gradient(135deg, #FFD700, #FFA000);
    --telegram-gradient: linear-gradient(135deg, #0088CC, #00B0FF);
    --dark-gradient: linear-gradient(180deg, #0A0E17 0%, #151C2C 100%);

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 6px 24px rgba(255, 215, 0, 0.25);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    font-weight: 700;
    color: var(--text-main);
}

h1 { font-size: 2.5rem; margin-bottom: var(--space-md); }
h2 { font-size: 1.8rem; margin-bottom: var(--space-md); color: var(--gold); }
h3 { font-size: 1.3rem; margin-bottom: var(--space-sm); }
h4 { font-size: 1.1rem; margin-bottom: var(--space-sm); }

p {
    margin-bottom: var(--space-md);
    color: var(--text-sub);
}

strong { color: var(--text-main); font-weight: 600; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-2xl) 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    padding: var(--space-md) 0;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 1px;
}

.header__nav {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.9rem;
    color: var(--text-sub);
}

.header__nav a:hover {
    color: var(--gold);
}

.header__cta {
    display: flex;
    gap: var(--space-sm);
}

/* ---------- Buttons (3-Button System) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Primary: Register */
.btn--register {
    background: var(--green-gradient);
    color: #00220A;
    box-shadow: var(--shadow-md);
}

.btn--register:hover {
    box-shadow: 0 8px 28px rgba(0, 230, 118, 0.4);
}

/* Secondary: Login */
.btn--login {
    background: var(--blue-gradient);
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* Tertiary: Telegram */
.btn--telegram {
    background: var(--telegram-gradient);
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* Gold variant (bonus CTAs) */
.btn--gold {
    background: var(--gold-gradient);
    color: #1A0F00;
    box-shadow: var(--shadow-gold);
}

/* Sizes */
.btn--lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn--block {
    width: 100%;
}

/* ---------- Cards ---------- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: transform var(--transition-base), border-color var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.3);
}

.card h3 {
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

/* ---------- Hero ---------- */
.hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.hero__title span {
    color: var(--gold);
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--text-sub);
    max-width: 700px;
    margin: 0 auto var(--space-xl);
}

.hero__image {
    width: 100%;
    max-width: 800px;
    margin: 0 auto var(--space-xl);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: var(--shadow-lg);
}

.hero__cta {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* ---------- FAQ ---------- */
.faq {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq__item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq__question {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    background: transparent;
    cursor: pointer;
    transition: background var(--transition-base);
}

.faq__question:hover {
    background: rgba(255, 215, 0, 0.05);
}

.faq__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
}

.faq__item.active .faq__icon {
    transform: rotate(180deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq__item.active .faq__answer {
    max-height: 500px;
    padding: 0 var(--space-lg) var(--space-md);
}

.faq__answer p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-sub);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--dark-secondary);
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
    font-size: 0.88rem;
    color: var(--text-sub);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer__col h4 {
    color: var(--gold);
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.footer__col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer__col ul a {
    color: var(--text-sub);
    font-size: 0.88rem;
}

.footer__col ul a:hover {
    color: var(--gold);
}

.footer__disclaimer {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer__disclaimer p {
    margin-bottom: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ---------- Mobile Sticky CTA ---------- */
.mobile-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-sm);
    z-index: 999;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    gap: var(--space-sm);
}

.mobile-cta .btn {
    flex: 1;
    font-size: 0.72rem;
    padding: 0.7rem 0.4rem;
    gap: 0.3rem;
}

.mobile-cta .btn svg {
    width: 14px;
    height: 14px;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    padding: var(--space-md) 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: var(--space-sm);
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-sub);
}

.breadcrumbs a:hover {
    color: var(--gold);
}

/* ---------- Author Box ---------- */
.author-box {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.author-box__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    flex-shrink: 0;
    object-fit: cover;
}

.author-box__info h4 {
    color: var(--gold);
    margin-bottom: var(--space-xs);
}

.author-box__info p {
    font-size: 0.88rem;
    margin: 0;
}
/* Technical audit: progressive FAQ, natural image proportions and overflow safety. */
.faq:not(.faq--enhanced) .faq__answer { max-height: none; padding: 0 var(--space-lg) var(--space-md); }
.faq.faq--enhanced .faq__answer { max-height: none; display: none; }
.faq.faq--enhanced .faq__item.active .faq__answer { display: block; max-height: none; padding: 0 var(--space-lg) var(--space-md); }
.hero__image, .page-hero__image { height: auto; max-height: 680px; width: auto; max-width: 100%; object-fit: contain; }
.author-box__avatar { width: 64px; height: 64px; }
main, .container { min-width: 0; }
main img.page-hero__image, main img.hero__image { width: auto; height: auto; max-width: min(100%, 400px); object-fit: contain; }
@media (max-width:768px) { main img.page-hero__image, main img.hero__image { max-width: min(100%,320px); } }
.table-wrap { overflow-x: auto; }
@media (max-width: 768px) { .header__nav { display: flex; flex-wrap: wrap; gap: .65rem; width: 100%; font-size: .85rem; } }
/* Keep the small author portrait out of article screenshot sizing rules. */
main img.author-box__avatar { width:64px; height:64px; flex:0 0 64px; object-fit:cover; }
.author-box__info { min-width:0; overflow-wrap:anywhere; }

/* Audit: readable small text and fewer unnecessary paint effects. */
.breadcrumbs li[aria-current="page"], .footer__disclaimer, .footer__disclaimer p { color:#b9c2d0; }
.header__cta, .mobile-cta a, .btn { transition:background-color .2s,color .2s,transform .2s; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }
