/* =========================================
   ROUGHTAKE — Design System
   Brand: #5114FF | Dark UI
   Font: Inter (Google Fonts)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --purple:        #5114FF;
  --purple-dark:   #3a0db8;
  --purple-light:  #7b4fff;
  --purple-glow:   rgba(81, 20, 255, 0.25);
  --bg:            #08080f;
  --surface:       #111118;
  --surface-2:     #1a1a25;
  --border:        rgba(255,255,255,0.08);
  --text:          #ffffff;
  --text-muted:    #8888a0;
  --text-subtle:   #55556a;
  --radius:        16px;
  --radius-sm:     10px;
  --radius-pill:   100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* --- Typography Scale --- */
.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   NAV
   ========================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
}
.nav__logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

.nav__cta {
  background: var(--purple);
  color: #fff !important;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s !important;
}
.nav__cta:hover {
  background: var(--purple-dark) !important;
  transform: translateY(-1px);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav__mobile a:hover { color: var(--text); }
.nav__mobile .nav__cta {
  margin: 16px 24px;
  text-align: center;
  border-radius: var(--radius-pill);
  border: none;
  color: #fff !important;
  background: var(--purple);
}

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 80px;
  text-align: center;
}

/* YouTube background — pulls 120px above hero top to eliminate black gap */
.hero__video-bg {
  position: absolute;
  top: -450px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  /* scale(1.15) zooms the iframe slightly so YouTube's letterbox
     bars are pushed off all four edges — no black borders visible */
  transform: translate(-50%, -50%) scale(1.15);
  width: 177.78vh;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
}

/* Gradient overlay: nearly transparent at top (glitch shows raw),
   darkens in middle so logo/text stay readable, solid at base */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,8,15,0.10) 0%,
    rgba(8,8,15,0.08) 20%,
    rgba(8,8,15,0.45) 55%,
    rgba(8,8,15,0.92) 85%,
    rgba(8,8,15,1.00) 100%
  );
  pointer-events: none;
}

/* Content sits above video + overlay */
.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 120px;
}

/* Big wordmark — white silhouette with purple glow */
.hero__logotype {
  display: block;
  width: min(520px, 82%);
  margin: 0 auto 28px;
  filter: brightness(0) invert(1) drop-shadow(0 0 36px rgba(81,20,255,0.75));
}

.hero__headline {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: #fff;
}

.hero__sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  max-width: 540px;
  width: fit-content;
  margin: 0 auto 40px;
  line-height: 1.75;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 24px;
  border-radius: 12px;
}

.hero__buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.btn-store:hover {
  border-color: var(--purple);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.btn-store svg { flex-shrink: 0; }

.btn-store--primary {
  background: var(--purple);
  border-color: var(--purple);
}
.btn-store--primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
}

.hero__image {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
}
.hero__image img { width: 100%; }

/* =========================================
   HOW IT WORKS
   ========================================= */
.section {
  padding: 100px 0;
}

.section__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 14px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section__sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

.how__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
}

.how__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: border-color 0.2s, transform 0.2s;
}
.how__card:hover {
  border-color: rgba(81, 20, 255, 0.4);
  transform: translateY(-4px);
}

.how__icon {
  width: 48px;
  height: 48px;
  background: rgba(81, 20, 255, 0.15);
  border: 1px solid rgba(81, 20, 255, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.4rem;
}

.how__step {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 10px;
}

.how__card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.how__card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* =========================================
   PHONES SHOWCASE
   ========================================= */
.phones-showcase {
  padding: 100px 0 160px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.phones-showcase__header {
  text-align: center;
  margin-bottom: 80px;
}
.phones-showcase__header .section__sub { margin: 0 auto; }

.phones-showcase__stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
}

/* Phone parallax wrappers */
.phone-parallax {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  will-change: transform;
  position: relative;
}

/* Subtle brand glow under each phone */
.phone-parallax::after {
  content: '';
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 140px;
  background: radial-gradient(ellipse, rgba(81,20,255,0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* The phone body */
.phone-frame {
  position: relative;
  z-index: 1;
  width: 218px;
  background: #0c0c0e;
  border-radius: 48px;
  padding: 14px 9px 20px;
  /* Outer chrome ring + shadow */
  box-shadow:
    0 0 0 1.5px #2a2a2e,
    0 0 0 4px #0a0a0c,
    0 48px 90px rgba(0,0,0,0.65),
    0 12px 30px rgba(0,0,0,0.4);
}

/* Right side: power button + volume */
.phone-frame::before {
  content: '';
  position: absolute;
  right: -4.5px;
  top: 110px;
  width: 4px;
  height: 56px;
  background: #1d1d22;
  border-radius: 0 3px 3px 0;
}

/* Left side: mute + two volume buttons */
.phone-frame::after {
  content: '';
  position: absolute;
  left: -4.5px;
  top: 86px;
  width: 4px;
  height: 30px;
  background: #1d1d22;
  border-radius: 3px 0 0 3px;
  box-shadow: 0 42px 0 #1d1d22, 0 76px 0 #1d1d22;
}

/* Screen area — fixed height keeps all three phones the same size */
.phone-frame__screen {
  position: relative;
  border-radius: 38px;
  overflow: hidden;
  background: #000;
  height: 432px;
}

/* Dynamic island */
.phone-frame__screen::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 26px;
  background: #0c0c0e;
  border-radius: 20px;
  z-index: 10;
}

.phone-frame__screen img {
  width: 100%;
  display: block;
  /* Long images start at top; JS will scroll them */
  transform-origin: top center;
  will-change: transform;
}

/* Labels below phones */
.phone-label {
  text-align: center;
  position: relative;
  z-index: 1;
}
.phone-label strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.phone-label span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive — stack vertically, disable parallax */
@media (max-width: 768px) {
  .phones-showcase__stage {
    flex-direction: column;
    align-items: center;
    gap: 48px;
  }
  .phone-parallax {
    transform: none !important;
  }
}

/* =========================================
   TAGLINE / SECOND CTA
   ========================================= */
.cta-band {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(81,20,255,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.cta-band__tagline {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-muted);
  margin-bottom: 48px;
}
.cta-band__tagline strong {
  color: var(--text);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__logo {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.footer__logo span { color: var(--purple); }

.footer__links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.footer__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--text); }

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-subtle);
  width: 100%;
  margin-top: 8px;
}

/* =========================================
   CONTACT PAGE
   ========================================= */
.contact-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 80px 0;
}

.contact__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px 48px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.contact__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.contact__sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

.form__group {
  margin-bottom: 20px;
}
.form__group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.form__group input,
.form__group textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form__group input:focus,
.form__group textarea:focus {
  border-color: var(--purple);
}
.form__group input::placeholder,
.form__group textarea::placeholder {
  color: var(--text-subtle);
}
.form__group textarea { min-height: 140px; }

.btn-submit {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--purple);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 8px;
}
.btn-submit:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .hero { padding: 64px 0 60px; }
  .section { padding: 72px 0; }

  .how__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .screenshots__grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__links { flex-wrap: wrap; gap: 16px; }

  .contact__card { padding: 36px 24px; }
}

@media (max-width: 480px) {
  .hero__headline { font-size: 2.25rem; }
  .hero__buttons { flex-direction: column; align-items: center; }
  .btn-store { width: 220px; justify-content: center; }
}
