/* === TOWER BUILDER STACK PREMIUM STYLES === */

/* === FONTS === */
@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@800,700,400&f[]=general-sans@400,500,600&display=swap');

/* === CSS RESET & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Theme: LIGHT MANDATORY */
  --bg: #fafaf9;
  --bg-alt: #f1f1ef;
  --text: #292524;
  --text-muted: #57534e;
  --accent: #d97706; /* Warm amber/gold for tower blocks */
  --accent-soft: #fef3c7;
  --pastel-blue: #e0f2fe;
  --pastel-rose: #fff1f2;
  --pastel-green: #f0fdf4;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.05);
  --shadow-glass: 0 8px 32px 0 rgba(120, 113, 108, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);

  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  --nav-height: 80px;
}

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

body {
  font-family: 'General Sans', system-ui, sans-serif;
  line-height: 1.6;
  font-size: 18px;
  overflow-x: clip;
  color: var(--text);
  background: var(--bg);
}

/* Background Texture: Moving diagonal stripes */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(217, 119, 6, 0.02) 40px,
    rgba(217, 119, 6, 0.02) 80px
  );
  background-size: 200% 200%;
  animation: stripeMove 60s linear infinite;
}

@keyframes stripeMove {
  from { background-position: 0 0; }
  to { background-position: 200% 0; }
}

h1, h2, h3, h4 {
  font-family: 'Cabinet Grotesk', sans-serif;
  line-height: 1.1;
  font-weight: 800;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

/* === STRUCTURAL BASELINES === */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

section {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

/* Spacing Strategy: Tight-then-expand */
.section-start { padding: 4rem 0; }
.section-mid { padding: 5rem 0; }
.section-end { padding: 8rem 0; }

/* === UI COMPONENTS === */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-glass);
}

.btn-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-alt);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-tag:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.btn-tag i {
  font-size: 1.2rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: var(--accent);
  z-index: 1001;
  transition: width 0.1s ease-out;
}

/* === 1. NAVIGATION === */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(250, 250, 249, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.nav-links {
  display: none;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
}

.nav-cta {
  display: flex;
  align-items: center;
}

.mobile-toggle {
  display: block;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-toggle { display: none; }
}

/* === 2. HERO === */
.tower-hero {
  padding-top: calc(var(--nav-height) + 4rem);
  text-align: center;
  background: radial-gradient(circle at center, var(--accent-soft) 0%, transparent 70%);
  min-height: 90vh;
  display: flex;
  align-items: center;
  background-attachment: fixed; /* Parallax */
}

.hero-icon {
  width: 160px;
  height: 160px;
  margin: 0 auto 2.5rem;
  border-radius: 40px;
  box-shadow: 0 20px 40px -10px rgba(217, 119, 6, 0.3);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.hero-rating i { color: #f59e0b; }

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .hero-icon { width: 120px; height: 120px; }
}

/* === 3. REVIEWS (Ticker) === */
.reviews-section {
  padding: 4rem 0;
  background: var(--bg-alt);
}

.ticker-wrap {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  position: relative;
}

.ticker {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.review-card {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  width: 350px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-stars {
  color: #f59e0b;
  font-size: 0.9rem;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text);
  font-style: italic;
}

.review-user {
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.aggregate-rating {
  text-align: center;
  margin-top: 3rem;
}

.rating-badge-lg {
  display: inline-block;
  padding: 1.5rem 3.5rem;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.05);
}

.rating-score {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Cabinet Grotesk', sans-serif;
}

/* === 4. SCREENSHOT GALLERY (Masonry) === */
.gallery-section {
  background: #fff;
}

.masonry-grid {
  columns: 1;
  column-gap: 16px;
}

@media (min-width: 768px) { .masonry-grid { columns: 2; } }
@media (min-width: 1024px) { .masonry-grid { columns: 3; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.masonry-item:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
}

.masonry-item img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: contain; /* Prevent vertical stretching */
}

/* === 5. FEATURES (Grid Cards) === */
.features-section {
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  padding: 2.5rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glass);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* === 6. STATS (Bold Strips) === */
.stats-section {
  padding: 0; /* Strips are edge-to-edge in their own boxes */
}

.stat-strip {
  padding: 4rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-strip:nth-child(odd) { background: #fff; }
.stat-strip:nth-child(even) { background: var(--bg-alt); }

.stat-number {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 6rem;
  line-height: 1;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .stat-number { font-size: 3.5rem; }
  .stat-label { font-size: 1rem; }
}

/* === 7. DOWNLOAD CTA (Frosted Glass) === */
.cta-section {
  background: linear-gradient(135deg, var(--accent-soft), var(--pastel-blue));
  display: flex;
  justify-content: center;
}

.cta-glass-card {
  max-width: 800px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.cta-glass-card img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
}

.cta-title { font-size: 3rem; }

/* === 8. FOOTER === */
.main-footer {
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #fff;
  padding: 6rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  padding: 2px;
}

.footer-desc {
  max-width: 300px;
  opacity: 0.9;
  font-size: 0.95rem;
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-link {
  font-size: 0.95rem;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-link:hover {
  opacity: 1;
  padding-left: 5px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  font-size: 1.25rem;
  transition: var(--transition);
}

.social-link:hover { transform: translateY(-3px); }

/* Newsletter Signup */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  color: #fff;
  flex: 1;
}

.newsletter-input::placeholder { color: rgba(255,255,255,0.6); }

.newsletter-btn {
  background: #fff;
  color: var(--accent);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: none;
  cursor: pointer;
}

/* === ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--accent);
  opacity: 0.3;
  padding: 2rem 0;
}

.divider-line {
  height: 1px;
  border-top: 2px dashed var(--accent);
  flex: 1;
}

/* RESPONSIVE PROTECTOR */
img { max-width: 100%; height: auto; display: block; }

.screenshot-img, .hero img:not(.icon) {
  max-width: 320px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
}
