/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@300;400;500;600;700&display=swap');

/* Base */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  font-family: 'Fira Sans', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* Navbar */
.navbar { position: fixed; top: 0; width: 100%; background: #d34836; transition: background-color 500ms cubic-bezier(0.22,1,0.25,1); z-index: 1000; backdrop-filter: blur(6px); }
.navbar:before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.25); z-index: 1; }
.nav-container { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 16px 20px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: 0.5px; font-size: 24px; }
.brand .brand-accent { color: #FFEA00; font-weight: 800; }
.nav-menu { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav-link { color: #fff; text-decoration: none; font-size: 20px; letter-spacing: 0.4px; position: relative; padding: 8px 4px; font-weight: 700; }
.nav-link:focus { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 2px; border-radius: 4px; }
.nav-link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: rgba(255,255,255,0.95); border-radius: 3px; }
.nav-link.cta {
  padding: 10px 16px;
  border-radius: 999px;
  background: #FFEA00;
  color: #111;
  font-weight: 800;
  border: 2px solid transparent;
}
.nav-link.cta:hover { background: #FDD835; }
.nav-link.cta:active { background: #FBC02D; }
.nav-link.cta:focus { outline: 3px solid rgba(255,255,255,0.85); outline-offset: 2px; }

.nav-toggle { display: none; background: transparent; border: 0; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* Sections background colors */
#home {
  /* Fill section with color from top to bottom */
  background-color: #d34836; /* base for navbar color-on-scroll */
  background-image: linear-gradient(180deg, #d34836 0%, #ff7043 100%);
  --quote-bg: #2196f3;
}
#screenshots { background-color: #212121; --quote-bg: #424242; }
#techspec { background-color: #FFA000; --quote-bg: #3f51b5; }
#faq { background-color: #5677fc; --quote-bg: #ffc107; }
#launch { background-color: #8e24aa; --quote-bg: #00e5ff; }

/* Rotating bright backgrounds for many sections */
.bg1 { background-color: #d34836; --quote-bg: #2196f3; }
.bg2 { background-color: #009688; --quote-bg: #e91e63; }
.bg3 { background-color: #FFA000; --quote-bg: #3f51b5; }
.bg4 { background-color: #5677fc; --quote-bg: #ffc107; }
.bg5 { background-color: #8e24aa; --quote-bg: #00e5ff; }

/* Custom section colors */
#s1 { background-color: #2ecc71; --quote-bg: #1b5e20; }

/* Sections layout */
section { position: relative; height: 100vh; display: grid; grid-template-columns: 70% 30%; align-items: center; scroll-margin-top: 90px; overflow: hidden; }
.section-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 48px 60px 90px; /* increased right padding for more gutter */
  text-align: left;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  overflow: auto; /* allow internal scroll if content exceeds viewport */
  justify-self: center; /* center the content block within left column */
  grid-column: 1;
}

/* Right-side section icon */
.section-icon { width: 160px; max-width: 26vw; height: auto; z-index: 2; pointer-events: none; justify-self: center; align-self: center; grid-column: 2; }
@media (max-width: 1024px) { .section-icon { width: 130px; } }
@media (max-width: 768px) { .section-icon { width: 110px; } }
@media (max-width: 520px) { .section-icon { display: none; } }

/* Make Home image big in the right column */
#home .section-icon { width: 100%; max-width: none; box-sizing: border-box; padding-right: 56px; }

/* Remove background for Home quote */
#home .quote { background: transparent; border: 0; }

/* Flat primary button (pill) */
.btn-3d {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 16px 32px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: #8e24aa;
  border: 2px solid transparent; /* keep same overall height as outline */
  box-shadow: none;
  transition: background-color 140ms ease;
}
.btn-3d:hover { background-color: #7b1fa2; }
.btn-3d:active { background-color: #6a1b9a; }
.btn-3d:focus-visible { outline: 3px solid rgba(255,255,255,0.85); outline-offset: 2px; }

/* Variants for Tech Specs and FAQ */
.btn-3d.btn-tech { background: #3F51B5; color: #fff; }
.btn-3d.btn-tech:hover { background: #5C6BC0; }
.btn-3d.btn-tech:active { background: #3949AB; }

.btn-3d.btn-faq { background: #424242; color: #fff; }
.btn-3d.btn-faq:hover { background: #616161; }
.btn-3d.btn-faq:active { background: #373737; }

.section-inner h1, .section-inner h2 { margin: 0; color: #fff; line-height: 1.05; }
.section-inner h1 { font-size: 80px; font-weight: 800; letter-spacing: 0.2px; }
.section-inner h2 { font-size: 80px; font-weight: 800; letter-spacing: 0.2px; }
.section-inner .desc { font-size: 29px; max-width: 900px; margin-top: 30px; color: rgba(255,255,255,0.95); font-weight: 500; }
.section-inner .quote {
  font-size: 29px;
  margin-top: 26px;
  font-weight: 600;
  color: #fff;
  display: block;
  padding: 16px 22px;
  border-radius: 14px;
  background: var(--quote-bg, #1e88e5);
  border: 1px solid rgba(255,255,255,0.22);
  position: relative;
  max-width: 900px;
  font-style: italic;
}

/* Screenshots grid */
.screenshot-grid { width: 100%; max-width: 1100px; margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.shot-card { background: transparent; border: 12px solid #424242; border-radius: 6px; overflow: hidden; transition: transform 200ms ease; box-sizing: border-box; }
.shot-card:hover { transform: translateY(-6px); box-shadow: 0 16px 30px rgba(0,0,0,0.2); }
.shot-media { width: 100%; aspect-ratio: 16/9; background: rgba(0,0,0,0.25); overflow: hidden; }
.shot-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-caption { padding: 10px 12px; font-weight: 600; color: #fff; text-align: center; letter-spacing: 0.3px; }

/* Screenshots section: full-width 2x grid, no right icon column, no labels */
#screenshots { display: block; height: auto; }
#screenshots .section-icon { display: none !important; }
#screenshots .section-inner { max-width: none; width: 100%; margin: 0; padding: 60px 80px; overflow: visible; box-sizing: border-box; }
#screenshots .screenshot-grid { max-width: none; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 24px; }
#screenshots .shot-caption { display: none; }


/* Tech spec grid */
.spec-grid { width: 100%; max-width: 1100px; margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.spec-card { background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.25); border-radius: 14px; padding: 18px 16px; text-align: left; }
.spec-card h3 { margin: 0 0 8px 0; font-size: 26px; color: #fff; }
.spec-card p { margin: 0; color: rgba(255,255,255,0.92); line-height: 1.6; font-size: 18px; }

/* FAQ accordion */
.faq-list { width: 100%; max-width: 900px; margin-top: 36px; text-align: left; }
.faq-item { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.22); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; background: transparent; color: #fff; text-align: left; border: 0; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; font-size: 26px; font-weight: 800; cursor: pointer; letter-spacing: 0.3px; }
.faq-q:focus { outline: 2px solid rgba(255,255,255,0.6); outline-offset: -2px; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 300ms ease; background: rgba(0,0,0,0.25); padding: 0; }
.faq-a p { margin: 0; padding: 12px 22px 22px; color: rgba(255,255,255,0.95); font-size: 22px; font-weight: 500; }
.faq-a ul { margin: 0 0 12px; padding: 4px 22px 22px 44px; }
.faq-a li { font-size: 22px; color: rgba(255,255,255,0.95); line-height: 1.6; font-weight: 500; }
.faq-item.active .faq-a { max-height: 1200px; padding: 18px 0 22px; }

/* FAQ controls */
.faq-controls { display: flex; gap: 10px; margin: 8px 0 14px; }
.faq-controls .mini-btn { background: rgba(0,0,0,0.25); color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.faq-controls .mini-btn:hover { background: rgba(255,255,255,0.18); }
.faq-item .chev { font-weight: 800; font-size: 26px; margin-left: 12px; }
.faq-item.active .chev { content: "−"; }

/* CTA buttons */
.cta-buttons { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-block; text-decoration: none; border-radius: 999px; padding: 14px 22px; font-weight: 700; letter-spacing: 0.4px; }
.btn.primary { color: #111; background: linear-gradient(135deg, #fff 0%, #ffd54f 100%); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.btn.secondary { color: #fff; border: 2px solid rgba(255,255,255,0.85); }

/* Footer */
.footer { width: 100%; padding: 28px 20px 40px; text-align: center; color: rgba(255,255,255,0.9); background: #212121; }
.built { margin-top: 8px; font-size: 48px; font-weight: 800; }

/* Back to top */
#backToTop { position: fixed; right: 22px; bottom: 22px; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; color: #111; font-size: 22px; font-weight: 800; background: #FFEA00; display: none; }
#backToTop:hover { background: #FDD835; }
#backToTop:active { background: #FBC02D; }
#backToTop:focus { outline: 3px solid rgba(255,255,255,0.8); outline-offset: 2px; }

/* Wave divider */
.wave-divider { position: relative; width: 100%; height: 280px; line-height: 0; overflow: hidden; margin-top: -280px; pointer-events: none; }
.wave-svg { display: block; width: 100%; height: 100%; }
.wave-svg path { transition: fill 300ms ease; }

/* Home wave background */
#home .wave-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
#home .wave-bg-svg { width: 100%; height: 100%; display: block; }

/* Responsive */
@media (max-width: 1024px) {
  .section-inner h1, .section-inner h2 { font-size: 62px; }
  .screenshot-grid, .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .wave-divider { height: 220px; margin-top: -220px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu { position: absolute; right: 16px; top: 58px; flex-direction: column; gap: 8px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.25); padding: 12px; border-radius: 12px; display: none; }
  .nav-menu.open { display: flex; }
  section { grid-template-columns: 1fr; }
  .section-inner { padding: 100px 16px 60px; grid-column: 1; justify-self: stretch; }
  .section-inner h1, .section-inner h2 { font-size: 46px; }
  .built { font-size: 40px; }
  .wave-divider { height: 180px; margin-top: -180px; }
}

@media (max-width: 520px) {
  .section-inner h1, .section-inner h2 { font-size: 40px; }
  .section-inner .desc { font-size: 22px; }
  .section-inner .quote { font-size: 24px; padding: 12px 16px; }
  .screenshot-grid, .spec-grid { grid-template-columns: 1fr; }
  .wave-divider { height: 160px; margin-top: -160px; }
}
#home { grid-template-columns: 60% 40%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Outline buttons */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px; /* same as launch button */
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  background: transparent; /* no background */
  border: 2px solid rgba(255,255,255,0.9);
  font-weight: 800;
  font-size: 22px; /* match launch button */
  letter-spacing: 0.3px;
  box-shadow: none;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline:active { background: rgba(255,255,255,0.25); }
.btn-outline:focus-visible { outline: 3px solid rgba(255,255,255,0.85); outline-offset: 2px; }
#techspec, #faq { height: auto; display: block; overflow: visible; }
#techspec .section-inner, #faq .section-inner { height: auto; overflow: visible; max-width: 1100px; margin: 0 auto; padding: 60px 24px; }
#techspec .section-icon, #faq .section-icon { display: none !important; }
