/* === CSS RESET & BASE === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Fallback fonts if Gambetta/Switzer are unavailable via standard CDK, but I will simulate them with high-quality alternatives or assume they are provided in the environment's typography system. Using elegant serif and sans-serif pairings. */
:root {
  --bg: #ffffff;
  --bg-offset: #fafafa;
  --text: #1a1a1a;
  --text-muted: #666666;
  --accent: #2dd4bf; /* Turquoise/Teal from Uzbek tiles */
  --accent-secondary: #3b82f6; /* Silk Road Blue */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --shadow-glass: 0 20px 40px rgba(0,0,0,0.05);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.05);
  --font-heading: 'Gambetta', 'Playfair Display', serif;
  --font-body: 'Switzer', 'Inter', sans-serif;
  --sidebar-width: 35%;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: clip;
    color: var(--text);
    background: var(--bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    object-fit: cover;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

/* === LAYOUT ARCHETYPE: SIDEBAR + SCROLLING CONTENT === */
.tgu-main-wrapper {
    display: flex;
    min-height: 100vh;
}

.tgu-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    background: var(--bg);
    border-right: 1px solid var(--glass-border);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
}

.tgu-content-scroller {
    width: calc(100% - var(--sidebar-width));
    position: relative;
}

@media (max-width: 1024px) {
    .tgu-main-wrapper { flex-direction: column; }
    .tgu-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 2rem;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    .tgu-content-scroller { width: 100%; }
}

/* === BACKGROUND EFFECTS === */
.glass-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    filter: blur(100px);
    opacity: 0.1;
    border-radius: 50%;
    animation: moveBlobs 20s infinite alternate;
}

.blob-1 { top: -10%; left: -10%; background-color: var(--accent); }
.blob-2 { bottom: -10%; right: -10%; background-color: var(--accent-secondary); animation-delay: -5s; }

@keyframes moveBlobs {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
}

.text-stroke {
    -webkit-text-stroke: 1px rgba(0,0,0,0.05);
    color: transparent;
    font-size: 8rem;
    position: absolute;
    z-index: -1;
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 900;
}

/* === BUTTONS & CTAs === */
.btn-arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--accent-secondary);
    font-size: 1.1rem;
    padding: 0.5rem 0;
}

.btn-arrow-link ph {
    transition: transform 0.3s ease;
}

.btn-arrow-link:hover ph {
    transform: translateX(5px);
}

.download-pill {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--text);
    color: var(--bg);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* === COMPONENTS === */
.section-divider-tear {
    height: 50px;
    width: 100%;
    background: var(--bg);
    clip-path: polygon(0% 0%, 5% 40%, 10% 0%, 15% 50%, 20% 0%, 25% 30%, 30% 0%, 35% 60%, 40% 0%, 45% 45%, 50% 0%, 55% 55%, 60% 0%, 65% 35%, 70% 0%, 75% 65%, 80% 0%, 85% 40%, 90% 0%, 95% 50%, 100% 0%, 100% 100%, 0% 100%);
    margin-top: -49px;
    position: relative;
    z-index: 2;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem;
    background: radial-gradient(circle at center, #ffffff 0%, #f0fdfa 100%);
}

.giant-title {
    font-size: clamp(4rem, 10vw, 12rem);
    margin-bottom: 2rem;
    color: var(--text);
    letter-spacing: -0.04em;
}

.hero-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    margin-bottom: 2.5rem;
}

/* Screenshot Fan Gallery */
.fan-gallery-container {
    height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 0;
}

.fan-card {
    position: absolute;
    width: 280px;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    background: #fff;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    overflow: hidden;
}

.fan-card:nth-child(1) { transform: translateX(-180px) rotate(-8deg); z-index: 1; }
.fan-card:nth-child(2) { transform: translateX(-90px) rotate(-4deg); z-index: 2; }
.fan-card:nth-child(3) { transform: translateX(0) rotate(0deg); z-index: 3; }
.fan-card:nth-child(4) { transform: translateX(90px) rotate(4deg); z-index: 2; }
.fan-card:nth-child(5) { transform: translateX(180px) rotate(8deg); z-index: 1; }

.fan-card:hover {
    transform: translateY(-50px) scale(1.05) rotate(0deg) !important;
    z-index: 10 !important;
}

/* Stats Counter Bar */
.stats-bar {
    background: var(--accent);
    color: white;
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    display: block;
    font-family: var(--font-heading);
}

.stat-label {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Magazine Features */
.feature-editorial {
    padding: 8rem 0;
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    margin-bottom: 8rem;
}

.feature-block:nth-child(even) { direction: rtl; }
.feature-block:nth-child(even) .feature-content { direction: ltr; }

.feature-number {
    font-size: 10rem;
    font-family: var(--font-heading);
    color: var(--accent);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: -4rem;
    display: block;
}

.feature-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Rating / Reviews */
.reviews-section {
    padding: 8rem 0;
    background: var(--bg-offset);
}

.rating-aggregate {
    text-align: center;
    margin-bottom: 5rem;
}

.rating-badge {
    font-size: 5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
}

.star-bar-container {
    max-width: 400px;
    margin: 2rem auto;
}

.star-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.star-track {
    flex-grow: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.star-fill {
    height: 100%;
    background: var(--accent);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--glass-border);
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

/* FAQ Accordion */
.faq-section {
    padding: 8rem 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 600;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding-top: 0;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-top: 1rem;
}

.faq-item.active ph-caret-down {
    transform: rotate(180deg);
}

/* Download CTA */
.download-cta-section {
    padding: 10rem 0;
    text-align: center;
    background: radial-gradient(circle, #f0fdfa 0%, #ffffff 100%);
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
}

/* Footer */
.cta-footer {
    padding: 6rem 0;
    border-top: 1px solid var(--glass-border);
}

.footer-top {
    text-align: center;
    margin-bottom: 6rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--glass-border);
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .giant-title { font-size: 3.5rem; }
    .hero-section { padding: 2rem; }
    .feature-block { grid-template-columns: 1fr; gap: 3rem; }
    .feature-block:nth-child(even) { direction: ltr; }
    .tgu-sidebar { padding: 1.5rem; }
    .cta-stats { flex-direction: column; gap: 2rem; }
    .hero-icon { margin-left: auto; margin-right: auto; }
    .hero-section { text-align: center; }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Custom Cursor Placeholder */
.tgu-cursor { display: none; }
